palfrey / wharf

Web UI for Dokku
https://tevps.net/blog/2018/2/28/wharf-dokku-web-frontend/
GNU Affero General Public License v3.0
248 stars 21 forks source link

Server Error 500 after successfull deployment #71

Closed grandfso closed 4 years ago

grandfso commented 4 years ago

Hi, after successfull deployment of wharf, the app asked me for login and password, which I provided, but then I am welcomed by Server Error (500)

In nginx logs there's nothing (empy error log).

running dokku logs wharf shows me some error:

2020-01-21T09:26:26.379263914Z app[web.1]: Internal Server Error: /
2020-01-21T09:26:26.379299738Z app[web.1]: Traceback (most recent call last):
2020-01-21T09:26:26.379307518Z app[web.1]:   File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 34, in inner
2020-01-21T09:26:26.379326778Z app[web.1]:     response = get_response(request)
2020-01-21T09:26:26.379333749Z app[web.1]:   File "/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py", line 115, in _get_response
2020-01-21T09:26:26.379340768Z app[web.1]:     response = self.process_exception_by_middleware(e, request)
2020-01-21T09:26:26.379347388Z app[web.1]:   File "/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py", line 113, in _get_response
2020-01-21T09:26:26.379354195Z app[web.1]:     response = wrapped_callback(request, *callback_args, **callback_kwargs)
2020-01-21T09:26:26.379360860Z app[web.1]:   File "/app/apps/views.py", line 115, in index
2020-01-21T09:26:26.379367685Z app[web.1]:     apps = app_list()
2020-01-21T09:26:26.379374193Z app[web.1]:   File "/app/apps/views.py", line 107, in app_list
2020-01-21T09:26:26.379381048Z app[web.1]:     data = run_cmd_with_cache("apps:list")
2020-01-21T09:26:26.379387830Z app[web.1]:   File "/app/apps/views.py", line 39, in run_cmd_with_cache
2020-01-21T09:26:26.379394703Z app[web.1]:     res = run_cmd(cmd)
2020-01-21T09:26:26.379401195Z app[web.1]:   File "/app/apps/views.py", line 29, in run_cmd
2020-01-21T09:26:26.379407755Z app[web.1]:     return res.get().strip()
2020-01-21T09:26:26.379414233Z app[web.1]:   File "/usr/local/lib/python3.6/site-packages/celery/result.py", line 191, in get
2020-01-21T09:26:26.379420938Z app[web.1]:     on_message=on_message,
2020-01-21T09:26:26.379427383Z app[web.1]:   File "/usr/local/lib/python3.6/site-packages/celery/backends/base.py", line 462, in wait_for_pending
2020-01-21T09:26:26.379434142Z app[web.1]:     return result.maybe_throw(propagate=propagate, callback=callback)
2020-01-21T09:26:26.379440755Z app[web.1]:   File "/usr/local/lib/python3.6/site-packages/celery/result.py", line 296, in maybe_throw
2020-01-21T09:26:26.379447525Z app[web.1]:     self.throw(value, self._to_remote_traceback(tb))
2020-01-21T09:26:26.379454095Z app[web.1]:   File "/usr/local/lib/python3.6/site-packages/celery/result.py", line 289, in throw
2020-01-21T09:26:26.379460800Z app[web.1]:     self.on_ready.throw(*args, **kwargs)
2020-01-21T09:26:26.379467351Z app[web.1]:   File "/usr/local/lib/python3.6/site-packages/vine/promises.py", line 217, in throw
2020-01-21T09:26:26.379474043Z app[web.1]:     reraise(type(exc), exc, tb)
2020-01-21T09:26:26.379500098Z app[web.1]:   File "/usr/local/lib/python3.6/site-packages/vine/five.py", line 179, in reraise
2020-01-21T09:26:26.379508505Z app[web.1]:     raise value
2020-01-21T09:26:26.379515619Z app[web.1]: paramiko.ssh_exception.NoValidConnectionsError: [Errno None] Unable to connect to port 22 on 172.17.0.1
2020-01-21T09:26:26.381507248Z app[web.1]: "GET / HTTP/1.1" 500 145
grandfso commented 4 years ago

Solved it, posting this here for future reference.

The issue was, that the SSH on Dokku host is running on non standard port. The wharf seems to try to connect using default port 22.

I attepted to change the port used by wharf by setting ENV variable in the following way:

# on dokku host
dokku config:set wharf DOKKU_SSH_PORT=22222

After this, it stopped giving me Error 500

palfrey commented 4 years ago

I've added some extra notes to the README about this