Connection problems between SWPanel and my Cloud server
The swpanel-rpc software package is the API that manages the communication and synchronization between the operations performed between SWPanel and your Cloud server. When you perform an action in SWPanel, it will send a remote procedure call (RPC) to your Cloud, requesting the swpanel-rpc program to execute the task.
Troubleshooting
swpanel-rpc service status
If there is any communication problem, we will check the service status with the following command:
systemctl status swpanelrpcd.service
Giving this result:
root@cl2024052908001:~# systemctl status swpanelrpcd.service
? swpanelrpcd.service - SWPanel-rpc service
Loaded: loaded (/etc/systemd/system/swpanelrpcd.service; enabled; preset: enabled)
Active: active (running) since Tue 2024-08-13 12:00:09 CEST; 1 day 1h ago
Main PID: 1555013 (swpanelrpc_se)
Tasks: 7 (limit: 3485)
Memory: 229.6M
CGroup: /system.slice/swpanelrpcd.service
??1555013 /usr/bin/perl -w /usr/local/SWPanelRPC/script/swpanelrpc_server.pl
??2014807 /usr/bin/perl -w /usr/local/SWPanelRPC/script/swpanelrpc_server.pl
??2015014 /usr/bin/perl -w /usr/local/SWPanelRPC/script/swpanelrpc_server.pl
??2015182 /usr/bin/perl -w /usr/local/SWPanelRPC/script/swpanelrpc_server.pl
??2015319 /usr/bin/perl -w /usr/local/SWPanelRPC/script/swpanelrpc_server.pl
??2015386 /usr/bin/perl -w /usr/local/SWPanelRPC/script/swpanelrpc_server.pl
??2015652 /usr/bin/perl -w /usr/local/SWPanelRPC/script/swpanelrpc_server.pl
Aug 13 12:00:09 cl2024052908001 systemd[1]: Started swpanelrpcd.service - SWPanel-rpc service.
?? You must check that the service appears as active (running) in the command output.
In case it is inactive, try to restart it.
systemctl restart swpanelrpcd.service
For example:
root@cl2024052908001:~# systemctl restart swpanelrpcd.service
root@cl2024052908001:~# systemctl status swpanelrpcd.service
? swpanelrpcd.service - SWPanel-rpc service
Loaded: loaded (/etc/systemd/system/swpanelrpcd.service; enabled; preset: enabled)
Active: active (running) since Thu 2024-08-15 11:26:35 CEST; 2s ago
Main PID: 2127006 (swpanelrpc_se)
Tasks: 3 (limit: 3485)
Memory: 91.2M
CGroup: /system.slice/swpanelrpcd.service
??2127006 /usr/bin/perl -w /usr/local/SWPanelRPC/script/swpanelrpc_server.pl
??2127043 /usr/bin/perl -w /usr/local/SWPanelRPC/script/swpanelrpc_server.pl
??2127045 /usr/bin/perl -w /usr/local/SWPanelRPC/script/swpanelrpc_server.pl
Aug 15 11:26:35 cl2024052908001 systemd[1]: Started swpanelrpcd.service - SWPanel-rpc service.
Access to services
By running the test.pl file, which you can find in /usr/local/SWPanelRPC/sbin/
/usr/local/SWPanelRPC/sbin/test.pl
The result will tell us if there is any problem with access to the services.
root@cl2024052908001:~# /usr/local/SWPanelRPC/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' => 'swpanel-rpc',
'version' => '0.00.19',
'dpkg_version' => '0.6.3-1',
'dpkg_status' => 'ii',
'status' => '1'
}
},
'success' => '1',
'message' => 'Command completed successfully'
};
In an optimal state, it will return a status 'OK', or a status '1'. Otherwise, it will be necessary to enable the swpanel-rpc logs in 'ALL' mode:
Port Review
The swpanel-rpc API uses port 3203. Another verification is to confirm whether this port is 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 verify 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 verify if it can listen on that port.
root@Debian:~$ telnet 81.25.120.102 3203
Trying 81.25.120.102...
Connected to 31.24.156.110.
Escape character is '^]'.
With the nmap command, we can also verify 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