5 5
GeorgeL

SSH doesn't work on Orange Pi Zero

Recommended Posts

6 hours ago, Igor said:


This could be safe to ignore, but it would be nice to peek into the logs to see which module(s) are not getting loaded.


sudo journalctl -u systemd-modules-load.service

 

I can provide you with more information on the systemd-modules-load.service later on. However I'm currently back again on the legacy kernel because I noticed other stuff not working (which actually isn't crucial). But is it the case that all Armbian images with mainline kernel don't support the hardware read-outs of H3 processors? Armbianmonitor isn't working correctly on my side with 16.04 and mainline e.g. voltage, DRAM clock, temperature and so on are not retrieved correctly. The same is the case for h3consumption which doesn't work any more and a few other tools which now report either no value or wrong values (EZ Monitor, phpSysMonitor). Or is it because of the missing compatibility of 16.04 with mainline kernel as it is intended for legacy? thanks in advance for more info on that!

Share this post


Link to post
Share on other sites
4 hours ago, BlackWoxs said:

@thexman thank you very much for your work and the batch files on GitHub.

 

Thanks to these I am now back and running fine under systemd-229-4ubuntu-21.11, without having to resort to non-standard patching/config.

 

Much appreciated.

Hey BlackWoxs, you are very welcome! I'm very happy that I could contribute something useful that is also helping other people :)

Edited by thexman
typo

Share this post


Link to post
Share on other sites
17 minutes ago, thexman said:

I can provide you with more information on the systemd-modules-load.service later on


No need. We don't have capacity to sponsor support for generic Debian problems - use Google, Debian/Ubuntu forums. Pointing you to the right direction is already a premium service which will save you some time.
 

23 minutes ago, thexman said:

Armbianmonitor isn't working correctly on my side with 16.04 and mainline


That's is known. This service along with other utilities were made specially for legacy kernel. Most of those functions does not exists and/or will never exists in a modern kernel. Use kernel which suits your needs best. 

Share this post


Link to post
Share on other sites

@thexman

Thank you very much for recognizing the problem and your github bash files! They are really heplful!

I have Orange Pi PC server at home, which serves as dlna server and also tvheadend and samba store.  So after last update I was really upset when it occurred I can't connect with server anymore through SSH. Fortunately I installed Webmin few months ago and thanks to that I was able to get to webmin virtual console and easy repair the systemd thanks to your files.

 

It just came to me that I've got two Opi Zeros, running as dlna players and they have auto updates on. But yesterday they worked fine. I hope this bug won't happen to them.

Share this post


Link to post
Share on other sites

@Igor

It's fine, I thought you were interested in the output of the log. I simply misunderstood your post. It's not necessary to look into or provide support in that case because I also didn't invest much time finding the origin. Furthermore, I'm back on legacy for the moment and stay with it and watch how the systemd updates in the future proceed. Maybe the bug will be fixed and at the moment I have no desperate need to switch to mainline. Thanks for the additional information concerning Armbianmonitor and mainline that is very useful.

 

@scaevola

You are very welcome, thanks for your words I'm happy that the scripts helped you :). The issue with systemd is also very annoying for me because my OPi is a DNS server so it really sucks when a core update breaks the whole thing. I'm glad that I have a VNC server on the OPi otherwise it would be a pain in the a** because it works in headless mode (HDMI off)... I find it more convenient to simply execute one single batch file instead of searching every single of the four packages manually. IDK if there is a better way to find and get them without retrieving the download paths directly from Launchpad. A more sophisticated script would consider a specific Ubuntu versions, target platform and parse the download paths automatically. However for the moment this should be ok! Probably there is already a script where you can specify platform, package(s), system version and package version which then retrieves the correct paths and installs the package. Maybe an idea for a future project if not already existent :P. If your OPi Zeros are not on legacy kernel 3.x, you can check with uname -a, they probably won't be affected at all. If they have kernel version 4.x it should be fine from what I noticed.

Share this post


Link to post
Share on other sites

I thought I was hacked :D

 

I didn't have a lot of time to research, but I wanted to share my solution to the SSH issue.

I boot my Orange Pi Zero with serial connection and I run this command:

sudo mkdir -p /var/run/sshd

 

Afert that, SSH works until the next reboot :)

Share this post


Link to post
Share on other sites

@plus90

Yeah this works I also tried that the other day. You could also create the directory on start up, BUT you have to do this for all services on your device not initializing correctly. In my case that is a lot of stuff and also new installed services might break again as it affects volatile folder creation. Give my permanent solution a shot :).

Edited by thexman

Share this post


Link to post
Share on other sites

I faced with same problem on OPiplus2e, Ubuntu Xenial, legacy kernel 3.4.113-sun8i.

After systemd update to version 229-4ubuntu21.15 program /bin/systemd-tmpfiles which creates tmp directories on start stopped working.

For each dir (configured in /usr/lib/tmpfiles.d) message is the same:

  Failed to validate path /some_path: Bad file descriptor

 

This can be checked by  executing as root command: SYSTEMD_LOG_LEVEL=debug systemd-tmpfiles --create sshd

 

I had old backup from august last year, systemd version 229-4ubuntu21.4

I just copied this file (/bin/systemd-tmpfiles) from backup an everything start to work.

What is exactly wrong with it I am not sure. 

Share this post


Link to post
Share on other sites

@IgorS

Interesting that this approach works, however I wouldn't recommend doing this because you now have a different version of systemd-tmpfiles compared to the other systemd packages. This might cause compatibility issues. You should downgrade all systemd packages to a specific version instead of overwriting files manually. Also this might result in inconsistencies between the apt version of systemd-tempfiles and the real version residing on your disk. For more information on the bug see my post and the attached solution to downgrade to the latest working systemd revision without any issues.

Share this post


Link to post
Share on other sites

I'll take my chances.

systemd-tmpfiles just creates and cleans directories based on coniguration,

wjhile rest of systemd handles other things. Recently was, as far aa I know disovered security risk in systemd which ie possible to exploit from remote, therefore I wold like to keep last version and I really don't expect troubles because of this. Apt, in other hand cant know nothing about this, bec<use it just keep itts darabase of package versions.

Share this post


Link to post
Share on other sites

@IgorS

Ok how you mind ;). But it has to be said that your 229-4ubuntu21.4 is older than the last working version 229.4ubuntu21.11 as I proposed. Plus you still have the version discrepancy between apt and your real disk version. I'm not sure in which package systemd-tmpfiles is included but I assume systemd so you have two different versions of one package on your disk. But I do understand that just tmpfiles is replaced by 21.4. Yes apt doesn't know and that is what I said. I have no knowledge how the systemd included components interact TBH so it might not be a problem at all. If you take the security point serious switch to mainline kernel and everything will be good at all...because you currently still rely on an old version which can't be updated. This will also be the best bet depending on what you want.

Share this post


Link to post
Share on other sites

@IgorS

Ok can't say anything about that because I haven't tried. I assume video accel. in >16.04.5 does work so there might be a fix for that because all never version depend on mainline.

Share this post


Link to post
Share on other sites

@JRD McLAREN

The first service that breaks should be `systemd-tmpfiles`. I have my doubts that this will get fixed on Ubuntus side, because I reported it. The legacy kernel is quite old and it looks like they somehow don't care if the new systemd breaks it or not as no one felt responsible answering anything about how or if this will be resolved. The only real solution is downgrading to 21.11 which is the last working systemd version and put systemd on hold, at least for some time and see if a newer systemd fixes the problem. Here is a link my script which does that automatically.

Share this post


Link to post
Share on other sites

I can't connect to the OpenVPN server on my Orange Pi Zero since this SSH issue has started.

The OpenVPN server status is active (running).


My version info:

ARMBIAN 5.73 stable Ubuntu 16.04.5 LTS 3.4.113-sun8i

 

@thexman, thanks for the proposed solution, I'm planning on trying that. I just wanted to report the issue for now. Thanks.

Share this post


Link to post
Share on other sites

@plus90

Hey I can't confirm that OpenVPN server is affected by the latest kernel version or by the latest systemd. My OpenVPN server on 5.73 is working as expected and I can connect like before. Everything is up to date on my server and I'm not facing issues. Just to let you know that this might not be a general problem. You are welcome but I'm not assuming that my solution will be a workaround as the problem might be located somewhere else but feel free to try it as it could be easily reverted ;). If the service is up and running there is a high chance that you're facing a problem that is not related to original systemd problem.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
5 5