Hipchat Server upgrade fails with cannot execute binary file
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the server and data center platforms.
This is for an outdated version of Hipchat Server
This article applies to a version of Hipchat Server which will be deprecated soon. After that period the version will no longer be supported.
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.
Problem
When upgrading Hipchat Server, the upgrade fails to complete with the following error in the /var/log/hipchat/update.log file:
The following appears in the /var/log/hipchat/update.log
STDOUT: Setting up ca-certificates-java (20130815ubuntu1) ...
Processing triggers for ca-certificates (20160104ubuntu0.14.04.1) ...
Updating certificates in /etc/ssl/certs... 0 added, 0 removed; done.
Running hooks in /etc/ca-certificates/update.d....E: /etc/ca-certificates/update.d/jks-keystore exited with code 2.
done.
STDERR: /var/lib/dpkg/info/ca-certificates-java.postinst: line 12: .: /etc/default/cacerts: cannot execute binary file
dpkg: error processing package ca-certificates-java (--configure):
subprocess installed post-installation script returned error exit status 126
/etc/ca-certificates/update.d/jks-keystore: 4: /etc/default/cacerts: Syntax error: Unterminated quoted string
Errors were encountered while processing:
ca-certificates-java
Diagnosis
Environment
- Upgrading to Hipchat Server 2.0 build 2.0.4
Cause
While upgrading packages, the /etc/default/cacerts file is identified as binary, rather than ASCII/text, causing the package update to fail.
Workaround
- Log into the Hipchat Server terminal/command-line interface
Run the following commands:
sudo dont-blame-hipchat mv /etc/default/cacerts /home/admin/cacerts.bak /var/lib/dpkg/info/ca-certificates-java.postinst configure dpkg --configure -a hipchat upgrade --offline
If upgrading from build 1.3.x to build 2.x, you will need to reboot the Hipchat Server virtual machine in order to complete a successful upgrade. Please be sure to backup/snapshot the system before rebooting, just in case.
If the upgrade is still failing, please contact Hipchat Server support for further assistance.