我正在尝试使用Docker以及docker-compose.yml文件中的Web代理来部署GridGain网络控制台。我尝试了这个指南https://www.gridgain.com/docs/web-console/latest/deploying-web-console-docker,但是web-agent不是docker部署的一部分。
我尝试修改docker-compose.yml:
version: '2.4'
services:
backend:
image: gridgain/gridgain-web-console-backend:2020.05.00
# Restart on crash.
restart: always
environment:
# Mail settings
#- SPRING_MAIL_HOST=
#- SPRING_MAIL_PORT=
#- SPRING_MAIL_USERNAME=
#- SPRING_MAIL_PASSWORD=
- JVM_OPTS=
volumes:
- ${PWD}/Users:/opt/gridgain-web-console-server/work
frontend:
depends_on:
- backend
image: gridgain/gridgain-web-console-frontend:2020.05.00
ports:
# Proxy HTTP nginx port (HOST_PORT:DOCKER_PORT)
- 80:8008
container_name: frontend
webagent:
depends_on:
- frontend
- backend
image: gridgain/gridgain-web-agent:2020.05.00
environment:
- TOKENS=59f9d111-eaad-405b-a3c8-310e9245f943
- SERVER_URI=frontend:80但它并不起作用。web代理始终无法连接到服务器(GridGain控制台)。我通过docker-compose up运行它
我得到了下面的堆栈跟踪:
webagent_1 | [2020-08-29T12:03:56,213][INFO ][Connect thread][WebSocketRouter] Connecting to server: frontend:80
webagent_1 | [2020-08-29T12:03:56,220][WARN ][Connect thread][AgentUtils] Failed to configure proxy.
webagent_1 | java.net.URISyntaxException: Expected scheme-specific part at index 6: https:
webagent_1 | at java.net.URI$Parser.fail(URI.java:2848) ~[?:1.8.0_242]
webagent_1 | at java.net.URI$Parser.failExpecting(URI.java:2854) ~[?:1.8.0_242]
webagent_1 | at java.net.URI$Parser.parse(URI.java:3057) ~[?:1.8.0_242]
webagent_1 | at java.net.URI.<init>(URI.java:673) ~[?:1.8.0_242]
webagent_1 | at org.gridgain.console.agent.AgentUtils.configureProxy(AgentUtils.java:156) ~[gridgain-web-console-agent-2020.05.00.jar:?]
webagent_1 | at org.gridgain.console.agent.handlers.WebSocketRouter.connect0(WebSocketRouter.java:225) ~[gridgain-web-console-agent-2020.05.00.jar:?]
webagent_1 | at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_242]
webagent_1 | at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_242]
webagent_1 | at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_242]
webagent_1 | at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_242]
webagent_1 | at java.lang.Thread.run(Thread.java:748) [?:1.8.0_242]
webagent_1 | [2020-08-29T12:03:57,032][ERROR][Connect thread][WebSocketRouter] Failed to establish websocket connection with server: frontend:80
webagent_1 | java.lang.IllegalArgumentException: URI scheme must be 'ws' or 'wss'问题是如何正确地将webagent连接到gridgain控制台。我的意思是在docker文件中的“webagent”服务中缺少一些重要的东西,但我不知道是什么。你对解决我的问题有什么建议吗?谢谢你所做的一切。
发布于 2020-09-03 10:29:42
您为代理中的web控制台使用了错误的uri,请使用SERVER_URI=http://frontend:8008
要获取代理的令牌,您只能运行web控制台docker-compose up -d backend frontend
并打开配置文件页面,然后复制web agent
docker-compose up -d webagent中的内标识
TOKENS但我在你的配置文件里找不到NODE_URI。默认情况下,代理将尝试连接到在web代理容器中无法访问的http://localhost:8080。
https://stackoverflow.com/questions/63651057
复制相似问题