dokku / dokku-daemon

A daemon wrapper around dokku
MIT License
32 stars 13 forks source link

Problem with Postgresql occurs when starting daemon service #19

Closed michaelklopf closed 6 years ago

michaelklopf commented 6 years ago

Hi,

when starting the daemon with systemctl start dokku-daemon.service, there are problems with Postgresql appearing.

As seen in the logs of systemctl systemctl status dokku-daemon.service:

dokku-daemon.service - dokku-daemon
   Loaded: loaded (/etc/systemd/system/dokku-daemon.service; disabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Thu 2018-01-11 12:45:30 UTC; 2s ago
  Process: 27979 ExecStartPost=/bin/chmod 777 ${DOKKU_SOCK_PATH} (code=exited, status=1/FAILURE)
  Process: 25846 ExecStartPost=/bin/sleep 2 (code=exited, status=0/SUCCESS)
  Process: 25845 ExecStart=/usr/bin/dokku-daemon (code=killed, signal=TERM)
  Process: 25836 ExecStartPre=/bin/bash -c DOKKU_SOCK_DIR=$(dirname ${DOKKU_SOCK_PATH}); if [ "$${DOKKU_SOCK_DIR}" != "/tmp" ]; then mkdir -p -m ${PERMS} $${DOKKU_SOCK_DIR}; chown ${USE
  Process: 25827 ExecStartPre=/bin/bash -c DOKKU_LOCK_DIR=$(dirname ${DOKKU_LOCK_PATH}); if [ "$${DOKKU_LOCK_DIR}" != "/tmp" ]; then mkdir -p -m ${PERMS} $${DOKKU_LOCK_DIR}; chown ${USE
 Main PID: 25845 (code=killed, signal=TERM)

Jan 11 12:45:30 dokku-512mb-fra1-01 dokku-daemon[25845]: /var/lib/dokku/plugins/enabled/postgres/help-functions: line 105: echo: write error: Broken pipe
Jan 11 12:45:30 dokku-512mb-fra1-01 dokku-daemon[25845]: tput: unknown terminal "unknown"
Jan 11 12:45:30 dokku-512mb-fra1-01 dokku-daemon[25845]: /var/lib/dokku/plugins/enabled/postgres/help-functions: line 105: echo: write error: Broken pipe
Jan 11 12:45:30 dokku-512mb-fra1-01 dokku-daemon[25845]: tput: unknown terminal "unknown"
Jan 11 12:45:30 dokku-512mb-fra1-01 dokku-daemon[25845]: /var/lib/dokku/plugins/enabled/postgres/help-functions: line 105: echo: write error: Broken pipe
Jan 11 12:45:30 dokku-512mb-fra1-01 dokku-daemon[25845]: tput: unknown terminal "unknown"
Jan 11 12:45:30 dokku-512mb-fra1-01 dokku-daemon[25845]: /var/lib/dokku/plugins/enabled/postgres/help-functions: line 105: echo: write error: Broken pipe
Jan 11 12:45:30 dokku-512mb-fra1-01 systemd[1]: Failed to start dokku-daemon.
Jan 11 12:45:30 dokku-512mb-fra1-01 systemd[1]: dokku-daemon.service: Unit entered failed state.
Jan 11 12:45:30 dokku-512mb-fra1-01 systemd[1]: dokku-daemon.service: Failed with result 'exit-code'.

To solve the issue, we disable postgres, start the daemon and enable postgres afterwards again

dokku plugin:disable postgres
-----> Plugin postgres disabled

systemctl start dokku-daemon.service

systemctl status dokku-daemon.service
● dokku-daemon.service - dokku-daemon
   Loaded: loaded (/etc/systemd/system/dokku-daemon.service; disabled; vendor preset: enabled)
   Active: active (running) since Thu 2018-01-11 12:46:24 UTC; 14s ago

dokku plugin:enable postgres
-----> Plugin postgres enabled

We don't know if something went wrong, or if we did something wrong during configuration and setup.

Kind regards,

Michael

beydogan commented 6 years ago

Have you tried to start the service with sudo?

thoresuenert commented 6 years ago

Does not solve the problem.