Error 502 on my Organizr setup since I've updated to Bullseye Topic is solved

Having issues with your DietPi installation or found a bug? Post it here.
Post Reply
LeVraiRoiDHyrule
Posts: 67
Joined: Tue Apr 28, 2020 3:00 pm

Error 502 on my Organizr setup since I've updated to Bullseye

Post by LeVraiRoiDHyrule »

Hi,

I decided to update from Buster to Bullseye today.
I'm running on my Rpi4 an Nginx server with Organizr, that also works as a reverse proxy for all my services.
My services didn't seem to encounter any error, it all went smoothly. They all work, Nginx work, accessing with the reverse proxy works.

However, I can no longer access Organizr on the root of my domain. I get a "502 error".
In my network debug tab on my browser, there is nothing special except the html 502 error I get.
I don't know where I can seek for more infos, and I don't know what's causing this.
It's a bit annoying as it puts a whole part of my setup down.

Where should I search for more info ? Is it common when upgrading to Bullseye ? What should I do ?

Thanks in advance for any answer, have a great day.
User avatar
MichaIng
Site Admin
Posts: 3516
Joined: Sat Nov 18, 2017 6:21 pm

Re: Error 502 on my Organizr setup since I've updated to Bullseye

Post by MichaIng »

Did you setup Nginx manually to serve Organizr at the root of your domain? If you followed our distro upgrade guide, a reinstall of Nginx is triggered, so it may have reverted some customisations done to /etc/nginx/nginx.conf or /etc/nginx/sites-available/default. The previous files should however be present with a backup suffix.

Else, does /var/log/nginx/error.log contain anything after you try to access Organizr?

Nginx acts as proxy, right?
LeVraiRoiDHyrule
Posts: 67
Joined: Tue Apr 28, 2020 3:00 pm

Re: Error 502 on my Organizr setup since I've updated to Bullseye

Post by LeVraiRoiDHyrule »

MichaIng wrote: Sun Oct 10, 2021 7:17 pm Did you setup Nginx manually to serve Organizr at the root of your domain? If you followed our distro upgrade guide, a reinstall of Nginx is triggered, so it may have reverted some customisations done to /etc/nginx/nginx.conf or /etc/nginx/sites-available/default. The previous files should however be present with a backup suffix.

Else, does /var/log/nginx/error.log contain anything after you try to access Organizr?

Nginx acts as proxy, right?
Thanks a lot for your answer.

I followed your official update guide.

I just checked the /etc/nginx/sites-available/default file and it is correctly set to the path of my organizr folder (/var/www/organizr.local/html).

I checked the error logs from nginx, it says this :

Code: Select all

2021/10/10 18:42:13 [crit] 27704#27704: *1 connect() to unix:/run/php/php7.3-fpm.sock failed (2: No such file or directory) while connecting to upstream, client: 8.40.31.33, server: mydomainremovedforprivacy.com, request: "GET /?error=502 HTTP/2.0", upstream: "fastcgi://unix:/run/php/php7.3-fpm.sock:", host: "mydomainremovedforprivacy.com"
2021/10/10 18:42:13 [crit] 27704#27704: *1 connect() to unix:/run/php/php7.3-fpm.sock failed (2: No such file or directory) while connecting to upstream, client: 8.40.31.33, server: mydomainremovedforprivacy.com, request: "GET /?error=502 HTTP/2.0", upstream: "fastcgi://unix:/run/php/php7.3-fpm.sock:", host: "mydomainremovedforprivacy.com"
2021/10/10 18:42:13 [crit] 27704#27704: *1 connect() to unix:/run/php/php7.3-fpm.sock failed (2: No such file or directory) while connecting to upstream, client: 8.40.31.33, server: mydomainremovedforprivacy.com, request: "GET /?error=502 HTTP/2.0", upstream: "fastcgi://unix:/run/php/php7.3-fpm.sock:", host: "mydomainremovedforprivacy.com"
2021/10/10 18:42:13 [crit] 27704#27704: *1 connect() to unix:/run/php/php7.3-fpm.sock failed (2: No such file or directory) while connecting to upstream, client: 8.40.31.33, server: mydomainremovedforprivacy.com, request: "GET /?error=502 HTTP/2.0", upstream: "fastcgi://unix:/run/php/php7.3-fpm.sock:", host: "mydomainremovedforprivacy.com"
2021/10/10 18:42:22 [error] 27704#27704: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 8.40.31.33, server: mydomainremovedforprivacy.com, request: "GET /webmin/stats.cgi?xhr-stats=general HTTP/2.0", upstream: "http://[::1]:10000/stats.cgi?xhr-stats=general", host: "mydomainremovedforprivacy.com", referrer: "https://mydomainremovedforprivacy.com/webmin/filemin/?xnavigation=1"
2021/10/10 18:42:36 [error] 27704#27704: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 8.40.31.33, server: mydomainremovedforprivacy.com, request: "POST /webmin/index.cgi/?xhr-get_nice_size=1&xhr-get_nice_size_sum=65865 HTTP/2.0", upstream: "http://[::1]:10000/index.cgi/?xhr-get_nice_size=1&xhr-get_nice_size_sum=65865", host: "mydomainremovedforprivacy.com", referrer: "https://mydomainremovedforprivacy.com/webmin/filemin/?xnavigation=1"
2021/10/10 18:42:47 [error] 29545#29545: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 8.40.31.33, server: mydomainremovedforprivacy.com, request: "GET /webmin/stats.cgi?xhr-stats=general HTTP/2.0", upstream: "http://[::1]:10000/stats.cgi?xhr-stats=general", host: "mydomainremovedforprivacy.com", referrer: "https://mydomainremovedforprivacy.com/webmin/filemin/?xnavigation=1"
2021/10/10 18:42:59 [error] 29545#29545: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 8.40.31.33, server: mydomainremovedforprivacy.com, request: "GET /webmin/help.cgi/authentic-theme/editor HTTP/2.0", upstream: "http://[::1]:10000/help.cgi/authentic-theme/editor", host: "mydomainremovedforprivacy.com", referrer: "https://mydomainremovedforprivacy.com/webmin/filemin/?xnavigation=1"
Looks like it's seeking for PHP 7.3, and if I understood correctly Bullseye updates to PHP 7.4.
So I guessed that my nginx didn't got reinstalled correctly.

I executed again the command :

Code: Select all

dietpi-software reinstall 38 40 47 48 56 83 84 85 88 89 93 114 143
And this gives me the following error :

Code: Select all

   
      │ APT update
   │  - Command: apt-get -q update
   │  - Exit code: 100
   │  - DietPi version: v7.6.2 (MichaIng/master) | HW_MODEL: 4 | HW_ARCH: 2 | DISTRO: 6
   │  - Image creator: DietPi Core Team
   │  - Pre-image: Raspbian Lite
   │  - Error log:
   │ Hit:2 http://raspbian.raspberrypi.org/raspbian bullseye InRelease
   │ Hit:3 https://packages.sury.org/php bullseye InRelease
   │ Hit:4 https://archive.raspberrypi.org/debian bullseye InRelease
   │ Hit:5 https://apt.ombi.app/develop jessie InRelease
   │ Hit:6 https://apt.hrfee.dev trusty InRelease
   │ Hit:7 https://repo.jellyfin.org/debian bullseye InRelease
   │ Ign:8 https://download.mono-project.com/repo/debian raspbianbullseye InRelease
   │ Ign:1 https://pkg.cloudflareclient.com bullseye InRelease
   │ Err:10 https://download.mono-project.com/repo/debian raspbianbullseye Release
   │   404  Not Found [IP: 2606:2800:133:206e:1315:22a5:2006:24fd 443]
   │ Err:9 https://pkg.cloudflareclient.com bullseye Release
   │   404  Not Found [IP: 2606:4700::6810:550f 443]
   │ Ign:11 https://download.webmin.com/download/repository sarge InRelease
   │ Hit:12 https://download.webmin.com/download/repository sarge Release
   │ Reading package lists...
   │ W: Target Packages (main/binary-armhf/Packages) is configured multiple times in /etc/apt/sources.list:1 and
   │ /etc/apt/sources.list.d/pivpn-bullseye-repo.list:1
   │ W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:1 and
   │ /etc/apt/sources.list.d/pivpn-bullseye-repo.list:1
   │ E: The repository 'https://download.mono-project.com/repo/debian raspbianbullseye Release' does not have a Release
   │ file.
   │ E: The repository 'http://pkg.cloudflareclient.com bullseye Release' does not have a Release file.
   │ W: Target Packages (main/binary-armhf/Packages) is configured multiple times in /etc/apt/sources.list:1 and
   │ /etc/apt/sources.list.d/pivpn-bullseye-repo.list:1
   │ W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:1 and
   │ /etc/apt/sources.list.d/pivpn-bullseye-repo.list:1
   
So I think the problem comes from me who got my apt repo wrong. But I don't know how I can repair that.

My /etc/apt/sources.list file only contains :

Code: Select all

deb http://raspbian.raspberrypi.org/raspbian/ bullseye main contrib non-free
So I'm not sure how to fix these errors. Could you help me on that ? (if it is what's causing my problem with nginx, I'm still not 100% sure).
Thanks in advance for any answer, have a great day
User avatar
Joulinar
Posts: 6448
Joined: Sat Nov 16, 2019 12:49 am

Re: Error 502 on my Organizr setup since I've updated to Bullseye

Post by Joulinar »

ok no problem, we could correct source list. There is more than one error in.

Code: Select all

Err:10 https://download.mono-project.com/repo/debian raspbianbullseye Release
Mono did not support Bullseye yet and would need to switched back to Buster. Pls have a look into /etc/apt/sources.list.d directory. There should be a mono.list file

Code: Select all

Err:9 https://pkg.cloudflareclient.com bullseye Release
According Cloudflare install guide, you would need to use HTTP instead of HTTPS https://pkg.cloudflareclient.com/install
Should be in file /etc/apt/sources.list.d/cloudflare-client.list

could you share content of following to files

Code: Select all

/etc/apt/sources.list.d/pivpn-bullseye-repo.list
/etc/apt/sources.list
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
LeVraiRoiDHyrule
Posts: 67
Joined: Tue Apr 28, 2020 3:00 pm

Re: Error 502 on my Organizr setup since I've updated to Bullseye

Post by LeVraiRoiDHyrule »

Joulinar wrote: Sun Oct 10, 2021 9:15 pm ok no problem, we could correct source list. There is more than one error in.

Code: Select all

Err:10 https://download.mono-project.com/repo/debian raspbianbullseye Release
Mono did not support Bullseye yet and would need to switched back to Buster. Pls have a look into /etc/apt/sources.list.d directory. There should be a mono.list file

Code: Select all

Err:9 https://pkg.cloudflareclient.com bullseye Release
According Cloudflare install guide, you would need to use HTTP instead of HTTPS https://pkg.cloudflareclient.com/install
Should be in file /etc/apt/sources.list.d/cloudflare-client.list

could you share content of following to files

Code: Select all

/etc/apt/sources.list.d/pivpn-bullseye-repo.list
/etc/apt/sources.list
Thanks a lot for your answer, sorry for the late response;

Here is the content of my /etc/apt/sources.list.d/pivpn-bullseye-repo.list file:

Code: Select all

deb http://raspbian.raspberrypi.org/raspbian/ bullseye main
HHere is the content of my /etc/apt/sources.list file:

Code: Select all

deb http://raspbian.raspberrypi.org/raspbian/ bullseye main contrib non-free
I correctly edited the cloudflare repo to add the s to https.

I have no mono.list in /etc/apt/sources.list.d. However, I have a mono-xamarin.list. Here are its content:

Code: Select all

deb https://download.mono-project.com/repo/debian/ raspbianbullseye main
What is wrong with my repos ?
User avatar
MichaIng
Site Admin
Posts: 3516
Joined: Sat Nov 18, 2017 6:21 pm

Re: Error 502 on my Organizr setup since I've updated to Bullseye

Post by MichaIng »

The Mono repository has no Bullseye suite yet, but the Buster one works well. To fix it:

Code: Select all

echo 'deb https://download.mono-project.com/repo/debian/ raspbianbuster main' > /etc/apt/sources.list.d/mono-xamarin.list
User avatar
Joulinar
Posts: 6448
Joined: Sat Nov 16, 2019 12:49 am

Re: Error 502 on my Organizr setup since I've updated to Bullseye

Post by Joulinar »

PiVPN source list should be removed

Code: Select all

rm /etc/apt/sources.list.d/pivpn-bullseye-repo.list
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
LeVraiRoiDHyrule
Posts: 67
Joined: Tue Apr 28, 2020 3:00 pm

Re: Error 502 on my Organizr setup since I've updated to Bullseye

Post by LeVraiRoiDHyrule »

Joulinar wrote: Fri Oct 22, 2021 11:07 pm PiVPN source list should be removed

Code: Select all

rm /etc/apt/sources.list.d/pivpn-bullseye-repo.list
Thanks for your answer.
My apt repos are correct now ! Apt update runs without errors, which allowed me to update Dietpi to the latest version.

But the root page of my Nginx server is still broken with the 502 error. Do you know where I should search for this ?
Thanks in advance for your help,
Have a great day
User avatar
Joulinar
Posts: 6448
Joined: Sat Nov 16, 2019 12:49 am

Re: Error 502 on my Organizr setup since I've updated to Bullseye

Post by Joulinar »

Again we would need information from web server log

Code: Select all

cat /var/log/nginx/error.log
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
LeVraiRoiDHyrule
Posts: 67
Joined: Tue Apr 28, 2020 3:00 pm

Re: Error 502 on my Organizr setup since I've updated to Bullseye

Post by LeVraiRoiDHyrule »

Joulinar wrote: Sun Oct 24, 2021 1:31 pm Again we would need information from web server log

Code: Select all

cat /var/log/nginx/error.log
I finally succeeded to reinstall all the softwares recommended to reinstall by the official dietpi guide. It reinstalled a lot of things including nginx and php. I had to re-configure some nginx settings so it redirects to my organizr folder with correct arguments. And it works ! My organizr is fully working, my apt repo are correct. Everything is fixed ! Thanks a lot for your help about the repos ! Have a wonderful day !
Post Reply