citusdata / docker

:ship: Docker images and configuration for Citus
Apache License 2.0
249 stars 100 forks source link

/docker-entrypoint.sh: no such file or directory #232

Closed bouzouidja closed 3 years ago

bouzouidja commented 3 years ago

I am trying to setup a Citus cluster by executing the docker-compose -p citus up by using the latest tag (master branch) as in the Citus manual. This last work perfectly until the worker node creation stage at the wait-for-manager.sh command. It seems that the file /docker-entrypoint.sh is not found. Does this step is mandatory? any idea on how i may avoid this error?

Thank you in advance.

ReneBoehm commented 3 years ago

We've got the same issue here. The cause is the script "wait-for-manager.sh" which tries to exec /docker-entrypoint.sh as soon as the manager is available. But the entrypoint can be found in /usr/local/bin.

bouzouidja commented 3 years ago

Hello @ReneBoehm yes you are right when i set the right path it work perfectely! Thank you ! @ReneBoehm have you an idea on how to make the manager listening to workers node that maybe created by another host in the same network using the command >>>> docker-compose -p citus scale worker=3 for example. The manager cannot add nodes created by other host within the network.

Thank you! .

aliyildizoz commented 3 years ago

@bouzouidja @ReneBoehm Hello, can you explain how you solved the problem, I have the same problem? Do I need to make any changes to the docker files?

bouzouidja commented 3 years ago

@AliYildizoz909 you need to change the line >>> exec gosu postgres "/docker-entrypoint.sh" "postgres" in wait-for-manager.sh script to >>>>exec gosu postgres "/usr/local/bin/docker-entrypoint.sh" "postgres" in order to make the worker find the file.

aliyildizoz commented 3 years ago

Got it, thank you very much.

ReneBoehm commented 3 years ago

Hi @bouzouidja,

I don't know how the manager works internally but running the containers in a docker swarm should do the trick IMHO, since the stack internal network is transparent to the containers. Every container in the stack can talk to every other service regardless on what host of the swarm it might have been started.

Hello @ReneBoehm yes you are right when i set the right path it work perfectely! Thank you ! @ReneBoehm have you an idea on how to make the manager listening to workers node that maybe created by another host in the same network using the command >>>> docker-compose -p citus scale worker=3 for example. The manager cannot add nodes created by other host within the network.

Thank you! .

bouzouidja commented 3 years ago

Yes the only way that i see is to use the docker swarm. Thank you

ReneBoehm commented 3 years ago

We are building a distributed test setup with a swarm right now, to do some benchmarking. Let's see what the outcome is.

marrocksd commented 3 years ago

I reverted back to 10.0.3 due to this error. I applied the fix above and I was able to run the docker, but I couldn't get the manager to detect the worker container. @ReneBoehm Looking forward to seeing your result

hanefi commented 3 years ago

I did some digging and realized that docker images for postgres base image used to have a symlink, but they removed it.

- RUN ln -s usr/local/bin/docker-entrypoint.sh / # backwards compat

https://github.com/docker-library/postgres/commit/517c64f87e6661366b415df3f2273c76cea428b0#diff-be72594b81f7ffc23a3fd959ffa1f0e17c8043c1c1348b176f270f815d78d6cdL186

Once we fix all the dependencies on the existence of said symlink, we can close this issue

gurkanindibay commented 3 years ago

Fixed with PR#233 Thanks for the issue and your suggested solution

bouzouidja commented 3 years ago

Thank you @hanefi @gurkanindibay !