vishnubob / wait-for-it

Pure bash script to test and wait on the availability of a TCP host and port
MIT License
9.36k stars 2.27k forks source link

Timeout is not support on Centos 7 #65

Open vinhha96 opened 5 years ago

vinhha96 commented 5 years ago

Hi guy, when I run this script in OSX, everything will be ok. But when I deploy docker on cloud with CentOS 7, this error is shown.

timeout: can't execute '15': No such file or directory

Please help me this problem.

martialblog commented 5 years ago

@vishnubob Hi, I just tested it and it worked fine.

$ docker pull centos:7
$ docker run -ti --rm centos:7
[root@466142fdbeae wait-for-it]# yum install -y git
[root@466142fdbeae wait-for-it]# git clone https://github.com/vishnubob/wait-for-it.git
[root@466142fdbeae wait-for-it]# ./wait-for-it.sh -t 0 -h localhost -p 3306
wait-for-it.sh: waiting for localhost:3306 without a timeout

You sure you did call the script correctly?

atkrad commented 2 years ago

Hey @vinhha96

You can use the Wait4X, It's already compatible with Linux and OSX. https://github.com/atkrad/wait4x/releases