草庐IT

port_range

全部标签

Destination unreachable(Port unreachable) 错误原因和解决办法

        Destinationunreachable(Portunreachable)是一条由网络设备(如路由器或防火墙)生成的ICMP(InternetControlMessageProtocol)错误消息,用于通知源设备目标设备或端口无法到达。一、什么是ICMPICMP(InternetControlMessageProtocol)是一种网络协议,用于在IP网络中传输错误消息和操作控制消息。它是在网络层(OSI模型的第三层)上运行的协议,主要用于网络设备之间进行通信和交互。ICMP的主要功能包括:(一)错误报告:ICMP被用于向源设备发送错误报告,以指示在数据包传输过程中发生了什么

解决git报错:ssh:connect to host github.com port 22: Connection timed out

如题,git使用中突然报错ssh:connecttohostgithub.comport22:Connectiontimedout通过查阅各种资料,得知原因可能是由于电脑的防火墙或者其他网络原因导致ssh连接方式端口22被封锁。解决方法一:抛弃ssh连接方式,使用http连接。gitconfig--local-e将配置文件的url=git@github.com:username/repo.git一行改为:url=https://github.com/username/repo.git方法二:如果22号端口不行,那就换一个端口进入.ssh文件夹 创建一个config文件将下面的内容复制进去Hos

【win11】Thinkpad14+显示器分屏问题(display port dp口转type-c)

背景:显示屏dp转dp且主机没有dp口打开右下角开关,设置信号输入为dp模式确认电脑typec口可以传输音视频购买dp母转typec线win+x打开设备管理器,找到显示适配器启用如果显失败需要下载驱动软件驱动下载地址下载完后重启,再win+x打开适配器右键启用win+p投屏

ios - 将 Range<Int> 转换为 Range<String.Index>

下面的函数给出了NSString,从该字符串中删除HTML标记并将结果也作为NSString返回.privatefuncremoveHTMLTags(source:NSString)->NSString{varrange=NSMakeRange(0,0)letHTMLTags="]*>"varsourceString=sourcewhilesourceString.rangeOfString(HTMLTags,options:NSStringCompareOptions.RegularExpressionSearch).location!=NSNotFound{range=source

ios - 将 Range<Int> 转换为 Range<String.Index>

下面的函数给出了NSString,从该字符串中删除HTML标记并将结果也作为NSString返回.privatefuncremoveHTMLTags(source:NSString)->NSString{varrange=NSMakeRange(0,0)letHTMLTags="]*>"varsourceString=sourcewhilesourceString.rangeOfString(HTMLTags,options:NSStringCompareOptions.RegularExpressionSearch).location!=NSNotFound{range=source

postgresql13远程连接报错 Connection to 117.50.184.237:5432 refused. Check that the hostname and port are c

报错信息Connectiontohostname:portrefused.CheckthatthehostnameandportarecorrectandthatthepostmasterisacceptingTCP/IPconnections.Connectionrefused:nofurtherinformation解决方案修开配置文件vim/var/lib/pgsql/13/data/postgresql.conf添加以下内容并保存如图listen_addresses='*'重启systemctlrestartpostgresql-13.service再次连接报错FATAL:nopg_h

解决UnicodeEncodeError: ‘ascii‘ codec can‘t encode characters in position xxx: ordinal not in range

在调用一个库时,出现了一个异常报错类似如UnicodeEncodeError:'ascii'codeccan'tencodecharactersinposition0-1:ordinalnotinrange(128),只要该库返回结果包含中文,该结果时就会出现该异常。原因:Python2默认使用ASCII编码,ASCII编码不包含中文,处理中文时会报错Python3更换为默认使用Unicode编码解决方法(任选其一):1.在文件首部添加#coding=utf-82.在python的Lib\site-packages文件夹下新建一个sitecustomize.py,内容为:#encoding=u

ios - fatal error : Index out of range

我想展示我音乐库中的25首歌曲。这是我的代码:varallSongsArray:[MPMediaItem]=[]letsongsQuery=MPMediaQuery.songsQuery()funcnumberOfSectionsInTableView(tableView:UITableView)->Int{return1}functableView(tableView:UITableView,numberOfRowsInSectionsection:Int)->Int{return25//allSongsArray.count}functableView(tableView:UITa

ios - fatal error : Index out of range

我想展示我音乐库中的25首歌曲。这是我的代码:varallSongsArray:[MPMediaItem]=[]letsongsQuery=MPMediaQuery.songsQuery()funcnumberOfSectionsInTableView(tableView:UITableView)->Int{return1}functableView(tableView:UITableView,numberOfRowsInSectionsection:Int)->Int{return25//allSongsArray.count}functableView(tableView:UITa

Failed to connect to github.com port 443: Connection refused问题解决

1、关闭代理再重启gitconfig--global--unsethttp.proxygitconfig--global--unsethttps.proxy添加全局代理:gitconfig--globalhttp.proxygitconfig--globalhttps.proxy2、更改ip首先通过下面网站获取gitiphttps://ipaddress.com/website/github.comhttps://ipaddress.com/website/github.comsudogedit/etc/hostsC:\Windows\System32\drivers\etc然后根据自己的系统