zammad / zammad

Zammad is a web based open source helpdesk/customer support system
https://zammad.org
GNU Affero General Public License v3.0
4.41k stars 748 forks source link

apt-get dist-upgrade -y can break your zammad install #5315

Closed seederp2p closed 1 month ago

seederp2p commented 1 month ago

Used Zammad Version

6.3.1

Environment

Actual behaviour

I had upgrades pending for zammad but also:

postgresql-16/noble-updates 16.4-0ubuntu0.24.04.2 amd64 postgresql-client-16/noble-updates 16.4-0ubuntu0.24.04.2 amd64

Doing a apt-get dist-upgrade -y gave this error:

Preparing to unpack .../12-zammad_6.3.1-1724757244.41b98ccb.noble_amd64.deb ...
!!! ERROR !!!
Your database does not seem to be online!
Please check your configuration in config/database.yml and ensure the configured database server is online.
Exiting Zammad package installation / upgrade - try again.
dpkg: error processing archive /tmp/apt-dpkg-install-iusG7U/12-zammad_6.3.1-1724757244.41b98ccb.noble_amd64.deb (--unpack):
 new zammad package pre-installation script subprocess returned error exit status 1
# Enforcing Redis...
# Creating Redis bootstart
Synchronizing state of redis-server.service with SysV service script with /usr/lib/systemd/systemd-sysv-install.
Executing: /usr/lib/systemd/systemd-sysv-install enable redis-server
# Starting Redis server
# Redis server is running.
# (Re)creating init scripts
Nothing to do.
Nothing to do.
Nothing to do.
# Enabling Zammad on boot
# Stopping Zammad
# Clear cache...
/opt/zammad/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.8.4/lib/active_record/connection_adapters/postgresql_adapter.rb:87:in `rescue in new_client': connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: No such file or directory (ActiveRecord::ConnectionNotEstablished)
        Is the server running locally and accepting connections on that socket?

As this was a VM, I just reverted to a previous snapshot and did:

sudo apt-mark hold postgresql-16 postgresql-client-16

so this packaged wouldn't upgrade. After that I went:

sudo apt-get update
sudo apt-get dist-upgrade -y

And zammad upgraded successfully.

After that I did:

sudo apt-mark unhold postgresql-16 postgresql-client-16

and

sudo apt-get update
sudo apt-get dist-upgrade -y

And everything went fine.

I don't know if this is documented and can be somehow improved in terms of the upgrade process via apt-get

Expected behaviour

apt-get dist-upgrade -y shouldn't break the current install

Steps to reproduce the behaviour

As described

Support Ticket

No response

I'm sure this is a bug and no feature request or a general question.

yes

MrGeneration commented 1 month ago

Sorry, but this seems to be a technical question. Please note that this repository is the wrong place for technical questions. Instead, please refer the Zammad community over at: https://community.zammad.org .

In case this turns out the be a bug and no technical question, we'll transfer the relevant information to this repo!

If you require commercial grade support and are no hosted or support contract customer, you can check out our support contracts here: https://zammad.com/pricing#selfhosted If you're paying customer already, please consult your Zammad support for assistance! :-)