upcp script failure - /scripts/rpmup command reported error number 1 when it ended.

clarke_web

Registered
Aug 13, 2019
2
0
1
Virginia
cPanel Access Level
Reseller Owner
Lately my VPS server has been sending me emails reading “cPanel & WHM update failure in upcp script”

It reads:

Maintenance ended; however, it did not exit cleanly (256). The following events were logged: “scripts/rpmup”. Review the update logs to determine why the update failed.

Code:
Update log preview:
...
...
[2019-08-13 06:05:38 -0400] E [/usr/local/cpanel/scripts/rpmup] The “/usr/local/cpanel/scripts/rpmup” command (process 31027) reported error number 1 when it ended.
...
[2019-08-13 06:05:38 -0400] The Administrator will be notified to review this output when this script completes
[2019-08-13 06:05:38 -0400] - Finished command `/usr/local/cpanel/scripts/rpmup` in 14.180 seconds
[2019-08-13 06:05:38 -0400] 30% complete
[2019-08-13 06:05:38 -0400] - Finished in 14.180 seconds
[2019-08-13 06:05:38 -0400] - Finished in 0.036 seconds
[2019-08-13 06:05:38 -0400] Processing:
[2019-08-13 06:05:38 -0400] Maintenance complete. [state=pre]


I’ve searched the forums and found multiple threads with the same process giving the same error but there seemed to be a variety of causes for this error so I am not sure which ones if any apply to my situation.


Following the “Guide to Opening an Effective Forums Thread” recommendation, below if the output of my version numbers:


Code:
/etc/redhat-release:CentOS Linux release 7.6.1810 (Core)
/usr/local/cpanel/version:11.82.0.9
/var/cpanel/envtype:virtuozzo
CPANEL=release

I noticed that commonly the first troubleshooting step in the other threads with this issue was to run the rump command manually, so I did using this code: /usr/local/cpanel/scripts/rpmup


That gave over 700 lines of output that I don’t really understand, but a lot of it appears to be repeated. I’ve included below what I think is a relevant excerpt:

Code:
Cpanel::SafeFile::_lock_wait("/etc/yum.conf", Cpanel::SafeFileLock=ARRAY(0x1c3dc90), "/etc/yum.conf.lock") called at /usr/local/cpanel/Cpanel/SafeFile.pm line 350
        Cpanel::SafeFile::_safelock("/etc/yum.conf") called at /usr/local/cpanel/Cpanel/SafeFile.pm line 553
        Cpanel::SafeFile::_safe_open(IO::Handle=GLOB(0x1c3dba0), "<", "/etc/yum.conf", CODE(0x1197688), "safeopen") called at /usr/local/cpanel/Cpanel/SafeFile.pm line 118
        Cpanel::SafeFile::safeopen(IO::Handle=GLOB(0x1c3dba0), "<", "/etc/yum.conf") called at /usr/local/cpanel/Cpanel/SysPkgs/YUM.pm line 725
        Cpanel::SysPkgs::YUM::parse_yum_conf(Cpanel::SysPkgs::YUM=HASH(0x13e36d0)) called at /usr/local/cpanel/Cpanel/SysPkgs/YUM.pm line 240
        Cpanel::SysPkgs::YUM::check(Cpanel::SysPkgs::YUM=HASH(0x13e36d0)) called at /usr/local/cpanel/scripts/rpmup line 298
        scripts::rpmup::_run_checkyum(Cpanel::SysPkgs::YUM=HASH(0x13e36d0), "") called at /usr/local/cpanel/scripts/rpmup line 232
        scripts::rpmup::script("scripts::rpmup") called at /usr/local/cpanel/scripts/rpmup line 306
warn [rpmup] safelock: Failed to create a lockfile '/etc/yum.conf.lock-28cefc410b4d2-22775cad3-291b' in the directory '/etc' that isn't writable: Permission denied
[2019-08-13 06:18:49 -0400] warn [rpmup] safelock: Failed to create a lockfile '/etc/yum.conf.lock-37a8db7202b3b-22775cad3-291b' in the directory '/etc' that isn't writable: Permission denied at /usr/local/cpanel/Cpanel/SafeFile.pm line 431.

The error that appears to keep popping up is variants of “…the directory '/etc' that isn't writable: Permission denied” I don’t know why that directory isn’t writable, if it even should be. If that is the issue, would it be fixed if I changed the permissions? Is that safe to do? How do I even do so?

Please advise. I am feeling a bit out of my element here, I’m generally more of a front-end guy
 

clarke_web

Registered
Aug 13, 2019
2
0
1
Virginia
cPanel Access Level
Reseller Owner
lsattr -d /etc returned:

Code:
-----------I--e---- /etc
stat /etc returned::

Code:
 File: ‘/etc’
  Size: 20480           Blocks: 40         IO Block: 4096   directory
Device: e6b0b601h/3870340609d   Inode: 2490369     Links: 96
Access: (0755/drwxr-xr-x)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2019-08-13 05:37:33.444678680 -0400
Modify: 2019-08-13 06:05:55.250618282 -0400
Change: 2019-08-13 06:05:55.250618282 -0400
 Birth: -
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,261
463
-----------I--e---- /etc
Hello :)

The issue here is that your system's /etc directory is assigned the immutable attribute. I recommend opening a support ticket so we can take a closer look at your server to see why the immutable attribute is applied. You can post the ticket number here once it's opened and we'll link this thread to it.

Thank you.
 

verdon

Well-Known Member
Nov 1, 2003
945
16
168
Northern Ontario, Canada
cPanel Access Level
Root Administrator
The issue here is that your system's /etc directory is assigned the immutable attribute. I recommend opening a support ticket so we can take a closer look at your server to see why the immutable attribute is applied. You can post the ticket number here once it's opened and we'll link this thread to it.
I have created a ticket for each of my servers with this same condition. Would you like me to post those?