Joplin Server 500 error

I am running the newest Joplin server 2.7. It was working, but lately I have started getting the following error on the Joplin client:

Last error: Error: Error 500 Internal Server Error: 500 Internal Server Error

500 Internal Server Error


openresty

What does the server log say?

Where do I go for the log file that you mention?

docker logs <container_name> (presumably joplin_app_1, but do check it to make sure).

Apart from this, what changed in your configuration (mostly around your webserver configs)? Something had to, as no related change occurred in Joplin Server itself.

1 Like

Nothing at all. Interestingly, my mobile client syncs. My desktop client gives me the 500 error.

Thank you, in this case, let’s hope the logs shed some light to this.

Where are the logs that I should be looking at?

I just told you in my reply an hour ago.

@ibenny thanks. I somehow missed that one. So, I just did a sync and got the 500 error. The tail of the log looks like below. I am not really seeing any errors or am I missing something?
2022-02-05 20:58:05: App: GET /api/shares (200) (1ms)
2022-02-05 20:58:05: App: DELETE /api/items/root:/temp/timeCheck418300.txt: (200) (493ms)
2022-02-05 21:00:01: TaskService: Running #2 (Update total sizes) (scheduled)...
2022-02-05 21:00:01: TaskService: Completed #2 (Update total sizes) in 879ms
2022-02-05 21:03:05: App: GET /api/items/root:/info.json:/content (200) (3ms)
2022-02-05 21:03:06: App: POST /api/locks (200) (112ms)
2022-02-05 21:03:27: App: GET /api/locks (200) (1ms)
2022-02-05 21:03:27: App: DELETE /api/locks/1_1_7979ea7663e14415a7a9e1eae45a4d3d (200) (121ms)
2022-02-05 21:03:27: App: GET /api/share_users (200) (1ms)
2022-02-05 21:03:27: App: GET /api/shares (200) (3ms)
2022-02-05 21:08:27: App: GET /api/items/root:/info.json:/content (200) (3ms)
2022-02-05 21:08:28: App: POST /api/locks (200) (48ms)
2022-02-05 21:08:49: App: GET /api/locks (200) (1ms)
2022-02-05 21:08:49: App: PUT /api/items/root:/temp/timeCheck622248.txt:/content (200) (133ms)
2022-02-05 21:08:49: App: GET /api/items/root:/temp/timeCheck622248.txt: (200) (2ms)
2022-02-05 21:08:49: App: DELETE /api/locks/1_1_7979ea7663e14415a7a9e1eae45a4d3d (200) (16ms)
2022-02-05 21:08:49: App: DELETE /api/items/root:/temp/timeCheck622248.txt: (200) (21ms)
2022-02-05 21:08:49: App: GET /api/share_users (200) (1ms)
2022-02-05 21:08:49: App: GET /api/shares (200) (3ms)
2022-02-05 21:13:50: App: GET /api/items/root:/info.json:/content (200) (3ms)
2022-02-05 21:13:50: App: POST /api/locks (200) (58ms)
2022-02-05 21:14:11: App: GET /api/locks (200) (0ms)
2022-02-05 21:14:11: App: DELETE /api/locks/1_1_7979ea7663e14415a7a9e1eae45a4d3d (200) (68ms)
2022-02-05 21:14:11: App: GET /api/share_users (200) (0ms)
2022-02-05 21:14:11: App: GET /api/shares (200) (2ms)
2022-02-05 21:19:12: App: GET /api/items/root:/info.json:/content (200) (2ms)
2022-02-05 21:19:12: App: POST /api/locks (200) (82ms)
2022-02-05 21:19:33: App: GET /api/locks (200) (1ms)
2022-02-05 21:19:33: App: PUT /api/items/root:/temp/timeCheck432249.txt:/content (200) (59ms)
2022-02-05 21:19:33: App: GET /api/items/root:/temp/timeCheck432249.txt: (200) (1ms)
2022-02-05 21:19:33: App: DELETE /api/locks/1_1_7979ea7663e14415a7a9e1eae45a4d3d (200) (26ms)
2022-02-05 21:19:33: App: DELETE /api/items/root:/temp/timeCheck432249.txt: (200) (52ms)
2022-02-05 21:19:33: App: GET /api/share_users (200) (2ms)
2022-02-05 21:19:33: App: GET /api/shares (200) (1ms)
2022-02-05 21:24:34: App: GET /api/items/root:/info.json:/content (200) (2ms)
2022-02-05 21:24:34: App: POST /api/locks (200) (44ms)
2022-02-05 21:24:55: App: GET /api/locks (200) (1ms)
2022-02-05 21:24:55: App: DELETE /api/locks/1_1_7979ea7663e14415a7a9e1eae45a4d3d (200) (99ms)
2022-02-05 21:24:55: App: GET /api/share_users (200) (0ms)
2022-02-05 21:24:55: App: GET /api/shares (200) (1ms)
2022-02-05 21:29:56: App: GET /api/items/root:/info.json:/content (200) (3ms)
2022-02-05 21:29:56: App: POST /api/locks (200) (34ms)
2022-02-05 21:30:17: App: GET /api/locks (200) (1ms)
2022-02-05 21:30:17: App: PUT /api/items/root:/temp/timeCheck802113.txt:/content (200) (62ms)
2022-02-05 21:30:17: App: GET /api/items/root:/temp/timeCheck802113.txt: (200) (2ms)
2022-02-05 21:30:17: App: DELETE /api/locks/1_1_7979ea7663e14415a7a9e1eae45a4d3d (200) (38ms)
2022-02-05 21:30:17: App: DELETE /api/items/root:/temp/timeCheck802113.txt: (200) (48ms)
2022-02-05 21:30:17: App: GET /api/share_users (200) (1ms)
2022-02-05 21:30:17: App: GET /api/shares (200) (1ms)
2022-02-05 21:35:18: App: GET /api/items/root:/info.json:/content (200) (3ms)
2022-02-05 21:35:18: App: POST /api/locks (200) (97ms)
2022-02-05 21:35:39: App: GET /api/locks (200) (1ms)
2022-02-05 21:35:39: App: DELETE /api/locks/1_1_7979ea7663e14415a7a9e1eae45a4d3d (200) (351ms)
2022-02-05 21:35:39: App: GET /api/share_users (200) (18ms)
2022-02-05 21:35:40: App: GET /api/shares (200) (2ms)
2022-02-05 21:35:54: App: GET /api/items/root:/info.json:/content (200) (3ms)
2022-02-05 21:35:54: App: POST /api/locks (200) (81ms)
2022-02-05 21:36:15: App: GET /api/locks (200) (0ms)
2022-02-05 21:36:16: App: DELETE /api/locks/1_1_7979ea7663e14415a7a9e1eae45a4d3d (200) (212ms)
2022-02-05 21:36:16: App: GET /api/share_users (200) (1ms)
2022-02-05 21:36:16: App: GET /api/shares (200) (1ms)
2022-02-05 22:00:00: TaskService: Running #2 (Update total sizes) (scheduled)...
2022-02-05 22:00:00: TaskService: Completed #2 (Update total sizes) in 417ms

Thank you. I don’t see any errors, which is not strange as I didn’t suspect it was a Joplin Server error - I still think the problem is with your webserver config. If you can share it somehow, we may have a few ideas.

@ibenny thanks for helping out. So, I use NginX Proxy Manager for my instance. It's always worked before. My desktop client is 2.6.10 and it says sync version 3 and profile version 41. Does that sound right? Like I said my Android client works for the same server. Maybe a client issue?

What do the nginx logs say? This 500 error must be on a server log, so if it's not Joplin Server it's nginx

I wouldn’t know, sorry, I don’t use Nginx Proxy Manager, just a “barebones” Nginx - and the problem will lay there.

Just as Laurent indicated, we need to see it’s logs and possibly it’s config to help out better. We ruled out a problem with Joplin Server so it will be with the reverse proxy (webserver). If I had to guess, by the way, I would say it’s around some missing headers.

The key thing is that this works fine from another desktop and a laptop on the same network. I uninstalled the joplin-desktop snap and installed it again. I tried to import a JEX file I made and that just locks up my Ubuntu machine tight as a drum. I decided that the server based notes are close enough and only a couple days are missing. So, configured the Sync again and it can't download anything from the server and I still have the 500 error. I can log into my Joplin sync server just fine from my web browser and like I said, two other clients are fine.

Oh and my sync information verifies correctly on the problem client.

Ok, so I removed the SNAP entirely and downloaded the appimage. The appimage lets me import my saved notebook just fine unlike the SNAP. In setting it up again I established the sync with the joplin server. I then did the advanced option to re-upload my notebook contents to the server since my local copy is great. That ended up just throwing another 500 error. Like I said, I have an Ubuntu desktop and an Ubuntu notebook both running 20.04 LTS Ubuntu and they work fine. This main desktop of mine was working until I posted this issue. Everything is on the same network.

Ok, so interesting that the snap installation had issues. I got rid of it and installed from the script on github: wget -O - https://raw.githubusercontent.com/laurent22/joplin/master/Joplin_install_and_update.sh | bash

So, my other two clients with the same OS and a snap install work and sync fine. This main desktop still gets 500 errors.

I still don’t think it has anything to do with the client side, really. :slight_smile:
Someone may prove me wrong but at this point I firmly believe that your webserver (reverse proxy) for Joplin Server is not properly configured (and I’d still say the headers). The easiest would be if you shared the relevant part(s) of your config and the relevant webserver logs when those connection errors occur.

Ok, I understand. I removed the reverse proxy from the equation and allowed the joplin server to be the only service on the network. I still got the 500 error and the other two machines still worked. At this point, is it possible to clean the slate on the Joplin Server in case it has stored something related to this client? I have all my notebooks backed up in a JEX file and can reload them to my client. The other option I thought of is to just build another joplin server from scratch. I still don't get how or why two other clients on my network do replicate and never get an error. Also, I have an android client that replicates just fine.

I'd build it from scratch, but if you want to try first, contact me and I can give you an account on my Joplin Server so you can do a test-sync to be sure (if it's not too data intensive, I wouldn't see your data, anyway). I sync with MacOS, Windows and iOS devices so I can say for sure that my setup is ready for anything. :slight_smile: