Cannot connect remotely to Boinc Client via GUI RPC - CentOS 7.7.1908 Minimal on headless host

Message boards : Questions and problems : Cannot connect remotely to Boinc Client via GUI RPC - CentOS 7.7.1908 Minimal on headless host
Message board moderation

To post messages, you must log in.

AuthorMessage
ZadoRash

Send message
Joined: 22 Sep 19
Posts: 2
Italy
Message 92911 - Posted: 23 Sep 2019, 1:03:44 UTC

Hi everyone, I'm a long-time Boinc contributor (since 2010) but never felt the need to post on the forum, previously I mainly used Windows hosts, but as Windows 10 introduced forced updates and correlated forced restarts, while becoming more resouces intensive than previous versions of Windows, I'm starting to switch to a minimal and robust version of Linux, CentOS in particular, as it happens to me to lay my hands on it from time to time, having become a Windows and VMware certified sysadmin in the meantime.

All of this because I didn't want anymore to be forced to stop auto updates via local policy or set up autologon on Windows for security reasons while still be able to let Boinc start crunching at startup and using both CPU and GPU (installing as a service under Windows prevents the GPU to be used); add to this that some of my hosts are a bit old (~10 years circa) and low on RAM amount installed (~2GB), and that old versions of Windows are a living security threat themselves, so installing XP nowadays is out of the question.

Anyways, I googled extensively and also searched in the forum for an answer which could help me solve this frustrating issue without finding one, so I deciced to sign up in the forum and create a new discussion; not sure if this is the correct section where to post this, feel free to move it if doesn't belong here.

As stated in the title, on a fresh install of CentOS 7.7.1908 Minimal on a headless computer I installed the Boinc client via the Epel repository:
yum install -y boinc-client

and added the necessary libraries for 64-bit projects:
yum install -y compat-libstdc++-296.i686 compat-libstdc++-33.i686 compat-libstdc++-33.x86_64


Then I enabled the firewalld rule to allow port 31416 for RPC calls to pass through:
firewall-cmd --permanent --zone=public --add-port=31416/tcp
firewall-cmd --reload

issued a general package update:
yum update -y && yum upgrade -y

and adjusted the swappiness value to 5 by modifying the /etc/sysctl.conf file and issuing
sysctl vm.swappiness=5


After a reboot I enabled the Boinc Client to run on startup:
systemctl enable boinc-client

and modified the /usr/lib/systemd/system/boinc-client.service file ExecStart line from
ExecStart=/usr/bin/boinc

to
ExecStart=/usr/bin/boinc --allow_remote_gui_rpc

to enable GUI RPCs from every host, as I didn't want to use the remote_hosts.cfg method.

In the end i went to start the client itself:
systemctl daemon-reload
systemctl start boinc-client

and i verified that all went fine:
systemctl status boinc-client
● boinc-client.service - Berkeley Open Infrastructure Network Computing Client
   Loaded: loaded (/usr/lib/systemd/system/boinc-client.service; enabled; vendor preset: disabled)
   Active: active (running) since lun 2019-09-23 00:26:24 CEST; 2s ago
     Docs: man:boinc(1)
  Process: 30459 ExecStopPost=/bin/rm -f lockfile (code=exited, status=0/SUCCESS)
  Process: 30450 ExecStop=/usr/bin/boinccmd --quit (code=exited, status=0/SUCCESS)
 Main PID: 30584 (boinc)
   CGroup: /system.slice/boinc-client.service
           └─30584 /usr/bin/boinc --allow_remote_gui_rpc


Checking /var/log/messages confirmed:
cat /var/log/messages
...
Sep 23 00:26:24 scatorcio-bassa systemd: Started Berkeley Open Infrastructure Network Computing Client.
Sep 23 00:26:24 scatorcio-bassa boinc: 23-Sep-2019 00:26:24 [---] cc_config.xml not found - using defaults
Sep 23 00:26:25 scatorcio-bassa boinc: 23-Sep-2019 00:26:25 [---] Starting BOINC client version 7.16.1 for x86_64-pc-linux-gnu
Sep 23 00:26:25 scatorcio-bassa boinc: 23-Sep-2019 00:26:25 [---] log flags: file_xfer, sched_ops, task
Sep 23 00:26:25 scatorcio-bassa boinc: 23-Sep-2019 00:26:25 [---] Libraries: libcurl/7.29.0 NSS/3.36 zlib/1.2.7 libidn/1.28 libssh2/1.4.3
Sep 23 00:26:25 scatorcio-bassa boinc: 23-Sep-2019 00:26:25 [---] Data directory: /var/lib/boinc
Sep 23 00:26:25 scatorcio-bassa boinc: 23-Sep-2019 00:26:25 [---] No usable GPUs found
Sep 23 00:26:25 scatorcio-bassa boinc: 23-Sep-2019 00:26:25 [---] [libc detection] gathered: 2.17, GNU libc
Sep 23 00:26:25 scatorcio-bassa boinc: 23-Sep-2019 00:26:25 [---] Host name: scatorcio-bassa
Sep 23 00:26:25 scatorcio-bassa boinc: 23-Sep-2019 00:26:25 [---] Processor: 2 GenuineIntel Intel(R) Pentium(R) Dual CPU E2180 @ 2.00GHz [Family 6 Model 15 Stepping 13]
Sep 23 00:26:25 scatorcio-bassa boinc: 23-Sep-2019 00:26:25 [---] Processor features: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good nopl aperfmperf eagerfpu pni dtes64 monitor ds_cpl est tm2 ssse3 cx16 xtpr pdcm lahf_lm dtherm
Sep 23 00:26:25 scatorcio-bassa boinc: 23-Sep-2019 00:26:25 [---] OS: Linux CentOS Linux: CentOS Linux 7 (Core) [3.10.0-1062.el7.x86_64|libc 2.17 (GNU libc)]
Sep 23 00:26:25 scatorcio-bassa boinc: 23-Sep-2019 00:26:25 [---] Memory: 1.75 GB physical, 2.00 GB virtual
Sep 23 00:26:25 scatorcio-bassa boinc: 23-Sep-2019 00:26:25 [---] Disk: 49.98 GB total, 48.62 GB free
Sep 23 00:26:25 scatorcio-bassa boinc: 23-Sep-2019 00:26:25 [---] Local time is UTC +2 hours
Sep 23 00:26:25 scatorcio-bassa boinc: 23-Sep-2019 00:26:25 [---] Config: GUI RPC allowed from any host
Sep 23 00:26:25 scatorcio-bassa boinc: 23-Sep-2019 00:26:25 [---] Last benchmark was 18161 days 22:26:24 ago
Sep 23 00:26:25 scatorcio-bassa boinc: 23-Sep-2019 00:26:25 [---] No general preferences found - using defaults
Sep 23 00:26:25 scatorcio-bassa boinc: 23-Sep-2019 00:26:25 [---] Preferences:
Sep 23 00:26:25 scatorcio-bassa boinc: 23-Sep-2019 00:26:25 [---]    max memory usage when active: 896.23 MB
Sep 23 00:26:25 scatorcio-bassa boinc: 23-Sep-2019 00:26:25 [---]    max memory usage when idle: 1613.21 MB
Sep 23 00:26:25 scatorcio-bassa boinc: 23-Sep-2019 00:26:25 [---]    max disk usage: 44.98 GB
Sep 23 00:26:25 scatorcio-bassa boinc: 23-Sep-2019 00:26:25 [---]    don't use GPU while active
Sep 23 00:26:25 scatorcio-bassa boinc: 23-Sep-2019 00:26:25 [---]    suspend work if non-BOINC CPU load exceeds 25%
Sep 23 00:26:25 scatorcio-bassa boinc: 23-Sep-2019 00:26:25 [---]    (to change preferences, visit a project web site or select Preferences in the Manager)
Sep 23 00:26:25 scatorcio-bassa boinc: 23-Sep-2019 00:26:25 [---] Setting up project and slot directories
Sep 23 00:26:25 scatorcio-bassa boinc: 23-Sep-2019 00:26:25 [---] Checking active tasks
Sep 23 00:26:25 scatorcio-bassa boinc: 23-Sep-2019 00:26:25 [---] Setting up GUI RPC socket
Sep 23 00:26:25 scatorcio-bassa boinc: 23-Sep-2019 00:26:25 [---] Checking presence of 0 project files
Sep 23 00:26:25 scatorcio-bassa boinc: 23-Sep-2019 00:26:25 [---] This computer is not attached to any projects
Sep 23 00:26:25 scatorcio-bassa boinc: 23-Sep-2019 00:26:25 Initialization completed
...


I also checked that the boinc_client process was active and listening on port 31416:
ss -nutlp | grep boinc
tcp    LISTEN     0      128       *:31416                 *:*                   users:(("boinc",pid=30584,fd=5))

ps -ax | grep boinc
11542 pts/1    S+     0:00 grep --color=auto boinc
30584 ?        SNsl   0:02 /usr/bin/boinc --allow_remote_gui_rpc

boinccmd --version
boinccmd,  built from BOINC 7.16.1


But, when I tried to connect from the Boinc Manager installed on my Windows 10 PC, it got stuck at "Communicating with the Boinc client, please wait..." message forever.

What I tried in order to solve the issue:

    1) Editing the gui_rpc_auth.cfg file with a password different from the default and restarting the boinc.client service for it to take effect
    2) Adding
    firewall-cmd --zone=public --add-source=192.168.1.0/24 --permanent
    to the firewall ruleset and issuing
    firewall-cmd --reload
    to apply the changes; this was the resulting ruleset:
    firewall-cmd --list-all
    public (active)
      target: default
      icmp-block-inversion: no
      interfaces: enp0s25
      sources: 192.168.1.0/24
      services: dhcpv6-client ssh
      ports: 31416/tcp
      protocols:
      masquerade: no
      forward-ports:
      source-ports:
      icmp-blocks:
      rich rules:

    3) While leaving in place the gui_rpc_auth.cfg file I created a /var/lib/boinc/remote_hosts.cfg file and added to it every single IP address in my subnet (192.168.1.0/24), restarted the boinc-client service and verified it took effect:
    Sep 22 23:55:29 scatorcio-bassa systemd: Started Berkeley Open Infrastructure Network Computing Client.
    Sep 22 23:55:29 scatorcio-bassa boinc: 22-Sep-2019 23:55:29 [---] cc_config.xml not found - using defaults
    Sep 22 23:55:30 scatorcio-bassa boinc: 22-Sep-2019 23:55:30 [---] Starting BOINC client version 7.16.1 for x86_64-pc-linux-gnu
    Sep 22 23:55:30 scatorcio-bassa boinc: 22-Sep-2019 23:55:30 [---] log flags: file_xfer, sched_ops, task
    Sep 22 23:55:30 scatorcio-bassa boinc: 22-Sep-2019 23:55:30 [---] Libraries: libcurl/7.29.0 NSS/3.36 zlib/1.2.7 libidn/1.28 libssh2/1.4.3
    Sep 22 23:55:30 scatorcio-bassa boinc: 22-Sep-2019 23:55:30 [---] Data directory: /var/lib/boinc
    Sep 22 23:55:30 scatorcio-bassa boinc: 22-Sep-2019 23:55:30 [---] No usable GPUs found
    Sep 22 23:55:30 scatorcio-bassa boinc: 22-Sep-2019 23:55:30 [---] [libc detection] gathered: 2.17, GNU libc
    Sep 22 23:55:30 scatorcio-bassa boinc: 22-Sep-2019 23:55:30 [---] Host name: scatorcio-bassa
    Sep 22 23:55:30 scatorcio-bassa boinc: 22-Sep-2019 23:55:30 [---] Processor: 2 GenuineIntel Intel(R) Pentium(R) Dual CPU E2180 @ 2.00GHz [Family 6 Model 15 Stepping 13]
    Sep 22 23:55:30 scatorcio-bassa boinc: 22-Sep-2019 23:55:30 [---] Processor features: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good nopl aperfmperf eagerfpu pni dtes64 monitor ds_cpl est tm2 ssse3 cx16 xtpr pdcm lahf_lm dtherm
    Sep 22 23:55:30 scatorcio-bassa boinc: 22-Sep-2019 23:55:30 [---] OS: Linux CentOS Linux: CentOS Linux 7 (Core) [3.10.0-1062.el7.x86_64|libc 2.17 (GNU libc)]
    Sep 22 23:55:30 scatorcio-bassa boinc: 22-Sep-2019 23:55:30 [---] Memory: 1.75 GB physical, 2.00 GB virtual
    Sep 22 23:55:30 scatorcio-bassa boinc: 22-Sep-2019 23:55:30 [---] Disk: 49.98 GB total, 48.62 GB free
    Sep 22 23:55:30 scatorcio-bassa boinc: 22-Sep-2019 23:55:30 [---] Local time is UTC +2 hours
    Sep 22 23:55:30 scatorcio-bassa boinc: 22-Sep-2019 23:55:30 [---] Config: GUI RPC allowed from any host
    Sep 22 23:55:30 scatorcio-bassa boinc: 22-Sep-2019 23:55:30 [---] Config: GUI RPCs allowed from:
    Sep 22 23:55:30 scatorcio-bassa boinc: 22-Sep-2019 23:55:30 [---]     192.168.1.1
    Sep 22 23:55:30 scatorcio-bassa boinc: 22-Sep-2019 23:55:30 [---]     192.168.1.2
    Sep 22 23:55:30 scatorcio-bassa boinc: 22-Sep-2019 23:55:30 [---]     192.168.1.3
    [...] [b](TRUNCATED)[/b]
    Sep 22 23:55:30 scatorcio-bassa boinc: 22-Sep-2019 23:55:30 [---]     192.168.1.252
    Sep 22 23:55:30 scatorcio-bassa boinc: 22-Sep-2019 23:55:30 [---]     192.168.1.253
    Sep 22 23:55:30 scatorcio-bassa boinc: 22-Sep-2019 23:55:30 [---]     192.168.1.254
    Sep 22 23:55:30 scatorcio-bassa boinc: 22-Sep-2019 23:55:30 [---] Last benchmark was 18161 days 21:55:29 ago
    Sep 22 23:55:30 scatorcio-bassa boinc: 22-Sep-2019 23:55:30 [---] No general preferences found - using defaults
    Sep 22 23:55:30 scatorcio-bassa boinc: 22-Sep-2019 23:55:30 [---] Preferences:
    Sep 22 23:55:30 scatorcio-bassa boinc: 22-Sep-2019 23:55:30 [---]    max memory usage when active: 896.23 MB
    Sep 22 23:55:30 scatorcio-bassa boinc: 22-Sep-2019 23:55:30 [---]    max memory usage when idle: 1613.21 MB
    Sep 22 23:55:30 scatorcio-bassa boinc: 22-Sep-2019 23:55:30 [---]    max disk usage: 44.98 GB
    Sep 22 23:55:30 scatorcio-bassa boinc: 22-Sep-2019 23:55:30 [---]    don't use GPU while active
    Sep 22 23:55:30 scatorcio-bassa boinc: 22-Sep-2019 23:55:30 [---]    suspend work if non-BOINC CPU load exceeds 25%
    Sep 22 23:55:30 scatorcio-bassa boinc: 22-Sep-2019 23:55:30 [---]    (to change preferences, visit a project web site or select Preferences in the Manager)
    Sep 22 23:55:30 scatorcio-bassa boinc: 22-Sep-2019 23:55:30 [---] Setting up project and slot directories
    Sep 22 23:55:30 scatorcio-bassa boinc: 22-Sep-2019 23:55:30 [---] Checking active tasks
    Sep 22 23:55:30 scatorcio-bassa boinc: 22-Sep-2019 23:55:30 [---] Setting up GUI RPC socket
    Sep 22 23:55:30 scatorcio-bassa boinc: 22-Sep-2019 23:55:30 [---] Checking presence of 0 project files
    Sep 22 23:55:30 scatorcio-bassa boinc: 22-Sep-2019 23:55:30 [---] This computer is not attached to any projects
    Sep 22 23:55:30 scatorcio-bassa boinc: 22-Sep-2019 23:55:30 Initialization completed

    4) Undid the /usr/lib/systemd/system/boinc-client.service modification, reloaded the systemctl daemon and restarted the boinc-client service, to only allow the hosts specified in remote_hosts.cfg to be able to access the client
    5) Deleted the gui_rpc_auth.cfg file and restarted the service to recreate another one with a random password to be used in the manager
    6) Stopped and disabled the firewalld service
    7) From an elevated PowerShell on my Windows machine, issued
    telnet <IP_of_CentOS_host> 31416
    and, by pressing CTRL + C while trying random combinations of keys, i got
    <boinc_gui_rpc_reply>
                           <unauthorized/>
                                          </boinc_gui_rpc_reply>
    , so the client is probably able to communicate
    8) With the firewall disabled, I reedited the boinc-client.service file with the
    ExecStart=/usr/bin/boinc --allow_remote_gui_rpc
    line, deleted remote_hosts.cfg and edited gui_rpc_auth.cfg with my previous password of choice, then reloaded the boinc service again
    9) I threw various computer restarts in the middle, especially when messing with firewalld
    10) Installing the Boinc manager on another freshly installed Windows 10 machine on the same subnet to access the CentOS machine from there



None of the above worked, I'm at a total loss now, as other users who asked on the matter simply solved adding the RPC port to the firewall. Any help would be greatly appreciated.

Other useful info:


    - The affected PC has SELinux turned on as per default settings, haven't tried disabling it during my various fiddlings with the machine
    - I have another headless PC with CentOS 6.10 Minimal running Boinc, version 7.2.33 installed from repository, which starts as a service and has a custom gui_rpc_auth password too; I am able to control it via remote manager from both the two Windows 10 PCs mentioned above without issues; the only notes that have to be done are that this PC has SELinux disabled, iptables disabled and the boinc-client service starts with the root user and uses the /root directory as data directory; I had to modify the /etc/rc.d/init.d/boinc-client file to make it work like this, because issuing
    service boinc-client start
    returned an error, and issuing the
    boinc
    command in its place made it start using the root user and the /root directory, in place of the boinc user and the /var/lib/boinc directory; why it did so is still unclear to me, probably it needed the --dir /var/lib/boinc argument passed to it, it would be strange anyways, because I had to reinstall from scratch said machine due to a failed hard drive, and on the previous installation it used the correct data path and user automatically, but this is another story
    - The above point implicates that the issue doesn't happen because of the Windows machines, as they are able to access this CentOS 6.10 PC without disabling the Windows Firewall or using some other kind of workaround, in contrast to the newer CentOS 7.7 machine; the Windows Firewall on both machines already has an automatic rule to allow Boinc to communicate



PC specs, as extrapolated from the boinc logs:

Sep 23 00:17:31 scatorcio-bassa boinc: 23-Sep-2019 00:17:31 [---] No usable GPUs found
Sep 23 00:17:31 scatorcio-bassa boinc: 23-Sep-2019 00:17:31 [---] [libc detection] gathered: 2.17, GNU libc
Sep 23 00:17:31 scatorcio-bassa boinc: 23-Sep-2019 00:17:31 [---] Host name: scatorcio-bassa
Sep 23 00:17:31 scatorcio-bassa boinc: 23-Sep-2019 00:17:31 [---] Processor: 2 GenuineIntel Intel(R) Pentium(R) Dual CPU E2180 @ 2.00GHz [Family 6 Model 15 Stepping 13]
Sep 23 00:17:31 scatorcio-bassa boinc: 23-Sep-2019 00:17:31 [---] Processor features: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good nopl aperfmperf eagerfpu pni dtes64 monitor ds_cpl est tm2 ssse3 cx16 xtpr pdcm lahf_lm dtherm
Sep 23 00:17:31 scatorcio-bassa boinc: 23-Sep-2019 00:17:31 [---] OS: Linux CentOS Linux: CentOS Linux 7 (Core) [3.10.0-1062.el7.x86_64|libc 2.17 (GNU libc)]
Sep 23 00:17:31 scatorcio-bassa boinc: 23-Sep-2019 00:17:31 [---] Memory: 1.75 GB physical, 2.00 GB virtual
Sep 23 00:17:31 scatorcio-bassa boinc: 23-Sep-2019 00:17:31 [---] Disk: 49.98 GB total, 48.62 GB free
Sep 23 00:17:31 scatorcio-bassa boinc: 23-Sep-2019 00:17:31 [---] Local time is UTC +2 hours


The real disk size is 320GB, 50GB is the root (/) partition.

Boinc version:
boinccmd --version
boinccmd,  built from BOINC 7.16.1


All of the commands listed above has been executed as the root user, which is the only one present on the two CentOS machines cited, aside form the autogenerated boinc user for running the client.

If you need a /var/log/messages dump let me know.

Best regards
ZadoRash
ID: 92911 · Report as offensive
ZadoRash

Send message
Joined: 22 Sep 19
Posts: 2
Italy
Message 92933 - Posted: 24 Sep 2019, 14:32:50 UTC - in response to Message 92911.  

*** UPDATE ***
I tried disabling SELinux and repeated the tests above, but the situation remains unchanged.

I also noticed that, if I insert a wrong password in the remote manager, I get the message "The password you inserted is not correct, please try again".
Also, when I insert the correct password for the remote client and the manager says "Connecting with the remote client, please wait", if I press on the Cancel button or attempt to close the Manager window using the red X button on the top right corner, the program freezes and I have to force close it via Task Manager.

Should I downgrade to version 7.14.2? I saw some message from other users in the forum which are having issues with this release, like this one:https://boinc.berkeley.edu/forum_thread.php?id=13112

I'm thinkink of reporting this issue as a bug on Github, will update the thread in the case.

Regards
ZadoRash
ID: 92933 · Report as offensive

Message boards : Questions and problems : Cannot connect remotely to Boinc Client via GUI RPC - CentOS 7.7.1908 Minimal on headless host

Copyright © 2024 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.