[vpsFree.cz: community-list] ssh a screen po vypadku 2019-01-14 14:50 CET (na node3.brq)
Matěj Koudelka
matej at hxpro.cz
Wed Jan 16 09:49:21 CET 2019
Nejsem ubunťák, ale adresáře v adresáři /var/run vytváří systemd pomocí
systemd-tmpfiles-setup, bylo by fajn překontrolovat, jestli tohle není
nějak nakopnuté.
Definici adresáře který se má vytvořit pro ssh najdeš snad v
/usr/lib/tmpfiles.d/sshd.conf a mělo by to vypadat nějak takhle:
d /var/run/sshd 0755 root root
Kdyžtak rtfm:
http://manpages.ubuntu.com/manpages/bionic/man5/tmpfiles.d.5.html
*Matěj Koudelka*
+420 604 266 933
On Wed, 16 Jan 2019 at 08:01, Jiri Drozd <jiri.drozd at sde.cz> wrote:
>
> Ahoj,
>
> od vypadku viz subj. mi na VPSce odmita startovat SSH a SCREEN - oboje ma
> problem s chybejicim adresarem ve /var/run, jede to na ubuntu 16.04
>
> - sshd chybi /var/run/sshd a proto nenajede po restartu, musim rucne
> vytvorit /var/run/sshd a nastartovat sshd, nicmene po dalsim restartu
> adresar opet chybi a je nutno ho vytvorit znova
>
> ---
> root at bgrserver:~# systemctl status sshd
>
> ● ssh.service - OpenBSD Secure Shell server
> Loaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor
> preset: e
> Active: failed (Result: start-limit-hit) since Mon 2019-01-14 16:06:32
> UTC
> Process: 376 ExecStartPre=/usr/sbin/sshd -t (code=exited, status=255)
>
> xxx at bgrserver:~$ sudo cat /var/log/syslog | grep ssh
> [sudo] password for xxx:
> Jan 14 16:06:14 bgrserver systemd-tmpfiles[86]: Failed to validate path
> /var/run/sshd: Too many levels of symbolic links
> Jan 14 16:06:31 bgrserver sshd[326]: Missing privilege separation
> directory: /var/run/sshd
> Jan 14 16:06:31 bgrserver systemd[1]: ssh.service: Control process exited,
> code=exited status=255
> Jan 14 16:06:31 bgrserver systemd[1]: ssh.service: Unit entered failed
> state.
> Jan 14 16:06:31 bgrserver systemd[1]: ssh.service: Failed with result
> 'exit-code'.
> Jan 14 16:06:31 bgrserver systemd[1]: ssh.service: Service hold-off time
> over, scheduling restart.
> ---
>
> - screenu prozmenu chybi /var/run/screen a situace je stejna jako u sshd -
> po restartu je nutne rucne znova vytvorit a zmenit mod na 777, pak jede
>
> ---
> xxx at bgrserver:~$ screen -S test
> Cannot make directory '/var/run/screen': Permission denied
>
> ... screen nejede ...
>
> xxx at bgrserver:~$ sudo mkdir /var/run/screen
> [sudo] password for xxx:
> xxx at bgrserver:~$ screen -S test
> Directory '/var/run/screen' must have mode 777.
> xxx at bgrserver:~$ sudo chmod 777 /var/run/screen
> xxx at bgrserver:~$ screen -S test
>
> ... ted screen funguje, co po rebootu? ...
>
> [detached from 7334.test]
> xxx at bgrserver:~$
> xxx at bgrserver:~$ sudo reboot
> packet_write_wait: Connection to 37.205.11.73 port 22: Broken pipe
>
> ... ted je treba nahodit sshd pres VPSadmina, vytvorenim /var/run/sshd a
> restartem sshd, jinak connection refused ...
>
> jdrozd at jdrozd-MS-7592:~$ ssh xxx at srv.dread.cz
> ssh: connect to host srv.dread.cz port 22: Connection refused
>
> jdrozd at jdrozd-MS-7592:~$ ssh xxx at srv.dread.cz
> Welcome to Ubuntu 16.04.5 LTS (GNU/Linux 3.16.6-042stab134.43 x86_64)
>
> * Documentation: https://help.ubuntu.com
> * Management: https://landscape.canonical.com
> * Support: https://ubuntu.com/advantage
> Last login: Wed Jan 16 06:10:45 2019
> xxx at bgrserver:~$ screen -S test
> Cannot make directory '/var/run/screen': Permission denied
>
> ... po restartu je to o5 v ...
>
> ---
>
> Pritom prava na /var/run potazmo /run kam se to symlinkuje jsou stejna
> jako na jine ubuntu 16.04 masine kde vse funguje.
>
> ---
> xxx at bgrserver:~$ ll /var | grep run
> lrwxrwxrwx 1 root root 9 lis 15 2016 lock -> /run/lock/
> lrwxrwxrwx 1 root root 4 lis 15 2016 run -> /run/
>
> xxx at bgrserver:~$ ll / | grep run
> drwxr-xr-x 17 root root 560 led 16 06:11 run/
> ---
>
> Nesetkal se nekdo z Vas s necim podobnym, nebo netusite kde by mohl byt
> problem?
>
> Poslal sem to i na podporu VPSfree, protoze si nejsem jisty jestli se
> jedna o problem na jejich strane, nebo se mi rozbilo Ubuntu (i kdyz k tomu
> nemelo duvod)...
>
> Diky - Buger
> _______________________________________________
> Community-list mailing list
> Community-list at lists.vpsfree.cz
> http://lists.vpsfree.cz/listinfo/community-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vpsfree.cz/pipermail/community-list/attachments/20190116/bfb98c8b/attachment-0001.html>
More information about the Community-list
mailing list