SOLVED Perl problems with 78.0.13?

Nicola Urbinati

Well-Known Member
Feb 1, 2017
73
10
8
Italy
cPanel Access Level
Root Administrator
Hi,

I find many lfd warnings with (I think) perl problems, like:

Code:
/usr/local/cpanel/logs/error_log:
Use of uninitialized value $peername in unpack at /usr/local/cpanel/Cpanel/Server/Connection.pm line 289.
Use of uninitialized value $ip in pack at /usr/local/cpanel/Cpanel/Server/Connection.pm line 290.

/var/log/cxswatch.log:
Mar  5 09:05:42 srvcp01 cxswatch[4835]: Child 1: (Scan Error [Undefined path for Socket::pack_sockaddr_un at /usr/local/cpanel/3rdparty/perl/528/lib/perl5/5.28.0/x86_64-linux-64int/Socket.pm line 873, <$C31KS8Q68F62ZR2VBYER72WR2B3PQYZ2Z8K30YRJ1SU44MIAEL4> line 18159.
] while processing) '/home/domain1/public_html/wp-content/wflogs/.htaccess'
Mar  5 09:43:05 srvcp01 cxswatch[4843]: Child 3: (Scan Error [Undefined path for Socket::pack_sockaddr_un at /usr/local/cpanel/3rdparty/perl/528/lib/perl5/5.28.0/x86_64-linux-64int/Socket.pm line 873, <$C31KS8Q68F62ZR2VBYER72WR2B3PQYZ2Z8K30YRJ1SU44MIAEL4> line 18374.
] while processing) '/home/domain2/public_html/wp-content/uploads/wpdiscuz/cache/gravatars/18d33f6445b6c57dd6eebaa1966497c8.gif'
Mar  5 09:43:05 srvcp01 cxswatch[4839]: Child 2: (Scan Error [Undefined path for Socket::pack_sockaddr_un at /usr/local/cpanel/3rdparty/perl/528/lib/perl5/5.28.0/x86_64-linux-64int/Socket.pm line 873, <$C31KS8Q68F62ZR2VBYER72WR2B3PQYZ2Z8K30YRJ1SU44MIAEL4> line 18374.
] while processing) '/home/domain2/public_html/wp-content/uploads/wpdiscuz/cache/gravatars/32c1d7fbd4616b031dbbf594fef58797.gif'
I also contacted csf for cxswatch problems, but aving also problems elsewhere (WHM/cPanel specific) I also see the need to post here.

Thank you.
 

GOT

Get Proactive!
PartnerNOC
Apr 8, 2003
1,740
300
363
Chesapeake, VA
cPanel Access Level
DataCenter Provider
I can't speak to the cPanel log, but the first thing I would do for the CXS issue was to make sure its running the latest version. Have you tried updating it?
 

GOT

Get Proactive!
PartnerNOC
Apr 8, 2003
1,740
300
363
Chesapeake, VA
cPanel Access Level
DataCenter Provider
Never seen that. Can you ensure these RPMs are installed:

perl-IO-Socket-IP-0.21-5.el7.noarch
perl-Socket-2.010-4.el7.x86_64
perl-IO-Socket-SSL-1.94-7.el7.noarch
 

Nicola Urbinati

Well-Known Member
Feb 1, 2017
73
10
8
Italy
cPanel Access Level
Root Administrator
All three already installed.

I must say that the problem begun with cPanel update it seems to me, and everything worked fine before, so the system should be properly updated and configured.

I'm still eager to try and answer other debugs/solutions if you have other insights, thank you very much.
 

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,304
1,250
313
Houston
Hi @Nicola Urbinati


I run CSF and haven't run into any issues so it must be something specific to CXS - Unfortunately as it's a 3rd party software I can't guarantee compatibility that portion is ConfigServer to manage. I can though address perl issues that may be specific to cPanel. Can you show me an example of these which aren't related to CSF?


Thanks!
 

Nicola Urbinati

Well-Known Member
Feb 1, 2017
73
10
8
Italy
cPanel Access Level
Root Administrator
Hi @cPanelLauren

Are these examples from cpanel's logs, or not?

Code:
/usr/local/cpanel/logs/error_log:
Use of uninitialized value $peername in unpack at /usr/local/cpanel/Cpanel/Server/Connection.pm line 289.
Use of uninitialized value $ip in pack at /usr/local/cpanel/Cpanel/Server/Connection.pm line 290.
As of cxs, it begun throwing those errors from upgrading to 78.0.13.

Let's see if 78.0.15 could have someway solved, I'll get back with some more examples or with a "solved" comment.
 

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,304
1,250
313
Houston
Hi @cPanelLauren

Are these examples from cpanel's logs, or not?

Code:
/usr/local/cpanel/logs/error_log:
Use of uninitialized value $peername in unpack at /usr/local/cpanel/Cpanel/Server/Connection.pm line 289.
Use of uninitialized value $ip in pack at /usr/local/cpanel/Cpanel/Server/Connection.pm line 290.
As of cxs, it begun throwing those errors from upgrading to 78.0.13.

Let's see if 78.0.15 could have someway solved, I'll get back with some more examples or with a "solved" comment.

I was under the impression from your initial response that this was being presented as a result of something in CXS - I'm not seeing any of this and I run my primary server on EDGE is there more to those two errors than what you added? Specifically anything above or below?

Thanks!
 

Nicola Urbinati

Well-Known Member
Feb 1, 2017
73
10
8
Italy
cPanel Access Level
Root Administrator
Hi @cPanelLauren

Back here to say that, after a night and some lfd hourly runs after 78.0.15 update, I can fairly state the problem has solved, both cpsrvd and cxs do not throw those lines in the logs, and lfd does not warn me anymore about that.

For reference, the last lines with those errors are (still 78.0.13):

Code:
[2019-03-05 09:15:28 +0100] info [cpsrvd] version 11.78.0.13 online
==> cpsrvd 11.78.0.13 started
==> cpsrvd: loading security policy....Done
==> cpsrvd: Setting up SSL support ... Done
==> cpsrvd: transferred port bindings: 10,11,12,3,4,5,6,7,8,9
==> cpsrvd: bound to ports
[2019-03-05 09:18:11 +0100] info [cpsrvd] version 11.78.0.13 online
Use of uninitialized value $peername in unpack at /usr/local/cpanel/Cpanel/Server/Connection.pm line 289.
Use of uninitialized value $ip in pack at /usr/local/cpanel/Cpanel/Server/Connection.pm line 290.
==> cpsrvd 11.78.0.13 started
==> cpsrvd: loading security policy....Done
==> cpsrvd: Setting up SSL support ... Done
==> cpsrvd: transferred port bindings: 10,11,12,3,4,5,6,7,8,9
==> cpsrvd: bound to ports
[2019-03-05 09:22:39 +0100] info [cpsrvd] version 11.78.0.13 online
==> cpsrvd 11.78.0.13 started
==> cpsrvd: loading security policy....Done
==> cpsrvd: Setting up SSL support ... Done
==> cpsrvd: transferred port bindings: 10,11,12,3,4,5,6,7,8,9
==> cpsrvd: bound to ports
Then, from that moment on, no more of those errors (even if the log line is tagged [info], lfd saw that as problematic), I only see one more problematic moment in the logs (already 78.0.15):

Code:
[2019-03-05 20:43:21 +0100] info [cpsrvd] version 11.78.0.15 online
[2019-03-05 20:48:25 +0100] info [tailwatchd] Updated chkservd apache_php_fpm driver from /usr/local/cpanel/src/chkservd/chkserv.d.
[2019-03-05 20:49:05 +0100] info [whostmgrd] Successfully verified signature for cpanel (key types: release).
open(/var/cpanel/sessions/cache/root:5iXencsQZb6XZvqw): Permission denied at /usr/local/cpanel/Cpanel/Session/Load.pm line 108.
open(/var/cpanel/sessions/raw/root:5iXencsQZb6XZvqw): Permission denied at /usr/local/cpanel/Cpanel/Session/Load.pm line 108.
[2019-03-05 20:52:39 +0100] info [xml-api] Setting up cPanel support access cPHulk whitelist rules
[2019-03-05 20:52:39 +0100] info [xml-api] Setting up cPanel support access CSF whitelist rules
[2019-03-05 20:52:43 +0100] info [xml-api] Setting up the cPanel Support hosts.allow entry…
[2019-03-05 20:57:03 +0100] info [gather-update-logs] File /usr/local/cpanel/logs/update_analysis/2019-03-05T19:57:01Z.tar.gz has been sent successfully to updatelogdrop.cpanel.net.
[2019-03-05 21:00:42 +0100] info [whostmgrd] Successfully verified signature for cpanel (key types: release).
==> cpsrvd 11.78.0.15 started
==> cpsrvd: loading security policy....Done
==> cpsrvd: Setting up SSL support ... Done
==> cpsrvd: transferred port bindings: 10,11,12,3,4,5,6,7,8,9
==> cpsrvd: bound to ports
[2019-03-05 21:15:43 +0100] info [cpsrvd] version 11.78.0.15 online
[2019-03-05 21:16:08 +0100] info [whostmgrd] Successfully verified signature for cpanel (key types: release).
[2019-03-05 21:16:54 +0100] info [cpsrvd] reloading config based on -HUP signal
[2019-03-05 21:25:39 +0100] info [whostmgrd] Successfully verified signature for cpanel (key types: release).
Traceback (most recent call last):
  File "/usr/share/l.v.e-manager/cpanel/stats_bar/get_lve_limits.py", line 246, in <module>
    show_stats, show_inode = get_config()
  File "/usr/share/l.v.e-manager/cpanel/stats_bar/get_lve_limits.py", line 230, in get_config
    cfg = get_file_lines(CPANEL_CONFIG)
  File "/opt/alt/python27/lib/python2.7/site-packages/clcommon/utils.py", line 53, in get_file_lines
    with open(path, 'r') as f:
IOError: [Errno 13] Permission denied: '/var/cpanel/cpanel.config'
[2019-03-05 21:27:34 +0100] warn [Internal Warning while parsing unknown 3894793] Cpanel::ResourceUsage::Custom::Cloudlinux: malformed JSON string, neither tag, array, object, number, string or atom, at character offset 0 (before "(end of string)") at /var/cpanel/perl/Cpanel/ResourceUsage/Custom/Cloudlinux.pm line 11.
 at /usr/local/cpanel/Cpanel/API/ResourceUsage.pm line 428.
        Cpanel::API::ResourceUsage::_add_custom_usage_stats(ARRAY(0x2fb3308)) called at /usr/local/cpanel/Cpanel/API/ResourceUsage.pm line 320
        Cpanel::API::ResourceUsage::get_usages(Cpanel::Args=HASH(0x2dfc810), Cpanel::Result=HASH(0x2da18b8)) called at /usr/local/cpanel/Cpanel/API.pm line 302
        Cpanel::API::__ANON__() called at /usr/local/cpanel/Cpanel/API.pm line 373
        eval {...} called at /usr/local/cpanel/Cpanel/API.pm line 373
        Cpanel::API::_eval_guard(Cpanel::Result=HASH(0x2da18b8), CODE(0x2fc2830)) called at /usr/local/cpanel/Cpanel/API.pm line 302
        Cpanel::API::_run_module_function(Cpanel::Args=HASH(0x2dfc810), Cpanel::Result=HASH(0x2da18b8), "ResourceUsage", "get_usages") called at /usr/local/cpanel/Cpanel/API.pm line 164
        Cpanel::API::execute("ResourceUsage", "get_usages", HASH(0x2da1570)) called at /usr/local/cpanel/Cpanel/API.pm line 584
        Cpanel::API::run_api_mode(HASH(0x2da1570)) called at uapi.pl line 307
        main::script() called at uapi.pl line 138


Traceback (most recent call last):
  File "/usr/share/l.v.e-manager/cpanel/stats_bar/get_lve_limits.py", line 246, in <module>
    show_stats, show_inode = get_config()
  File "/usr/share/l.v.e-manager/cpanel/stats_bar/get_lve_limits.py", line 230, in get_config
    cfg = get_file_lines(CPANEL_CONFIG)
  File "/opt/alt/python27/lib/python2.7/site-packages/clcommon/utils.py", line 53, in get_file_lines
    with open(path, 'r') as f:
IOError: [Errno 13] Permission denied: '/var/cpanel/cpanel.config'
[2019-03-05 21:27:46 +0100] warn [Internal Warning while parsing unknown 3894832] Cpanel::ResourceUsage::Custom::Cloudlinux: malformed JSON string, neither tag, array, object, number, string or atom, at character offset 0 (before "(end of string)") at /var/cpanel/perl/Cpanel/ResourceUsage/Custom/Cloudlinux.pm line 11.
 at /usr/local/cpanel/Cpanel/API/ResourceUsage.pm line 428.
        Cpanel::API::ResourceUsage::_add_custom_usage_stats(ARRAY(0x3427b50)) called at /usr/local/cpanel/Cpanel/API/ResourceUsage.pm line 320
        Cpanel::API::ResourceUsage::get_usages(Cpanel::Args=HASH(0x326fd78), Cpanel::Result=HASH(0x3214c10)) called at /usr/local/cpanel/Cpanel/API.pm line 302
        Cpanel::API::__ANON__() called at /usr/local/cpanel/Cpanel/API.pm line 373
        eval {...} called at /usr/local/cpanel/Cpanel/API.pm line 373
        Cpanel::API::_eval_guard(Cpanel::Result=HASH(0x3214c10), CODE(0x34367a0)) called at /usr/local/cpanel/Cpanel/API.pm line 302
        Cpanel::API::_run_module_function(Cpanel::Args=HASH(0x326fd78), Cpanel::Result=HASH(0x3214c10), "ResourceUsage", "get_usages") called at /usr/local/cpanel/Cpanel/API.pm line 164
        Cpanel::API::execute("ResourceUsage", "get_usages", HASH(0x325b900)) called at /usr/local/cpanel/Cpanel/API.pm line 584
        Cpanel::API::run_api_mode(HASH(0x325b900)) called at uapi.pl line 307
        main::script() called at uapi.pl line 138


==> cpsrvd 11.78.0.15 started
==> cpsrvd: loading security policy....Done
==> cpsrvd: Setting up SSL support ... Done
==> cpsrvd: transferred port bindings: 10,11,12,3,4,5,6,7,8,9
==> cpsrvd: bound to ports
[2019-03-05 21:45:07 +0100] info [cpsrvd] version 11.78.0.15 online
[2019-03-05 21:50:01 +0100] info [builddovecotconf] 'local' template in use (/var/cpanel/templates/dovecot2.3/main.local)
[2019-03-05 21:50:02 +0100] info [builddovecotconf] 'local' template in use (/var/cpanel/templates/dovecot2.3/main.local)
==> cpsrvd 11.78.0.15 started
==> cpsrvd: loading security policy....Done
==> cpsrvd: Setting up SSL support ... Done
==> cpsrvd: transferred port bindings: 10,11,12,3,4,5,6,7,8,9
==> cpsrvd: bound to ports
Thank you for your patience and insight.
 

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,304
1,250
313
Houston
Then, from that moment on, no more of those errors (even if the log line is tagged [info], lfd saw that as problematic),
I'm really glad to hear that updating resolved the error.

I only see one more problematic moment in the logs (already 78.0.15):
Based on the errors you're receiving they all seem to be CloudLinux related:

Code:
Traceback (most recent call last):
  File "/usr/share/l.v.e-manager/cpanel/stats_bar/get_lve_limits.py", line 246, in <module>
    show_stats, show_inode = get_config()
  File "/usr/share/l.v.e-manager/cpanel/stats_bar/get_lve_limits.py", line 230, in get_config
    cfg = get_file_lines(CPANEL_CONFIG)
  File "/opt/alt/python27/lib/python2.7/site-packages/clcommon/utils.py", line 53, in get_file_lines
    with open(path, 'r') as f:
IOError: [Errno 13] Permission denied: '/var/cpanel/cpanel.config'
Code:
[2019-03-05 21:27:34 +0100] warn [Internal Warning while parsing unknown 3894793] Cpanel::ResourceUsage::Custom::Cloudlinux: malformed JSON string, neither tag, array, object, number, string or atom, at character offset 0 (before "(end of string)") at /var/cpanel/perl/Cpanel/ResourceUsage/Custom/Cloudlinux.pm line 11.
 at /usr/local/cpanel/Cpanel/API/ResourceUsage.pm line 428.
Both of those are specific to CloudLinux's LVE Manager accessing the cpanel.config.

What are the permissions of this file?

Code:
stat /var/cpanel/cpanel.config
 

Nicola Urbinati

Well-Known Member
Feb 1, 2017
73
10
8
Italy
cPanel Access Level
Root Administrator
Code:
[[email protected] ~]# stat /var/cpanel/cpanel.config
  File: ‘/var/cpanel/cpanel.config’
  Size: 7203            Blocks: 16         IO Block: 4096   regular file
Device: 802h/2050d      Inode: 1050910     Links: 1
Access: (0660/-rw-rw----)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2019-03-06 19:38:53.000000000 +0100
Modify: 2019-03-06 19:38:53.000000000 +0100
Change: 2019-03-06 19:38:54.742085526 +0100
 Birth: -
 

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,304
1,250
313
Houston
HI @Nicola Urbinati


The permissions of that file are incorrect. They should be 644 this is an example from my server:

Code:
# stat /var/cpanel/cpanel.config
  File: ‘/var/cpanel/cpanel.config’
  Size: 7320          Blocks: 16         IO Block: 4096   regular file
Device: fd01h/64769d    Inode: 394644      Links: 1
Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2019-03-06 12:45:01.000000000 -0600
Modify: 2019-03-06 12:45:01.000000000 -0600
Change: 2019-03-06 12:45:02.517495003 -0600
 Birth: -
Can you run the following and then let us know if the issues persist?
Code:
chmod 644 /var/cpanel/cpanel.config
 

Nicola Urbinati

Well-Known Member
Feb 1, 2017
73
10
8
Italy
cPanel Access Level
Root Administrator
Hi,

Issue resolved.

I have other issues (like systematic problems with exim/smtp/cpsrvd failing around 09.10PM almost every day), but I'll probably open a different post to keep issues clearer between them.

Thank you very much.
 
  • Like
Reactions: cPanelLauren

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,304
1,250
313
Houston
Hi @Nicola Urbinati


I'm glad to hear that resolved the issue! Please do open a different thread for the other issues and we'll do our best to help with those as well!


Thanks!
 

jmginer

Well-Known Member
Jul 26, 2006
137
4
168
Alicante
cPanel Access Level
Root Administrator
I'm having the same issue with 78.0.18

Code:
 ----------- SCAN REPORT -----------

TimeStamp: Sun, 24 Mar 2019 09:50:58 +0100

(/usr/sbin/cxs --allusers --nobayes --nodbreport --defapache nobody --delete --doptions Mv --downloadserver download2.configserver.com --exploitscan --nofallback --filemax 0 --noforce --html --ignore /etc/cxs/cxs.ignore --mail root --options mMOLfuSGchexdnZRrD --qoptions Mv --quiet --sizemax 1000000 --smtp --ssl --nosummary --nosversionscan --timemax 30 --nounofficial --virusscan --Wmaxchild 3 --Wnotify inotify --Wrateignore 300 --Wrefresh 7 --Wsleep 3 --Wstart)


cxswatch Scanning /home/xxx:

# Scan Error [Undefined path for Socket::pack_sockaddr_un at /usr/local/cpanel/3rdparty/perl/528/lib/perl5/5.28.0/x86_64-linux-64int/Socket.pm line 873. ] while processing: '/home/xxx'/file.html