You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "Administrator-Xorex (via GitHub)" <gi...@apache.org> on 2023/04/11 07:04:42 UTC

[GitHub] [shardingsphere] Administrator-Xorex opened a new issue, #25098: Unable to run the docker image of ShardingSphere-Proxy 5.3.2 (latest)

Administrator-Xorex opened a new issue, #25098:
URL: https://github.com/apache/shardingsphere/issues/25098

   ## Bug Report
   
   ShardingSphere-Proxy: docker.io/apache/shardingsphere-proxy:latest
   Docker version 1.13.1, build 7d71120/1.13.1
   
   Run docker command:
   ```
   docker run -id \
   -v /home/user/shardingsphere-proxy/proxy-latest/conf:/opt/shardingsphere-proxy/conf \
   -v /home/user/shardingsphere-proxy/proxy-latest/ext-lib:/opt/shardingsphere-proxy/ext-lib \
   -v /home/user/shardingsphere-proxy/proxy-latest/logs:/opt/shardingsphere-proxy/logs \
   -p 3307:3307 \
   --name proxy-latest \
   apache/shardingsphere-proxy:latest
   ```
   
   container exited.
   
   <img width="1335" alt="image" src="https://user-images.githubusercontent.com/26794746/231079988-2536da72-70f1-48d7-bcf7-995111be6d42.png">
   
   Then, I enter this container, try to start shardingsphere-proxy by run `/bin/start.sh` and get an Error:
   
   `bin/start.sh: line 228: exec: -D: invalid option`
   
   This is the shell code at 227-230:
   
   ```shell
   if [ -n "${IS_DOCKER}" ]; then
     exec $JAVA ${JAVA_OPTS} ${JAVA_MEM_OPTS} -classpath ${CLASS_PATH} ${MAIN_CLASS}
     exit 0
   fi
   ```
   ---
   I can run successfully shardingsphere-proxy container by other images version with the same docker command, include 5.3.1 and earlier.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] Administrator-Xorex commented on issue #25098: Unable to run the docker image of ShardingSphere-Proxy 5.3.2 (latest)

Posted by "Administrator-Xorex (via GitHub)" <gi...@apache.org>.
Administrator-Xorex commented on issue #25098:
URL: https://github.com/apache/shardingsphere/issues/25098#issuecomment-1503087646

   Thanks


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] TeslaCN commented on issue #25098: Unable to run the docker image of ShardingSphere-Proxy 5.3.2 (latest)

Posted by "TeslaCN (via GitHub)" <gi...@apache.org>.
TeslaCN commented on issue #25098:
URL: https://github.com/apache/shardingsphere/issues/25098#issuecomment-1502820783

   Hi @Administrator-Xorex 
   I tried your command. The Proxy startup failure was caused by no server.yaml.
   
   ```
    ~/Downloads/ docker run -id \                   
   -v /home/user/shardingsphere-proxy/proxy-latest/conf:/opt/shardingsphere-proxy/conf \
   -v /home/user/shardingsphere-proxy/proxy-latest/ext-lib:/opt/shardingsphere-proxy/ext-lib \
   -v /home/user/shardingsphere-proxy/proxy-latest/logs:/opt/shardingsphere-proxy/logs \
   -p 3307:3307 \
   --name proxy-latest \
   apache/shardingsphere-proxy:latest
   Unable to find image 'apache/shardingsphere-proxy:latest' locally
   latest: Pulling from apache/shardingsphere-proxy
   Digest: sha256:a3a1b6e439731a4c94ede8ca34b18fc76d87b9f137bd4262c62c4ed0b0454060
   Status: Downloaded newer image for apache/shardingsphere-proxy:latest
   e5979e008e7fb988884f0999b58d77a88068a00a24a5a4cf293094482f93228b
    ~/Downloads/ docker ps -a
   CONTAINER ID   IMAGE                                 COMMAND                  CREATED          STATUS                      PORTS     NAMES
   e5979e008e7f   apache/shardingsphere-proxy:latest    "/bin/sh -c '${LOCAL…"   2 seconds ago    Exited (1) 2 seconds ago              proxy-latest
   b47ff2d7c757   mysql:8.0.32                          "docker-entrypoint.s…"   35 minutes ago   Up 35 minutes                         bold_ishizaka
   83fda880157a   postgres:15.1                         "docker-entrypoint.s…"   25 hours ago     Up 25 hours                           hardcore_tharp
   4f2a8b2b7677   postgres:15.1                         "docker-entrypoint.s…"   2 months ago     Up 25 hours                           pg15
   df6ac7b51f6d   gcr.io/k8s-minikube/kicbase:v0.0.36   "/usr/local/bin/entr…"   4 months ago     Exited (137) 2 months ago             minikube
   5560b9c7c0fb   enmotech/opengauss:3.0.0              "entrypoint.sh gauss…"   8 months ago     Exited (0) 3 months ago               opengauss3
   6ad4a9e11c15   postgres:14.2                         "docker-entrypoint.s…"   12 months ago    Exited (0) 2 months ago               pg14
   2a349e0764c1   mysql:8.0.28                          "docker-entrypoint.s…"   12 months ago    Up About an hour                      mysql8
   28ba784b005e   mysql:5.7.36                          "docker-entrypoint.s…"   16 months ago    Exited (0) 5 weeks ago                mysql57
    ~/Downloads/ docker logs proxy-latest 
   we find java version: java17, full_version=17.0.6, full_path=/opt/java/openjdk/bin/java
   The classpath is /opt/shardingsphere-proxy/conf:/opt/shardingsphere-proxy/conf:.:/opt/shardingsphere-proxy/lib/*:/opt/shardingsphere-proxy/ext-lib/*
   main class org.apache.shardingsphere.proxy.Bootstrap -1 /opt/shardingsphere-proxy/conf 0.0.0.0 false
   Exception in thread "main" java.io.FileNotFoundException: /opt/shardingsphere-proxy/conf/server.yaml (No such file or directory)
   	at java.base/java.io.FileInputStream.open0(Native Method)
   	at java.base/java.io.FileInputStream.open(FileInputStream.java:216)
   	at java.base/java.io.FileInputStream.<init>(FileInputStream.java:157)
   	at org.apache.shardingsphere.infra.util.yaml.YamlEngine.unmarshal(YamlEngine.java:53)
   	at org.apache.shardingsphere.proxy.backend.config.ProxyConfigurationLoader.loadServerConfiguration(ProxyConfigurationLoader.java:79)
   	at org.apache.shardingsphere.proxy.backend.config.ProxyConfigurationLoader.load(ProxyConfigurationLoader.java:65)
   	at org.apache.shardingsphere.proxy.Bootstrap.main(Bootstrap.java:51)
   ```
   
   ![image](https://user-images.githubusercontent.com/20503072/231086690-eba62381-e5e2-4105-add2-0e6ce24b4f58.png)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] TeslaCN commented on issue #25098: Unable to run the docker image of ShardingSphere-Proxy 5.3.2 (latest)

Posted by "TeslaCN (via GitHub)" <gi...@apache.org>.
TeslaCN commented on issue #25098:
URL: https://github.com/apache/shardingsphere/issues/25098#issuecomment-1503081662

   Still failed to reproduce.
   
   ```
   ╰─[:)] % docker run -id \
   -v /home/wuweijie/projects/shardingsphere/.settings/master/mysql/conf/server.yaml:/opt/shardingsphere-proxy/conf/server.yaml \
   -p 3307:3307 \
   --name proxy-532 \   
   apache/shardingsphere-proxy:5.3.2 
   cb69142d475335a64381ddf766dc90cbeec4641699944942218e3daf621b6872
   ╭─[~/.jdks]─[wuweijie@wuweijie-ubuntu]─[0]─[10063]
   ╰─[:)] % docker ps
   CONTAINER ID   IMAGE                               COMMAND                  CREATED         STATUS         PORTS                                       NAMES
   cb69142d4753   apache/shardingsphere-proxy:5.3.2   "/bin/sh -c '${LOCAL…"   6 seconds ago   Up 5 seconds   0.0.0.0:3307->3307/tcp, :::3307->3307/tcp   proxy-532
   b47ff2d7c757   mysql:8.0.32                        "docker-entrypoint.s…"   4 hours ago     Up 4 hours                                                 bold_ishizaka
   83fda880157a   postgres:15.1                       "docker-entrypoint.s…"   28 hours ago    Up 28 hours                                                hardcore_tharp
   4f2a8b2b7677   postgres:15.1                       "docker-entrypoint.s…"   2 months ago    Up 28 hours                                                pg15
   2a349e0764c1   mysql:8.0.28                        "docker-entrypoint.s…"   12 months ago   Up 4 hours                                                 mysql8
   ╭─[~/.jdks]─[wuweijie@wuweijie-ubuntu]─[0]─[10064]
   ╰─[:)] % nc 127.0.0.1 3307
   e
   8.0.29-ShardingSphere-Proxy 5.3.2E30eaSXfO�apOLy2eP9pzamysql_native_password
   ^C
   ╭─[~/.jdks]─[wuweijie@wuweijie-ubuntu]─[130]─[10065]
   ╰─[:(] % docker logs proxy-532
   we find java version: java17, full_version=17.0.6, full_path=/opt/java/openjdk/bin/java
   The classpath is /opt/shardingsphere-proxy/conf:/opt/shardingsphere-proxy/conf:.:/opt/shardingsphere-proxy/lib/*:/opt/shardingsphere-proxy/ext-lib/*
   main class org.apache.shardingsphere.proxy.Bootstrap -1 /opt/shardingsphere-proxy/conf 0.0.0.0 false
   [INFO ] 2023-04-11 10:28:45.930 [main] o.a.s.p.frontend.ShardingSphereProxy - ShardingSphere-Proxy Standalone mode started successfully
   ```
   
   ![image](https://user-images.githubusercontent.com/20503072/231134197-4bc9b3e6-9fe3-49ed-82e5-0ce2f88262d4.png)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] TeslaCN commented on issue #25098: Unable to run the docker image of ShardingSphere-Proxy 5.3.2 (latest)

Posted by "TeslaCN (via GitHub)" <gi...@apache.org>.
TeslaCN commented on issue #25098:
URL: https://github.com/apache/shardingsphere/issues/25098#issuecomment-1504404836

   Please try upgrading your Docker engine. `1.13.1` is outdated.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] Administrator-Xorex commented on issue #25098: Unable to run the docker image of ShardingSphere-Proxy 5.3.2 (latest)

Posted by "Administrator-Xorex (via GitHub)" <gi...@apache.org>.
Administrator-Xorex commented on issue #25098:
URL: https://github.com/apache/shardingsphere/issues/25098#issuecomment-1502862534

   I set the server.yaml before run docker image:
   <img width="382" alt="image" src="https://user-images.githubusercontent.com/26794746/231093065-8e39d08d-8f28-4d0c-8bcc-d28176d84cae.png">
   
   And when run `docker run` order, it does't response error, it also does't make a log file in /logs.
   In my docker container, the error occurs when running the start.sh, it is failed start the JVM to run shardingsphere-proxy.
   
   There is the start.sh 's error: `bin/start.sh: line 228: exec: -D: invalid option`


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] Administrator-Xorex commented on issue #25098: Unable to run the docker image of ShardingSphere-Proxy 5.3.2 (latest)

Posted by "Administrator-Xorex (via GitHub)" <gi...@apache.org>.
Administrator-Xorex commented on issue #25098:
URL: https://github.com/apache/shardingsphere/issues/25098#issuecomment-1502871927

   If this image can run successfully at others computer, you can ignore my issue.
   I have run ShardingSphere-Proxy successfully by no-container environment. Issue this problem is that I worry this image works error general.
   Thanks for your reply.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] Administrator-Xorex closed issue #25098: Unable to run the docker image of ShardingSphere-Proxy 5.3.2 (latest)

Posted by "Administrator-Xorex (via GitHub)" <gi...@apache.org>.
Administrator-Xorex closed issue #25098: Unable to run the docker image of ShardingSphere-Proxy 5.3.2 (latest)
URL: https://github.com/apache/shardingsphere/issues/25098


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] mck753 commented on issue #25098: Unable to run the docker image of ShardingSphere-Proxy 5.3.2 (latest)

Posted by "mck753 (via GitHub)" <gi...@apache.org>.
mck753 commented on issue #25098:
URL: https://github.com/apache/shardingsphere/issues/25098#issuecomment-1551536774

   I also encountered this issue
   Docker version 19.03.9, build 9d988398e7
   
   Run docker command:
   `docker run -id -v /host/path/to/conf:/opt/shardingsphere-proxy/conf -v /host/path/to/ext-lib:/opt/shardingsphere-proxy/ext-lib -v /host/path/to/logs:/opt/shardingsphere-proxy/logs -p 3307:3307 --name proxy-latest apache/shardingsphere-proxy:latest`
   
   this is logs,Why is 46
   ![image](https://github.com/apache/shardingsphere/assets/57063138/7221390f-ba99-44b6-ba4d-1c6e9e3abeab)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org