Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

502 Bad Gateway on the Docker version #184

Open
Yarg-mirror opened this issue Jan 18, 2025 · 7 comments
Open

502 Bad Gateway on the Docker version #184

Yarg-mirror opened this issue Jan 18, 2025 · 7 comments
Labels
question Further information is requested

Comments

@Yarg-mirror
Copy link

Hello,

New user there, I wanted to notify you about the error talked about in #97

After installing the lastest version (2.8.0) of OtterWiki in Docker form, on a remote machine and accessing it through http://192.168.1.15:8080
everything work fine with Firefox, but the moment I try to create a new page, the 502 error trigger and I cannot access OtterWiki anymore with the browser unless I start using private browsing mode.

The fix of setting buffer-size=8196 in /app/uwsgi.ini seem to work and fix the issue.

otterwiki-1  | 2025-01-18 23:43:21,122 INFO success: nginx entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
otterwiki-1  | 2025-01-18 23:43:21,122 INFO success: uwsgi entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
otterwiki-1  | invalid request block size: 5233 (max 4096)...skip
otterwiki-1  | 192.168.1.111 - - [18/Jan/2025:23:43:24 +0000] "GET / HTTP/1.1" 502 157 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:134.0) Gecko/20100101 Firefox/134.0"
otterwiki-1  | 2025/01/18 23:43:24 [error] 19#19: *1 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 192.168.1.111, server: , request: "GET / HTTP/1.1", upstream: "uwsgi://unix:///tmp/uwsgi.sock:", host: "192.168.1.15:8006"

I tried to recover a .har file from Firefox by redoing the same steps, but OtterWiki don't seem to want to work again without setting the fix, even on a fresh restart, the request block size seem pretty random in the end, or maybe it is something in the cache...

Reproducing the sames steps in private browsing mode does not seem to trigger the 502 and new pages are created normally.

I am a bit confused.

@redimp redimp added the question Further information is requested label Jan 19, 2025
@redimp
Copy link
Owner

redimp commented Jan 19, 2025

Hey @Yarg-mirror, that confuses me too. At first I have no idea what is causing it.

Let's dig into this. I'm wondering about what may cause the problems with request block size. The very same was reported in #179.

A few questions:

  1. What reverse proxy are you using?
  2. Do you edit as anonymous user or are you logged in?

@Yarg-mirror
Copy link
Author

Hello,

  1. At this point the installation was really fresh, so no other reverse proxy than the nginx inside
    1.2 I will add HAProxy in front of it today and see if that change something with the default buffer

  2. The edit (page creation even) was done as an anonymous user, it was the first action done once connected, not even the first user/admin was created

@Yarg-mirror
Copy link
Author

Yarg-mirror commented Jan 19, 2025

Setting the reverse proxy seem to fix the issue, the navigation came back, and page creation/edition work as intended. Even if the 502 still trigger when trying a direct access.

As a bonus test, no issues with chrome in direct access, it really seem to be browser dependant

Maybe it's something with the internal nginx then?

@redimp
Copy link
Owner

redimp commented Jan 19, 2025

Using which browser did you run into the 502?

@Yarg-mirror
Copy link
Author

The current version of Firefox for Windows 10 - 134.0.1 (64 bits) -

@balgerion
Copy link

balgerion commented Jan 21, 2025

Just spined fresh installation and after few edits to check how everything works

Image

ARM build if that matter - Docker

as anonymous user and on chrome

@redimp
Copy link
Owner

redimp commented Jan 21, 2025

Can find anything useful in the logs?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants