Mac電腦下使用Socket報錯socket丟擲Can’t assign requested address解決
最近在學習Socket,在使用 UDP 組播的時候,死活報錯。
一直 Can't assign requested address
在網上查了幾篇文章,得到了解決
解決方法
方法一、(測試沒通過)
禁用IPv6
具體方法,可以百度(mac如何禁用ipv6)
方法二、新增環境變數(測試沒通過)
在etc下面的profile檔案(字尾忘了,大概是cnf)中增加
export JAVA_OPTS="-Djava.net.preferIPv4Stack=true"
方法三、在IDE裡配置JVM引數(測試通過可行)
在 VM options 裡新增 -Djava.net.preferIPv4Stack=true 即可
參考
http://wenson.iteye.com/blog/578160
https://stackoverflow.com/questions/18747134/getting-cant-assign-requested-address-java-net-socketexception-using-ehcache
http://blog.csdn.net/petershusheng/article/details/77149254
相關文章
- k8s 環境下Cannot assign requested address問題解決K8S
- Can't Connect to MySQL Server on IP Address (10061) 錯誤的解決方案MySqlServer
- 【Socket】解決UDP丟包問題UDP
- linux下連線mysql報錯ERROR 2002 (HY000): Can‘t connect to local MySQL server through socket ‘/var/lib/mysqLinuxMySqlErrorServer
- Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock錯誤MySqlServer
- mysql 啟動報錯Can't connect to local MySQL server through socket '/data/mysql/mysql/mysql.sock'(111)MySqlServer
- Window中安裝gitblit時,IP地址或埠衝突,提示Cannot assign requested address: bind的詳細解決方法Git
- socket在python下的使用Python
- eslint --fix 報錯 can't not find modulesEsLint
- Supervisor 解決 can't find command *
- socket 的使用
- 網路協議之:socket協議詳解之Socket和Stream Socket協議
- 使用Socket進行HTTP請求與報文講解HTTP
- 蘋果Mac電腦安裝Axure首次開啟報錯解決方案蘋果Mac
- Python報錯:UnicodeDecodeError: 'gbk' codec can't decode byte ...PythonUnicodeError
- Redis 3.2.1從庫啟動報錯"Error condition on socket for SYNC"問題解決一例RedisError
- Android Socket連線,使用Socket進行通訊(Android)Android
- laravel 傳送郵件 使用ssl 報錯為:" stream_socket_client(): SSL :"Laravelclient
- MYSQL報1022錯誤:Can't write;duplicate key in table '.....'MySql
- socket基本的API使用API
- Mysql:Variable 'XXXt' can't be set to the value of 'NULL'解決MySqlNull
- socket
- Python3.7使用pip install xxxx報錯:UnicodeDecodeError: 'gbk' codec can't decode bytePythonUnicodeError
- Promise基礎(消化錯誤和丟擲錯誤)Promise
- migrate:rollback 時 dropForeign 丟擲的異常解決方案
- Shiro身份驗證丟擲AuthenticationException異常,解決方案Exception
- 網路協議之:socket協議詳解之Datagram Socket協議
- [mac pip錯誤]Can't connect to HTTPS URL because the SSL module is not availableMacHTTPAI
- wget下載安裝時出現錯誤doesn‘t match requested host name錯誤wget
- 網路協議之:socket協議詳解之Unix domain Socket協議AI
- 解決ERROR 1231 (42000): Variable 'time_zone' can'tError
- socket.io 原理詳解
- python socket函式詳解Python函式
- npm報錯"A complete log of this run can be found in:"的解決辦法NPM
- Mac提示app損壞、Error,Mac電腦最常見錯誤的解決方案MacAPPError
- TCP socket和web socket的區別TCPWeb
- 小程式真機報錯errMsg: “hideLoading:fail:toast can‘t be found“ ?IDEAIAST
- sockjs-node/info?t=1462183700002 報錯解決方案JS