I’m having trouble getting WSGI to work after upgrading to Server 7.05…
I switched from fastCGI to WSGI with the instructions in the manual.for nginx Then, I reloaded the nginix config file and started seahub using “seahub.sh.hstart”.
Now, when I connect, to the web server, the server times out with the following error message:
seahub.error.log
02/04 00:22:46 [error] 12598#0: *81 upstream timed out (110: Connection timed out) while reading response header from upstream, client: xx.xxx.xxx.xxx, server: , request: "GET /api2/repos/ HTTP/1.1", upstream: "fastcgi://127.0.0.1:8000", host: "xx.xxx.xxx.xxx"
My understanding is that the nginx startup script handles this when it loads the nginx config file. Is there another startup script that needs to be modified?
I do not think so. There is no memcached config file in /etc
I have now been able to establish an unsecured connection through a web browser.
I also now see entries in error.log and access.log. I don’t understand why these entries are contained in these log files as opposed to the x.seahub.log files. Here are a few lines of output:
error.log
`2021/02/05 23:35:22 [error] 12598#0: *2063 open() "/sefaile/seafile-server-latest/seahub/media/js/base.js" failed (2: No such file or directory), client: 192.168.x.xxx, server: seafile.example.com, request: "GET /media/js/base.js?t=1569203823 HTTP/1.1", host: "192.168.x.xx", referrer: http://192.168.x.xx/accounts/login/?next=/`
I feel flattered but I am not an expert… I am just an ordinary Seafile user tweaking some servers from times to times !
What @mercury was pointing out is that your Seafile base folder is called sefaile instead of seafile which might cause errors if you use standard configuration files for your server.
If you connect a web browser to your server’s IP on port 8000, do Seafile and Seahub work properly ?
Not sure why I didn’t realize that the typo Mercury was pointing out was in the message–not in the .py file. I just fixed that and it solved one of the problems.
Now, I am able to connect via Seafile Client http via port 8000, but not https. The seafile.error log still produces the entries indicating fastcgi is being called somehow.
Also, I notice that in ccnet.conf, I have the following entry:
Nate,
I am glad I could be of some help.
I took a look on my production server and on my test ones for the ccnet conf file.
On my production server I have : SERVICE_URL = https://<fqdn>
On my tests servers, which are not public, I have the following : SERVICE_URL = http://10.44.3.101:8000
From my point of view it should match with the address and protocol you are using.
If you are using a web server (Apache ou Nginx) for HTTPS, you should probably keep “https://xxxx.xx.net” but without the 8001 port.
Seahub lessons to port 8000 and uses HTTP. Which is why you can not connect directly in HTTPS.
As I said, I am not an expert, but you should try to change your configuration accordingly.
This looks like a partial seahub_settings.py configuration, not like ccnet.conf…
In the ccnet config database is not set like this at all
Here is what it should look like :
[General]
SERVICE_URL = https://<your fqdn>
[Database]
ENGINE = mysql
HOST = 127.0.0.1
PORT = 3306
USER = <dbuser>
PASSWD = <yourdbpassword>
DB = ccnet-db
CONNECTION_CHARSET = utf8
Thanks for catching my dumb error–I posted my seahub_settings.py file by mistake (seem that I’ve been staying up way too late working on this ).
Here is my real ccnet.conf file:
[General]
USER_NAME = seafile
ID = xxxxx
NAME = seafile
SERVICE_URL = https://xxx.net:8001
[Client]
PORT = 13419
[Database]
ENGINE = mysql
HOST = 127.0.0.1
PORT = 3306
USER = >username>
PASSWD = <password>
DB = ccnet-db
CONNECTION_CHARSET = utf8
I removed the port for the SERVICE_URL and restarted seafile and seahub, but still cannot connect via HTTPS.
Does this mean that I should not use HTTPS in my client settings? When I try to connect via HTTP in browser, it connects but the connection shows “unsecured”. Do you know whether an HTTP connection to Seahub is supposed to be changed to HTTPS after the connection is made? I haven’t been able to fully understand that.
From the below log file entry, it appears to at least begin a connection to seahub when I use HTTPS:
Ok, let’s make things clearer regarding HTTP and HTTPS :
Seahub listens to HTTP connections on port 8000
Your web server daemon handles HTTPS requests and sends them in HTTP to Seahub on port 8000.
Therefore :
Continue to use HTTPS for your connections, it is more secured
If you try to connect to your internal IP address on port 8000 do it in HTTP
Your ccnet configuration file seems fine.
The only doubt I have got is on the SERVICE_URL = https://xxx.net:8001 line.
I would put SERVICE_URL = https://xxx.net (without the :8001)
By the way, where does this 8001 port comes from ?
Have you got any other file referring to it ?
What have you got in your gunicorn.conf.py file for the bind value ?
I seem to have solved the problem by changing the listen port in the nginx seafile.conf file from 80 to 443. Now, I’m able to connect and login to the seahub web interface via HTTPS, although some of the images are not loading and html format is not correct. I’m going to look into that next.