Network sources sometimes loose connection

Hi there. I have a pi3 and have sources on a wd cloud network drive.
I have sources as nfs share and i have also mounted a folder on boot.

Now and again i try and play something and it spins for a while and says lost connection to network.
If i try and browse via the file manager i cant browse either my nfs source or my mapped folder.

However if i ssh onto the pi i can cd into mapped folder perfectly fine. So the pi can see it so the pi has connection ok. Just not from inside kodi itself. If i do a reboot then all is ok again

Is there anything i can do to check or fix this.

Regards
Chris

To get a better understanding of the problem you are experiencing we need more information from you. The best way to get this information is for you to upload logs that demonstrate your problem. You can learn more about how to submit a useful support request here.

Thanks for your understanding. We hope that we can help you get up and running again shortly.

thanks for your email.

My logs are located http://paste.osmc.io/ekiromijaz

its just done it again so hopefully these logs are useful
To clarify I store my media on a networked hard drive. I have the sources for films /tv shows via NFS.
I have also mapped a drive using CIFS.
When this issue arises. none of these works from inside OSMC. However if I SSH onto the box the CIFS mount does work ok. (just not from OSMC) although once I restart all links via OSMC work again.

Could it be the network hard drive loosing connection temporarily and then not reconnecting? I think the NAS drive is set to “goto Sleep” to save energy.

I have a Py script which should auto remount any missing drives from boot. mount -a I think it was. But this hasn’t needed to be done as via SSH (and via windows if I Samba to the drive) I can still browse ok. I just cant from inside Kodi…
j

Ok - something else I have found out- I was trying to take a screen shot via the command - and then save to the home drive. This also doesn’t open. So its not just my network location I cant browse too- I cant browse to my home drive / or ROOT. or a NFS share. (from Kodi interface)

I’m running the Standard Skin (not the OSMC one) but the Default 17 skin)

Very odd!

You have your drive mounted via fstab using cifs, but in Kodi you are accessing it via nfs:// and smb://. You should use one method or the other. The best being to use the fstab mounted drive, and even better just use nfs to mount. Then edit your sources.xml to use the fstab mounded drive.

fstab mounted drives will perform better as the are a kernel mode driver, instead of making Kodi to the work.

Apr 18 23:10:59 thepi sudo[812]: pam_unix(sudo:session): session opened for user root by (uid=0)
Apr 18 23:10:59 thepi sudo[812]: pam_unix(sudo:session): session closed for user root
Apr 18 23:11:00 thepi sudo[818]: osmc : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/bin/mv /var/tmp/config.txt /boot/config.txt
Apr 18 23:11:00 thepi sudo[818]: pam_unix(sudo:session): session opened for user root by (uid=0)
Apr 18 23:11:00 thepi mediacenter[489]: mv: failed to preserve ownership for '/boot/config.txt': Operation not permitted
Apr 18 23:11:00 thepi sudo[818]: pam_unix(sudo:session): session closed for user root
Apr 18 23:11:18 thepi sshd[849]: Address 80.82.70.134 maps to no-reverse-dns-configured.com, but this does not map back to the address - POSSIBLE BREAK-IN ATTEMPT!
Apr 18 23:11:18 thepi sshd[849]: Invalid user admin from 80.82.70.134
Apr 18 23:11:20 thepi sshd[845]: Received disconnect from 58.218.211.94: 11:  [preauth]
Apr 18 23:11:23 thepi sshd[849]: input_userauth_request: invalid user admin [preauth]
Apr 18 23:11:24 thepi sshd[853]: Address 80.82.70.134 maps to no-reverse-dns-configured.com, but this does not map back to the address - POSSIBLE BREAK-IN ATTEMPT!
Apr 18 23:11:24 thepi sshd[853]: Invalid user admin from 80.82.70.134
Apr 18 23:11:24 thepi sshd[853]: input_userauth_request: invalid user admin [preauth]
Apr 18 23:11:24 thepi sshd[855]: Address 80.82.70.134 maps to no-reverse-dns-configured.com, but this does not map back to the address - POSSIBLE BREAK-IN ATTEMPT!
Apr 18 23:11:24 thepi sshd[855]: Invalid user admin from 80.82.70.134
Apr 18 23:11:24 thepi sshd[855]: input_userauth_request: invalid user admin [preauth]
Apr 18 23:11:25 thepi sshd[857]: Address 80.82.70.134 maps to no-reverse-dns-configured.com, but this does not map back to the address - POSSIBLE BREAK-IN ATTEMPT!
Apr 18 23:11:25 thepi sshd[857]: Invalid user admin from 80.82.70.134
Apr 18 23:11:25 thepi sshd[857]: input_userauth_request: invalid user admin [preauth]
Apr 18 23:11:26 thepi sshd[860]: Address 80.82.70.134 maps to no-reverse-dns-configured.com, but this does not map back to the address - POSSIBLE BREAK-IN ATTEMPT!
Apr 18 23:11:26 thepi sshd[860]: Invalid user admin from 80.82.70.134
Apr 18 23:11:26 thepi sshd[860]: input_userauth_request: invalid user admin [preauth]
Apr 18 23:11:27 thepi sshd[863]: Address 80.82.70.134 maps to no-reverse-dns-configured.com, but this does not map back to the address - POSSIBLE BREAK-IN ATTEMPT!
Apr 18 23:11:27 thepi sshd[863]: Invalid user debian from 80.82.70.134
Apr 18 23:11:27 thepi sshd[863]: input_userauth_request: invalid user debian [preauth]
Apr 18 23:11:27 thepi sshd[863]: Received disconnect from 80.82.70.134: 11: Bye Bye [preauth]
Apr 18 23:11:28 thepi sshd[866]: Address 80.82.70.134 maps to no-reverse-dns-configured.com, but this does not map back to the address - POSSIBLE BREAK-IN ATTEMPT!

Something is hammering your device and attempting to connect to SSH…

Have you port forwarded port 22 to your pi from the outside world?!

Ooh yes I have! - I have just Disabled that port forward! Do you think that could be breaking it? Thanks a lot for the quick reply!

thanks for the advise on Mounting too - I will look to see if I can change my sources.
Regards

Certainly it’s a possibility that the repeating traffic is clogging your network connection. More concerning is that, in zero uncertain terms, if your user:pass was not changed from osmc:osmc, you MUST now reinstall in order to be certain that your pi, and therefore every other system connected to your LAN, are not compromised! Forwarding 22 without, at the very least, changing the default user:pass is literally a “worst practice” and I have seen with my own eyes, password lists (for the purposes of hacking random IP addresses) that contain user:pass osmc:osmc. Not to mention the logs I’ve seen from actual systems confirming compromise.

If you want remote access, you must do, at the very least two things, use a non-standard port and change the default password!!!

Best Practice would be to disable password logins all together and only allow private key authentication (again, on a non-standard port).

You’re post history also indicates you may be passing FTP as well? This is literally the worst thing you can do regarding security… :frowning:

Thanks for the advice. Yes. They wasnt changed. Although i was having issues connecting. Where it wanted more to log in than just username /pass. Like a certificate.

I have turned off ssh for port forwarding. Ftp is thrned on but the port for ftp is going to a different machine (my wd cloud in fact).

Would i just be able to change my user/pass for pi and check there are no other accounts (somehow)

I have a few other things running on pi so completely reinstalling everything wouldn’t be ideal but obviously if there is no other choice…

The safest thing would be a reinstall, as you don’t know for sure what might have been compromised.
It will probably save you headaches in the future. You can probably reinstall faster than figuring out what has been compromised :wink:

1 Like

If you do not re-install, EVERY DEVICE on your LAN cannot be considered secure!

Thanks for the help.
Looks like ill be reinstalling it all over the weekened. :disappointed: My own fault thou. Lets hope that my issue was resolved. Either way a reinstall might help anyway! :relaxed: Do i change the default username once osmc has installed or create a new one and remove/disable the old one?

Regards
Chris

Just change it after the installation don’t change the user as OSMC depends on it.
But ensure that no public internet access at all is possible until you have done the security changes and then only use a random highport for SSH and not FTP or others.

apart from the other bits I will need to reinstall on the pi. Kodi wise
am I able to use the back and restore to reinstall any addons and settings for OSMC itself?

will that also restore things like watched lists and things like sources?

Regards

Keep a copy of the folder /home/osmc/.kodi to preserve all your settings and the database, but reintroduce them only one file at a time and only those you really need to keep as there is no telling where malware may be stored if you have been hacked.

Thanks. Might just redo it all. Safer. Is there any need to use usb 3 stick along side thesd card for speed improvement. I always installed to usb (as believd it was a bit quicker)

No – SD performance has improved a lot over the years and the chance of corruption is now the same as using a USB device

1 Like

Hi Sam

Redid my pi a few days ago, have had the same issue again :frowning: not able to browse any files, If I goto add a source I cant even brose my Home drive. or any network shares, or a Web portal.

I have not port forwarded the SSH as before (and redid everything) I have a new log file to hopefully help.

http://paste.osmc.io/uwedoyurax

:frowning: really not sure whats causing it.

Once again if I SSH onto the PI - I can browse all files and the Mapped Drive (cifs) all work fine…
Very odd

You have far too much extraneous stuff going on, much of it from 3rd party addons that we will not support. With all of the static, it’s quite difficult to be able to see what the problem might be. You need to demonstrate the issue on a clean installation that you have done nothing to, other than add sources and attempt to access files. Then provide debug enabled logs so that we have a chance of seeing what the problem is.