File Upload Failed - Network Error

Hi,

for testing purpose I tried running Seafile with Docker on my personal laptop.
I followed the instructions here: hxxps://download.seafile.com/published/seafile-manual/docker/deploy%20seafile%20with%20docker.md

In short I downloaded docker-compose.yml and run docker-compose up -d.

Everything goes well but when I try to upload a file, I get a Network error as showed in the following screen:

I didn’t modify any configuration file.
I’m running “Debian GNU/Linux 10 (buster)” and “Docker version 19.03.12”.

Any idea?

I’ve been struggling with this problem all day … I can finally send and create files if you put your public domain (if you have one) in your SEAFILE_SERVER_HOSTNAME variable of your docker-compose.yml file or 127.0.0.1 (for example) if you prefer run it locally. Remember to modify your current docker-compose, delete your / opt / seafile folders, and run the new docker-compose file.

2 Likes

OMG I think I love you!
Thank you very much!

Same issue as OP but local IP and 127.0.0.1 both don’t work.

Anyone have any idea how to get this working?

I have the same problem

This fixed the issue for me: login to your Seafile web UI, click on your avatar, got ot “System Admin” > Settings > FILE_SERVER_ROOT > and here you should put your seafile URL or IP address like this:
“hxxp://{YOUR_SERVER_URL}/seafhttp”
For exmple, my server URL is “seafile.local” so I put
hxxp://seafile.local/seafhttp

You can also put it in ‘SEAFILE_SERVER_HOSTNAME=’ in the docker-compose.yml file.
Keep in mind: if the URL is a domain name like (seafile.local), you should have a record for it in your DNS server.
I’m using Pi-Hole as my local DNS server and I’ve added a record for seafile.local pointing to my server’s IP and then put this domain in the system admin URL settings and I was immediately able to upload files.

6 Likes

I am late to this thread, but just experienced this problem. Running Apache as the box’s primary web server, then have Seafile running in Docker with NGINX using alternative ports 1080 and 8443.

I do have Apache do a redirect
RewriteRule ^ https://%{SERVER_NAME}:8443%{REQUEST_URI} [END,NE,R=permanent]

This particular grief was SOLVED by proceeding to the Admin Settings page and setting

I described the URLS below but not included as there is a “no links” rule :stuck_out_tongue:

SERVICE_URL: included https and included :8443 then a trailing slash
FILE_SERVER_ROOT: included https and included :8443 then a trailing slash/ then seafhttp

A quick check with my other browser logged in as a user, bingidity bang!

Note that you can make theses setting changes in the py file, but do note that the settings page explains that setting made there are stored in the database and take precedence over the py configurations.

2 Likes

Also note:
In the settings as mentioned above. Make sure you set your protocol correctly.

My settings were hxxp://mydomain.tld, but I was behind a reverse proxy with certs.
Once I updated the two URL fields to hxxps://mydomain.tld, I was golden.

1 Like

This solution fixed my issue.

I’m having a similar issue. Seafile 11 deployed on docker, under MacOS Catalina, behind a reverse proxy set up on Nginx Proxy Manager (which by hand is inside another container, all inside the same network).

After following the yml file (with some tweaks) from the seafile manual. When I try to upload a file I get a “Network Error”.

Tried to follow the instructions on this post setting the following:

SERVICE_URL - hxxps://my.domain.com
FILE_SERVER_ROOT - hxxp://my.domain.com/seafhttp

However if I change FILE_SERVER_ROOT to hxxps://[…] the error disappears, and it stays on waiting forever. When analyzed with browser’s programmer tools, the POST action that should upload the file is giving a 502 error.

Any clues or tips?

Hello! I had this exact same issue in the past couple of days. Like many, I made sure my SERVICE_URL & FILE_SERVER_ROOT were correct in seahub_settings.py and it still made no difference. I threw a lot of stuff at the wall, from trying different reverse proxies & configurations to meddling with the seahub_db database (constance_config table). Nothing worked. Until…

…I modified relevant config .yml files to change any environment fallback protocol lines from using http to using https.

For instance, in seafile-server.yml, one of the environment items sets the SEADOC_SERVER_URL, and one sees this default substitution as part of the value:

${SEAFILE_SERVER_PROTOCOL:-http}

Instead, add an “s” there so you have:

${SEAFILE_SERVER_PROTOCOL:-https}

So, in any of the accepted user-configurable .yml files, for any environment value where you see the above pattern, add that “s”. But ONLY in an environment section, not in, say, a labels section that deals with Caddy labels. For me, that meant modifying both seafile-server.yml & seadoc.yml and that was it. After that, BOOM! :slight_smile:

Lastly, for completeness, I should note that in my .env file, I removed the SEAFILE_SERVER_PROTOCOL line but left my SEAFILE_SERVER_HOSTNAME in there. I would need to dig into the source to figure out all of the pieces in play here and why these changes got it working, but in the short term, I hope it works for you.

UPDATE: I just noticed that I actually removed both SERVICE_URL & FILE_SERVER_ROOT from seahub_settings.py and file uploads via the web interface are still working. I am guessing that that removal wasn’t advisable, but I am assuming that the default falls back to my SEAFILE_SERVER_HOSTNAME in my .env file anyway.

1 Like