solo 启动 docker 报错

配置

version: "2"
 
services:
  mysql:
    container_name: solo-mysql
    image: mysql:5.7.13
    restart: always
    volumes:
      - /opt/docker/solo/mysql/data:/var/lib/mysql
      - /opt/docker/solo/mysql/logs:/logs
      - /opt/docker/solo/mysql/conf:/etc/mysql/conf.d
      - /etc/localtime:/etc/localtime:ro
    ports:
      - "3306:3306" 
    environment:
      MYSQL_ROOT_PASSWORD: 123456 
      TZ: "Asia/Shanghai"
    command: --max_allowed_packet=32505856
  solo:
    container_name: solo
    image: b3log/solo:latest
    restart: always
    ports:
      - "8080:8080"
    environment: 
      RUNTIME_DB: "MYSQL"
      JDBC_USERNAME: "root"
      JDBC_PASSWORD: "123456"
      JDBC_DRIVER: "com.mysql.cj.jdbc.Driver"
      JDBC_URL: "jdbc:mysql://127.0.0.1:3306/solo?useUnicode=yes&characterEncoding=UTF-8&useSSL=false&serverTimezone=UTC&allowPublicKeyRetrieval=true"
    command: --listen_port=8080 --server_scheme=http --server_host=localhost --server_port=
  nginx:
    container_name: solo-nginx
    image: nginx:latest
    restart: always
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - /opt/docker/nginx/conf/nginx.conf:/etc/nginx/nginx.conf
      - /opt/docker/nginx/conf/conf.d:/etc/nginx/conf.d
      - /opt/docker/nginx/html:/usr/share/nginx/html
      - /opt/docker/nginx/logs:/var/log/nginx

报错

solo exited with code 255
solo     | [INFO ]-[2020-12-29 10:58:42]-[org.b3log.solo.Server:253]: Solo is booting [ver=4.3.1, os=Linux, isDocker=true, inJar=false, luteAvailable=false, pid=1, runtimeDatabase=MYSQL, runtimeMode=PRODUCTION, jdbc.username=root, jdbc.URL=jdbc:mysql://localhost:3306/solo?useUnicode=yes&characterEncoding=UTF-8&useSSL=false&serverTimezone=UTC&allowPublicKeyRetrieval=true]
solo     | [ERROR]-[2020-12-29 10:58:45]-[com.zaxxer.hikari.pool.HikariPool:593]: HikariPool-1 - Exception during pool initialization.
solo     | com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure
solo     | 
solo     | The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
solo     | 	at com.mysql.cj.jdbc.exceptions.SQLError.createCommunicationsException(SQLError.java:174) ~[mysql-connector-java-8.0.20.jar:8.0.20]
solo     | 	at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:64) ~[mysql-connector-java-8.0.20.jar:8.0.20]
solo     | 	at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:836) ~[mysql-connector-java-8.0.20.jar:8.0.20]
solo     | 	at com.mysql.cj.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:456) ~[mysql-connector-java-8.0.20.jar:8.0.20]
solo     | 	at com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:246) ~[mysql-connector-java-8.0.20.jar:8.0.20]
solo     | 	at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:197) ~[mysql-connector-java-8.0.20.jar:8.0.20]
solo     | 	at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:138) ~[HikariCP-3.4.5.jar:?]
solo     | 	at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:358) ~[HikariCP-3.4.5.jar:?]
solo     | 	at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:206) ~[HikariCP-3.4.5.jar:?]
solo     | 	at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:477) [HikariCP-3.4.5.jar:?]
solo     | 	at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:560) [HikariCP-3.4.5.jar:?]
solo     | 	at com.zaxxer.hikari.pool.HikariPool.<init>(HikariPool.java:115) [HikariCP-3.4.5.jar:?]
solo     | 	at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:112) [HikariCP-3.4.5.jar:?]
solo     | 	at org.b3log.latke.repository.jdbc.util.Connections.getConnection(Connections.java:196) [latke-core-3.4.10.jar:?]
solo     | 	at org.b3log.solo.service.InitService.initTables(InitService.java:165) [solo/:?]
solo     | 	at org.b3log.solo.service.InitService_$$_jvst5a4_47._d7initTables(InitService_$$_jvst5a4_47.java) [solo/:?]
solo     | 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_212]
solo     | 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_212]
solo     | 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_212]
solo     | 	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_212]
solo     | 	at org.b3log.latke.ioc.JavassistMethodHandler.invoke(JavassistMethodHandler.java:108) [latke-core-3.4.10.jar:?]
solo     | 	at org.b3log.solo.service.InitService_$$_jvst5a4_47.initTables(InitService_$$_jvst5a4_47.java) [solo/:?]
solo     | 	at org.b3log.solo.Server.main(Server.java:266) [solo/:?]
solo     | Caused by: com.mysql.cj.exceptions.CJCommunicationsException: Communications link failure
solo     | 
solo     | The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
solo     | 	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_212]
solo     | 	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:1.8.0_212]
solo     | 	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:1.8.0_212]
solo     | 	at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[?:1.8.0_212]
solo     | 	at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:61) ~[mysql-connector-java-8.0.20.jar:8.0.20]
solo     | 	at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:105) ~[mysql-connector-java-8.0.20.jar:8.0.20]
solo     | 	at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:151) ~[mysql-connector-java-8.0.20.jar:8.0.20]
solo     | 	at com.mysql.cj.exceptions.ExceptionFactory.createCommunicationsException(ExceptionFactory.java:167) ~[mysql-connector-java-8.0.20.jar:8.0.20]
solo     | 	at com.mysql.cj.protocol.a.NativeSocketConnection.connect(NativeSocketConnection.java:91) ~[mysql-connector-java-8.0.20.jar:8.0.20]
solo     | 	at com.mysql.cj.NativeSession.connect(NativeSession.java:144) ~[mysql-connector-java-8.0.20.jar:8.0.20]
solo     | 	at com.mysql.cj.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:956) ~[mysql-connector-java-8.0.20.jar:8.0.20]
solo     | 	at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:826) ~[mysql-connector-java-8.0.20.jar:8.0.20]
solo     | 	... 20 more
solo     | Caused by: java.net.NoRouteToHostException: Host is unreachable (Host unreachable)
solo     | 	at java.net.PlainSocketImpl.socketConnect(Native Method) ~[?:1.8.0_212]
solo     | 	at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) ~[?:1.8.0_212]
solo     | 	at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) ~[?:1.8.0_212]
solo     | 	at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) ~[?:1.8.0_212]
solo     | 	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) ~[?:1.8.0_212]
solo     | 	at java.net.Socket.connect(Socket.java:589) ~[?:1.8.0_212]
solo     | 	at com.mysql.cj.protocol.StandardSocketFactory.connect(StandardSocketFactory.java:155) ~[mysql-connector-java-8.0.20.jar:8.0.20]
solo     | 	at com.mysql.cj.protocol.a.NativeSocketConnection.connect(NativeSocketConnection.java:65) ~[mysql-connector-java-8.0.20.jar:8.0.20]
solo     | 	at com.mysql.cj.NativeSession.connect(NativeSession.java:144) ~[mysql-connector-java-8.0.20.jar:8.0.20]
solo     | 	at com.mysql.cj.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:956) ~[mysql-connector-java-8.0.20.jar:8.0.20]
solo     | 	at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:826) ~[mysql-connector-java-8.0.20.jar:8.0.20]
solo     | 	... 20 more
solo     | [ERROR]-[2020-12-29 10:58:45]-[org.b3log.solo.service.InitService:173]: Check tables failed, please make sure database existed and database configuration [jdbc.*] in local.props is correct [msg=Communications link failure
solo     | 
solo     | The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.]
^CGracefully stopping... (press Ctrl+C again to force)

有人知道 怎么改,什么问题吗?

广告 我要投放

欢迎来到这里!

我们正在构建一个小众社区,大家在这里相互信任,以平等 • 自由 • 奔放的价值观进行分享交流。最终,希望大家能够找到与自己志同道合的伙伴,共同成长。

注册 关于
请输入回帖内容 ...
  • Gakkiyomi2019

    这种有明确报错信息的问题,建议百度。