Hipchat Server upgrade fails with the error ImportError No module named datetime

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

This version of Hipchat Server is no longer supported

This article applies to a version of Hipchat Server which is beyond the Atlassian End of Life policy, and is no longer supported.

When was my version deprecated?

The following versions have been deprecated:

  • Hipchat Server 1.3 (EOL Date: Aug 17, 2017)

The following versions will be deprecated soon:

  • Hipchat Server 2.0 (EOL Date: Jun 17, 2018)
  • Hipchat Server 2.1 (EOL Date: Dec 8, 2018)
  • Hipchat Server 2.2 (EOL Date: May 30, 2019)

You can read more about Atlassian's End of Life policy here

You should upgrade to a more recent version of Hipchat Server as soon as you can to take advantage of new features, and security and bug fixes. If possible, you should also consider deploying Hipchat Data Center instead.

Problem

When attempting to upgrade Hipchat to version 1.4.1 or later, the upgrade fails to complete.  Some of the following symptoms may be observed as a result:

  • Hipchat services refuse to start.
  • Users can no longer log in to the instance.
  • Attempts to re-run an upgrade with hipchat upgrade --force-upgrade will fail with the following output to the terminal/command-line interface and/or the /var/log/chef.log file:

 

Traceback (most recent call last):
  File "/opt/cumulus/virtualenv/bin/aws", line 19, in <module>
    import awscli.clidriver
  File "/opt/cumulus/virtualenv/local/lib/python2.7/site-packages/awscli/clidriver.py", line 17, in <module>
    import botocore.session
  File "/opt/cumulus/virtualenv/local/lib/python2.7/site-packages/botocore/session.py", line 25, in <module>
    import botocore.config
  File "/opt/cumulus/virtualenv/local/lib/python2.7/site-packages/botocore/config.py", line 18, in <module>
    from botocore.compat import six
  File "/opt/cumulus/virtualenv/local/lib/python2.7/site-packages/botocore/compat.py", line 15, in <module>
    import datetime
ImportError: No module named datetime

 

Diagnosis

Environment

Upgrade performed from Hipchat Server 1.3.9 or earlier

Cause

Something may have blocked the upgrade (a package upgrade failure, a specific config that is corrupted, etc.) or intermittently failed during the upgrade.

Workaround

Run the following commands:

force-continue-upgrade
sudo dont-blame-hipchat
uname -a
dpkg -l | grep linux-image
dpkg -l | grep hc-
dpkg --configure -a
apt-get install --reinstall hc-cumulus
service monit stop
hipchat upgrade --force-upgrade
tail -n50 /var/log/chef.log /var/log/hipchat/update.log

 

 

Last modified on Jan 19, 2018

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.