billw2 / pikrellcam

Raspberry Pi motion vector detection program with OSD web interface.
GNU General Public License v3.0
262 stars 70 forks source link

502 bad gateway on pikrellcam webpage #66

Closed kajan001 closed 3 years ago

kajan001 commented 3 years ago

I am getting the 502 message from pikrellcam. I have just installed Buster on a fresh SD card on my pi0 and installed pikrellcam. It started working fine but then I lost all connection with GUI. I tried reinstalling pikrellcam (just ran sh install-pikrellcam again) and got a lot of strange messages, se below, and after reboot i get the nginx page ok but when I add the portnumber I get 502 bad gateway. I still get asked the password though.

[b]Is this some trouble with the new OS or is there an issue with pikrellcag or with nginx?[/b]

BTW I had the same issue with a pi2 running stretch: sudden loss of connection with GUI, then nothing, then bad gateway. After reinstall pikrellcam, including cloning a new version, I get 502 message. But then I thought it was just some issue with stretch and a version of pikrellcam adapted to Buster.

Other pis with buster and stretch are working just fine, so far

install-pikrellcam.sh: 5: [: 0: unexpected operator

Set the port for the nginx web server. If you already have a web server configuration using the default port 80, you should enter an alternate port for PiKrellCam. Otherwise you can use the default port 80 or an alternate as you wish. The port number will be set in: /etc/nginx.sites-available/pikrellcam. Enter web server port: 5003 install-pikrellcam.sh: 56: [: 5003: unexpected operator

For auto starting at boot, a PiKrellCam start command must be in rc.local. If you don't start at boot, PiKrellCam can always be started and stopped from the web page. Do you want PiKrellCam to be auto started at boot? (yes/no): y install-pikrellcam.sh: 69: [: y: unexpected operator install-pikrellcam.sh: 69: [: y: unexpected operator

A web password is already set. Do you want to change the password (yes/no)? n install-pikrellcam.sh: 86: [: n: unexpected operator install-pikrellcam.sh: 86: [: n: unexpected operator install-pikrellcam.sh: 97: [: no: unexpected operator

Starting PiKrellCam install... install-pikrellcam.sh: 124: install-pikrellcam.sh: DEB_VERSION: not found install-pikrellcam.sh: 128: install-pikrellcam.sh: DEB_VERSION: not found Installing packages: php5 php5-common php5-fpm libav-tools Running: apt-get update Hit:1 http://raspbian.raspberrypi.org/raspbian buster InRelease Err:2 http://archive.raspberrypi.org/debian buster InRelease Temporary failure resolving 'archive.raspberrypi.org' Reading package lists... Done
W: Failed to fetch http://archive.raspberrypi.org/debian/dists/buster/InRelease Temporary failure resolving 'archive.raspberrypi.org' W: Some index files failed to download. They have been ignored, or old ones used instead. Reading package lists... Done Building dependency tree
Reading state information... Done Package php5 is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source

Package libav-tools is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source However the following packages replace it: ffmpeg

Package php5-fpm is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source

Package php5-common is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source

E: Package 'php5' has no installation candidate E: Package 'php5-common' has no installation candidate E: Package 'php5-fpm' has no installation candidate E: Package 'libav-tools' has no installation candidate install-pikrellcam.sh: 166: install-pikrellcam.sh: cannot open JESSIE: No such file install-pikrellcam.sh: 166: install-pikrellcam.sh: DEB_VERSION: not found install-pikrellcam.sh: 196: [: root: unexpected operator install-pikrellcam.sh: 228: [: no: unexpected operator install-pikrellcam.sh: 301: install-pikrellcam.sh: cannot open JESSIE: No such file install-pikrellcam.sh: 301: install-pikrellcam.sh: DEB_VERSION: not found Installing /etc/nginx/sites-available/pikrellcam nginx web server port: 5003 nginx web server root: /home/pi/pikrellcam/www install-pikrellcam.sh: 316: install-pikrellcam.sh: DEB_VERSION: not found install-pikrellcam.sh: 319: install-pikrellcam.sh: DEB_VERSION: not found install-pikrellcam.sh: 326: [: 5003: unexpected operator install-pikrellcam.sh: 380: install-pikrellcam.sh: Bad substitution

THis is the stuff I am getting from the nginx errorlog: 2020/09/01 10:11:47 [error] 375#375: 2 FastCGI sent in stderr: "PHP message: PHP Warning: include_once(/home/pi/pikrellcam/www/con$ 2020/09/02 10:58:16 [crit] 925#925: 2 connect() to unix:/var/run/php5-fpm.sock failed (2: No such file or directory) while connecti$ 2020/09/02 10:58:38 [crit] 925#925: 2 connect() to unix:/var/run/php5-fpm.sock failed (2: No such file or directory) while connecti$ 2020/09/02 11:27:47 [crit] 366#366: 1 connect() to unix:/var/run/php5-fpm.sock failed (2: No such file or directory) while connecti$ 2020/09/02 11:27:50 [crit] 366#366: 1 connect() to unix:/var/run/php5-fpm.sock failed (2: No such file or directory) while connecti$ 2020/09/02 11:51:53 [crit] 366#366: 6 connect() to unix:/var/run/php5-fpm.sock failed (2: No such file or directory) while connecti$ 2020/09/02 12:05:59 [crit] 865#865: 1 connect() to unix:/var/run/php5-fpm.sock failed (2: No such file or directory) while connecti$ 2020/09/02 12:11:52 [crit] 865#865: 3 connect() to unix:/var/run/php5-fpm.sock failed (2: No such file or directory) while connecti$ 2020/09/02 12:12:02 [crit] 865#865: *3 connect() to unix:/var/run/php5-fpm.sock failed (2: No such file or directory) while connecti$

kajan001 commented 3 years ago

After fresh install it seemed to work. Will try again and see what happens.

kajan001 commented 3 years ago

Ok, so I tried again: First full removal: sudo rm -r pikrellcam sudo rm -r .pikrellcam Then reinstall with cloning again as per instructions This time it worked. Perhaps it was something with the databases for downloading dependencies or maybe I just had a bad connection. I will close this issue now to be reopened if it occurs again.