NolanPL has asked for the wisdom of the Perl Monks concerning the following question:

The answers I received to my last query were wonderful, and I have successfully gotten through that sticking point, however now that I am through there a new problem has arisen.

I fork off a child process to run the background command, but when the main process continues running it must also run a remote command on the same machine that the previous one is already ssh'd into.

The command sent that is running in the background is:

nohup ./sleepwake 100 120 12 140 160 12 08:15:00 > sleepwake.out &

The next attempt to remote execute a command causess this error:

ProtoSocket: bind() error: Address already in use
mgen: ../common/protoSocket.cpp:2722: bool ProtoSocket::SetLoopback(bool): Assertion `IsOpen()' failed.

  • Comment on ProtoSocket: bind() error: Address already in use

Replies are listed 'Best First'.
Re: ProtoSocket: bind() error: Address already in use
by moritz (Cardinal) on Aug 04, 2008 at 12:30 UTC
    Just for the curious reader, this thread is related to Remotely Executing a background command.

    As for the question itself, it seems that the program you're running actually opens a port, and listens to that port. When you run it again, it complains that it can't bind to that port again. Bad luck, and not perl related at all.

Re: ProtoSocket: bind() error: Address already in use
by Lawliet (Curate) on Aug 04, 2008 at 18:28 UTC

    Could you have a link to the previous thread and if it is not too troublesome, change your title that addresses the problem at hand? It will help others help you faster.

    <(^.^-<) <(-^.^<) <(-^.^-)> (>^.^-)> (>-^.^)>