DiUS / pact_broker-docker

'Dockerised' pact broker
http://pact.io
MIT License
76 stars 102 forks source link

Cloud Foundry Push dockerized image #91

Open tcanavan opened 5 years ago

tcanavan commented 5 years ago

Pre issue-raising checklist

I have already (please mark the applicable with an x): x

Software versions

Expected behaviour

Container starts

Actual behaviour

Tries to start but gets the following error

2019-05-16T12:07:45.63+0200 [API/1] OUT Updated app with guid 629d8fe3-8331-43bd-a364-ba3f16f97268 ({"state"=>"STARTED"})
   2019-05-16T12:07:45.79+0200 [CELL/0] OUT Cell c75793fe-4037-4b5c-8102-79cb0eed788b creating container for instance 19540041-8cd2-466f-5c39-7154
   2019-05-16T12:07:47.72+0200 [CELL/0] OUT Cell c75793fe-4037-4b5c-8102-79cb0eed788b successfully created container for instance 19540041-8cd2-466f-5c39-7154
   2019-05-16T12:07:47.90+0200 [CELL/0] OUT Starting health monitoring of container
   2019-05-16T12:07:48.19+0200 [APP/PROC/WEB/0] ERR *** Running /etc/my_init.d/00_regen_ssh_host_keys.sh...
   2019-05-16T12:07:48.20+0200 [APP/PROC/WEB/0] ERR *** Running /etc/my_init.d/10_syslog-ng.init...
   2019-05-16T12:07:48.25+0200 [APP/PROC/WEB/0] OUT May 16 10:07:48 19540041-8cd2-466f-5c39-7154 syslog-ng[63]: syslog-ng starting up; version='3.13.2'
   2019-05-16T12:07:48.25+0200 [APP/PROC/WEB/0] ERR *** Running /etc/my_init.d/30_presetup_nginx.sh...
   2019-05-16T12:07:48.26+0200 [APP/PROC/WEB/0] ERR *** Booting runit daemon...
   2019-05-16T12:07:48.27+0200 [APP/PROC/WEB/0] ERR *** Runit started as PID 82
   2019-05-16T12:07:48.28+0200 [APP/PROC/WEB/0] OUT ok: run: /etc/service/nginx-log-forwarder: (pid 88) 0s
   2019-05-16T12:07:48.28+0200 [APP/PROC/WEB/0] OUT May 16 10:07:48 19540041-8cd2-466f-5c39-7154 cron[94]: (CRON) INFO (pidfile fd = 3)
   2019-05-16T12:07:48.28+0200 [APP/PROC/WEB/0] OUT May 16 10:07:48 19540041-8cd2-466f-5c39-7154 cron[94]: (CRON) INFO (Running @reboot jobs)
   2019-05-16T12:07:49.28+0200 [APP/PROC/WEB/0] OUT [ N 2019-05-16 10:07:48.3420 102/T1 age/Wat/WatchdogMain.cpp:1366 ]: Starting Passenger watchdog...
   2019-05-16T12:07:49.28+0200 [APP/PROC/WEB/0] OUT [ N 2019-05-16 10:07:48.3657 105/T1 age/Cor/CoreMain.cpp:1339 ]: Starting Passenger core...
   2019-05-16T12:07:49.28+0200 [APP/PROC/WEB/0] OUT [ N 2019-05-16 10:07:48.3659 105/T1 age/Cor/CoreMain.cpp:256 ]: Passenger core running in multi-application mode.
   2019-05-16T12:07:49.28+0200 [APP/PROC/WEB/0] OUT [ N 2019-05-16 10:07:48.4175 105/T1 age/Cor/CoreMain.cpp:1014 ]: Passenger core online, PID 105
   2019-05-16T12:07:51.28+0200 [APP/PROC/WEB/0] OUT [ N 2019-05-16 10:07:50.5847 105/T5 age/Cor/SecurityUpdateChecker.h:519 ]: Security update check: no update found (next check in 24 hours)
   2019-05-16T12:08:48.63+0200 [HEALTH/0] ERR Failed to make TCP connection to port 443: connection refused
   2019-05-16T12:08:48.63+0200 [CELL/0] ERR Timed out after 1m0s: health check never passed.
   2019-05-16T12:08:48.63+0200 [CELL/SSHD/0] OUT Exit status 0
   2019-05-16T12:08:49.05+0200 [APP/PROC/WEB/0] ERR *** Shutting down runit daemon (PID 82)...
   2019-05-16T12:08:49.05+0200 [APP/PROC/WEB/0] ERR *** Running /etc/my_init.post_shutdown.d/10_syslog-ng.shutdown...
   2019-05-16T12:08:49.06+0200 [APP/PROC/WEB/0] OUT May 16 10:08:49 19540041-8cd2-466f-5c39-7154 syslog-ng[63]: syslog-ng shutting down; version='3.13.2'
   2019-05-16T12:08:50.07+0200 [APP/PROC/WEB/0] ERR *** Init system aborted.
   2019-05-16T12:08:50.07+0200 [APP/PROC/WEB/0] ERR *** Killing all processes...

Steps to reproduce

cf push smt-pact-broker --docker-image dius/pact-broker

Relevent log files

Please ensure you set logging to DEBUG and attach any relevant log files here (or link from a gist).

mefellows commented 5 years ago

Given this container works on standard Docker environments, this must mean there is something special about CF. We can't be expected to be experts in every runtime, have you done any digging that means you can give us something to look at?

Furthermore, we also now have an "edge" tag available that has a different runtime, it might be worth giving that a try also.

See #90

tcanavan commented 5 years ago

Could it be that our cloud foundry only supports https. Do I need also to install nginx as a reverse proxy?

bethesque commented 5 years ago

This line: 2019-05-16T12:08:48.63+0200 [HEALTH/0] ERR Failed to make TCP connection to port 443: connection refused suggests that whatever is externally monitoring the instance is doing a healthcheck on port 443. Port 443 isn't configured or exposed on the broker docker image (it's expected that you'll set up your own SSL configuration).

bethesque commented 5 years ago

So, yes, you'll need to set up nginx yourself.