502 Bad Gateway (Seafile) after DDNS

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

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?

/var/www/seafile/conf/seahub_settings.py:

Code: Select all

# -*- coding: utf-8 -*-
SECRET_KEY = "CENSORED"

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.mysql',
        'NAME': 'seahub-db',
        'USER': 'seafile',
        'PASSWORD': 'CENSORED',
        'HOST': '127.0.0.1',
        'PORT': '3306'
    }
}

TIME_ZONE = 'CENSORED'

CACHES = {
    'default': {
        'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
        'LOCATION': '127.0.0.1:11211',
    }
}
HTTP_SERVER_ROOT = 'http://myddnsurl.com/seafhttp'
SERVE_STATIC = False
/var/www/seafile/conf/ccnet.conf

Code: Select all

[General]
USER_NAME = Cloud
ID = bfc6c59160b8673e785fe5de5c0305f711673c82
NAME = Cloud
SERVICE_URL = http:/myddnsurl.com

[Client]
PORT = 13419

[Database]
ENGINE = mysql
HOST = 127.0.0.1
PORT = 3306
USER = seafile
PASSWD = CENSORED
DB = ccnet-db
CONNECTION_CHARSET = utf8
/var/www/seafile/conf/seafile.conf:

Code: Select all

[fileserver]
port = 8082

[database]
type = mysql
host = 127.0.0.1
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 0.0.0.0:8000 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 :)

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

Re: 502 Bad Gateway (Seafile) after DDNS

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

Hi.

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

{seafile_directory}/seafile-server-latest/runtime/*.log
{seafile_directory}/logs

Post Reply

Return to “Issues”

Who is online

Users browsing this forum: No registered users and 0 guests