1

When I run the container, it gets started, it does ✅ System checks and also prints the message "Yugabyted started successfully" And then when it tries to create the sample DB, it prints this error message. Anybody has any idea on this?

ysqlsh: could not connect to server: Connection refused Is the server running on host "localhost" (127.0.0.1) and accepting TCP/IP connections on port 5433? could not connect to server: Cannot assign requested address Is the server running on host "localhost" (::1) and accepting TCP/IP connections on port 5433?

Docker File

FROM yugabytedb/yugabyte:latest EXPOSE 7000 9000 5433 9042 COPY startup_sh.sh /bin/ WORKDIR /home RUN chmod +x /bin/startup_sh.sh ENTRYPOINT ["/bin/startup_sh.sh"]

startup_sh.sh is here #!/bin/bash set -e cd /bin/ yugabyted start cd /home/yugabyte/bin/ ysqlsh -c 'CREATE DATABASE yb_demo;' ysqlsh -d yugabyte;

theNewGuy
  • 23
  • 3

1 Answers1

0

Figured out the yugabyted start takes a while to get it started and when you try to run an exec command before that service is up, you get this error. You need to wait at least 10s for the service to be up. YB confirmed this as well

theNewGuy
  • 23
  • 3