Web server not responding in 2018-11-13-raspian-stretch-lite

SPC Web Gateway support issues
Post Reply
la5cq
Posts: 3
Joined: Fri 15 Dec 2017, 13:27

Web server not responding in 2018-11-13-raspian-stretch-lite

Post by la5cq » Mon 10 Dec 2018, 12:57

Hi!
I have a working test-installation in a RPi 3 running 2018-04-18-raspbian-stretch-lite.
Now I am completing a "permanent" installation using the latest 2018-11-13-raspian-stretch-lite.
However, I have problems with the communication with the spc web gateway from my browser.
If I run the spc-web-gateway as follows it seems to communicate with the panel:

pi@r35james:~/spc-web-gateway-1.3 $ ./spc-web-gateway -d
License valid until 2038-01-01
Waiting for PANEL...
Connection established
Waiting for SPC-message

Protocol ID: E
Protocol version: 2
Protocol flags: 1
Sequence number: 3042177028
Source ID: 1000
Destination ID: 1101
Major function code: 1
Minor function code: 2
Data length: 8
more....
If running as a daemon:
pi@r35james:~ sudo /etc/init.d/spc-web-gateway start
Starting SPC Web Gateway: done.
But starting a browser with https://192.168.1.157:8088/ fails.

I wonder if there are some incompatible openssl libssl-dev versions in the 2018-11-13-raspian-stretch-lite??

Any hint?

gol
Webbplatsadministratör
Posts: 80
Joined: Sun 01 Jun 2014, 19:38

Re: Web server not responding in 2018-11-13-raspian-stretch-lite

Post by gol » Mon 10 Dec 2018, 17:22

Are you sure your access control list is correct?
// Goran

la5cq
Posts: 3
Joined: Fri 15 Dec 2017, 13:27

Re: Web server not responding in 2018-11-13-raspian-stretch-lite

Post by la5cq » Mon 10 Dec 2018, 20:31

Both RPi's have untarred the same spc-web-gateway-1.3 file and the config.xml are equal and unedited.
The older and functioning RPi have IP number 192.168.1.190 and the new have 192.168.1.157.

Maybe there are some security magic that kicks in. In the SPC panel, I just change the IP address 192.168.1.190 to 192.168.1.157. When I start the browser with https://192.168.1.157:8088 I get the Test Panel. Then I select Panel->system info and I am asked Please sign in https://192.168.1.157:8088 Username, Password but this just repeats.

Then I edit back 192.168.1.190 in the SPC panel and https://192.168.1.190:8088 works immediately...

When I switch RPi's, I unplug their Ethernet cable to avoid interference..

What could be the problem with 192.168.1.157?

gol
Webbplatsadministratör
Posts: 80
Joined: Sun 01 Jun 2014, 19:38

Re: Web server not responding in 2018-11-13-raspian-stretch-lite

Post by gol » Mon 10 Dec 2018, 22:06

If you are suspect caching issue, easiest is to work in incognito mode in the webbrowser.

la5cq
Posts: 3
Joined: Fri 15 Dec 2017, 13:27

Re: Web server not responding in 2018-11-13-raspian-stretch-lite

Post by la5cq » Tue 11 Dec 2018, 09:32

Tried incognito mode, no change.

I have tried to "destill" the problem as much as possible. I have downloaded 2018-04-18-raspbian-stretch-lite.zip which is the same image as the working RPi is running. Did the raspi-config and booted.
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install openssl libssl-dev

wget https://nodejs.org/dist/v10.14.1/node-v ... v7l.tar.xz
tar xvf node-v10.14.1-linux-armv7l.tar.xz
cd node-v10.14.1-linux-armv7l/
sudo cp -R * /usr/local/

Then transferred spc-web-gateway-rp_stretch.1.3.tar.gz to /home/pi/ and did a tar xvf spc-web-gateway-rp_stretch.1.3.tar.gz
Testing with:
pi@r35james:~/spc-web-gateway-1.3 $ ./spc-web-gateway -d
License valid until 2038-01-01
Waiting for PANEL...
Connection established
Waiting for SPC-message

Protocol ID: E
Protocol version: 2
Protocol flags: 1
Sequence number: 2771781742
Source ID: 1000
Destination ID: 1101
Major function code: 1
Minor function code: 2
Data length: 8

Waiting for SPC-message
...more...

Then starting the server
pi@r35james:~/spc-web-gateway-1.3 $ sudo /etc/init.d/spc-web-gateway start
Starting SPC Web Gateway: done.

Checking with ps:
pi@r35james:~/spc-web-gateway-1.3 $ ps aux | grep spc
pi 852 0.0 0.2 101528 2400 ? Sl 09:16 0:00 spc-web-gateway
pi 882 0.0 0.0 4776 528 pts/0 S+ 09:17 0:00 grep --color=auto spc
pi@r35james:~/spc-web-gateway-1.3 $

Then using firefox browser: https://192.168.1.157:8088
The result is when saved as HAR (whatever this is)
-
{
"log": {
"version": "1.1",
"creator": {
"name": "Firefox",
"version": "63.0.3"
},
"browser": {
"name": "Firefox",
"version": "63.0.3"
},
"pages": [
{
"startedDateTime": "2018-12-11T09:18:46.081+01:00",
"id": "page_1",
"title": "Ny fane",
"pageTimings": {
"onContentLoad": 35,
"onLoad": -1
}
}
],
"entries": [
{
"pageref": "page_1",
"startedDateTime": "2018-12-11T09:18:46.081+01:00",
"request": {
"bodySize": 0,
"method": "GET",
"url": "https://192.168.1.157:8088/",
"httpVersion": "",
"headers": [
{
"name": "Host",
"value": "192.168.1.157:8088"
},
{
"name": "User-Agent",
"value": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:63.0) Gecko/20100101 Firefox/63.0"
},
{
"name": "Accept",
"value": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"
},
{
"name": "Accept-Language",
"value": "nb-NO,nb;q=0.9,no-NO;q=0.8,no;q=0.6,nn-NO;q=0.5,nn;q=0.4,en-US;q=0.3,en;q=0.1"
},
{
"name": "Accept-Encoding",
"value": "gzip, deflate, br"
},
{
"name": "Connection",
"value": "keep-alive"
},
{
"name": "Upgrade-Insecure-Requests",
"value": "1"
},
{
"name": "Pragma",
"value": "no-cache"
},
{
"name": "Cache-Control",
"value": "no-cache"
}
],
"cookies": [],
"queryString": [],
"headersSize": 438
},
"response": {
"status": 0,
"statusText": "",
"httpVersion": "",
"headers": [],
"cookies": [],
"content": {
"mimeType": "",
"size": 0,
"encoding": "base64",
"text": ""
},
"redirectURL": "",
"bodySize": 0
},
"cache": {},
"timings": {
"blocked": 1,
"dns": 0,
"connect": 1,
"ssl": 1,
"send": 0,
"wait": 0,
"receive": 0
},
"time": 3,
"_securityState": "insecure"
}
]
}
}

The difference (as far as I know) to the working RPi at 192.168.1.190 is node version.
Maybe I should think of downgrading node?

Post Reply