Using PyPXE with dhcp-proxy - ipxe

I'm trying to setup a simple PXE server using PyPXE in DHCP-Proxy mode, but I keep getting server response timeout from when I try to netboot
Does anyone have experience setting up and using PyPXE in DHCP-Proxy mode?
Here is the debug output
2022-12-05 07:04:43,940 [INFO] PyPXE Starting TFTP server...
2022-12-05 07:04:43,941 [DEBUG] PyPXE.TFTP NOTICE: TFTP server started in debug mode. TFTP server is using the following:
2022-12-05 07:04:43,941 [DEBUG] PyPXE.TFTP Server IP: 10.2.230.2
2022-12-05 07:04:43,941 [DEBUG] PyPXE.TFTP Server Port: 69
2022-12-05 07:04:43,941 [DEBUG] PyPXE.TFTP Network Boot Directory: netboot
2022-12-05 07:04:43,941 [INFO] PyPXE Starting DHCP server in ProxyDHCP mode...
2022-12-05 07:04:43,941 [DEBUG] PyPXE.DHCP NOTICE: DHCP server started in debug mode. DHCP server is using the following:
2022-12-05 07:04:43,941 [INFO] PyPXE.DHCP DHCP Server IP: 10.2.230.2
2022-12-05 07:04:43,941 [INFO] PyPXE.DHCP DHCP Server Port: 67
2022-12-05 07:04:43,941 [INFO] PyPXE.DHCP File Server IP: 10.2.230.5
2022-12-05 07:04:43,941 [INFO] PyPXE.DHCP File Name: http://10.2.230.5/boot.http.ipxe
2022-12-05 07:04:43,941 [INFO] PyPXE.DHCP ProxyDHCP Mode: True
2022-12-05 07:04:43,941 [INFO] PyPXE.DHCP Using iPXE: True
2022-12-05 07:04:43,941 [INFO] PyPXE.DHCP Using HTTP Server: True
2022-12-05 07:04:43,942 [INFO] PyPXE Starting HTTP server...
2022-12-05 07:04:43,942 [DEBUG] PyPXE.HTTP NOTICE: HTTP server started in debug mode. HTTP server is using the following:
2022-12-05 07:04:43,942 [INFO] PyPXE.HTTP Server IP: 10.2.230.5
2022-12-05 07:04:43,942 [INFO] PyPXE.HTTP Server Port: 80
2022-12-05 07:04:43,942 [INFO] PyPXE.HTTP Network Boot Directory: netboot
2022-12-05 07:04:43,942 [INFO] PyPXE PyPXE successfully initialized and running!
2022-12-05 07:04:44,539 [DEBUG] PyPXE.DHCP Received message
2022-12-05 07:04:44,539 [DEBUG] PyPXE.DHCP <--BEGIN MESSAGE-->
2022-12-05 07:04:44,539 [DEBUG] PyPXE.DHCP b'\x01\x01\x06\x00\xb0pL\xe8\x00\x04\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\xbf\x01:H\xc4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00c\x82Sc5\x01\x019\x02\x05\xc07#\x01\x02\x03\x04\x05\x06\x0c\r\x0f\x11\x12\x16\x17\x1c()*+236:;<BCa\x80\x81\x82\x83\x84\x85\x86\x87a\x11\x00\xa2O\xc5\x00\xbcZ\x11\xe7\x90n\x00\x17\xa4#5b^\x03\x01\x03\x10]\x02\x00\x07< PXEClient:Arch:00007:UNDI:003016\xff'
2022-12-05 07:04:44,539 [DEBUG] PyPXE.DHCP <--END MESSAGE-->
2022-12-05 07:04:44,539 [DEBUG] PyPXE.DHCP Parsed received options
2022-12-05 07:04:44,539 [DEBUG] PyPXE.DHCP <--BEGIN OPTIONS-->
2022-12-05 07:04:44,539 [DEBUG] PyPXE.DHCP {53: [b'\x01'], 57: [b'\x05\xc0'], 55: [b'\x01\x02\x03\x04\x05\x06\x0c\r\x0f\x11\x12\x16\x17\x1c()*+236:;<BCa\x80\x81\x82\x83\x84\x85\x86\x87'], 97: [b'\x00\xa2O\xc5\x00\xbcZ\x11\xe7\x90n\x00\x17\xa4#5b'], 94: [b'\x01\x03\x10'], 93: [b'\x00\x07'], 60: [b'PXEClient:Arch:00007:UNDI:003016']}
2022-12-05 07:04:44,539 [DEBUG] PyPXE.DHCP <--END OPTIONS-->
2022-12-05 07:04:44,539 [INFO] PyPXE.DHCP PXE client request received from A4:BF:01:3A:48:C4
2022-12-05 07:04:44,539 [DEBUG] PyPXE.DHCP Sending DHCPOFFER to A4:BF:01:3A:48:C4
2022-12-05 07:04:44,539 [DEBUG] PyPXE.DHCP DHCPOFFER - Sending the following
2022-12-05 07:04:44,539 [DEBUG] PyPXE.DHCP <--BEGIN HEADER-->
2022-12-05 07:04:44,540 [DEBUG] PyPXE.DHCP b'\x02\x01\x06\x00\xb0pL\xe8\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\n\x02\xe6\x05\x00\x00\x00\x00\xa4\xbf\x01:H\xc4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00http://10.2.230.5/boot.http.ipxe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00c\x82Sc'
2022-12-05 07:04:44,540 [DEBUG] PyPXE.DHCP <--END HEADER-->
2022-12-05 07:04:44,540 [DEBUG] PyPXE.DHCP <--BEGIN OPTIONS-->
2022-12-05 07:04:44,540 [DEBUG] PyPXE.DHCP b'5\x01\x026\x04\n\x02\xe6\x02B\n10.2.230.5C\x0fchainload.kpxe\x00<\tPXEClient+\n\x06\x01\x08\n\x04\x00PXE\xff\xff'
2022-12-05 07:04:44,540 [DEBUG] PyPXE.DHCP <--END OPTIONS-->
2022-12-05 07:04:44,540 [DEBUG] PyPXE.DHCP <--BEGIN RESPONSE-->
2022-12-05 07:04:44,540 [DEBUG] PyPXE.DHCP b'\x02\x01\x06\x00\xb0pL\xe8\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\n\x02\xe6\x05\x00\x00\x00\x00\xa4\xbf\x01:H\xc4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00http://10.2.230.5/boot.http.ipxe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00c\x82Sc5\x01\x026\x04\n\x02\xe6\x02B\n10.2.230.5C\x0fchainload.kpxe\x00<\tPXEClient+\n\x06\x01\x08\n\x04\x00PXE\xff\xff'
2022-12-05 07:04:44,540 [DEBUG] PyPXE.DHCP <--END RESPONSE-->

Related

Import ScadaLTS and MySQL on GNS3

I have not problem to deploy the project docker components using docker-compose. However, I need to import the whole project on GNS3.
I have no problem deploying the OpenPLC container. However, when I deploy the ScadaTLS docker container and the associated MySQL database container the ScadaLTS login page cannot be displayed to provide the getting started.
ScadaLTS configuration:
ScadaLTS network configuration:
# Static config for eth0
auto eth0
iface eth0 inet static
address 192.168.123.6
netmask 255.255.255.0
gateway 192.168.123.1
up echo nameserver 192.168.123.1 > /etc/resolv.conf
ScadaLTS container logs:
wait-for-it: waiting 30 seconds for 192.168.123.10:3306
wait-for-it: timeout occurred after waiting 30 seconds for 192.168.123.10:3306
Using CATALINA_BASE: /usr/local/tomcat
Using CATALINA_HOME: /usr/local/tomcat
Using CATALINA_TMPDIR: /usr/local/tomcat/temp
Using JRE_HOME: /usr/local/openjdk-11
Using CLASSPATH: /usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/tomcat-juli.jar
Using CATALINA_OPTS: -Xmx512m -Xms512m
NOTE: Picked up JDK_JAVA_OPTIONS: --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED
15-Jan-2023 11:28:54.148 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version name: Apache Tomcat/9.0.53
15-Jan-2023 11:28:54.151 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: Sep 6 2021 19:09:00 UTC
15-Jan-2023 11:28:54.151 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version number: 9.0.53.0
15-Jan-2023 11:28:54.151 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Linux
15-Jan-2023 11:28:54.152 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version: 5.4.0-136-generic
15-Jan-2023 11:28:54.152 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture: amd64
15-Jan-2023 11:28:54.152 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home: /usr/local/openjdk-11
15-Jan-2023 11:28:54.152 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version: 11.0.12+7
15-Jan-2023 11:28:54.152 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor: Oracle Corporation
15-Jan-2023 11:28:54.152 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: /usr/local/tomcat
15-Jan-2023 11:28:54.152 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: /usr/local/tomcat
15-Jan-2023 11:28:54.165 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.lang=ALL-UNNAMED
15-Jan-2023 11:28:54.165 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.io=ALL-UNNAMED
15-Jan-2023 11:28:54.165 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.util=ALL-UNNAMED
15-Jan-2023 11:28:54.165 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.util.concurrent=ALL-UNNAMED
15-Jan-2023 11:28:54.165 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED
15-Jan-2023 11:28:54.165 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=/usr/local/tomcat/conf/logging.properties
15-Jan-2023 11:28:54.166 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
15-Jan-2023 11:28:54.166 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
15-Jan-2023 11:28:54.166 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
15-Jan-2023 11:28:54.166 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dorg.apache.catalina.security.SecurityListener.UMASK=0027
15-Jan-2023 11:28:54.166 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xmx512m
15-Jan-2023 11:28:54.166 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xms512m
15-Jan-2023 11:28:54.166 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dignore.endorsed.dirs=
15-Jan-2023 11:28:54.166 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=/usr/local/tomcat
15-Jan-2023 11:28:54.166 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=/usr/local/tomcat
15-Jan-2023 11:28:54.166 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=/usr/local/tomcat/temp
15-Jan-2023 11:28:54.171 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded Apache Tomcat Native library [1.2.31] using APR version [1.7.0].
15-Jan-2023 11:28:54.171 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true], UDS [true].
15-Jan-2023 11:28:54.171 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true]
15-Jan-2023 11:28:54.174 INFO [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized [OpenSSL 1.1.1k 25 Mar 2021]
15-Jan-2023 11:28:54.538 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]
15-Jan-2023 11:28:54.567 INFO [main] org.apache.catalina.startup.Catalina.load Server initialization in [599] milliseconds
15-Jan-2023 11:28:54.623 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina]
15-Jan-2023 11:28:54.623 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/9.0.53]
15-Jan-2023 11:28:54.637 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
15-Jan-2023 11:28:54.647 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in [79] milliseconds
15-Jan-2023 11:32:21.831 INFO [Thread-2] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio-8080"]
15-Jan-2023 11:32:21.840 INFO [Thread-2] org.apache.catalina.core.StandardService.stopInternal Stopping service [Catalina]
15-Jan-2023 11:32:21.845 INFO [Thread-2] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-nio-8080"]
15-Jan-2023 11:32:21.889 INFO [Thread-2] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-nio-8080"]
wait-for-it: waiting 30 seconds for 192.168.123.10:3306
wait-for-it: 192.168.123.10:3306 is available after 2 seconds
Using CATALINA_BASE: /usr/local/tomcat
Using CATALINA_HOME: /usr/local/tomcat
Using CATALINA_TMPDIR: /usr/local/tomcat/temp
Using JRE_HOME: /usr/local/openjdk-11
Using CLASSPATH: /usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/tomcat-juli.jar
Using CATALINA_OPTS: -Xmx512m -Xms512m
NOTE: Picked up JDK_JAVA_OPTIONS: --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED
15-Jan-2023 11:38:31.211 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version name: Apache Tomcat/9.0.53
15-Jan-2023 11:38:31.214 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: Sep 6 2021 19:09:00 UTC
15-Jan-2023 11:38:31.214 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version number: 9.0.53.0
15-Jan-2023 11:38:31.215 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Linux
15-Jan-2023 11:38:31.215 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version: 5.4.0-136-generic
15-Jan-2023 11:38:31.215 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture: amd64
15-Jan-2023 11:38:31.215 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home: /usr/local/openjdk-11
15-Jan-2023 11:38:31.229 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version: 11.0.12+7
15-Jan-2023 11:38:31.229 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor: Oracle Corporation
15-Jan-2023 11:38:31.229 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: /usr/local/tomcat
15-Jan-2023 11:38:31.229 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: /usr/local/tomcat
15-Jan-2023 11:38:31.252 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.lang=ALL-UNNAMED
15-Jan-2023 11:38:31.252 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.io=ALL-UNNAMED
15-Jan-2023 11:38:31.252 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.util=ALL-UNNAMED
15-Jan-2023 11:38:31.253 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.util.concurrent=ALL-UNNAMED
15-Jan-2023 11:38:31.253 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED
15-Jan-2023 11:38:31.253 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=/usr/local/tomcat/conf/logging.properties
15-Jan-2023 11:38:31.253 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
15-Jan-2023 11:38:31.253 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
15-Jan-2023 11:38:31.254 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
15-Jan-2023 11:38:31.254 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dorg.apache.catalina.security.SecurityListener.UMASK=0027
15-Jan-2023 11:38:31.254 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xmx512m
15-Jan-2023 11:38:31.254 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xms512m
15-Jan-2023 11:38:31.255 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dignore.endorsed.dirs=
15-Jan-2023 11:38:31.255 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=/usr/local/tomcat
15-Jan-2023 11:38:31.255 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=/usr/local/tomcat
15-Jan-2023 11:38:31.255 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=/usr/local/tomcat/temp
15-Jan-2023 11:38:31.259 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded Apache Tomcat Native library [1.2.31] using APR version [1.7.0].
15-Jan-2023 11:38:31.259 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true], UDS [true].
15-Jan-2023 11:38:31.260 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true]
15-Jan-2023 11:38:31.262 INFO [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized [OpenSSL 1.1.1k 25 Mar 2021]
15-Jan-2023 11:38:31.692 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]
15-Jan-2023 11:38:31.722 INFO [main] org.apache.catalina.startup.Catalina.load Server initialization in [702] milliseconds
15-Jan-2023 11:38:31.785 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina]
15-Jan-2023 11:38:31.786 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/9.0.53]
15-Jan-2023 11:38:31.804 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
15-Jan-2023 11:38:31.828 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in [106] milliseconds
MySQL configuration:
MySQL network configuration:
# Static config for eth0
auto eth0
iface eth0 inet static
address 192.168.123.10
netmask 255.255.255.0
gateway 192.168.123.1
up echo nameserver 192.168.123.1 > /etc/resolv.conf
MySQL container log:
[Entrypoint] MySQL Docker Image 5.7.40-1.2.10-server
[Entrypoint] Starting MySQL 5.7.40-1.2.10-server
2023-01-15T11:56:35.833384Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2023-01-15T11:56:35.834418Z 0 [Note] mysqld (mysqld 5.7.40) starting as process 1 ...
2023-01-15T11:56:35.837364Z 0 [Note] InnoDB: PUNCH HOLE support available
2023-01-15T11:56:35.837383Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2023-01-15T11:56:35.837389Z 0 [Note] InnoDB: Uses event mutexes
2023-01-15T11:56:35.837394Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2023-01-15T11:56:35.837408Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.12
2023-01-15T11:56:35.837413Z 0 [Note] InnoDB: Using Linux native AIO
2023-01-15T11:56:35.837630Z 0 [Note] InnoDB: Number of pools: 1
2023-01-15T11:56:35.837739Z 0 [Note] InnoDB: Using CPU crc32 instructions
2023-01-15T11:56:35.839001Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2023-01-15T11:56:35.845313Z 0 [Note] InnoDB: Completed initialization of buffer pool
2023-01-15T11:56:35.846788Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2023-01-15T11:56:35.858342Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
2023-01-15T11:56:35.922496Z 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
2023-01-15T11:56:35.922531Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2023-01-15T11:56:35.922601Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2023-01-15T11:56:36.061803Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2023-01-15T11:56:36.063369Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.
2023-01-15T11:56:36.063390Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.
2023-01-15T11:56:36.063846Z 0 [Note] InnoDB: Waiting for purge to start
2023-01-15T11:56:36.114026Z 0 [Note] InnoDB: 5.7.40 started; log sequence number 2755871
2023-01-15T11:56:36.114276Z 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
2023-01-15T11:56:36.114491Z 0 [Note] Plugin 'FEDERATED' is disabled.
2023-01-15T11:56:36.116861Z 0 [Note] InnoDB: Buffer pool(s) load completed at 230115 11:56:36
2023-01-15T11:56:36.123639Z 0 [Note] Found ca.pem, server-cert.pem and server-key.pem in data directory. Trying to enable SSL support using them.
2023-01-15T11:56:36.123665Z 0 [Note] Skipping generation of SSL certificates as certificate files are present in data directory.
2023-01-15T11:56:36.123674Z 0 [Warning] A deprecated TLS version TLSv1 is enabled. Please use TLSv1.2 or higher.
2023-01-15T11:56:36.123680Z 0 [Warning] A deprecated TLS version TLSv1.1 is enabled. Please use TLSv1.2 or higher.
2023-01-15T11:56:36.124675Z 0 [Warning] CA certificate ca.pem is self signed.
2023-01-15T11:56:36.124741Z 0 [Note] Skipping generation of RSA key pair as key files are present in data directory.
2023-01-15T11:56:36.125239Z 0 [Note] Server hostname (bind-address): '*'; port: 3306
2023-01-15T11:56:36.125408Z 0 [Note] IPv6 is available.
2023-01-15T11:56:36.125428Z 0 [Note] - '::' resolves to '::';
2023-01-15T11:56:36.125451Z 0 [Note] Server socket created on IP: '::'.
2023-01-15T11:56:36.184900Z 0 [Note] Event Scheduler: Loaded 0 events
2023-01-15T11:56:36.185163Z 0 [Note] mysqld: ready for connections.
Version: '5.7.40' socket: '/var/lib/mysql/mysql.sock' port: 3306 MySQL Community Server (GPL)
2023-01-15T11:57:04.985825Z 2 [Note] Access denied for user 'healthchecker'#'localhost' (using password: YES)
2023-01-15T11:57:35.393691Z 3 [Note] Access denied for user 'healthchecker'#'localhost' (using password: YES)
Any suggestions?

Docker-compose up throws Errors running first time and works ok after second run

When I run docker-compose up for the first time it throws Errors and is not working,
after second run everything works fine.
It is looking like something is missing during first run and is available during second run.
I want this working after first run.
These are my config files:
docker-compose.yml:
version: '3'
services:
api:
build: .
ports:
- "10012:10012"
database:
image: mysql
container_name: database
environment:
MYSQL_PASSWORD: ***
MYSQL_ROOT_PASSWORD: ***
MYSQL_USER: user
MYSQL_DATABASE: currencydb
ports:
- "3306:3306"
depends_on:
- api
Dockerfile:
FROM openjdk:8
ADD target/currency-rest-0.0.1-SNAPSHOT.jar .
EXPOSE 10011
CMD java -jar currency-rest-0.0.1-SNAPSHOT.jar
application.properties:
server.port=10012
spring.jpa.ddl-auto=create
spring.datasource.url=jdbc:mysql://database:3306/currencydb?useUnicode=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC
spring.datasource.username=root
spring.datasource.password=***
spring.jpa.hibernate.ddl-auto=update
hibernate.dialect=org.hibernate.dialect.MySQLDialect
hibernate.show_sql=true
Console output after first run:
PS C:\Users\wuher\desktop\currency-rest> docker-compose up
docker-compose : Building api
At line:1 char:1
+ docker-compose up
+ ~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (Building api:String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError
Step 1/4 : FROM openjdk:8
---> f8146facf376
Step 2/4 : ADD target/currency-rest-0.0.1-SNAPSHOT.jar .
---> fd52b0529742
Step 3/4 : EXPOSE 10011
---> Running in dba375d741f8
Removing intermediate container dba375d741f8
---> 2dd51a3c0782
Step 4/4 : CMD java -jar currency-rest-0.0.1-SNAPSHOT.jar
---> Running in 7d204a8fc8d5
Removing intermediate container 7d204a8fc8d5
---> 1010d46a1bb8
Successfully built 1010d46a1bb8
Successfully tagged currency-rest_api:latest
Image for service api was built because it did not already exist. To rebuild this image you must use `docker-compose build` or `docker-compose up --build`.
Creating currency-rest_api_1 ...
[1A[2KCreating currency-rest_api_1 ... [32mdone[0m[1B
Creating database ...
[1A[2KCreating database ... [32mdone[0m[1B
Attaching to currency-rest_api_1, database
[33mdatabase |[0m 2020-01-12 23:44:32+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.18-1debian9 started.
[33mdatabase |[0m 2020-01-12 23:44:32+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
[33mdatabase |[0m 2020-01-12 23:44:32+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.18-1debian9 started.
[33mdatabase |[0m 2020-01-12 23:44:32+00:00 [Note] [Entrypoint]: Initializing database files
[33mdatabase |[0m 2020-01-12T23:44:32.472398Z 0 [Warning] [MY-011070] [Server] 'Disabling symbolic links using --skip-symbolic-links (or equivalent) is the default. Consider not using this option as it' is deprecated and will be removed in a future rele
ase.
[33mdatabase |[0m 2020-01-12T23:44:32.472481Z 0 [System] [MY-013169] [Server] /usr/sbin/mysqld (mysqld 8.0.18) initializing of server in progress as process 45
[36mapi_1 |[0m
[36mapi_1 |[0m . ____ _ __ _ _
[36mapi_1 |[0m /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
[36mapi_1 |[0m ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
[36mapi_1 |[0m \\/ ___)| |_)| | | | | || (_| | ) ) ) )
[36mapi_1 |[0m ' |____| .__|_| |_|_| |_\__, | / / / /
[36mapi_1 |[0m =========|_|==============|___/=/_/_/_/
[36mapi_1 |[0m :: Spring Boot :: (v2.2.2.RELEASE)
[36mapi_1 |[0m
[36mapi_1 |[0m 2020-01-12 23:44:32.707 INFO 6 --- [ main] p.k.c.CurrencyRestApplication : Starting CurrencyRestApplication v0.0.1-SNAPSHOT on b5facd58e175 with PID 6 (/currency-rest-0.0.1-SNAPSHOT.jar started by root in /)
[36mapi_1 |[0m 2020-01-12 23:44:32.750 INFO 6 --- [ main] p.k.c.CurrencyRestApplication : No active profile set, falling back to default profiles: default
[36mapi_1 |[0m 2020-01-12 23:44:33.783 INFO 6 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode.
[36mapi_1 |[0m 2020-01-12 23:44:33.904 INFO 6 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 104ms. Found 3 JPA repository interfaces.
[36mapi_1 |[0m 2020-01-12 23:44:34.426 INFO 6 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotat
ion.ProxyTransactionManagementConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
[36mapi_1 |[0m 2020-01-12 23:44:34.822 INFO 6 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 10012 (http)
[36mapi_1 |[0m 2020-01-12 23:44:34.841 INFO 6 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
[36mapi_1 |[0m 2020-01-12 23:44:34.841 INFO 6 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.29]
[33mdatabase |[0m 2020-01-12T23:44:35.145873Z 5 [Warning] [MY-010453] [Server] root#localhost is created with an empty password ! Please consider switching off the --initialize-insecure option.
[36mapi_1 |[0m 2020-01-12 23:44:35.391 INFO 6 --- [ main] org.apache.jasper.servlet.TldScanner : At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were sc
anned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
[36mapi_1 |[0m 2020-01-12 23:44:35.697 INFO 6 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
[36mapi_1 |[0m 2020-01-12 23:44:35.697 INFO 6 --- [ main] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 2840 ms
[36mapi_1 |[0m 2020-01-12 23:44:36.207 INFO 6 --- [ main] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [name: default]
[36mapi_1 |[0m 2020-01-12 23:44:36.293 INFO 6 --- [ main] org.hibernate.Version : HHH000412: Hibernate Core {5.4.9.Final}
[36mapi_1 |[0m 2020-01-12 23:44:36.499 INFO 6 --- [ main] o.hibernate.annotations.common.Version : HCANN000001: Hibernate Commons Annotations {5.1.0.Final}
[36mapi_1 |[0m 2020-01-12 23:44:36.665 INFO 6 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...
[36mapi_1 |[0m 2020-01-12 23:44:36.770 ERROR 6 --- [ main] com.zaxxer.hikari.pool.HikariPool : HikariPool-1 - Exception during pool initialization.
[36mapi_1 |[0m
[36mapi_1 |[0m com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure
[36mapi_1 |[0m
[36mapi_1 |[0m The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
[36mapi_1 |[0m at com.mysql.cj.jdbc.exceptions.SQLError.createCommunicationsException(SQLError.java:174) ~[mysql-connector-java-8.0.18.jar!/:8.0.18]
[36mapi_1 |[0m at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:64) ~]
/////
cut part of code
/////
[36mapi_1 |[0m Caused by: com.mysql.cj.exceptions.CJCommunicationsException: Communications link failure
[36mapi_1 |[0m
[36mapi_1 |[0m The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
[36mapi_1 |[0m at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:1.8.0_232]
[36mapi_1 |[0m at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[na:1.8.0_232]
[36mapi_1 |[0m at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:1.8.0_232]
[36mapi_1 |[0m at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[na:1.8.0_232]
[36mapi_1 |[0m at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:61) ~[mysql-connector-java-8.0.18.jar!/:8.0.18]
[36mapi_1 |[0m at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:105) ~[mysql-connector-java-8.0.18.jar!/:8.0.18]
[36mapi_1 |[0m at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:151) ~[mysql-connector-java-8.0.18.jar!/:8.0.18]
[36mapi_1 |[0m at com.mysql.cj.exceptions.ExceptionFactory.createCommunicationsException(ExceptionFactory.java:167) ~[mysql-connector-java-8.0.18.jar!/:8.0.18]
[36mapi_1 |[0m at com.mysql.cj.protocol.a.NativeSocketConnection.connect(NativeSocketConnection.java:91) ~[mysql-connector-java-8.0.18.jar!/:8.0.18]
[36mapi_1 |[0m at com.mysql.cj.NativeSession.connect(NativeSession.java:144) ~[mysql-connector-java-8.0.18.jar!/:8.0.18]
[36mapi_1 |[0m at com.mysql.cj.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:956) ~[mysql-connector-java-8.0.18.jar!/:8.0.18]
[36mapi_1 |[0m at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:826) ~[mysql-connector-java-8.0.18.jar!/:8.0.18]
[36mapi_1 |[0m ... 57 common frames omitted
[36mapi_1 |[0m Caused by: java.net.ConnectException: Connection refused (Connection refused)
[36mapi_1 |[0m at java.net.PlainSocketImpl.socketConnect(Native Method) ~[na:1.8.0_232]
[36mapi_1 |[0m at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) ~[na:1.8.0_232]
[36mapi_1 |[0m at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) ~[na:1.8.0_232]
[36mapi_1 |[0m at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) ~[na:1.8.0_232]
[36mapi_1 |[0m at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) ~[na:1.8.0_232]
[36mapi_1 |[0m at java.net.Socket.connect(Socket.java:607) ~[na:1.8.0_232]
[36mapi_1 |[0m at com.mysql.cj.protocol.StandardSocketFactory.connect(StandardSocketFactory.java:155) ~[mysql-connector-java-8.0.18.jar!/:8.0.18]
[36mapi_1 |[0m at com.mysql.cj.protocol.a.NativeSocketConnection.connect(NativeSocketConnection.java:65) ~[mysql-connector-java-8.0.18.jar!/:8.0.18]
[36mapi_1 |[0m ... 60 common frames omitted
[36mapi_1 |[0m
[36mapi_1 |[0m 2020-01-12 23:44:36.771 WARN 6 --- [ main] o.h.e.j.e.i.JdbcEnvironmentInitiator : HHH000342: Could not obtain connection to query metadata : Communications link failure
[36mapi_1 |[0m
[36mapi_1 |[0m The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
[36mapi_1 |[0m 2020-01-12 23:44:36.775 WARN 6 --- [ main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: Invocation of init method failed; nested exception is org.hibernate.service.spi.ServiceExce
ption: Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment]
[36mapi_1 |[0m 2020-01-12 23:44:36.779 INFO 6 --- [ main] o.apache.catalina.core.StandardService : Stopping service [Tomcat]
[36mapi_1 |[0m 2020-01-12 23:44:36.798 INFO 6 --- [ main] ConditionEvaluationReportLoggingListener :
[36mapi_1 |[0m
[36mapi_1 |[0m Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
[36mapi_1 |[0m 2020-01-12 23:44:36.801 ERROR 6 --- [ main] o.s.boot.SpringApplication : Application run failed
///////
cut part of info
///////
[36mcurrency-rest_api_1 exited with code 1
[0m[33mdatabase |[0m 2020-01-12 23:44:38+00:00 [Note] [Entrypoint]: Database files initialized
[33mdatabase |[0m 2020-01-12 23:44:38+00:00 [Note] [Entrypoint]: Starting temporary server
[33mdatabase |[0m 2020-01-12T23:44:38.668558Z 0 [Warning] [MY-011070] [Server] 'Disabling symbolic links using --skip-symbolic-links (or equivalent) is the default. Consider not using this option as it' is deprecated and will be removed in a future rele
ase.
[33mdatabase |[0m 2020-01-12T23:44:38.668651Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.18) starting as process 94
[33mdatabase |[0m 2020-01-12T23:44:39.078017Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
[33mdatabase |[0m 2020-01-12T23:44:39.082365Z 0 [Warning] [MY-011810] [Server] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory.
[33mdatabase |[0m 2020-01-12T23:44:39.102708Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.18' socket: '/var/run/mysqld/mysqld.sock' port: 0 MySQL Community Server - GPL.
[33mdatabase |[0m 2020-01-12 23:44:39+00:00 [Note] [Entrypoint]: Temporary server started.
[33mdatabase |[0m 2020-01-12T23:44:39.243716Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Socket: '/var/run/mysqld/mysqlx.sock'
[33mdatabase |[0m Warning: Unable to load '/usr/share/zoneinfo/iso3166.tab' as time zone. Skipping it.
[33mdatabase |[0m Warning: Unable to load '/usr/share/zoneinfo/leap-seconds.list' as time zone. Skipping it.
[33mdatabase |[0m Warning: Unable to load '/usr/share/zoneinfo/zone.tab' as time zone. Skipping it.
[33mdatabase |[0m Warning: Unable to load '/usr/share/zoneinfo/zone1970.tab' as time zone. Skipping it.
[33mdatabase |[0m 2020-01-12 23:44:41+00:00 [Note] [Entrypoint]: Creating database currencydb
[33mdatabase |[0m 2020-01-12 23:44:41+00:00 [Note] [Entrypoint]: Creating user user
[33mdatabase |[0m 2020-01-12 23:44:41+00:00 [Note] [Entrypoint]: Giving user user access to schema currencydb
[33mdatabase |[0m
[33mdatabase |[0m 2020-01-12 23:44:41+00:00 [Note] [Entrypoint]: Stopping temporary server
[33mdatabase |[0m 2020-01-12T23:44:41.782901Z 14 [System] [MY-013172] [Server] Received SHUTDOWN from user root. Shutting down mysqld (Version: 8.0.18).
[33mdatabase |[0m 2020-01-12T23:44:43.508856Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.18) MySQL Community Server - GPL.
[33mdatabase |[0m 2020-01-12 23:44:43+00:00 [Note] [Entrypoint]: Temporary server stopped
[33mdatabase |[0m
[33mdatabase |[0m 2020-01-12 23:44:43+00:00 [Note] [Entrypoint]: MySQL init process done. Ready for start up.
[33mdatabase |[0m
[33mdatabase |[0m 2020-01-12T23:44:44.029991Z 0 [Warning] [MY-011070] [Server] 'Disabling symbolic links using --skip-symbolic-links (or equivalent) is the default. Consider not using this option as it' is deprecated and will be removed in a future rele
ase.
[33mdatabase |[0m 2020-01-12T23:44:44.030080Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.18) starting as process 1
[33mdatabase |[0m 2020-01-12T23:44:44.448592Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
[33mdatabase |[0m 2020-01-12T23:44:44.452896Z 0 [Warning] [MY-011810] [Server] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory.
[33mdatabase |[0m 2020-01-12T23:44:44.467507Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.18' socket: '/var/run/mysqld/mysqld.sock' port: 3306 MySQL Community Server - GPL.
[33mdatabase |[0m 2020-01-12T23:44:44.636049Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Socket: '/var/run/mysqld/mysqlx.sock' bind-address: '::' port: 33060
What am I doing wrong?
As per your docker-compose you are expecting your App to run before Database.
But App has a dependency on MySQL and if it's not up SpringBoot will throw error.
Please change your depends_on configuration like this.
version: '3'
services:
api:
build: .
ports:
- "10012:10012"
depends_on:
- database
database:
image: mysql
container_name: database
environment:
MYSQL_PASSWORD: ***
MYSQL_ROOT_PASSWORD: ***
MYSQL_USER: user
MYSQL_DATABASE: currencydb
ports:
- "3306:3306"
Refer more in detail here. Search for depends_on

Kubernetes Galera: WSREP: failed to open gcomm backend connection: 110:

I am trying to setup a Kubernetes Galera 3 Replica set. I am using:
https://github.com/kubernetes/kubernetes/tree/master/test/e2e/testing-manifests/statefulset/mysql-galera
The first pod spins up fine, but the second pod gets stuck:
1 [ERROR] WSREP: failed to open gcomm backend connection: 110: failed to reach primary view: 110 (Connection timed out)
at gcomm/src/pc.cpp:connect():162
2018-07-21 18:24:40 1 [ERROR] WSREP: gcs/src/gcs_core.cpp:gcs_core_open():208: Failed to open backend connection: -110 (Connection timed out)
2018-07-21 18:24:40 1 [ERROR] WSREP: gcs/src/gcs.cpp:gcs_open():1379: Failed to open channel 'mysql' at 'gcomm://mysql-0.galera.mysql.svc.cluster.local,mysql-1.galera.mysql.svc.cluster.local': -110 (Connection timed out)
2018-07-21 18:24:40 1 [ERROR] WSREP: gcs connect failed: Connection timed out
2018-07-21 18:24:40 1 [ERROR] WSREP: wsrep::connect(gcomm://mysql-0.galera.mysql.svc.cluster.local,mysql-1.galera.mysql.svc.cluster.local) failed: 7
2018-07-21 18:24:40 1 [ERROR] Aborting
Do I need to have etcd setup for this cluster to work? Any suggestions would be appreciated.
Thank you!
Kubernetes Info:
Client Version: version.Info{Major:"1", Minor:"11", GitVersion:"v1.11.1", GitCommit:"b1b29978270dc22fecc592ac55d903350454310a", GitTreeState:"clean", BuildDate:"2018-07-17T18:53:20Z", GoVersion:"go1.10.3", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"11", GitVersion:"v1.11.1", GitCommit:"b1b29978270dc22fecc592ac55d903350454310a", GitTreeState:"clean", BuildDate:"2018-07-17T18:43:26Z", GoVersion:"go1.10.3", Compiler:"gc", Platform:"linux/amd64"}

Will supervisor change the program master process

Supervisor version: 3.3.3
I use supervisor to manage gunicorn processes.It works very well, but recently when I send hub to supervisor to reload gunicorn, gunicorn logs show me occasionally that
[2018-07-03 16:16:49 +0000] [25949] [INFO] Handling signal: hup
[2018-07-03 16:16:49 +0000] [25949] [INFO] Hang up: Master
[2018-07-03 16:16:52 +0000] [18459] [INFO] Parent changed, shutting down: <Worker 18459>
[2018-07-03 16:16:52 +0000] [18459] [INFO] Worker exiting (pid: 18459)
[2018-07-03 16:17:00 +0000] [18458] [INFO] Parent changed, shutting down: <Worker 18458>
[2018-07-03 16:17:00 +0000] [18458] [INFO] Worker exiting (pid: 18458)
[2018-07-03 16:17:00 +0000] [18456] [INFO] Parent changed, shutting down: <Worker 18456>
[2018-07-03 16:17:00 +0000] [18456] [INFO] Worker exiting (pid: 18456)
[2018-07-03 16:17:00 +0000] [18455] [INFO] Parent changed, shutting down: <Worker 18455>
[2018-07-03 16:17:00 +0000] [18455] [INFO] Worker exiting (pid: 18455)
[2018-07-03 16:17:00 +0000] [18457] [INFO] Parent changed, shutting down: <Worker 18457>
I have no idea to handle this situation.
Is that supervisor changed the gunicorn master process?
and how can I deal with this situation?

One of the node can not start the mariadb in Galera Cluster

I have 3 nodes in my cluster, names: ha-node1, ha-node2, ha-node3.
The ha-node2 can not start the mariadb.service now, before is normal:
I use the below commands to show logs:
[root#ha-node2 ~]# systemctl status mariadb.service
● mariadb.service - MariaDB database server
Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
Drop-In: /etc/systemd/system/mariadb.service.d
└─migrated-from-my.cnf-settings.conf
Active: failed (Result: timeout) since Mon 2017-07-31 12:00:33 CST; 13min ago
Process: 59147 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= || VAR=`/usr/bin/galera_recovery`; [ $? -eq 0 ] && systemctl set-environment _WSREP_START_POSITION=$VAR || exit 1 (code=killed, signal=TERM)
Process: 59138 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
Jul 31 11:59:02 ha-node2 systemd[1]: Starting MariaDB database server...
Jul 31 12:00:33 ha-node2 systemd[1]: mariadb.service start-pre operation timed out. Terminating.
Jul 31 12:00:33 ha-node2 systemd[1]: Failed to start MariaDB database server.
Jul 31 12:00:33 ha-node2 systemd[1]: Unit mariadb.service entered failed state.
Jul 31 12:00:33 ha-node2 systemd[1]: mariadb.service failed.
And use journal -xe:
[root#ha-node2 ~]# journalctl -xe
Jul 31 12:14:49 ha-node2 attrd[2281]: notice: Removing all ha-node3 attributes for attrd_peer_change_cb
Jul 31 12:14:49 ha-node2 attrd[2281]: notice: Lost attribute writer ha-node3
Jul 31 12:14:49 ha-node2 attrd[2281]: notice: Removing ha-node3/3 from the membership list
Jul 31 12:14:49 ha-node2 attrd[2281]: notice: Purged 1 peers with id=3 and/or uname=ha-node3 from the membership cache
Jul 31 12:14:49 ha-node2 xinetd[1175]: START: mysqlchk pid=66355 from=::ffff:192.168.8.102
Jul 31 12:14:49 ha-node2 xinetd[1175]: EXIT: mysqlchk status=1 pid=66340 duration=0(sec)
Jul 31 12:14:49 ha-node2 xinetd[1175]: EXIT: mysqlchk status=1 pid=66341 duration=0(sec)
Jul 31 12:14:49 ha-node2 xinetd[1175]: EXIT: mysqlchk signal=13 pid=66355 duration=0(sec)
Jul 31 12:14:49 ha-node2 corosync[1444]: [TOTEM ] A new membership (192.168.8.102:11184) was formed. Members
Jul 31 12:14:49 ha-node2 corosync[1444]: [QUORUM] Members[1]: 2
Jul 31 12:14:49 ha-node2 corosync[1444]: [MAIN ] Completed service synchronization, ready to provide service.
Jul 31 12:14:49 ha-node2 crmd[2285]: notice: State transition S_ELECTION -> S_INTEGRATION [ input=I_ELECTION_DC cause=C_TIMER_POPPED origin=election_timeout_popped ]
Jul 31 12:14:49 ha-node2 crmd[2285]: warning: FSA: Input I_ELECTION_DC from do_election_check() received in state S_INTEGRATION
Jul 31 12:14:49 ha-node2 crmd[2285]: notice: Notifications disabled
Jul 31 12:14:49 ha-node2 corosync[1444]: [TOTEM ] A new membership (192.168.8.101:11188) was formed. Members joined: 1 3
Jul 31 12:14:49 ha-node2 pacemakerd[1675]: error: Node ha-node1[1] appears to be online even though we think it is dead
Jul 31 12:14:49 ha-node2 pacemakerd[1675]: notice: pcmk_cpg_membership: Node ha-node1[1] - state is now member (was lost)
Jul 31 12:14:49 ha-node2 pacemakerd[1675]: error: Node ha-node3[3] appears to be online even though we think it is dead
Jul 31 12:14:49 ha-node2 pacemakerd[1675]: notice: pcmk_cpg_membership: Node ha-node3[3] - state is now member (was lost)
Jul 31 12:14:49 ha-node2 attrd[2281]: notice: crm_update_peer_proc: Node ha-node1[1] - state is now member (was (null))
Jul 31 12:14:49 ha-node2 cib[2277]: notice: crm_update_peer_proc: Node ha-node1[1] - state is now member (was (null))
Jul 31 12:14:49 ha-node2 corosync[1444]: [QUORUM] This node is within the primary component and will provide service.
Jul 31 12:14:49 ha-node2 corosync[1444]: [QUORUM] Members[3]: 1 2 3
Jul 31 12:14:49 ha-node2 corosync[1444]: [MAIN ] Completed service synchronization, ready to provide service.
Jul 31 12:14:49 ha-node2 pacemakerd[1675]: notice: Membership 11188: quorum acquired (3)
Jul 31 12:14:49 ha-node2 stonith-ng[2279]: notice: crm_update_peer_proc: Node ha-node1[1] - state is now member (was (null))
Jul 31 12:14:49 ha-node2 cib[2277]: notice: crm_update_peer_proc: Node ha-node3[3] - state is now member (was (null))
Jul 31 12:14:49 ha-node2 attrd[2281]: notice: crm_update_peer_proc: Node ha-node3[3] - state is now member (was (null))
Jul 31 12:14:49 ha-node2 stonith-ng[2279]: notice: crm_update_peer_proc: Node ha-node3[3] - state is now member (was (null))
Jul 31 12:14:49 ha-node2 crmd[2285]: notice: Membership 11188: quorum acquired (3)
Jul 31 12:14:49 ha-node2 crmd[2285]: notice: pcmk_quorum_notification: Node ha-node1[1] - state is now member (was lost)
Jul 31 12:14:49 ha-node2 crmd[2285]: notice: pcmk_quorum_notification: Node ha-node3[3] - state is now member (was lost)
Jul 31 12:14:49 ha-node2 attrd[2281]: notice: Recorded attribute writer: ha-node3
Jul 31 12:14:49 ha-node2 attrd[2281]: notice: Processing sync-response from ha-node3
EDIT-1
I use clustercheck to check the status of cluster in the ha-node2, I found the connection is close, and the galera cluster node is not synced:
[root#ha-node2 ~]# clustercheck
HTTP/1.1 503 Service Unavailable
Content-Type: text/plain
Connection: close
Content-Length: 36
Galera cluster node is not synced.
And in the ha-node1 and ha-node3 is connection is close, and galera cluster node is synced:
[root#ha-node1 ~]# clustercheck
HTTP/1.1 200 OK
Content-Type: text/plain
Connection: close
Content-Length: 32
Galera cluster node is synced.
I personally see issue in message xinetd[1175]: EXIT: mysqlchk signal=13. From the xinetd man pages it is
For services with type =
INTERNAL, SIGTERM signal will be sent. For services without type =
INTERNAL, SIGKILL signall will be sent.
In your case it is SIGPIPE 13 Write on a pipe with no reader, Broken pipe (POSIX)
The most likely cause is:
Jul 31 12:14:49 ha-node2 attrd[2281]: notice: Lost attribute writer ha-node3 You have to trace this one to find out what is happening between ha-node2 and ha-node3 (I recommend tcpdump for that)
.
I would have to see more of your mysqlchk or the script that makes your HAproxy.
If nothing will help you can also try alternative HAClustering solution https://github.com/olafz/percona-clustercheck