Thread 'boinc_cmd will not connect to client'

Message boards : BOINC client : boinc_cmd will not connect to client
Message board moderation

To post messages, you must log in.

AuthorMessage
fatsheldon

Send message
Joined: 28 May 08
Posts: 4
United States
Message 17478 - Posted: 28 May 2008, 4:00:37 UTC

I have installed DreamLinux 3.1 and have used synaptic to grab the boinc client. everything seems to work properly, but attempting to run any boinc_cmd command yields no output. No errors, or any other output. It just sits.

I have tried adjusting the password file, using the --host and --passwd switches but nothing produces any affect at all. The stderrdae.txt file is empty and the stdoutdae.txt shows that the client seems to be running correctly.

I previously ran boinc from this very computer under gentoo, and have no personal firewall installed or anything like that.

Any suggestions?
ID: 17478 · Report as offensive
Chris Sutton

Send message
Joined: 29 Aug 05
Posts: 117
Message 17480 - Posted: 28 May 2008, 10:59:28 UTC - in response to Message 17478.  

Any suggestions?

Try and see where it's hanging up using strace:
strace boinc_cmd

Mine executes fine and with no arguments it prints out the usage string. Here are the last few lines:

write(2, "Usage: boinc_cmd [--host hostna"..., 110Usage: boinc_cmd [--host hostname] [--passwd passwd] command
Give --help as a command for a list of commands
) = 110
exit_group(1) = ?
Process 31523 detached
ID: 17480 · Report as offensive
fatsheldon

Send message
Joined: 28 May 08
Posts: 4
United States
Message 17483 - Posted: 28 May 2008, 13:02:06 UTC - in response to Message 17480.  
Last modified: 28 May 2008, 13:10:26 UTC

when run with no arguments mine prints identical output to yours and finishes fine. When I run boinc_cmd --get_state I see this:

...
open("gui_rpc_auth.cfg", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 3
fcntl64(3, F_SETFD, FD_CLOEXEC) = 0
connect(3, {sa_family=AF_INET, sin_port=htons(31416), sin_addr=inet_addr("127.0.0.1")}, 16

there is where it hangs. netstat shows boinc_client LISTENing on port 31416...

I thought it odd that it showed an ENOENT for the gui_rpc_auth file, so i coppied the boinc_cmd binary to /var/lib/boinc-client (where the boinc config files are) and ran it again. It now seems to find the gui_rpc_auth file, but still hangs in the same place:

open("gui_rpc_auth.cfg", O_RDONLY|O_LARGEFILE) = 3
fstat64(3, {st_mode=S_IFREG|0640, st_size=1, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7ef5000
read(3, "n", 4096) = 1
close(3) = 0
munmap(0xb7ef5000, 4096) = 0
socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 3
fcntl64(3, F_SETFD, FD_CLOEXEC) = 0
connect(3, {sa_family=AF_INET, sin_port=htons(31416), sin_addr=inet_addr("127.0.0.1")}, 16

the only other thing that I thought looked odd was this:

access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)

I'm not sure if that's relevant, but it did show up repeatedly in the strace output.

EDIT: the purpose of the nohwcap file is explained a bit in the ld.so manpage. I don't think that's my issue.
ID: 17483 · Report as offensive
Chris Sutton

Send message
Joined: 29 Aug 05
Posts: 117
Message 17493 - Posted: 28 May 2008, 15:28:05 UTC - in response to Message 17483.  

when run with no arguments mine prints identical output to yours and finishes fine. When I run boinc_cmd --get_state I see this:

...
open("gui_rpc_auth.cfg", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 3
fcntl64(3, F_SETFD, FD_CLOEXEC) = 0
connect(3, {sa_family=AF_INET, sin_port=htons(31416), sin_addr=inet_addr("127.0.0.1")}, 16

there is where it hangs. netstat shows boinc_client LISTENing on port 31416...

I get the same, except the last line returns 0, followed by comms, like so:
--- snip ---
socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 3
fcntl(3, F_SETFD, FD_CLOEXEC) = 0
connect(3, {sa_family=AF_INET, sin_port=htons(31416), sin_addr=inet_addr("127.0.0.1")}, 16) = 0
sendto(3, "<boinc_gui_rpc_request>n<auth1/>"..., 59, 0, NULL, 0) = 59
recvfrom(3, "<boinc_gui_rpc_reply>n<nonce>121"..., 8192, 0, NULL, NULL) = 79

--- snip ---
I thought it odd that it showed an ENOENT for the gui_rpc_auth file, so i coppied the boinc_cmd binary to /var/lib/boinc-client (where the boinc config files are) and ran it again.

Doesn't seem necessary. I get the same ENOENT, but it still works fine.
open("gui_rpc_auth.cfg", O_RDONLY) = -1 ENOENT (No such file or directory)
It now seems to find the gui_rpc_auth file, but still hangs in the same place:

Logic seems to dictate that it can't connect to the client on that port, so it would appear that either the client is not running, or the port is blocked/closed.
the only other thing that I thought looked odd was this:

access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)

I'm not sure if that's relevant, but it did show up repeatedly in the strace output.

Same in mine, as far as I can tell.

Can you telnet to the client on the localhost?
chriss@elliot:~$ sudo netstat -pl | grep 31416
tcp        0      0 *:31416                 *:*                     LISTEN     5544/boinc_client

chriss@elliot:~$ telnet 127.0.0.1 31416
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.

<boinc_gui_rpc_reply>
<error>unrecognized op</error>
</boinc_gui_rpc_reply>

<boinc_gui_rpc_reply>
<error>unrecognized op</error>
</boinc_gui_rpc_reply>
^]

telnet> close
Connection closed.


If that doesn't work I'd suggest checking that there isn't some arbitrary firewalling going on:
chriss@elliot:~$ for TABLE in filter nat mangle raw; do echo "Table: $TABLE"; sudo iptables -L -t $TABLE; done
Table: filter
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination         
Table: nat
Chain PREROUTING (policy ACCEPT)
target     prot opt source               destination         

Chain POSTROUTING (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination         
Table: mangle
Chain PREROUTING (policy ACCEPT)
target     prot opt source               destination         

Chain INPUT (policy ACCEPT)
target     prot opt source               destination         

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination         

Chain POSTROUTING (policy ACCEPT)
target     prot opt source               destination         
Table: raw
Chain PREROUTING (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
ID: 17493 · Report as offensive
fatsheldon

Send message
Joined: 28 May 08
Posts: 4
United States
Message 17497 - Posted: 28 May 2008, 16:04:47 UTC - in response to Message 17493.  

well, my netstat output and iptables output are identical to yours, but I cannot telnet to the client.

Your suggestions were good, and I really expected to see something... anything.

let me know if you think of anything else.
ID: 17497 · Report as offensive
fatsheldon

Send message
Joined: 28 May 08
Posts: 4
United States
Message 17501 - Posted: 28 May 2008, 17:00:29 UTC

I've got it. For some reason unknown to me there is no lo network device set up. I believe that to be the reason that I cannot connect to localhost in any app (ssh, boinc, etc). I ssh'd into another machine, configured the boinc-client to accept remote connections from that IP and it connects fine.

Thanks for your help Chris.

This was obviously not a boinc issue.
ID: 17501 · Report as offensive
Chris Sutton

Send message
Joined: 29 Aug 05
Posts: 117
Message 17503 - Posted: 28 May 2008, 18:54:20 UTC

Glad to hear that it's sorted.
Every time we learn a little more. :)
ID: 17503 · Report as offensive

Message boards : BOINC client : boinc_cmd will not connect to client

Copyright © 2025 University of California.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.