Guides and tutorials

Hundreds of tutorials and step by step guides carefully written by our support team.

Connection problems between SWPanel and my Cloud servers

The swhosting-rpc software package is the API that manages the communication and synchronisation between the operations carried out in SWPanel and your SWPanel and your Cloud server. When you perform an action in SWPanel, SWPanel will send a remote procedure call (RPC) to your Cloud, requesting the swhosting-rpc program to execute the task.

Incident resolution

SWHosting-rpc service status

If there is any communication problem, we'll check the status of the service with the following command:

 systemctl status swhostingrpcd.service
 

Giving this result:

root@cl2024052908001:~# systemctl status swhostingrpcd.service
● swhostingrpcd.service - SWHosting-rpc service
     Loaded: loaded (/etc/systemd/system/swhostingrpcd.service; enabled; preset: enabled)
     Active: active (running) since Tue 2024-08-13 12:00:09 CEST; 1 day 1h ago
   Main PID: 1555013 (swhostingrpc_se)
      Tasks: 7 (limit: 3485)
     Memory: 229.6M
     CGroup: /system.slice/swhostingrpcd.service
             ├─1555013 /usr/bin/perl -w /usr/local/SWHostingRPC/script/swhostingrpc_server.pl
             ├─2014807 /usr/bin/perl -w /usr/local/SWHostingRPC/script/swhostingrpc_server.pl
             ├─2015014 /usr/bin/perl -w /usr/local/SWHostingRPC/script/swhostingrpc_server.pl
             ├─2015182 /usr/bin/perl -w /usr/local/SWHostingRPC/script/swhostingrpc_server.pl
             ├─2015319 /usr/bin/perl -w /usr/local/SWHostingRPC/script/swhostingrpc_server.pl
             ├─2015386 /usr/bin/perl -w /usr/local/SWHostingRPC/script/swhostingrpc_server.pl
             └─2015652 /usr/bin/perl -w /usr/local/SWHostingRPC/script/swhostingrpc_server.pl

Aug 13 12:00:09 cl2024052908001 systemd[1]: Started swhostingrpcd.service - SWHosting-rpc service.

💡 You should check that the output of the command shows the service as active (running).

In case it is inactive, try restarting it.

systemctl restart swhostingrpcd.service

For example:

root@cl2024052908001:~# systemctl restart swhostingrpcd.service
root@cl2024052908001:~# systemctl status swhostingrpcd.service
● swhostingrpcd.service - SWHosting-rpc service
     Loaded: loaded (/etc/systemd/system/swhostingrpcd.service; enabled; preset: enabled)
     Active: active (running) since Thu 2024-08-15 11:26:35 CEST; 2s ago
   Main PID: 2127006 (swhostingrpc_se)
      Tasks: 3 (limit: 3485)
     Memory: 91.2M
     CGroup: /system.slice/swhostingrpcd.service
             ├─2127006 /usr/bin/perl -w /usr/local/SWHostingRPC/script/swhostingrpc_server.pl
             ├─2127043 /usr/bin/perl -w /usr/local/SWHostingRPC/script/swhostingrpc_server.pl
             └─2127045 /usr/bin/perl -w /usr/local/SWHostingRPC/script/swhostingrpc_server.pl
Aug 15 11:26:35 cl2024052908001 systemd[1]: Started swhostingrpcd.service - SWHosting-rpc service.

Access to services

By running the file test.pl which you will find at /usr/local/SWHostingRPC/sbin/

/usr/local/SWHostingRPC/sbin/test.pl

The result will tell you if there are any problems with access to services.

root@cl2024052908001:~# /usr/local/SWHostingRPC/sbin/test.pl
$VAR1 = {
          'info' => {
                      'libs' => {
                                  'AWStats' => {
                                                 'active' => '1',
                                                 'type' => 'AWStats',
                                                 'version' => '0.00.03',
                                                 'status' => 'OK'
                                               },
                                  'MySql' => {
                                               'active' => '1',
                                               'version' => '0.00.11',
                                               'type' => 'MySql',
                                               'status' => 'OK'
                                             },
                                  'Sys' => {
                                             'status' => 'OK',
                                             'active' => '1',
                                             'version' => '0.00.50',
                                             'type' => 'Debian11'
                                           },
                                  'List' => {
                                              'type' => 'Sympa',
                                              'version' => '0.00.03',
                                              'active' => '1',
                                              'status' => 'OK'
                                            },
                                  'Mail' => {
                                              'active' => '1',
                                              'type' => 'Amavis',
                                              'version' => '0.00.4',
                                              'status' => 'OK'
                                            },
                                  'User' => {
                                              'type' => 'Linux',
                                              'version' => '0.00.04',
                                              'active' => '1',
                                              'status' => 'OK'
                                            },
                                  'Dns' => {
                                             'status' => 'OK',
                                             'version' => '0.03.2',
                                             'type' => 'Bind',
                                             'active' => '1'
                                           },
                                  'Ftp' => {
                                             'version' => '0.00.08',
                                             'type' => 'Proftp',
                                             'active' => '1',
                                             'status' => 'OK'
                                           },
                                  'Web' => {
                                             'active' => '1',
                                             'type' => 'Proxy',
                                             'version' => '0.00.08',
                                             'status' => 'OK',
                                             'plugins' => [
                                                            'ssl',
                                                            'jail'
                                                          ]
                                           }
                                },
                      'core' => {
                                  'dpkg_name' => 'swhosting-rpc',
                                  'version' => '0.00.19',
                                  'dpkg_version' => '0.6.3-1',
                                  'dpkg_status' => 'ii',
                                  'status' => '1'
                                }
                    },
          'success' => '1',
          'message' => 'Commando completado correctamente'
        };

In an optimal state it will return a status of 'OK', or a status of '1'. If not, you will need to activate the swhosting-rpc logs in 'ALL' mode:


Port checking

The swhosting-rpc APi uses port 3203. Another check is to check if we have this port open. For example, with the command

ss -tuln | grep 3203

root@cl2024052908001:~# ss -tuln | grep 3203
tcp   LISTEN 0      4096   81.25.120.102:3203       0.0.0.0:*
tcp   LISTEN 0      4096       127.0.0.1:3203       0.0.0.0:*

You can also check that your server is listening on port 3203 with the command

netstat -putona | grep 3203

root@cl2024052908001:~# netstat -putona | grep 3203
tcp        0      0 127.0.0.1:3203          0.0.0.0:*               LISTEN      475489/perl          off (0.00/0/0)
tcp        0      0 81.25.120.102:3203      0.0.0.0:*               LISTEN      475489/perl          off (0.00/0/0)

With telnet you can also check if it can listen on that port.

Trying 81.25.120.102...
Connected to 31.24.156.110.
Escape character is '^]'.

With the command nmap, we can also check if the port is open. For example:

nmap 81.25.120.102 -p 3203

root@Debian:~$ nmap 81.25.120.102 -p 3203
Starting Nmap 7.80 ( https://nmap.org ) at 2024-09-23 08:21 CEST
Nmap scan report for 81.25.120.102
Host is up (0.016s latency).

PORT     STATE SERVICE
3203/tcp open  netwatcher-mon

Nmap done: 1 IP address (1 host up) scanned in 0.72 seconds