WebSocket connection failed with error Error Domain=NSPOSIXErrorDomain Code=61 "Connection refused"
2016-09-13 17:52
1341 查看
今天在用react native开发时,一开始还好好的,后来不知为啥,突然报错如下:
WebSocket connection failed with error Error Domain=NSPOSIXErrorDomain Code=61 "Connection refused"
多次重启,刷新也没用,很奇怪,经搜索,发现一篇文章:
http://www.jianshu.com/p/2c5e738cecca
但不能很肯定这么改就是正确的,毕竟我之前是可以运行的,突然不好使了,
按照上面的方法改了下,还真好了!囧。。。
WebSocket connection failed with error Error Domain=NSPOSIXErrorDomain Code=61 "Connection refused"
多次重启,刷新也没用,很奇怪,经搜索,发现一篇文章:
http://www.jianshu.com/p/2c5e738cecca
解决:
在RCTWebSocketExecutor.m文件中修改
setup函数中的
localhost为你电脑的IP地址(例如:192.168.0.104)
但不能很肯定这么改就是正确的,毕竟我之前是可以运行的,突然不好使了,
按照上面的方法改了下,还真好了!囧。。。
相关文章推荐
- WebSocket connection failed with error Error Domain=NSPOSIXErrorDomain Code=61 "Connection refused"
- 使用PHPMailer 中的报错解决 "Connection failed. Error #2: stream_socket_client(): SSL operation failed with code 1. OpenSSL Error messages:"
- 安装了VS2010 sp1 后再安装ASP.NET MVC 3.0的问题(Final Result: Installation failed with error code: (0x80070643), "安装时发生严重错误 " (Ela)
- 【Error】JavaWeb: 严重: Failed to initialize end point associated with ProtocolHandler ["http-bio-8080"]
- WebSocket connection to 'ws://localhost:8080/xxx' failed: Error during WebSocket handshake...
- Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details
- Job for postfix.service failed because the control process exited with error code. See "systemctl st
- 从"error: linker command failed with exit code 1 (use -v to see invocation)"说起
- compile" failed with error code 1 解决办法
- pip错误 Command "python setup.py egg_info" failed with error code 2
- pip安装软件时出现Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build*的解决方案
- "_OBJC_CLASS_$_ALAssetsLibrary", referenced from:和clang: error: linker command failed with exit code 1 (use -v to see invocation)错误
- MS SQL错误:SQL Server failed with error code 0xc0000000 to spawn a thread to process a new login or connection. Check the SQL Server error log and the Windows event logs for information about possible related problems
- [SSIS 2005]SSIS Error The AcquireConnection method call to the connection manager failed with error code 0xC0202009
- mongodb 报错:Query failed with error code 13 and error message 'not authorized for query on ..."
- Error Domain=ASIHTTPRequestErrorDomain Code=8 "Failed to move file from"xxx/xxx"to"xxx/xxx"
- Job for nginx.service failed because the control process exited with error code. See "systemctl stat
- 【Error】JavaWeb: 严重: Failed to initialize end point associated with ProtocolHandler ["http-bio-8080"]
- Error Domain=NSURLErrorDomain Code=-1005 "The network connection was lost.
- (未解决,只是提供一种思路)安装pyspider失败:Command "python setup.py egg_info"failed with error code 10 in.....