Error 404 on all /seafhttp URLs after update

Hi.

I’m running Seafile 7.1.5 on FreeBSD 12.2. It all worked fine until I updated it from 7.1.4 (granted, during an OS update from 12.1).

7.1.4 on FreeBSD 12.1 worked fine, but with the current version (7.1.5 on FreeBSD 12.2), I cannot access any of my files — the libraries are still present, and I can browse them online, but if I try to open a file (as opposed to a library or folder), it fails to do so. Logs & browser debugging reveals that the server is returning 404 errors.

Both are accessed via an nginx reverse proxy. Nginx configuration was not changed in any way (in fact, no configuration was changed, except while I was trying to figure out what was wrong).

I could try upgrading to 8.x, but I figured I’d ask first, to avoid making things worse.

Any ideas as to what’s going on?

Thanks!

Update 2021-03-10: I’ve tried upgrading to 8.0.3, to no avail. Same exact problem.

Bump. I still haven’t managed to resolve the problem. Did some testing, and it definitely seems to happen in Seafile itself, not nginx.

I should mention that I run two Seafile instances, and both have the exact same problem.

### Run Seahub on another port[¶](https://manual.seafile.com/deploy/using_mysql/#run-seahub-on-another-port)

If you want to run Seahub on a port other than the default 8000, say 8001, you must modify the  `conf/gunicorn.conf` :

```
# default localhost:8000
bind = "0.0.0.0:8001"
```

Then restart Seafile service:

```
./seafile.sh restart
./seahub.sh restart
```

https://manual.seafile.com/deploy/using_mysql/#run-seahub-on-another-port

Thanks for the reply.

I don’t think that’s the problem, because Seahub is working perfectly (obviously with the exception of any file access, which accesses /seafhttp).

As the title suggests, it’s only /seafhttp URLs that don’t work — and those point to Seafile, not Seahub. Nginx is definitely connecting to it (eliminating the possibility of a listen address or port problem), because I get a 404 error — and if I try to stop the Seafile server entirely, I get a “502 Bad Gateway” instead (as expected).

So the problem seems to be somewhere in Seafile. I’ve run truss on it, and it indicated that nginx is rewriting the URL properly, too (/seafhttp/… -> /).
Keep in mind that this configuration worked perfectly before the update.

To answer your question just in case, though: Seahub is bound to 127.0.0.1:8000. It is then reverse-proxied by nginx. And to clarify, this part is working fine: I can login, browse the libraries & folders (and see all the files), create new libraries (even create new files! — though I can’t edit them), etc … I just can’t view or download any file, since /seafhttp is broken.

Found the problem.

It was not the FreeBSD update, nor the Seafile update; it was oniguruma, updating it from 6.9.5 to 6.9.6 appears to break Seafile.

I’m not sure why Seafile shows no errors, but that package is definitely the culprit.

1 Like