502 Bad Gateway (Seafile) after DDNS

Post Reply
Posts: 1
Joined: Wed Dec 19, 2018 12:31 am
languages_spoken: english

502 Bad Gateway (Seafile) after DDNS

Unread post by archivepipper » Sun Jan 13, 2019 6:04 am

Hi, I've been following the tutorial over here (https://wiki.odroid.com/odroid-xu4/soft ... 3_advanced) from 01_beginning until this 03_advanced section to install Seafile on my XU4. Everything worked well up until accessing it via DDNS.

I've just finished the steps to forward Seafile through DDNS externally but now anytime I try and load the interface at [myserverurl]:8000 (through DDNS or locally) I get a 502 Bad Gateway - nginx/1.10.3 error. I can confirm both seahub and seafile are running and I'm pretty sure it has to do with the code I add in Extra options during the 3. Apply it to each program Seafile step. Is there maybe a mistake in the extra options code provided?

Can anyone help me in moving forwards to restore the Seafile web UI?


Code: Select all

# -*- coding: utf-8 -*-

    'default': {
        'ENGINE': 'django.db.backends.mysql',
        'NAME': 'seahub-db',
        'USER': 'seafile',
        'HOST': '',
        'PORT': '3306'


    'default': {
        'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
        'LOCATION': '',
HTTP_SERVER_ROOT = 'http://myddnsurl.com/seafhttp'

Code: Select all

ID = bfc6c59160b8673e785fe5de5c0305f711673c82
NAME = Cloud
SERVICE_URL = http:/myddnsurl.com

PORT = 13419

ENGINE = mysql
PORT = 3306
USER = seafile
DB = ccnet-db

Code: Select all

port = 8082

type = mysql
host =
port = 3306
user = seafile
password = CENSORED
db_name = seafile-db
connection_charset = utf8
/var/log/nginx/error.log.1 (excerpt, lots of the below repeating):

Code: Select all

[emerg] 3361#3361: bind() to failed (98: Addre$
$ Address already in use)
And if I run netstat -tulpn:
1446/monit and 1336/cnid_metad are on port 8000. Could this be conflicting with Seafile & Seahub?

I'm happy to share error logs or additional info, just let me know if and what's needed :)

Posts: 140
Joined: Fri Sep 22, 2017 5:54 pm
languages_spoken: English
ODROIDs: XU4, XU4Q + Cloudshell2

Re: 502 Bad Gateway (Seafile) after DDNS

Unread post by joshua.yang » Tue Jan 15, 2019 10:20 am


I haven't had trouble with conflicting port 8000. But in your case, it can be the cause for the Address already in use message.
So it may be worth trying to reload Nginx and stop/start Seafile/Seahub services. And should do double check Seafile/Seahub is still executed even after stopping the services. Or temporary close the cnid_metad process and proceed.

And you can check the logs of the Seafile itself. Please check them.

Code: Select all

# Seafile logs


Post Reply

Return to “Issues”

Who is online

Users browsing this forum: No registered users and 0 guests