Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/elixir/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
错误:未实现websockets phoenix_Websocket_Elixir_Phoenix Framework - Fatal编程技术网

错误:未实现websockets phoenix

错误:未实现websockets phoenix,websocket,elixir,phoenix-framework,Websocket,Elixir,Phoenix Framework,我正在尝试在我的服务器上使用phoenix作为websockets,该服务器托管在Digital Ocean上,我一直在使用它 WebSocket connection to 'ws://104.236.16.92/ws' failed: Error in connection establishment: net::ERR_NOT_IMPLEMENTED 在这个问题上,我似乎找不到任何东西,也找不到什么可以解决它。WebSocket在我本地的机器上运行良好 If也有类似的错误,这是因为co

我正在尝试在我的服务器上使用phoenix作为websockets,该服务器托管在Digital Ocean上,我一直在使用它

WebSocket connection to 'ws://104.236.16.92/ws' failed: 
Error in connection establishment: net::ERR_NOT_IMPLEMENTED

在这个问题上,我似乎找不到任何东西,也找不到什么可以解决它。WebSocket在我本地的机器上运行良好

If也有类似的错误,这是因为cowboy在nginx代理后面处理连接。在我的nginx proxy_参数中,我必须添加以下配置才能使websockets工作

proxy_http_version 1.1;  # recommended with keepalive connections 
# WebSocket proxying - from http://nginx.org/en/docs/http/websocket.html
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";

这实际上是不够的内存。我使用的是最低的液滴,其中WebSocket不起作用。升级到该层解决了我的问题

什么凤凰版本?您是在使用频道还是直接使用牛仔分派来处理原始WebSocket?在Phoenix v0.10.0中使用频道除了这个:和这个:不幸的是,这些似乎没有帮助,因为我也尝试过没有nginx。实际上,我也尝试过完全没有nginx的频道,它仍然会给我同样的错误: