Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] SSHD fopen `/var/run/sshd.pid': No such file
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Spanish
View previous topic :: View next topic  
Author Message
Fitap
Guru
Guru


Joined: 13 Mar 2011
Posts: 437
Location: Rosario, Argentina

PostPosted: Thu Oct 19, 2017 10:03 pm    Post subject: [Solved] SSHD fopen `/var/run/sshd.pid': No such file Reply with quote

Code:

rc-status
Runlevel: default
 dbus                                                                                                                                    [  started  ]
 syslog-ng                                                                                                                               [  started  ]
 consolekit                                                                                                                              [  started  ]
 NetworkManager                                                                                                                          [  started  ]
 tigervnc                                                                                                                                [  stopped  ]
 vixie-cron                                                                                                                              [  started  ]
 privoxy                                                                                                                                 [  started  ]
 openvpn                                                                                                                                 [  started  ]
 netmount                                                                                                                                [  started  ]
 xdm                                                                                                                                     [  started  ]
 sshd                                                                                                                                    [  crashed  ]
 deluged                                                                                                                                 [  started  ]
 lm_sensors                                                                                                                              [  started  ]
 libvirtd                                                                                                                                [  started  ]
 minidlna                                                                                                                                [  started  ]
 dnscrypt-proxy                                                                                                                          [  started  ]
 local                                                                                                                                   [  started  ]
Dynamic Runlevel: hotplugged
Dynamic Runlevel: needed/wanted
 xdm-setup                                                                                                                               [  started  ]
 modules-load                                                                                                                            [  started  ]
 virtlogd                                                                                                                                [  started  ]
Dynamic Runlevel: manual


Code:

sudo service sshd restart
 * Executing: /lib64/rc/sh/openrc-run.sh /lib64/rc/sh/openrc-run.sh /etc/init.d/sshd stop
 * Stopping sshd ...
 * start-stop-daemon: fopen `/var/run/sshd.pid': No such file or directory
 * Will stop /usr/sbin/sshd
 * Will stop processes of `/usr/sbin/sshd'
 * start-stop-daemon: no matching processes found                                                                                               [ ok ]
 * Executing: /lib64/rc/sh/openrc-run.sh /lib64/rc/sh/openrc-run.sh /etc/init.d/sshd start
 * Starting sshd ...
 * start-stop-daemon: fopen `/var/run/sshd.pid': No such file or directory
 * Detaching to start `/usr/sbin/sshd' ...   


Donde puedo mirar?
Gracias por su tiempo.
Saludos.


Last edited by Fitap on Sun Oct 22, 2017 9:46 pm; edited 1 time in total
Back to top
View user's profile Send private message
cameta
Veteran
Veteran


Joined: 04 Aug 2004
Posts: 1320

PostPosted: Fri Oct 20, 2017 9:41 am    Post subject: Reply with quote

https://wiki.gentoo.org/wiki/SSH#OpenRC
Juraría que te falta configurarlo.
_________________
Si algo falla LEE el jodido manual, Si sigue fallando LEE BIEN el jodido manual.
Back to top
View user's profile Send private message
Fitap
Guru
Guru


Joined: 13 Mar 2011
Posts: 437
Location: Rosario, Argentina

PostPosted: Fri Oct 20, 2017 8:44 pm    Post subject: Reply with quote

No esta creando el pid necesario.

Code:

fopen `/var/run/sshd.pid': No such file or directory
Back to top
View user's profile Send private message
quilosaq
Veteran
Veteran


Joined: 22 Dec 2009
Posts: 1521

PostPosted: Sat Oct 21, 2017 12:19 am    Post subject: Reply with quote

¿Existe /var/run?
Code:
ls -ld /var/run
Back to top
View user's profile Send private message
Fitap
Guru
Guru


Joined: 13 Mar 2011
Posts: 437
Location: Rosario, Argentina

PostPosted: Sat Oct 21, 2017 1:57 pm    Post subject: Reply with quote

Code:

ls -l /var/run
lrwxrwxrwx 1 root root 4 ago 12  2015 /var/run -> /run


Code:

ls -l /run
total 48
-rw-------  1 root     root        0 oct 20 20:45 agetty.reload
drwx------  3 root     root       60 oct 20 20:45 alsasound
drwxr-xr-x  2 root     root       60 oct 20 20:45 console
drwxr-xr-x  3 root     root      100 oct 20 20:45 ConsoleKit
-rw-r--r--  1 root     root        5 oct 20 20:45 cron.pid
drwxrwxr-x  2 root     root       60 oct 20 20:45 dbus
-rw-r--r--  1 root     root        5 oct 20 20:45 dbus.pid
-rw-r--r--  1 root     root        5 oct 20 21:15 deluged.pid
-rw-r--r--  1 root     root        5 oct 21 10:50 dhclient-eno1.pid
drwxr-xr-x  2 dnscrypt dnscrypt   60 oct 20 20:45 dnscrypt-proxy
drwxr-xr-x  7 root     root      220 oct 20 21:15 libvirt
-rw-r--r--  1 root     root        4 oct 20 21:15 libvirtd.pid
drwx--x--x  3 root     root       60 oct 20 20:45 lightdm
-rw-r--r--  1 root     root        5 oct 20 20:45 lightdm.pid
drwxrwxr-x  3 root     uucp       80 oct 21 10:50 lock
drwx------  2 root     root       40 oct 20 20:45 lvm
drwxr-x---  2 minidlna minidlna   60 oct 20 21:15 minidlna
drwxr-xr-x  2 root     root       60 oct 20 20:45 mount
drwxr-xr-x  3 root     root      120 oct 20 23:23 NetworkManager
drwxr-xr-x  2 ldap     ldap       40 oct 20 20:45 openldap
drwxrwxr-x 14 root     root      340 oct 20 20:45 openrc
-rw-r--r--  1 root     root        5 oct 20 21:15 openvpn.pid
-rw-r--r--  1 root     root        5 oct 20 20:45 privoxy.pid
drwxr-xr-x  2 radvd    radvd      40 oct 20 20:45 radvd
drwxr-xr-x  4 root     root       80 oct 20 23:23 resolvconf
drwxr-xr-x  2 root     root       40 oct 20 20:45 saslauthd
drwx--x--x  3 root     root       60 oct 20 22:36 sudo
srwxr-xr-x  1 root     root        0 oct 20 20:45 syslog-ng.ctl
-rw-r--r--  1 root     root        5 oct 20 20:45 syslog-ng.pid
drwxrwxr-x  2 root     root       60 oct 20 20:45 tmpfiles.d
drwxr-xr-x  8 root     root      180 oct 21 10:52 udev
drwx------  2 root     root       40 oct 20 20:45 udisks2
drwxr-xr-x  4 root     root       80 oct 20 20:45 user
-rw-rw-r--  1 root     utmp     4224 oct 20 20:45 utmp
-rw-r--r--  1 root     root        4 oct 20 20:45 virtlogd.pid


Hice una burrada en el directorio run, copie un pid cualquiera y lo renombre sshd.pid, al hacer restart al servicio sshd, lo borra y no crea el propio.
Back to top
View user's profile Send private message
quilosaq
Veteran
Veteran


Joined: 22 Dec 2009
Posts: 1521

PostPosted: Sat Oct 21, 2017 6:51 pm    Post subject: Reply with quote

Prueba esto:
1.- Elimina el proceso sshd, si existe. Usa
Code:
(root)# ps -C sshd
para averiguar su pid.

2.- Elimina el archivo sshd.pid, si existe.
Code:
(root)# rm -f /var/run/sshd.pid

3.- Elimina los datos acerca del estado del servicio.
Code:
(root)# service sshd zap

4.- Arranca el servicio.
Code:
(root)# service sshd start
Back to top
View user's profile Send private message
cameta
Veteran
Veteran


Joined: 04 Aug 2004
Posts: 1320

PostPosted: Sun Oct 22, 2017 10:56 am    Post subject: Reply with quote

http://www.pclinuxos.com/forum/index.php?topic=141441.0
Mira este foro habla algo de PCC, configurar y volver a arrancar el servicio. (no se cual es el equivalente en gentoo)
_________________
Si algo falla LEE el jodido manual, Si sigue fallando LEE BIEN el jodido manual.
Back to top
View user's profile Send private message
Fitap
Guru
Guru


Joined: 13 Mar 2011
Posts: 437
Location: Rosario, Argentina

PostPosted: Sun Oct 22, 2017 9:21 pm    Post subject: Reply with quote

quilosaq, cameta gracias por responder.
Va por el lado de lo que decia cameta, mal configuracion, acabo de recolectar este comando y no donde esta leyendo la ip terminada en 251.


Code:
sudo /usr/sbin/sshd -d
debug1: HPN Buffer Size: 87380
debug1: sshd version OpenSSH_7.5, OpenSSL 1.0.2l  25 May 2017
debug1: private host key #0: ssh-rsa SHA256:PB+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
debug1: private host key #1: ssh-ed25519 SHA256:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
debug1: rexec_argv[0]='/usr/sbin/sshd'
debug1: rexec_argv[1]='-d'
debug1: Set /proc/self/oom_score_adj from 0 to -1000
debug1: Bind to port 22 on 10.0.0.251.
debug1: Server TCP RWIN socket size: 87380
debug1: HPN Buffer Size: 87380
Bind to port 22 on 10.0.0.251 failed: Cannot assign requested address.
Cannot bind any address.


Saludos.
Back to top
View user's profile Send private message
Fitap
Guru
Guru


Joined: 13 Mar 2011
Posts: 437
Location: Rosario, Argentina

PostPosted: Sun Oct 22, 2017 9:45 pm    Post subject: Reply with quote

Me respondo solo.

Code:
rm .ssh/known_hosts


y nuevamente el servicio esta started

Saludos.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Spanish All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum