SSH/Webinterface stops working after a while

After booting up OSMC for about a day, I cannot access any port. I have to reboot (OSMC/Linux, not Kodi) it to be able to access SSH and the Kodi web interface. I will post Kodi logs when the issue will be reproduced, in a day or two.

nmap shows that the ports are filtered:

bash-5.0# nmap
Starting Nmap 7.70 ( ) at 2019-06-19 20:06 +04
Nmap scan report for aPi3A (
Host is up (0.071s latency).
All 1000 scanned ports on aPi3A ( are filtered
MAC Address: XX:XX:XX:XX:XX:XX (Raspberry Pi Foundation)

Nmap done: 1 IP address (1 host up) scanned in 72.51 seconds

After the reboot, nmap outputs me:

bash-5.0# nmap
Starting Nmap 7.70 ( ) at 2019-06-19 20:13 +04
Nmap scan report for aPi3A (
Host is up (0.0017s latency).
Not shown: 996 closed ports
22/tcp   open  ssh
80/tcp   open  http
111/tcp  open  rpcbind
9090/tcp open  zeus-admin
MAC Address: XX:XX:XX:XX:XX:XX (Raspberry Pi Foundation)

Nmap done: 1 IP address (1 host up) scanned in 20.75 seconds

iptables shows nothing of interest:

osmc@aPi3A:~$ sudo iptables --list
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination  

Thank you for the help!

Are you forwarding your SSH and web ports to the outside world? That’s not a real good idea. If you did I hope you changed the default osmc password, because if you didn’t your system has probably been hacked :unamused:

No, I am not forwarding any of the ports to the internet.

What system did you run nmap on? It’s not installed by default on an OSMC system.

I ran nmap on a Linux computer. Linux version is 4.19.

Have you checked the power supply of the Pi? It is an approved power supply and not a cell phone charger, right?

Do you have a keyboard that you can connect to the Pi? That way you will know if it’s really hanging or you are just losing the network.

I hadn’t had any problem with my Samsung 5.2V 2A travel adapter. It isn’t a power supply but it works correctly with my Raspberry Pis.
The Raspberry Pi isn’t hanging. I can interact with the user interface without problem. The network is not lost as nmap reports the device as online.

That is not enough for a Pi. You really should get a proper power supply. Power problems manifest a lots of different ways.

I forgot to add that the problem was non-existent before updating from the December 2018 update. It started after the first or second reboot in the 2019 May update (first upgrade that brought me to Leia).
Kodi is sitting on it’s home screen without any high CPU usage.

A 2A power supply will not work properly. The Pi Foundation recommendation is 2.5A.

The newer versions of Kodi will push the performance of the Pi to a higher limit, so a marginal supply that worked before may no longer reliably work.

Why would the problem appear a lapse of time after booting and not immediately?

It’s hard to say, maybe the script that checks for updates is running, or maybe you have an automatic library scan running. Anything could be pushing the below spec power supply over it’s limit.

I have seen a similar effects with a RaspberryPi. Not with OSMC, but with another debian based 24/7 system. Some services simply stopped after some time.

The strange probelms disappeared completely after switching to the Official Raspberry Pi Power Supply. Just try it.

The issue with the power supplies is not that 2A isn’t enough. The issue is that the Pi (and most other SBC’s) have issues when the power drops below 4.7v (don’t quote me on the exact number) while cell phone/tablets have no issue unless the voltage drops below 3.8v (or something, again, don’t quote me on the exact numbers) as they are only charging a even lower voltage battery. Because of this most “charger” power supplies don’t bother regulating their voltage very well. When the current draw increases the voltage on these “charger” type supplies will often drop below the Pi’s minimum which can make all kinds of strange things happen aside of just crashing or rebooting. It is also expected for you to have issues with current builds when you might not have had previously as OSMC/Kodi has been tweaked for performance so it draws more current. I assume your using a 3b+ because it is much less forgiving than older versions of the Pi’s. The ethernet is also much less forgiving than earlier versions as it is using its own dedicated chip now and I think it is running straight off the 5v bus.

Just for the record, port that are “filtered” haven’t responded at all. (As opposed to ports that do respond but say they are “closed”.)

Complete lack of response suggests that at least part of the operating system (eg the networking part) has locked up.

You mention that Kodi still works:

so it looks like a networking-related problem to me.

While it could be a power issue, it might also be a data corruption or iffy SD card. A good test will be a fresh installation of OSMC on a different SD card. If it still locks up, you could be looking at a marginal cable/connection, something amiss with the router, the PSU or even with the Pi itself.

No, last time the problem happened, Kodi could still access the internet.

Interesting… I will get one in the following month.

Sorry for not specifying my Pi’s model: I am using a Raspberry Pi 3A+.

A while ago, I dd the contents (block device, e.g /dev/sdd) of the card and I was getting I/O errors. I bought a new microSD card that I left unused. Can I simply dd (without command line args) the contents of the card (to a file then) to the new one or do I need to specify arguments to the dd utility?

My Pi is up for a day and I can still access SSH and the web interface. I haven’t done anything heavy on the Pi since it has booted up which may explain why I can still access these interfaces. I will definitely buy the Raspberry Pi Universal Power Supply, as it fits my needs with the interchangeable plug heads.

Thank you all for your help! :smiley: :+1:

I’m a little surprised you forgot to mention this important point.

Which means it has no built-in wired network interface – and I can see no mention in the thread of whether you’re using WiFi or an external network adapter. Full logs at the beginning would have helped.

Not advisable, since (a) you were getting I/O errors from the card and (b) the receiving card might be smaller than the original card, even if the nominal sizes are the same. Better to dd from an uncompressed OSMC image.