Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

“cPanel & WHM update failure in upcp script” persists after forced update

Discussion in 'General Discussion' started by Jim Ratliff, Jan 1, 2018.

Tags:
  1. Jim Ratliff

    Jim Ratliff Member

    Joined:
    Jan 1, 2018
    Messages:
    18
    Likes Received:
    3
    Trophy Points:
    3
    Location:
    Oakland CA
    cPanel Access Level:
    Root Administrator
    Subject: “cPanel & WHM update failure in upcp script” persists after forced update

    I received an email from my server tonight that:
    I reviewed the log and the last activity before the Post Maintenance message was:
    Code:
    Processing: Updating plugins data cache
     - Processing command `/usr/local/cpanel/bin/refresh_plugin_cache`
     - Finished command `/usr/local/cpanel/bin/refresh_plugin_cache` in 0.016 seconds
    95% complete
    Anticipating next steps, I executed both:
    Code:
    yum update
    /scripts/upcp --force
    However, I once again got the same “cPanel & WHM update failure in upcp script” email from the server. The log showed that it once again got only as far as the refresh_plugin_cache command at 95% complete.

    I assume this was unrelated, but I did discover something puzzling to me in the log: It's complaining that my hostname ("sierra") isn't valid, even though WHM never complained when I chose it to begin with:
    Code:
    Processing: Validating server hostname”, I see
       Processing: Validating server hostname
    - Processing command `/usr/local/cpanel/scripts/check_valid_server_hostname --notify`
      [/usr/local/cpanel/scripts/check_valid_server_hostname] Changing hostname to sierra...Failed!
      [/usr/local/cpanel/scripts/check_valid_server_hostname]
      [/usr/local/cpanel/scripts/check_valid_server_hostname] sierra is not a valid hostname
      [/usr/local/cpanel/scripts/check_valid_server_hostname] Warnings were seen during rename:
      [/usr/local/cpanel/scripts/check_valid_server_hostname]
      [/usr/local/cpanel/scripts/check_valid_server_hostname] Please refer to RFCs 952 and 1123 to determine valid hostname.
    - Finished command `/usr/local/cpanel/scripts/check_valid_server_hostname --notify` in 3.397 seconds
    Any ideas on how to take it from 95% complete to 100% complete?

    Thanks!
     
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    45,167
    Likes Received:
    1,934
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello,

    First, it looks like you need to update your hostname to a fully-qualified domain name (e.g. server.domain.tld) using "WHM >> Change Hostname". As far as the cPanel update error, could you run the command below and let us know the output?

    Code:
    awk '$4=="E"' /var/cpanel/updatelogs/update.xxxxxxxxxx.log
    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. Jim Ratliff

    Jim Ratliff Member

    Joined:
    Jan 1, 2018
    Messages:
    18
    Likes Received:
    3
    Trophy Points:
    3
    Location:
    Oakland CA
    cPanel Access Level:
    Root Administrator
    Thanks! I entered:
    Code:
    awk '$4=="E"' /var/cpanel/updatelogs/update.xxxxxxxxxx.log
    and got this response:

    Code:
    ~ jim$ awk '$4=="E"' /var/cpanel/updatelogs/update.xxxxxxxxxx.log
    awk: can't open file /var/cpanel/updatelogs/update.xxxxxxxxxx.log
     source line number 1
     
  4. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    45,167
    Likes Received:
    1,934
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hi Jim,

    I apologize, I should have mentioned that you need to replace "update.xxxxxxxxxx.log" with the name of the most recent update log in the /var/cpanel/updatelogs/ directory.

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. Jim Ratliff

    Jim Ratliff Member

    Joined:
    Jan 1, 2018
    Messages:
    18
    Likes Received:
    3
    Trophy Points:
    3
    Location:
    Oakland CA
    cPanel Access Level:
    Root Administrator
    Thanks, Michael. This looks promisingly informative:
    Code:
    E    [/usr/local/cpanel/scripts/fixetchosts] The “/usr/local/cpanel/scripts/fixetchosts” command (process 10320) reported error number 255 when it ended.
    E Post Maintenance ended, however it did not exit cleanly (256). Please check the logs for an indication of what happened
    
     
  6. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    45,167
    Likes Received:
    1,934
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello,

    That shows the cPanel update is failing when it attempts to run the following command:

    Code:
    /usr/local/cpanel/scripts/fixetchosts
    Could you run that command manually after updating the server's hostname using "WHM >> Change Hostname" and let us know if it still fails?

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. Jim Ratliff

    Jim Ratliff Member

    Joined:
    Jan 1, 2018
    Messages:
    18
    Likes Received:
    3
    Trophy Points:
    3
    Location:
    Oakland CA
    cPanel Access Level:
    Root Administrator
    Thanks, Michael! I changed the hostname to a FQDN. Then I entered:
    Code:
    /usr/local/cpanel/scripts/fixetchosts
    It immediately returned with no errors or anything else. I assume that means that the command worked.

    Thanks, again. I appreciate your quick and on-target help!
     
  8. Jim Ratliff

    Jim Ratliff Member

    Joined:
    Jan 1, 2018
    Messages:
    18
    Likes Received:
    3
    Trophy Points:
    3
    Location:
    Oakland CA
    cPanel Access Level:
    Root Administrator
    I'm surprised that WHM accepted my defective hostname in the first place, however.
     
  9. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    45,167
    Likes Received:
    1,934
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello,

    You can also run the "/scripts/upcp" command to confirm the cPanel update process completes successfully. If this is a VPS on the OpenVZ/Virtuozzo platform, you may also want to review the following thread:

    SOLVED - Hostname resets on reboot

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  10. Jim Ratliff

    Jim Ratliff Member

    Joined:
    Jan 1, 2018
    Messages:
    18
    Likes Received:
    3
    Trophy Points:
    3
    Location:
    Oakland CA
    cPanel Access Level:
    Root Administrator
    Michael, the "/scripts/upcp" command is still failing with an error for fixetchosts:
    Code:
    E    [/usr/local/cpanel/scripts/fixetchosts] The “/usr/local/cpanel/scripts/fixetchosts” command (process 6810) reported error number 255 when it ended.
    E Post Maintenance ended, however it did not exit cleanly (256). Please check the logs for an indication of what happened
     
  11. Jim Ratliff

    Jim Ratliff Member

    Joined:
    Jan 1, 2018
    Messages:
    18
    Likes Received:
    3
    Trophy Points:
    3
    Location:
    Oakland CA
    cPanel Access Level:
    Root Administrator
    Updating my last post…

    For some reason, it's still complaining about my hostname. About 10 hours ago, I changed the hostname to a FQDN (sierra.mydomain.org) and I received a "Hostname change status" email confirming it:
    Now however the log produced by "/scripts/upcp" still shows:
    Code:
    Processing: Validating server hostname
    - Processing command `/usr/local/cpanel/scripts/check_valid_server_hostname --notify`
      [/usr/local/cpanel/scripts/check_valid_server_hostname] Changing hostname to sierra...Failed!
      [/usr/local/cpanel/scripts/check_valid_server_hostname]
      [/usr/local/cpanel/scripts/check_valid_server_hostname] sierra is not a valid hostname
      [/usr/local/cpanel/scripts/check_valid_server_hostname] Warnings were seen during rename:
      [/usr/local/cpanel/scripts/check_valid_server_hostname]
      [/usr/local/cpanel/scripts/check_valid_server_hostname] Please refer to RFCs 952 and 1123 to determine valid hostname.
    - Finished command `/usr/local/cpanel/scripts/check_valid_server_hostname --notify` in 0.128 seconds
    
     
    #11 Jim Ratliff, Jan 2, 2018
    Last edited by a moderator: Jan 3, 2018
  12. Jim Ratliff

    Jim Ratliff Member

    Joined:
    Jan 1, 2018
    Messages:
    18
    Likes Received:
    3
    Trophy Points:
    3
    Location:
    Oakland CA
    cPanel Access Level:
    Root Administrator
    I re-changed the hostname and ran "/scripts/upcp" and this time it went through to 100% completion without complaining about the hostname. In WHM » Change Hostname, I've verified that the new/correct hostname has stuck. (Somehow it reverted previously.)

    So… I think I'm fine now.
     
  13. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    45,167
    Likes Received:
    1,934
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  14. Jim Ratliff

    Jim Ratliff Member

    Joined:
    Jan 1, 2018
    Messages:
    18
    Likes Received:
    3
    Trophy Points:
    3
    Location:
    Oakland CA
    cPanel Access Level:
    Root Administrator
    Thanks, Michael! Your earlier link to the "Hostname resets on reboot" was enlightening. Because it requires a VPS-level change, I outsourced that to my host. My reboot will be the test!
     
    cPanelMichael likes this.
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice