[GH-ISSUE #602] [QUESTION] 502 error upon opening a whoogle page, only occurs on the first opening. #385

Closed
opened 2026-02-25 20:35:36 +03:00 by kerem · 15 comments
Owner

Originally created by @milesmcclane on GitHub (Jan 4, 2022).
Original GitHub issue: https://github.com/benbusby/whoogle-search/issues/602

Hello,

Hard to describe. I have a self hosted Whoogle instance, using Docker on a Synology NAS. Upon performing a search for the first time after X amount of time since the last search occurred - it opens to a 502 Error. If is then immediately type in the same search again, it opens as normal. This occurs using the search bar, the actually URL, the local URL, any browser, any device, after clearing cookies, rebuilding the docker container etc.

If it’s a search via the search bar then this is what the initial search ends up reading, if I searched ‘hello’, for example:
https://my_Instance.com/session/6a654347-9ae2-4edb-a956-d6722224ef79?follow=http%3A%2F%2F my_instance.com%2Fsearch%3Fq%3Dhello

It’s been happening for the past month or so, after ages of hassle free usage. I think it may be an issue my ends rather than with the app, but I wondered if anyone could shed any light on it for me.

I’m afraid I’m fairly clueless with this type of thing.

Cheers!

MM

Originally created by @milesmcclane on GitHub (Jan 4, 2022). Original GitHub issue: https://github.com/benbusby/whoogle-search/issues/602 Hello, Hard to describe. I have a self hosted Whoogle instance, using Docker on a Synology NAS. Upon performing a search for the first time after X amount of time since the last search occurred - it opens to a 502 Error. If is then immediately type in the same search again, it opens as normal. This occurs using the search bar, the actually URL, the local URL, any browser, any device, after clearing cookies, rebuilding the docker container etc. If it’s a search via the search bar then this is what the initial search ends up reading, if I searched ‘hello’, for example: https://my_Instance.com/session/6a654347-9ae2-4edb-a956-d6722224ef79?follow=http%3A%2F%2F my_instance.com%2Fsearch%3Fq%3Dhello It’s been happening for the past month or so, after ages of hassle free usage. I think it may be an issue my ends rather than with the app, but I wondered if anyone could shed any light on it for me. I’m afraid I’m fairly clueless with this type of thing. Cheers! MM
kerem closed this issue 2026-02-25 20:35:36 +03:00
Author
Owner

@DUOLabs333 commented on GitHub (Jan 11, 2022):

That actually happens to me as well -- it only happens sometimes, so I haven't been able to pin it down.

<!-- gh-comment-id:1010173093 --> @DUOLabs333 commented on GitHub (Jan 11, 2022): That actually happens to me as well -- it only happens sometimes, so I haven't been able to pin it down.
Author
Owner

@milesmcclane commented on GitHub (Jan 20, 2022):

In the log, I have a warning that Tor is already starting, and a start Tor execution command in the overview. I don’t nor have ever used whoogle with Tor - could this be something?

<!-- gh-comment-id:1017501855 --> @milesmcclane commented on GitHub (Jan 20, 2022): In the log, I have a warning that Tor is already starting, and a start Tor execution command in the overview. I don’t nor have ever used whoogle with Tor - could this be something?
Author
Owner

@DUOLabs333 commented on GitHub (Jan 20, 2022):

That can definitely be an error. Again, since this only happens sometimes, I can't actually determine the cause, however, can you try updating to the git HEAD?

<!-- gh-comment-id:1017535276 --> @DUOLabs333 commented on GitHub (Jan 20, 2022): That can definitely be an error. Again, since this only happens sometimes, I can't actually determine the cause, however, can you try updating to the git HEAD?
Author
Owner

@Albonycal commented on GitHub (Jan 24, 2022):

That actually happens to me as well -- it only happens sometimes, so I haven't been able to pin it down.

yea me too it's very rare 😄 , but has happened with me

<!-- gh-comment-id:1019728066 --> @Albonycal commented on GitHub (Jan 24, 2022): > That actually happens to me as well -- it only happens sometimes, so I haven't been able to pin it down. yea me too it's very rare 😄 , but has happened with me
Author
Owner

@Stolz commented on GitHub (Feb 11, 2022):

For me it only happens the first time I visit Whoogle after having my computer off for a while. In my case Whoogle is running in a computer that is up 24/7 but if my client computer is switched off for a few hours, next time I tun it on and visit Whoogle I will get the error

<!-- gh-comment-id:1035835821 --> @Stolz commented on GitHub (Feb 11, 2022): For me it only happens the first time I visit Whoogle after having my computer off for a while. In my case Whoogle is running in a computer that is up 24/7 but if my client computer is switched off for a few hours, next time I tun it on and visit Whoogle I will get the error
Author
Owner

@DUOLabs333 commented on GitHub (Feb 11, 2022):

I've had this happen in the past, but not anymore.

<!-- gh-comment-id:1035836188 --> @DUOLabs333 commented on GitHub (Feb 11, 2022): I've had this happen in the past, but not anymore.
Author
Owner

@DUOLabs333 commented on GitHub (Mar 2, 2022):

Can this be closed now?

<!-- gh-comment-id:1057359633 --> @DUOLabs333 commented on GitHub (Mar 2, 2022): Can this be closed now?
Author
Owner

@Stolz commented on GitHub (Mar 2, 2022):

It is still happening to me in a regular basis.

<!-- gh-comment-id:1057471203 --> @Stolz commented on GitHub (Mar 2, 2022): It is still happening to me in a regular basis.
Author
Owner

@DUOLabs333 commented on GitHub (Mar 2, 2022):

Try pulling from git (or latest).

<!-- gh-comment-id:1057471902 --> @DUOLabs333 commented on GitHub (Mar 2, 2022): Try pulling from git (or `latest`).
Author
Owner

@Stolz commented on GitHub (Mar 4, 2022):

I always use latest, which gets automatically updated via pyouroboros/ouroboros. Problem persist

<!-- gh-comment-id:1058802135 --> @Stolz commented on GitHub (Mar 4, 2022): I always use `latest`, which gets automatically updated via pyouroboros/ouroboros. Problem persist
Author
Owner

@DUOLabs333 commented on GitHub (Mar 4, 2022):

Weird, what's your env file?

<!-- gh-comment-id:1058814690 --> @DUOLabs333 commented on GitHub (Mar 4, 2022): Weird, what's your `env` file?
Author
Owner

@Stolz commented on GitHub (Mar 7, 2022):

      WHOOGLE_CONFIG_BLOCK: "pinterest.com"
      WHOOGLE_CONFIG_DISABLE: 1
      WHOOGLE_CONFIG_LANGUAGE: lang_en
      WHOOGLE_CONFIG_NEW_TAB: 1
      WHOOGLE_CONFIG_SEARCH_LANGUAGE: lang_en
      WHOOGLE_CONFIG_THEME: dark
      WHOOGLE_CONFIG_TOR: 0
      WHOOGLE_CONFIG_URL: "https://whoogle.example.com/"
      WHOOGLE_CONFIG_VIEW_IMAGE: 1
<!-- gh-comment-id:1060082935 --> @Stolz commented on GitHub (Mar 7, 2022): ``` WHOOGLE_CONFIG_BLOCK: "pinterest.com" WHOOGLE_CONFIG_DISABLE: 1 WHOOGLE_CONFIG_LANGUAGE: lang_en WHOOGLE_CONFIG_NEW_TAB: 1 WHOOGLE_CONFIG_SEARCH_LANGUAGE: lang_en WHOOGLE_CONFIG_THEME: dark WHOOGLE_CONFIG_TOR: 0 WHOOGLE_CONFIG_URL: "https://whoogle.example.com/" WHOOGLE_CONFIG_VIEW_IMAGE: 1 ```
Author
Owner

@ras07 commented on GitHub (Apr 11, 2022):

This sounds a lot like what I was experiencing in https://github.com/benbusby/whoogle-search/issues/678 . It looks like your Synology NAS's reverse proxy may be doing something similar; note the https/http mismatch:

https://my_Instance.com/session/6a654347-9ae2-4edb-a956-d6722224ef79?follow=http%3A%2F%2F my_instance.com%2Fsearch%3Fq%3Dhello

I think the root cause is that the session token is expired, and the "follow=" link is essentially asking for a new one. But that link doesn't work for one reason or another. I still don't understand why it starts working the second time.

I don't know if Synology lets you implement a solution similar to mine, but perhaps it will point you in the right direction.

<!-- gh-comment-id:1094441837 --> @ras07 commented on GitHub (Apr 11, 2022): This sounds a lot like what I was experiencing in https://github.com/benbusby/whoogle-search/issues/678 . It looks like your Synology NAS's reverse proxy may be doing something similar; note the https/http mismatch: **https:**//my_Instance.com/session/6a654347-9ae2-4edb-a956-d6722224ef79?follow=**http**%3A%2F%2F my_instance.com%2Fsearch%3Fq%3Dhello I think the root cause is that the session token is expired, and the "follow=" link is essentially asking for a new one. But that link doesn't work for one reason or another. I still don't understand why it starts working the second time. I don't know if Synology lets you implement a solution similar to mine, but perhaps it will point you in the right direction.
Author
Owner

@benbusby commented on GitHub (Aug 1, 2022):

I'm going through and closing old issues that I believe are fixed in more recent versions of Whoogle. If your issue persists, feel free to reopen and tag me or open a new issue.

<!-- gh-comment-id:1201456414 --> @benbusby commented on GitHub (Aug 1, 2022): I'm going through and closing old issues that I believe are fixed in more recent versions of Whoogle. If your issue persists, feel free to reopen and tag me or open a new issue.
Author
Owner

@TheSunCat commented on GitHub (Sep 24, 2023):

I think I'm running into the same issue. Whoogle gives me a 502 every once in a while as of a couple days ago. If I reload the search it works fine.
I saw this in the log which might be relevant (mentions Tor despite not having Tor set up):

Sep 23 14:13:24.504 [notice] Tor 0.4.6.9 running on Linux with Libevent 2.1.12-stable, OpenSSL 1.1.1v, Zlib 1.2.12, Liblzma 5.2.5, Libzstd 1.5.0 and Unknown N/A as libc.
Sep 23 14:13:24.504 [notice] Tor can't help you if you use it wrong! Learn how to be safe at https://www.torproject.org/download/download#warning
Sep 23 14:13:24.509 [notice] Read configuration file "/etc/tor/torrc".
Sep 23 14:13:24.517 [notice] Opening Socks listener on 127.0.0.1:9050
Sep 23 14:13:24.517 [notice] Opened Socks listener connection (ready) on 127.0.0.1:9050
Sep 23 14:13:24.517 [notice] Opening Control listener on 127.0.0.1:9051
Sep 23 14:13:24.517 [notice] Opened Control listener connection (ready) on 127.0.0.1:9051

These are the only logs around the time the last 502 error happened.

<!-- gh-comment-id:1732595328 --> @TheSunCat commented on GitHub (Sep 24, 2023): I think I'm running into the same issue. Whoogle gives me a 502 every once in a while as of a couple days ago. If I reload the search it works fine. I saw this in the log which might be relevant (mentions Tor despite not having Tor set up): ``` Sep 23 14:13:24.504 [notice] Tor 0.4.6.9 running on Linux with Libevent 2.1.12-stable, OpenSSL 1.1.1v, Zlib 1.2.12, Liblzma 5.2.5, Libzstd 1.5.0 and Unknown N/A as libc. Sep 23 14:13:24.504 [notice] Tor can't help you if you use it wrong! Learn how to be safe at https://www.torproject.org/download/download#warning Sep 23 14:13:24.509 [notice] Read configuration file "/etc/tor/torrc". Sep 23 14:13:24.517 [notice] Opening Socks listener on 127.0.0.1:9050 Sep 23 14:13:24.517 [notice] Opened Socks listener connection (ready) on 127.0.0.1:9050 Sep 23 14:13:24.517 [notice] Opening Control listener on 127.0.0.1:9051 Sep 23 14:13:24.517 [notice] Opened Control listener connection (ready) on 127.0.0.1:9051 ``` These are the only logs around the time the last 502 error happened.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/whoogle-search#385
No description provided.