Raspberryshake get ip, connect to internet but can not be accessed through webinterface

I have two raspberryshake 1-D shake. Both of them could connect to internet and do everything. Suddenly things changed and now I can only ssh to them. I found that they can see the internet (they can ping 8.8.8.8) but still using rc.local:5000 or ip:5000 could not be accessed by web interface. My ip is in the 192.168.50.*, a facke one not a true one.

I will be happy to have your help

Hello rezaghods, welcome to the community!

Have you tried a direct connection? The how to do it is explained here on our manual: https://manual.raspberryshake.org/ssh.html#direct-connections

Or, when connected to your LAN, can you find it in the list of the devices from your modem/router admin panel? Or, can you find it with an app like Fing (https://www.fing.com/products/fing-app )?

If Fing manages to find them, can you try to connect to both Shakes using their IP address?

Hi, I have a 4-D shake which recently started to have similar issues. The live view was available on my mobile phone app MyShake, and via ShakeNet’s Dashboard “your favorite stream”. However using rs.local or the actual IP address on the home network, reported unable to connect.
Powering down, and restarting the 4-D solved the problem, but local connection only lasted a few hours to a couple of days, while the external web connections continued to work. Powering down the router and then reconnection the 4-D made little difference, the same problem reappeared a couple of days later. The IP address of the 4-D is listed on the router’s tables, and the 4-D responds to a ping scan using Fing. Currently the 4-D is visible on the home network after 3 days following a full reset of the router to default factory settings.

Sorry, forgot to include log files.
RSH.R8A0C.2021-02-15T22_40_06.logs.tar (3.3 MB)

Dear Stormchaster

I could connect to my raspberryshake directly. Indeed once I connect it to my local lan ( I am in a university behind a firewall with fake ips in the range of 192.168.50.*), I can connect to my raspberryshake using ssh rs.local@rs.local. Even ping rs.local does work. Once I am connected to the unit using ssh, I can see its IP which was assigned to it dynamically by DHCPD. Then I can also ssh to the unit using ssh myshake@ip. I can ping the outside world from my raspberryshake unit and it does work. The same unit was working perfectly and I did not do anything to cause this problem. I noticed similar behaviour as reported by Corofinshake but now I totally can not access the webinterface.

Please find my logfile attached to this message.

By the way, I used nmap to scan opened ports on the raspberryshake units. I found there are only two ports open, namely 22 for ssh and 111 for rpcbind. To have a webserver there should be another port, default 80, open. I do not really understand what is going here.
reza-log.tar (3.6 MB)

Yours

Reza

Hello Reza,

thank you for the logs and the further information that you provided. Indeed, the port situation is quite strange, since this is the list of all the ones that should be open in order for the Shake to fully operate: Firewall issues? — Instructions on Setting Up Your Raspberry Shake

The missing IP:80 port may be the reason why you are not able to access your Shake locally. For example, for both of my Shakes, I have the TCP Port 80 open and listening.

Can you please SSH into the Shake again and execute either or netstat or ss followed by -lntu and post here the results?

Thank you.

@CorofinShake Thank you for your message, info and logs.

It seems that this is some intermittent issue, because I cannot see anything that is particularly wrong with the logs themselves. Is the Shake still visible in local, or has the issue appeared again?

Could you please SSH into the Shake (guide here: How to access your Raspberry Shake’s computer via ssh — Instructions on Setting Up Your Raspberry Shake) and execute either or netstat or ss followed by -lntu and post here the results? So that we can see if any port has been closed.

After this, could you also shut down your Shake again first, then your modem/router. Wait for 2 to 5 minutes, then restart your modem/router, and when it’s back online, wait for another 2 minutes, and turn on the Shake again. Now, after around 10 minutes, download the logs anew and please post them here, so that I can check for any difference.

Thank you.

Hi

Thanks for the instructions, I have followed them plus a bit. I was unsure on how to “post” the results, so I have forwarded them as PDF files.

Both before and after switching the Shake and router OFF then ON, the 4-D Shake was visible on a range of devices directly connected to the home network.

As well as accessing the 4-D Shake via the ssh, I also have included the before and after results using a Nmap ‘intensive scan’ on the Shake’s IP address.

Hope this will be helpful.

Thanks

Kieran Devine

CorofinShake ssh-netrstat-3.27pm-17-02-2021.pdf (83.2 KB)

CorofinShake Nmap-3.33pm-17-02-2021.pdf (86.7 KB)

CorofinShake ssh-netrstat-6.06pm-17-02-2021.pdf (83 KB)

CorofinShake Nmap-5.58pm-17-02-2021.pdf (87.1 KB)

Dear Stormchaster

Thank you for your reply. Is there a way to initiate the webserver? The result of ss -lntu is as follow,
root@raspberryshake:/opt/log# ss -lntu
Netid State Recv-Q Send-Q Local Address:Port Peer Address:Port
tcp LISTEN 0 128 :111 :
tcp LISTEN 0 128 :22 :
tcp LISTEN 0 128 172.17.0.2:8000 :
tcp LISTEN 0 128 127.0.0.1:2947 :
tcp LISTEN 0 128 :::111 :::

tcp LISTEN 0 128 :::18000 :::

tcp LISTEN 0 128 :::22 :::*
tcp LISTEN 0 128 :::16032

Thank you both for the information you have provided. @rezaghods @CorofinShake

We will review that and I’ll write to you as soon as I have an update.

Dear Stormchaser
My RaspberryShake failed to connect this afternoon using the local home network, but is still visible on the mobile app and as my favorite stream on the Dashboard of ShakeNet.
To assist I have included both the Nmap and SSH files, to allow comparison with the previous equivalent files when the local network connection was working.
Thanks
CorofinShake
R8A0C ssh-16.09-1 Mar 2021.pdf (82.7 KB) R8A0C Nmap-16.09-1 Mar 2021.pdf (81.9 KB)

Dear @CorofinShake,

thank you for the further info and the comparison PDFs. I assume that you have also tried to connect on the local network via both rs.local and the Shake IP address.

Could you please also send us the logs from the Shake? Thank you.

Hi Stormchaser

I tried several times, and on several PCs and Macs with both rs.local and the actual IP address, all with the same result, “rs.local, or 192.168.50.100, refused to connect”.

The Nmap scan shows that ports 21, 80 and 5000 have been closed on the RaspberryShake, (only ports 111 and 22 are open), so it seems unlikely a connection can be made using the web interface.

Is there a way of downloading the logs via port 22 and SSH?

Thanks

CorofinShake

Hello CorofinShake,

Yes, it is possible to download the logs via SSH. Once in, you have to navigate to the following folder:

/opt/log

and send me its entire content via zipped (or .rar) file.

Thank you.

Hi Stormchaser
I have had difficulty accessing the /log file via SSH. PuTTY summary below:

myshake@raspberryshake:/opt $ tar cf /tmp/rsh.logs.tar /opt/log
tar: /tmp/rsh.logs.tar: Cannot open: Read-only file system
tar: Error is not recoverable: exiting now
myshake@raspberryshake:/opt $

I finally resorted to restarting my RaspberryShake by powering down/up. This restored the local network web interface, and I used the “DOWNLOAD LOG FILES” button.
RSH.R8A0C.2021-03-06T00_43_41.logs.tar (3.2 MB)
I also discovered that all the waveforms for the period when the RaspberryShake was not able to be accessed via the local network web interface were not available using the Helicorder, and I assume not recorded. A bit annoying with all the recent activity in New Zealand.
However I was able to access all the data on my mobile app.
Thanks
CorofinShake

Hi Stormchaser
After several weeks of restarting my 4-D to regain connection to my home network, the SD micro card failed. Reloaded a new clean version of version 0.18 on a new card and powered the 4-D Shake.
Perversely, I now have connection to the home network, but am unable to get a server connection.
I have tried this process several times, including with a factory settings default restart of the router, with the same result.

A mapping of the IP address shows not all required ports are open.

Starting Nmap 7.91 ( https://nmap.org ) at 2021-04-13 12:56 New Zealand Standard Time
Nmap scan report for 192.168.50.100
Host is up (0.00s latency).
Not shown: 995 closed ports
PORT STATE SERVICE
21/tcp open ftp
22/tcp open ssh
80/tcp open http
111/tcp open rpcbind
5000/tcp open upnp
MAC Address: B8:27:EB:96:8A:0C (Raspberry Pi Foundation)
Nmap done: 1 IP address (1 host up) scanned in 0.59 seconds

I have included the logs.
RSH.R8A0C.2021-04-13T01_58_51.logs.tar (96.5 KB)
Thank you in anticipation.
CorofinShake

Hello CorofinShake,

Thank you for the logs. Yes, what I can see confirms your situation. Can you SSH (the guide is here: How to access your Raspberry Shake’s computer via ssh — Instructions on Setting Up Your Raspberry Shake ) into the Shake and try and ping the following addresses?

  • ping 8.8.8.8 -c 10
  • ping 104.200.16.60 -c 10

The first one is the Google server, while the second is our data server. The two commands will execute the exchange ten times, and your expected result is a 0% packet loss for both instances.

Since we don’t have any connection these two tests should fail, but I prefer having this verified before going forward.

Hi StormChaser
Results of ping tests attached.

login as: myshake
myshake@192.168.50.100’s password:
Linux raspberryshake 4.14.79-v7+ #1159 SMP Sun Nov 4 17:50:20 GMT 2018 armv7l

WELCOME TO RASPBERRY SHAKE!

Developed by:
Raspberry Shake: https://raspberryshake.org
Boaz Consultancy: https://sqlx.science

STATION: AM.R8A0C.00

Last login: Thu Aug 13 22:34:40 2020 from 10.18.90.6
myshake@raspberryshake:/opt $ ping 8.8.8.8 -c 10
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
From 169.254.37.202 icmp_seq=1 Destination Host Unreachable
From 169.254.37.202 icmp_seq=2 Destination Host Unreachable
From 169.254.37.202 icmp_seq=3 Destination Host Unreachable
From 169.254.37.202 icmp_seq=4 Destination Host Unreachable
From 169.254.37.202 icmp_seq=5 Destination Host Unreachable
From 169.254.37.202 icmp_seq=6 Destination Host Unreachable
From 169.254.37.202 icmp_seq=7 Destination Host Unreachable
From 169.254.37.202 icmp_seq=8 Destination Host Unreachable
From 169.254.37.202 icmp_seq=9 Destination Host Unreachable
From 169.254.37.202 icmp_seq=10 Destination Host Unreachable

— 8.8.8.8 ping statistics —
10 packets transmitted, 0 received, +10 errors, 100% packet loss, time 142ms
pipe 4
myshake@raspberryshake:/opt $ ping 104.200.16.60 -c 10
PING 104.200.16.60 (104.200.16.60) 56(84) bytes of data.
From 169.254.37.202 icmp_seq=1 Destination Host Unreachable
From 169.254.37.202 icmp_seq=2 Destination Host Unreachable
From 169.254.37.202 icmp_seq=3 Destination Host Unreachable
From 169.254.37.202 icmp_seq=4 Destination Host Unreachable
From 169.254.37.202 icmp_seq=5 Destination Host Unreachable
From 169.254.37.202 icmp_seq=6 Destination Host Unreachable
From 169.254.37.202 icmp_seq=7 Destination Host Unreachable
From 169.254.37.202 icmp_seq=8 Destination Host Unreachable
From 169.254.37.202 icmp_seq=9 Destination Host Unreachable
From 169.254.37.202 icmp_seq=10 Destination Host Unreachable

— 104.200.16.60 ping statistics —
10 packets transmitted, 0 received, +10 errors, 100% packet loss, time 394ms
pipe 4

Thanks
CorofinShake

Hello CorofinShake,

Thank you for the results of the tests, they are what I expected them to be with the message that was present in the logs you attached before.

Can you please SSH into the Shake again, and now post a screenshot of the content of these two files, after opening them with the following command?

cat /etc/dhcpcd.conf
cat /etc/resolv.conf

I want to see, with this information, if the Shake network connectivity was properly configured by your router or if our issue is located there.

Hi StormChaser

Details from running commands:

login as: myshake

myshake@192.168.50.100’s password:

Linux raspberryshake 4.14.79-v7+ #1159 SMP Sun Nov 4 17:50:20 GMT 2018 armv7l

WELCOME TO RASPBERRY SHAKE!

Developed by:

Raspberry Shake: https://raspberryshake.org

Boaz Consultancy: https://sqlx.science

STATION: AM.R8A0C.00

Last login: Wed Apr 14 22:40:12 2021 from 192.168.50.147

myshake@raspberryshake:/opt $ cat /etc/resolv.conf

Generated by resolvconf

nameserver 192.168.50.1

myshake@raspberryshake:/opt $ cat /etc/dhcpcd.conf

interface eth0

static ip_address=192.168.50.100/

static routers=

static domain_name_servers=192.168.50.1

A sample configuration for dhcpcd.

See dhcpcd.conf(5) for details.

Allow users of this group to interact with dhcpcd via the control socket.

#controlgroup wheel

Inform the DHCP server of our hostname for DDNS.

Use the hardware address of the interface for the Client ID.

clientid

or

Use the same DUID + IAID as set in DHCPv6 for DHCPv4 ClientID as per RFC4361.

#duid

Persist interface configuration when dhcpcd exits.

persistent

Rapid commit support.

Safe to enable by default because it requires the equivalent option set

on the server to actually work.

option rapid_commit

A list of options to request from the DHCP server.

option domain_name_servers, domain_name, domain_search, host_name

option classless_static_routes

Most distributions have NTP support.

option ntp_servers

Respect the network MTU.

Some interface drivers reset when changing the MTU so disabled by default.

#option interface_mtu

A ServerID is required by RFC2131.

require dhcp_server_identifier

Generate Stable Private IPv6 Addresses instead of hardware based ones

slaac private

A hook script is provided to lookup the hostname if not set by the DHCP

server, but it should not be run by default.

#nohook loo

denyinterfaces wlan0myshake@raspberryshake:/opt $

Thanks

CorofinShake