Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 506604

Summary: net-misc/netkit-rsh - install systemd unit?
Product: Gentoo Linux Reporter: helgefje
Component: [OLD] Core systemAssignee: Hank Leininger <hlein>
Status: UNCONFIRMED ---    
Severity: normal CC: proxy-maint
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 448882    

Description helgefje 2014-04-02 21:20:37 UTC
I can't get the rsh daemon to work when using systemd.

I had previously installed OpenRC and then the rsh daemon worked by:

/etc/init.d/xinetd start

After changing to systemd I tried:

systemctl enable xinetd
systemctl start xinetd

And I am still unable to connect to the machine using rsh

In a Fedora-forum I found that it may need the following command:

systemctl enable rsh.socket

But on my gentoo-machine I get the following error:

Failed to issue method call: No such file or directory
Comment 1 Pacho Ramos gentoo-dev 2014-04-05 09:59:12 UTC
In Fedora, they provide .service and .socket files (you need both kind of files):
http://pkgs.fedoraproject.org/cgit/rsh.git/tree/

Regarding xinetd not working, it works fine for me for qpopper, and it shouldn't depend on openrc/systemd running as xinetd.service file simply runs xinetd as openrc script does (in summary, running "xinetd --foreground" should work for you)

Maybe "systemctl status xinetd" shows some hints
Comment 2 helgefje 2014-04-06 20:11:49 UTC
xinetd is working, but it doesn't seem to start the rsh daemon. So I am not sure why it is not working. I still have the /etc/xinet.d/rsh, which was working in OpenRC.

I tried to download the fedora-files .service and .socket:
/etc/systemd/system/rsh@.socket
/etc/systemd/system/rsh.service

systemctl start rsh.socket
Job for rsh.socket failed. See 'systemctl status rsh.socket' and 'journalctl -xn' for details.
systemctl status rsh.socket
systemd[1]: rsh.socket failed to listen on sockets: Address already in use
systemd[1]: Failed to listen on Remote Shell Facilities Activation Socket.muffe systemd[1]: Unit rsh.socket entered failed state.
systemd[1]: Starting Remote Shell Facilities Activation Socket.
systemd[1]: rsh.socket failed to listen on sockets: Address already in use
...

Did you manage to start the rsh daemon using systemd?
Comment 3 Pacho Ramos gentoo-dev 2014-04-13 11:40:54 UTC
Not sure if that socket is meant to make the service started when someone tries to connect to the port
Comment 4 Pacho Ramos gentoo-dev 2014-04-13 11:42:41 UTC
Maybe you need to run systemctl enable for the sockets
Comment 5 helgefje 2014-04-13 21:23:20 UTC
Thanks. I have tried that.

Anyone who has started rsh daemon in systemd?
Comment 6 Mike Gilbert gentoo-dev 2014-04-14 01:44:34 UTC
(In reply to helgefje from comment #5)
> Anyone who has started rsh daemon in systemd?

I got this working on my own system, and uploaded the units to my devspace.

http://dev.gentoo.org/~floppym/rsh/


A few pointers:

1. Stop any socket units you may have started.

2. Run systemctl reset-failed to clear out any failures that are hanging around from previous testing. Failure to do so will cause errors like this:

systemd[1]: rshd.socket failed to queue service startup job (Maybe the service file is missing or not a template unit?): File exists

3. After replacing the unit files, run systemctl daemon-reload, and then start the socket units.


One technical note: I had to add 0.0.0.0 to the ListenStream setting to force it to listen on an IPv4 socket. Otherwise, they throw errors like this.

rshd[24516]: malformed "from" address (af 10)


Please let me know if this works for you.
Comment 7 Mike Gilbert gentoo-dev 2014-04-14 01:53:33 UTC
I also want to note that rsh works perfectly fine for me on systemd using xinetd instead of the dedicated units.