Eclipse Che Websocket无法建立连接

时间:2018-12-29 15:01:47

标签: eclipse eclipse-che

我正在Windows的Docker下的WS2019上运行Che。使用指南中的调用启动Che时(请参见下面的副本,添加了自定义端口),它将拉出容器并将其设置为正常。

docker run -it --rm -v /var/run/docker.sock:/var/run/docker.sock -v /chedata:/data -e CHE_PORT=8090 eclipse/che start

当我打开Che并转到工作区(localhost:8090)创建项目时,“创建”按钮显示为灰色,并且浏览器控制台出现以下错误。

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://wsagent-http-dev-machine-workspacel90axz6gl3kl3mzl.192.168.1.100.nip.io:8090/api/project-type. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).

Firefox can’t establish a connection to the server at ws://localhost:32845/wsagent?token=. playground:18015:24
ERROR (org.eclipse.che.ide.projecttype.ProjectTypeRegistryImpl): Can't load project types: org.eclipse.che.ide.commons.exception.ServerDisconnectedException _app-0.js:17942:126
WARNING (org.eclipse.che.ide.websocket.impl.BasicWebSocketEndpoint): Error occurred for endpoint ws://localhost:32845/wsagent?token= _app-0.js:17942:126
Firefox can’t establish a connection to the server at ws://localhost:32845/wsagent?token=. playground:18015:24
WARNING (org.eclipse.che.ide.websocket.impl.BasicWebSocketEndpoint): Error occurred for endpoint ws://localhost:32845/wsagent?token=

为了避免出现防火墙问题,我禁用了Windows防火墙。最初,我尝试使用CHE_CORS_ENABLED来解决CORS问题,但没有这种运气。

我尝试指定CHE_HOST和CHE_DOCKER_IP_EXTERNAL标志,其结果实际上相同。我也尝试过使用CHE_SINGLE_PORT = true,再次遇到类似的问题。

我已经查看了Che上报告的许多其他GitHub问题(例如https://github.com/eclipse/che-dockerfiles/pull/11),并且已经进行了好几天没有用。

任何建议都会有所帮助, 印西

0 个答案:

没有答案