docker 测试shinyproxy-demo时无法启动容器

oxcyiej7  于 2024-01-06  发布在  Docker
关注(0)|答案(1)|浏览(115)

我是新来的shinyproxy,所以我要开始学习向导https://www.shinyproxy.io/documentation/
我按照每一个指令在这一切,我设法访问localhost:8080然而,我不能得到的应用程序,像这样.
x1c 0d1x的数据
但是我继续按照向导构建了shinyproxy-template镜像,运行docker run -it -p 3838:3838 openanalytics/shinyproxy-template,运行得很好,然后我手动添加了applicaiton.yml文件,在使用shinyproxy时也出现了同样的问题。




我在google或stackoverflow上找不到和我一样的情况,所以我向你们寻求帮助!
我的操作系统是win10LTSC2021,我使用WSL2 instead of Hyper-V安装了Docker Desktop
我手动添加了C:\ProgramData\Docker\config\daemon.json文件,内容为{ "hosts": ["tcp://127.0.0.1:2375"] }

  • 酒店**
2024-01-04 23:20:54.736  INFO 5144 --- [  XNIO-1 task-2] e.o.containerproxy.service.UserService   : User logged in [user: jack]
2024-01-04 23:20:58.153  INFO 5144 --- [pool-1-thread-1] e.o.containerproxy.service.ProxyService  : [user=jack proxyId=fe994ae3-6984-4cb7-af8d-99184149ce67 specId=01_hello] Starting proxy
2024-01-04 23:21:00.319  WARN 5144 --- [pool-1-thread-1] e.o.containerproxy.service.ProxyService  : [user=jack proxyId=fe994ae3-6984-4cb7-af8d-99184149ce67 specId=01_hello] Proxy failed to start

eu.openanalytics.containerproxy.ProxyFailedToStartException: Container with index 0 failed to start
        at eu.openanalytics.containerproxy.backend.AbstractContainerBackend.startProxy(AbstractContainerBackend.java:116) ~[containerproxy-1.0.2.jar!/:1.0.2]
        at eu.openanalytics.containerproxy.service.ProxyService.startOrResumeProxy(ProxyService.java:455) ~[containerproxy-1.0.2.jar!/:1.0.2]
        at eu.openanalytics.containerproxy.service.ProxyService.lambda$startProxy$4(ProxyService.java:279) ~[containerproxy-1.0.2.jar!/:1.0.2]
        at eu.openanalytics.containerproxy.service.ProxyService.lambda$action$11(ProxyService.java:599) ~[containerproxy-1.0.2.jar!/:1.0.2]
        at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572) ~[na:na]
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317) ~[na:na]
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[na:na]
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[na:na]
        at java.base/java.lang.Thread.run(Thread.java:1583) ~[na:na]
Caused by: eu.openanalytics.containerproxy.ContainerFailedToStartException: Docker container failed to start
        at eu.openanalytics.containerproxy.backend.docker.DockerEngineBackend.startContainer(DockerEngineBackend.java:153) ~[containerproxy-1.0.2.jar!/:1.0.2]
        at eu.openanalytics.containerproxy.backend.AbstractContainerBackend.startProxy(AbstractContainerBackend.java:108) ~[containerproxy-1.0.2.jar!/:1.0.2]
        ... 8 common frames omitted
Caused by: com.spotify.docker.client.exceptions.DockerException: java.util.concurrent.ExecutionException: javax.ws.rs.ProcessingException: org.apache.http.conn.HttpHostConnectException: Connect to localhost:2375 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused: no further information
        at com.spotify.docker.client.DefaultDockerClient.propagate(DefaultDockerClient.java:2848) ~[docker-client-8.16.0.jar!/:8.16.0]
        at com.spotify.docker.client.DefaultDockerClient.request(DefaultDockerClient.java:2712) ~[docker-client-8.16.0.jar!/:8.16.0]
        at com.spotify.docker.client.DefaultDockerClient.inspectImage(DefaultDockerClient.java:1509) ~[docker-client-8.16.0.jar!/:8.16.0]
        at eu.openanalytics.containerproxy.backend.docker.DockerEngineBackend.isImagePresent(DockerEngineBackend.java:243) ~[containerproxy-1.0.2.jar!/:1.0.2]
        at eu.openanalytics.containerproxy.backend.docker.DockerEngineBackend.startContainer(DockerEngineBackend.java:81) ~[containerproxy-1.0.2.jar!/:1.0.2]
        ... 9 common frames omitted
Caused by: java.util.concurrent.ExecutionException: javax.ws.rs.ProcessingException: org.apache.http.conn.HttpHostConnectException: Connect to localhost:2375 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused: no further information
        at jersey.repackaged.com.google.common.util.concurrent.AbstractFuture$Sync.getValue(AbstractFuture.java:299) ~[jersey-guava-2.26-b03.jar!/:na]
        at jersey.repackaged.com.google.common.util.concurrent.AbstractFuture$Sync.get(AbstractFuture.java:286) ~[jersey-guava-2.26-b03.jar!/:na]
        at jersey.repackaged.com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:116) ~[jersey-guava-2.26-b03.jar!/:na]
        at com.spotify.docker.client.DefaultDockerClient.request(DefaultDockerClient.java:2710) ~[docker-client-8.16.0.jar!/:8.16.0]
        ... 12 common frames omitted
Caused by: javax.ws.rs.ProcessingException: org.apache.http.conn.HttpHostConnectException: Connect to localhost:2375 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused: no further information
        at org.glassfish.jersey.apache.connector.ApacheConnector.apply(ApacheConnector.java:488) ~[jersey-apache-connector-2.26-b03.jar!/:na]
        at org.glassfish.jersey.apache.connector.ApacheConnector$1.run(ApacheConnector.java:498) ~[jersey-apache-connector-2.26-b03.jar!/:na]
        at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572) ~[na:na]
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317) ~[na:na]
        at jersey.repackaged.com.google.common.util.concurrent.MoreExecutors$DirectExecutorService.execute(MoreExecutors.java:299) ~[jersey-guava-2.26-b03.jar!/:na]
        at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:123) ~[na:na]
        at jersey.repackaged.com.google.common.util.concurrent.AbstractListeningExecutorService.submit(AbstractListeningExecutorService.java:50) ~[jersey-guava-2.26-b03.jar!/:na]
        at jersey.repackaged.com.google.common.util.concurrent.AbstractListeningExecutorService.submit(AbstractListeningExecutorService.java:37) ~[jersey-guava-2.26-b03.jar!/:na]
        at org.glassfish.jersey.apache.connector.ApacheConnector.apply(ApacheConnector.java:494) ~[jersey-apache-connector-2.26-b03.jar!/:na]
        at org.glassfish.jersey.client.ClientRuntime$2.run(ClientRuntime.java:181) ~[jersey-client-2.26-b03.jar!/:na]
        at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) ~[jersey-common-2.26-b03.jar!/:na]
        at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) ~[jersey-common-2.26-b03.jar!/:na]
        at org.glassfish.jersey.internal.Errors.process(Errors.java:315) ~[jersey-common-2.26-b03.jar!/:na]
        at org.glassfish.jersey.internal.Errors.process(Errors.java:297) ~[jersey-common-2.26-b03.jar!/:na]
        at org.glassfish.jersey.internal.Errors.process(Errors.java:267) ~[jersey-common-2.26-b03.jar!/:na]
        at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:303) ~[jersey-common-2.26-b03.jar!/:na]
        at org.glassfish.jersey.client.ClientRuntime$3.run(ClientRuntime.java:209) ~[jersey-client-2.26-b03.jar!/:na]
        ... 5 common frames omitted
Caused by: org.apache.http.conn.HttpHostConnectException: Connect to localhost:2375 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused: no further information
        at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:156) ~[httpclient-4.5.13.jar!/:4.5.13]
        at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:376) ~[httpclient-4.5.13.jar!/:4.5.13]
        at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:393) ~[httpclient-4.5.13.jar!/:4.5.13]
        at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236) ~[httpclient-4.5.13.jar!/:4.5.13]
        at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:186) ~[httpclient-4.5.13.jar!/:4.5.13]
        at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89) ~[httpclient-4.5.13.jar!/:4.5.13]
        at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110) ~[httpclient-4.5.13.jar!/:4.5.13]
        at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185) ~[httpclient-4.5.13.jar!/:4.5.13]
        at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:72) ~[httpclient-4.5.13.jar!/:4.5.13]
        at org.glassfish.jersey.apache.connector.ApacheConnector.apply(ApacheConnector.java:442) ~[jersey-apache-connector-2.26-b03.jar!/:na]
        ... 21 common frames omitted
Caused by: java.net.ConnectException: Connection refused: no further information
        at java.base/sun.nio.ch.Net.pollConnect(Native Method) ~[na:na]
        at java.base/sun.nio.ch.Net.pollConnectNow(Net.java:682) ~[na:na]
        at java.base/sun.nio.ch.NioSocketImpl.timedFinishConnect(NioSocketImpl.java:542) ~[na:na]
        at java.base/sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:592) ~[na:na]
        at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:327) ~[na:na]
        at java.base/java.net.Socket.connect(Socket.java:751) ~[na:na]
        at org.apache.http.conn.socket.PlainConnectionSocketFactory.connectSocket(PlainConnectionSocketFactory.java:75) ~[httpclient-4.5.13.jar!/:4.5.13]
        at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:142) ~[httpclient-4.5.13.jar!/:4.5.13]
        ... 30 common frames omitted

字符串

gfttwv5a

gfttwv5a1#

您的设置中似乎存在与Docker连接相关的问题。关键错误消息包括:

Caused by: com.spotify.docker.client.exceptions.DockerException: java.util.concurrent.ExecutionException: javax.ws.rs.ProcessingException: org.apache.http.conn.HttpHostConnectException: Connect to localhost:2375 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused: no further information

字符串
这表示ShinyProxy无法连接到您系统上的Docker。以下是您可以检查并解决的几个问题:

  1. Docker守护程序正在运行:确保Docker守护程序正在您的计算机上运行。ShinyProxy需要与Docker通信以启动容器。
  2. Docker主机配置:ShinyProxy正在尝试联机至localhost:2375上的Docker。请确定Docker已设定为接受远端联机。如果您是在本机执行Docker,可能需要将Docker常驻程式公开为TCP服务。您可以修改Docker常驻程式设定(通常位于/etc/docker/daemon.json)以包含下列项目来完成此作业:
{
  "hosts": ["tcp://0.0.0.0:2375", "unix:///var/run/docker.sock"]
}


修改Docker守护程序配置后,重新启动Docker守护程序。

  1. Docker套接字权限:
    请确保运行ShinyProxy的用户具有访问Docker套接字的必要权限。您可能需要将该用户添加到docker组。
sudo usermod -aG docker $USER


进行此更改后,您可能需要注销并重新登录或重新启动系统,以使更改生效。
1.检查Docker连接:
通过在终端中执行以下命令,验证Docker是否正在运行并可访问:

docker info


如果此命令失败,则可能表明Docker本身存在问题。
1.防火墙设定:
确保没有防火墙规则阻止ShinyProxy和Docker之间的通信。

相关问题