Haufe-Lexware / wicked.haufe.io

An API Management system based on Mashape Kong
http://wicked.haufe.io
Other
123 stars 37 forks source link

Wicked box start timing out #206

Closed rshrimp closed 4 years ago

rshrimp commented 5 years ago

Hello Haufe-Lexware,... I am running into an issue installing wicked box and starting it on Ubuntu linux 18.04. I followed the instructions for linux to pass the docker host like this:

wicked box start . --docker-host 192.168.100.69

... but i still am getting the below error and cant start wicked box.

Probing ping endpoint http://localhost:8000/ping-portal Waiting for environment to start............................................................ *** Start of wicked box timed out!

The log file shows:

docker logs -f wicked-box Using kong database host: 192.168.100.69 Using kong database port: 5432 Trusting all IPs to send correct X-Forwarded-Proto values 7:C 28 Jun 17:25:05.898 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo 7:C 28 Jun 17:25:05.898 # Redis version=4.0.12, bits=64, commit=1be97168, modified=0, pid=7, just started 7:C 28 Jun 17:25:05.898 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf 7:M 28 Jun 17:25:05.902 * Running mode=standalone, port=6379. 7:M 28 Jun 17:25:05.902 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128. 7:M 28 Jun 17:25:05.902 # Server initialized 7:M 28 Jun 17:25:05.902 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled. 7:M 28 Jun 17:25:05.902 * Ready to accept connections wtfc.sh: waiting 30 seconds for nc -z 192.168.100.69 5432 Terminated wtfc.sh: timeout occurred after waiting 30 seconds for nc -z 192.168.100.69 5432 to return status: 0 (was status: 143)

DonMartin76 commented 5 years ago

The wicked box can apparently not access the Postgres instance, for some reason.

I would need to try to reproduce this. You are using which type of machine to run Ubuntu in this case?

I know that people are actively using this on Ubuntu and it should be working; do you happen to have something else running on port 5432? Is the docker container for postgres running? What does docker ps say?

Do you have other IP addresses assigned to your machine? What happens if you use one of those as --docker-host parameter?

DonMartin76 commented 5 years ago

Something else: Just had somebody try this out on Ubuntu/Elementary, and for him it worked simply without specifying the --docker-host parameter. It may be that the docs are slightly out of date here, the wicked CLI should automatically extract the correct IP address on Linux.

rshrimp commented 5 years ago

I used the following to start wicked box after postgres started without issues. wicked box start . --docker-host 192.168.1.1 docker ps has the following output


CONTAINER ID        IMAGE                            COMMAND                  CREATED              STATUS              PORTS                                                                               NAMES
5bcf346f4449        haufelexware/wicked.box:latest   "/usr/src/app/docker…"   About a minute ago   Up About a minute   3001-3005/tcp, 0.0.0.0:3000->3000/tcp, 3010/tcp, 0.0.0.0:8000->8000/tcp, 8001/tcp   wicked-box
e4c0afbc4f54        postgres:11-alpine               "docker-entrypoint.s…"   2 minutes ago        Up 2 minutes        0.0.0.0:5432->5432/tcp  ```
DonMartin76 commented 5 years ago

It has proved to work on other Ubuntu machines by simply omitting the --docker-host parameter. Have you tried that?

rshrimp commented 5 years ago

Yes ,I have:

~/wicked$ wicked box start .
Linux detected: Attempting to resolve local machine's IP address...
Finding local IP addresses...
[ '192.168.100.69', '172.17.0.1', '10.16.10.6' ]
Auto-setting --docker-host to 192.168.100.69.
Will use Postgres on port 5432.
Pulling 'haufelexware/wicked.box:latest'...
Finished pull of 0 layers.                                                                            
Pull finished.
wicked-in-a-box has started. When the startup has finished, point your browser to:

  http://localhost:3000

You can follow the logs with the following command:

  docker logs -f wicked-box

Stop the wicked in a box container with the following command:

  wicked box stop

Probing ping endpoint http://localhost:8000/ping-portal
Waiting for environment to start............................................................
*** Start of wicked box timed out!
DonMartin76 commented 5 years ago

Can you try with a psql command line which IP you can connect to?

$ psql -U kong -d kong -h <ip>

Does that work with any of the above IP addresses? And if so, which one?

DonMartin76 commented 4 years ago

Closing due to no activity. If you still need assistance on this, feel free to re-open.