SOLVED cPanel 68 - Maintenance ended, however it did not exit cleanly

jndawson

Well-Known Member
Aug 27, 2014
303
32
78
Western US
cPanel Access Level
DataCenter Provider
Updating to v.68.0.2 and v.68.0.4 results all of our servers getting this email:

Code:
The cPanel & WHM update process failed for the following reason:


Maintenance ended; however, it did not exit cleanly (256). Review the update logs to determine why the update failed.



Update log preview:
[2017-10-17 03:07:58 -0700] [/usr/local/cpanel/scripts/migrate_local_ini_to_php_ini] No local.ini.
[2017-10-17 03:07:58 -0700] [/usr/local/cpanel/scripts/migrate_local_ini_to_php_ini] … done!
[2017-10-17 03:07:58 -0700] [/usr/local/cpanel/scripts/migrate_local_ini_to_php_ini] Processing ea-php70 …
[2017-10-17 03:07:58 -0700] [/usr/local/cpanel/scripts/migrate_local_ini_to_php_ini] No local.ini.
[2017-10-17 03:07:58 -0700] [/usr/local/cpanel/scripts/migrate_local_ini_to_php_ini] … done!
[2017-10-17 03:07:58 -0700] - Finished command `/usr/local/cpanel/scripts/migrate_local_ini_to_php_ini --run --verbose` in 0.744 seconds
[2017-10-17 03:07:58 -0700] 92% complete
[2017-10-17 03:07:58 -0700] - Finished in 0.066 seconds
[2017-10-17 03:07:58 -0700] Processing: Ensuring an "Active" MySQL profile is set
[2017-10-17 03:07:58 -0700] - Processing command `/usr/local/cpanel/scripts/check_mysql`
[2017-10-17 03:07:58 -0700] [/usr/local/cpanel/scripts/check_mysql] “check_mysql” will complete in the background (process ID 28813).
[2017-10-17 03:07:58 -0700] - Finished command `/usr/local/cpanel/scripts/check_mysql` in 0.123 seconds
[2017-10-17 03:07:58 -0700] 93% complete
[2017-10-17 03:07:58 -0700] Processing: Checking CloudLinux installation
[2017-10-17 03:07:58 -0700] - Processing command `/usr/local/cpanel/bin/cloudlinux_update`
[2017-10-17 03:07:58 -0700] - Finished command `/usr/local/cpanel/bin/cloudlinux_update` in 0.064 seconds
[2017-10-17 03:07:58 -0700] Processing: Updating plugins data cache
[2017-10-17 03:07:58 -0700] - Processing command `/usr/local/cpanel/bin/refresh_plugin_cache`
[2017-10-17 03:07:58 -0700] - Finished command `/usr/local/cpanel/bin/refresh_plugin_cache` in 0.379 seconds
[2017-10-17 03:07:58 -0700] 94% complete
[2017-10-17 03:07:58 -0700] 95% complete
=> Log closed Tue Oct 17 03:07:58 2017
----------------------------------------------------------------------------------------------------
=> Log opened from cPanel Update (upcp) - Slave (18337) at Tue Oct 17 03:07:58 2017
[2017-10-17 03:07:58 -0700] E Post Maintenance ended, however it did not exit cleanly (256). Please check the logs for an indication of what happened
What is causing this? There is no indication that something isn't working.
To which log is the last line referring? We've done massive searches and can't find anywhere it appears.
 

ElviCities

Active Member
Aug 9, 2012
27
7
53
cPanel Access Level
Root Administrator
Twitter
Same.... The only error in my update log is the following (note the "E" flag - an easy way to find errors in the log):

Code:
[2017-10-18 20:32:02 -0500]   Processing: Restarting any outdated services
[2017-10-18 20:32:02 -0500]    - Processing command `/usr/local/cpanel/scripts/find_outdated_services --always-restart`
[2017-10-18 20:32:02 -0500]      [/usr/local/cpanel/scripts/find_outdated_services] Looking for outdated services …
[2017-10-18 20:32:02 -0500] E    [/usr/local/cpanel/scripts/find_outdated_services] The “/usr/local/cpanel/scripts/find_outdated_services” command (process 2838) reported error number 255 when it ended.
[2017-10-18 20:32:02 -0500]   The Administrator will be notified to review this output when this script completes
[2017-10-18 20:32:02 -0500]    - Finished command `/usr/local/cpanel/scripts/find_outdated_services --always-restart` in 0.131 seconds
And then, like you, this being reported at the end:

Code:
[2017-10-18 20:32:49 -0500] E Post Maintenance ended, however it did not exit cleanly (256). Please check the logs for an indication of what happened
However, this does not seem to have any ill effects. Perhaps the cPanel folks have some more insight.
 

cPWilliamL

cP Technical Analyst II
Staff member
May 15, 2017
258
30
103
America
cPanel Access Level
Root Administrator
Hi @jndawson

As ElviCities pointed out, could you check the related log file for the 'E' tag? This can be done as below:
Code:
# awk '$4=="E"' /var/cpanel/updatelogs/update.XXXXXX.log
@ElviCities, The `/scripts/find_outdated_services' script checks for processes/services whose RPM's have been updated, but the service has not been restarted. If you run this script manually, do you see any errors or output?

Thanks,
 

Agics

Member
May 16, 2013
16
0
1
Netherlands
cPanel Access Level
Root Administrator
I receive the same error. Rebuilding the RPM database works. If I do an update after that no errors occur, however in the next scheduled update run the error is back.
The problem started with an upgrade to 68
 

ElviCities

Active Member
Aug 9, 2012
27
7
53
cPanel Access Level
Root Administrator
Twitter
Hi @jndawson

As ElviCities pointed out, could you check the related log file for the 'E' tag? This can be done as below:
Code:
# awk '$4=="E"' /var/cpanel/updatelogs/update.XXXXXX.log
@ElviCities, The `/scripts/find_outdated_services' script checks for processes/services whose RPM's have been updated, but the service has not been restarted. If you run this script manually, do you see any errors or output?

Thanks,

Sorry for the delay in responding. Indeed, running the script manually spits out the following error:
Code:
Looking for outdated services …
Cpanel::Exception::Unsupported/(XID jyqtz9) The kernel does not support smaps.
 at /usr/local/cpanel/Cpanel/Exception/CORE.pm line 336.
        Cpanel::Exception::create("Unsupported", "The kernel does not support [asis,smaps].") called at /usr/local/cpanel/Cpanel/Exception.pm line 46
        Cpanel::Exception::__ANON__(__CPANEL_HIDDEN__, __CPANEL_HIDDEN__) called at /usr/local/cpanel/Cpanel/ProcessCheck/Outdated.pm line 64
        Cpanel::ProcessCheck::Outdated::_get_exec() called at /usr/local/cpanel/Cpanel/ProcessCheck/Outdated.pm line 103
        Cpanel::ProcessCheck::Outdated::outdated_services() called at /scripts/find_outdated_services line 63
        scripts::find_outdated_services::run(scripts::find_outdated_services=HASH(0x1e3aa48)) called at /scripts/find_outdated_services line 54
Interesting that there is a kernel related error, as nothing on that end has changed.
 

Russ Friesen

Registered
Oct 25, 2017
1
0
1
Chilliwack BC
cPanel Access Level
Root Administrator
I am also having this message. Running /scripts/find_outdated_services also has same error.
Yes this is a grs kernel (3.14.32-xxxx-grs-ipv6-64 #7 SMP)
Code:
Cpanel::Exception::Unsupported/(XID gfbksf) The kernel does not support smaps.
 at /usr/local/cpanel/Cpanel/Exception/CORE.pm line 336.
        Cpanel::Exception::create("Unsupported", "The kernel does not support [asis,smaps].") called at /usr/local/cpanel/Cpanel/Exception.pm line 46
        Cpanel::Exception::__ANON__(__CPANEL_HIDDEN__, __CPANEL_HIDDEN__) called at /usr/local/cpanel/Cpanel/ProcessCheck/Outdated.pm line 64
        Cpanel::ProcessCheck::Outdated::_get_exec() called at /usr/local/cpanel/Cpanel/ProcessCheck/Outdated.pm line 72
        Cpanel::ProcessCheck::Outdated::eek:utdated_processes() called at /usr/local/cpanel/Cpanel/ProcessCheck/Outdated.pm line 173
        Cpanel::ProcessCheck::Outdated::_outdated_services_for_centos6() called at /usr/local/cpanel/Cpanel/ProcessCheck/Outdated.pm line 100
        Cpanel::ProcessCheck::Outdated::eek:utdated_services() called at /scripts/find_outdated_services line 63
        scripts::find_outdated_services::run(scripts::find_outdated_services=HASH(0x10876a8)) called at /scripts/find_outdated_services line 54
 
Last edited by a moderator:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,904
2,218
463
Hello,

I've opened internal case CPANEL-16624 to report the upcp failure notifications in cPanel 68 when the grsec kernel is installed. I'll monitor this case and update this thread with more information as it becomes available.

Thank you.
 
  • Like
Reactions: ElviCities

jndawson

Well-Known Member
Aug 27, 2014
303
32
78
Western US
cPanel Access Level
DataCenter Provider
Follow up:

The 'E' was the clue. We discovered that although each server had the same error, the 'E' line in the log provided different reason for the error. One was a quota issue, another missing vm-tools, etc. Seemed to track down to rpms not getting updated in order, or something.

Fix was to update rpm database and run upcp --force. Needed to do it twice on at least 2 servers. After that, no further issues.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,904
2,218
463
Hello,

To update, the resolution for internal case CPANEL-16624 is included in cPanel 68.0.9:

Fixed case CPANEL-16624: Find_outdated_services: handle grsec kernel more gracefully.

Thank you.
 
  • Like
Reactions: ElviCities

uk01

Well-Known Member
Dec 31, 2009
206
19
68
Hi incase like me anyone else is searching for "E Post Maintenance ended, however it did not exit cleanly (256)" with the v68 upgrade.

I also got the error but mine was shown with the E flag

[2017-11-01 19:47:24 +0000] E [/usr/local/cpanel/scripts/quotacheck] The “/usr/local/cpanel/scripts/quotacheck” command (process 3461) reported error number 255 when it ended.

I had to increase a users quota, then force the update again, then put the quota back down. Luckily only on one server, but we shouldn't have to do this. Some users keep hitting the quota and won't upgrade so they leave it full.
 
  • Like
Reactions: rpvw

[email protected]

Registered
Aug 18, 2016
1
0
1
Fair Oaks, CA
cPanel Access Level
Root Administrator
In my case, there was an error from the smartcheck command due to there not being an /etc/fstab file, which is normal for a VPS.
So it could be ignored.

Here was the issue:

========================
[2017-11-01 13:02:19 -0700] - Processing command `/usr/local/cpanel/scripts/smartcheck`
[2017-11-01 13:02:20 -0700] E [/usr/local/cpanel/scripts/smartcheck] The “/usr/local/cpanel/scripts/smartcheck” command (process 16541) reported error number 2 when it ended.
[2017-11-01 13:02:20 -0700] The Administrator will be notified to review this output when this script completes
========================

The smartcheck script failed because there is no /etc/fstab file:

========================
[13:28:35] [8995931] [~]$ stat /etc/fstab
stat: cannot stat ‘/etc/fstab’: No such file or directory
========================
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,904
2,218
463
I also got the error but mine was shown with the E flag

[2017-11-01 19:47:24 +0000] E [/usr/local/cpanel/scripts/quotacheck] The “/usr/local/cpanel/scripts/quotacheck” command (process 3461) reported error number 255 when it ended.

I had to increase a users quota, then force the update again, then put the quota back down. Luckily only on one server, but we shouldn't have to do this. Some users keep hitting the quota and won't upgrade so they leave it full.
Hi @uk01,

I've moved this to a separate thread:

upcp failure notification - quotacheck

In my case, there was an error from the smartcheck command due to there not being an /etc/fstab file
Hi @[email protected],

We actually have a separate thread and internal case open for that issue at:

upcp failure - smartcheck

I'll update that thread as soon as a resolution is published.

Thanks!
 
Last edited:

Bdzzld

Well-Known Member
Apr 3, 2004
412
5
168
@cPanelMichael:

I've the same problem since the upgrade to version 68 yesterday:
Code:
E Pre Maintenance ended, however it did not exit cleanly (256). Please check the logs for an indication of what happened
However:
  • We're not running a special or customized kernel. Just the standard CentOS one.
  • Running /scripts/find_outdated_services did not find any outdated services.
Please advise.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,904
2,218
463
Hello,

I've moved this post to a separate thread. Please let us know the output from the following command:

Code:
awk '$4=="E"' /var/cpanel/updatelogs/update.XXXXXX.log
Replace "update.XXXXXX.log" with the name of the most recent log file in the /var/cpanel/updatelogs/ directory.

Thank you.
 

Bdzzld

Well-Known Member
Apr 3, 2004
412
5
168
@cPanelMichael:

It shows the following:

Code:
[2017-11-08 05:02:46 +0100] E    [/usr/local/cpanel/scripts/quotacheck] The â/usr/local/cpanel/scripts/quotacheckâ
                                  [2017-11-08 05:03:32 +0100] E Pre Maintenance ended, however it did not exit cleanly (256). Please check the logs for an indication of what happened