Page 1 of 2

RevPi Core 3+: no Pictory, error 403 in browser

Posted: 15 Nov 2021, 12:42
by etienne1984
Hello,

We bought and configured a first RevPi Core 3+, and it worked without major problems.
We had a second piece (or ordered recently I am not sure), I configured it as the first one:

- apt update/upgrade until no more updates available
- try to access http://XX.XX.XX.XX to view Pictory interface

On this RevPi Core 3+, we have a "403 forbidden" message.

Code: Select all

pi@RevPi39037:~ $ cat /var/log/apache2/error.log
(...)
[Mon Nov 15 12:25:17.825373 2021] [autoindex:error] [pid 1609] [client 10.121.78.150:58726] AH01276: Cannot serve directory /var/www/: No matching DirectoryIndex (index.html,index.cgi,index.pl,index.php,index.xhtml,index.htm) found, and server-generated directory index forbidden by Options directive
and we have that:

Code: Select all

pi@RevPi39037:~ $ ll /var/www/
total 16
drwxrwxr-x  2 www-data www-data 4096 Nov  9 16:53 data
drwxr-xr-x  2 root     root     4096 Nov 15 09:14 html
drwxr-xr-x  4 root     root     4096 Nov 15 09:14 pictory
drwxr-xr-x 12 root     root     4096 Nov 15 09:14 revpi
Which is quite different from the other unit, the one properly working, which has:

Code: Select all

pi@RevPi39043:~ $ ll /var/www/
total 80
drwxr-xr-x 5 root     root      4096 Nov 24  2020 common
-rw-r--r-- 1 root     root       308 Oct  5  2020 config.json
-rw-r--r-- 1 root     root      5586 Oct  5  2020 configServices.json
drwxr-xr-x 2 root     root      4096 Nov 24  2020 css
drwxrwxr-x 2 www-data www-data  4096 Jan 22  2021 data
drwxr-xr-x 3 root     root      4096 Mar  2  2020 fonts
drwxr-xr-x 2 root     root      4096 Nov 24  2020 images
-rw-r--r-- 1 root     root      5296 Oct  5  2020 index.html
drwxr-xr-x 3 root     root      4096 Nov 24  2020 jquery
drwxr-xr-x 2 root     root      4096 Nov 24  2020 js
drwxr-xr-x 2 root     root      4096 Nov 24  2020 misc
drwxr-xr-x 2 root     root      4096 Nov 24  2020 php
drwxr-xr-x 7 root     root      4096 Nov 24  2020 pictory
-rw-r--r-- 1 root     root      1485 Oct  5  2020 RevPi7EULA.html
-rw-r--r-- 1 root     root     12647 Oct  5  2020 status.html
Any idea? Did we miss something obvious...?

Thank you for your help,

EdS

Re: RevPi Core 3+: no Pictory, error 403 in browser

Posted: 15 Nov 2021, 13:56
by nicolaiB
Hi etienne,

can you please share the installed image version of both devices? This can be fetch with the following command: cat /etc/revpi/image-release

Nicolai

Re: RevPi Core 3+: no Pictory, error 403 in browser

Posted: 15 Nov 2021, 14:53
by etienne1984
Of course:

Code: Select all

pi@RevPi39043:~ $ cat /etc/revpi/image-release
2020-03-02-revpi-stretch.img
and:

Code: Select all

pi@RevPi39037:~ $ cat /etc/revpi/image-release
2020-03-02-revpi-stretch.img
Could updates have an impact on apache files ???

It is as if files have been moved to /var/www/revpi folder, on working unit I have:

Code: Select all

pi@RevPi39043:/var/www $ ls -la
total 80
drwxr-xr-x 5 root     root      4096 Nov 24  2020 common
-rw-r--r-- 1 root     root       308 Oct  5  2020 config.json
-rw-r--r-- 1 root     root      5586 Oct  5  2020 configServices.json
drwxr-xr-x 2 root     root      4096 Nov 24  2020 css
drwxrwxr-x 2 www-data www-data  4096 Jan 22  2021 data
drwxr-xr-x 3 root     root      4096 Mar  2  2020 fonts
drwxr-xr-x 2 root     root      4096 Nov 24  2020 images
-rw-r--r-- 1 root     root      5296 Oct  5  2020 index.html
drwxr-xr-x 3 root     root      4096 Nov 24  2020 jquery
drwxr-xr-x 2 root     root      4096 Nov 24  2020 js
drwxr-xr-x 2 root     root      4096 Nov 24  2020 misc
drwxr-xr-x 2 root     root      4096 Nov 24  2020 php
drwxr-xr-x 7 root     root      4096 Nov 24  2020 pictory
-rw-r--r-- 1 root     root      1485 Oct  5  2020 RevPi7EULA.html
-rw-r--r-- 1 root     root     12647 Oct  5  2020 status.html
On problematic unit I have:

Code: Select all

pi@RevPi39037:/var/www $ ls -la *
data:
total 12
drwxrwxr-x 2 www-data www-data 4096 Nov  9 16:53 .
drwxr-xr-x 6 root     root     4096 Nov 15 09:14 ..
-rw-rw---- 1 www-data www-data   46 Mar 27  2019 login.json

html:
total 12
drwxr-xr-x 2 root root 4096 Nov 15 09:14 .
drwxr-xr-x 6 root root 4096 Nov 15 09:14 ..
-rw-r--r-- 1 root root   74 Nov 10 08:31 .htaccess

pictory:
total 16
drwxr-xr-x 4 root     root     4096 Nov 15 09:14 .
drwxr-xr-x 6 root     root     4096 Nov 15 09:14 ..
drwxrwxr-x 2 www-data www-data 4096 Nov 15 09:14 projects
drwxr-xr-x 3 root     root     4096 Nov 15 09:14 resources

revpi:
total 92
drwxr-xr-x 12 root     root      4096 Nov 15 09:14 .
drwxr-xr-x  6 root     root      4096 Nov 15 09:14 ..
drwxr-xr-x  5 root     root      4096 Nov 15 09:14 common
-rw-r--r--  1 root     root       308 Nov 10 08:31 config.json
-rw-r--r--  1 root     root      5586 Nov 10 08:31 configServices.json
drwxr-xr-x  2 root     root      4096 Nov 15 09:14 css
drwxrwxr-x  2 www-data www-data  4096 Nov 15 09:15 data
drwxr-xr-x  3 root     root      4096 Nov 15 09:14 fonts
-rw-r--r--  1 root     root        51 Nov 10 08:31 .htaccess
drwxr-xr-x  2 root     root      4096 Nov 15 09:14 images
-rw-r--r--  1 root     root      5308 Nov 10 08:31 index.html
drwxr-xr-x  3 root     root      4096 Nov 15 09:14 jquery
drwxr-xr-x  2 root     root      4096 Nov 15 09:14 js
drwxr-xr-x  2 root     root      4096 Nov 15 09:14 misc
drwxr-xr-x  2 root     root      4096 Nov 15 09:14 php
drwxr-xr-x  7 root     root      4096 Nov 15 09:14 pictory
-rw-r--r--  1 root     root      1485 Nov 10 08:31 RevPi7EULA.html
-rw-r--r--  1 root     root     12737 Nov 10 08:31 status.html

If I try to browse http://XX.XX.XX.XX/revpi/ on problematic unit, I have an orange portal (rather than red one), and I cannot use usual "admin" "label-password" credentials.

Is this normal ?
Thank you for you quick reply and help.

Re: RevPi Core 3+: no Pictory, error 403 in browser

Posted: 15 Nov 2021, 16:47
by zhan
Hello EdS,

as the "apt update&apt upgrade" getting executed, the pictory (and revpi-webstatus) are upgrade from 1.x to 2.x. The version 2.x contains following changes:
1. the DocumentRoot of pictory web application changed from /var/www/ to /var/www/pictory
2. the tcp port of the pictory is changed from 80 to 41080, but it will be automatically redirected when the 80 (by default) is used.
3. the color of GUI is changed from red to orange.
more info: https://revolutionpi.com/tutorials/rele ... rect=en_US

Regarding to you case, I think following things might be needed to check:
1. reboot after upgrade of pictory/webstatus, to make the apache2 reload the configuration .
2. clear the cache of the browser of client to make the new changed be used.
3. if it still not works, try to check the status of apache2 with command "systemdctl status apache2", it should be in active.

BR
Simon

Re: RevPi Core 3+: no Pictory, error 403 in browser

Posted: 16 Nov 2021, 07:48
by nicolai
Hi everyone. I have the same problem . After apt-get update/upgrade I can't access pictory by typing the IP-Address of RevPi in my browser.
I've been able to get the login screen than typing http://ip-address/revpi but it doesn't accept the password.
Also it shows this error on page load:

Code: Select all

Error in AjaxGetJSON: Not Found

Browser Console:
Image

Now i'm stuck and can't configure my plc for the project i'm working on.

Re: RevPi Core 3+: no Pictory, error 403 in browser

Posted: 16 Nov 2021, 10:48
by etienne1984
Hello,

Thank you Simon for answer. Unfortunately, it did not resolved the problem:

1. I already had restarted my revpi several time (I did it again, no change).
2. I cleared browser cache (used private session), no change except I also have a popup with the error mentioned by nicolai hereabove ("Error in AjaxGetJSON: Not Found").
3. Apache is running (I checked with systemctl as required, but you may find in my previous message apache logs appearing upon HTTP requests, and I have also access through http://XX.XX.XX.XX/revpi/ (and not http://XX.XX.XX.XX/pictory) to an orange portal, but cannot login with my credentials.

Please can you help further ?

I attached some apache configuration file (in /etc/apache2). You also have my file tree in /var/www in messages above, tell me if you need more.

Re: RevPi Core 3+: no Pictory, error 403 in browser

Posted: 16 Nov 2021, 11:35
by zhan
Hello,

I will check it on my devices and go back as soon as I get something.

BR
Simon

Re: RevPi Core 3+: no Pictory, error 403 in browser

Posted: 16 Nov 2021, 12:07
by nicolaiB
Hi everyone,

unfortunately this is a regression of a recent fix. We're aware of this and working on a solution which we hopefully can publish later today. I'm sorry for any inconvenience!

For now please try to downgrade to the previous version with the following command:

Code: Select all

sudo apt install pictory=1.4.7 revpi-webstatus=1.2.10
Nicolai

Re: RevPi Core 3+: no Pictory, error 403 in browser

Posted: 17 Nov 2021, 09:35
by etienne1984
Hi all,

OK, I downgraded as you propose, it seems to work without problem.

Luckily, I was anticipating this revpi configuration step for my part, so I am not in a hurry. I will wait for your fix, in order to process my device configuration from the updated version you are about to publish. Please keep us informed, thank you,

Etienne

Re: RevPi Core 3+: no Pictory, error 403 in browser

Posted: 17 Nov 2021, 09:39
by nicolaiB
Hi Etienne,

you can safely proceed with your device configuration. There is no change in the configuration format even with the upcomming patch release. Of course I will let you and the community know as soon as the new package is published!

Nicolai