Upgrade Zammad 6.2 to 6.3.1 failed pg_isready

Infos:

  • Used Zammad version: 6.2.0-1713335465.b27a0d24.centos8
  • Used Zammad installation type: Package
  • Operating system: Rocky Linux 8.10
  • Browser + version: Any

Expected behavior:

  • Upgrade to 6.3.1-1717174492.3b75df1e.centos8

Actual behavior:

Preparing : 1/1
Running scriptlet: zammad-6.3.1-1717174492.3b75df1e.centos8.x86_64 1/2
/tmp/tmp.wahOgCXkOk: line 36: pg_isready: command not found
!!! 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.

Steps to reproduce the behavior:

  • sudo yum install zammad

Additional info

I have added the bin path to PATH

/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/usr/pgsql-14/bin

pg_isready works when manual testing command

pg_isready (PostgreSQL) 14.12

[xxxx@xxxx tmp]# pg_isready -h localhost -p 5432
localhost:5432 - accepting connections

1 Like

This issue looks similar to Upgrade Zammad 6.0 to 6.1 failed

Extra information that was missing.
/opt/zammad/config/database.yml

production:
adapter: postgresql
database: zammad
pool: 50
timeout: 5000
encoding: utf8
username: zammad
password: xxxxx

Did anyone else had this issue upgrading to v6.3.1 please?

1 Like

I have the exact same issue, on AlmaLinux 8.10

Running transaction
  Preparing        :                                                                                                                                                                                                                     1/1
  Running scriptlet: zammad-6.3.1-1718095957.bfe18b8e.centos8.x86_64                                                                                                                                                                     1/2
/tmp/tmp.ejn9cLGPO1: line 36: pg_isready: command not found
!!! 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.
error: %prein(zammad-6.3.1-1718095957.bfe18b8e.centos8.x86_64) scriptlet failed, exit status 1

pg_isready is working outside of the script as well:

 pg_isready
/run/postgresql:5432 - accepting connections

database.yml


production:
  adapter: postgresql
  database: zammad
  pool: 50
  timeout: 5000
  encoding: utf8
  username: zammad
  password: ******

Also running PostgreSQL 14.12.

For now I’ve reverted back to a snapshot before the update, installed all updates except Zammad and everything works.

That path looks troubling.
The postinstall script (which is responsible for checking if database is there and then run the migrations etc) is using this path:
PATH=/opt/zammad/bin:/opt/zammad/vendor/bundle/bin:/sbin:/bin:/usr/sbin:/usr/bin:

Officially Rocky and AlmaLinux are not on our supported distribution list (Software — Zammad System Documentation documentation). So in that case you’re technically required to ensure to pick the fitting package version to your distribution and hope it works.

Are these postgresql servers from the default repositories of your distribution or a thirdparty one?

1 Like

Default repo. I didn’t add anything when installing Zammad.

pgdg-redhat-all.repo
https://download.postgresql.org/pub/repos/yum/common/redhat/rhel-$releasever-$basearch

Thanks for the tip. I have added a symlink and now the installation went through:

sudo ln -s /usr/pgsql-14/bin/pg_isready /usr/bin/pg_isready

I removed it to avoid potential conflicts

sudo /usr/bin/pg_isready

1 Like

Thanks, this also worked for me. Though your last command should be:
sudo rm /usr/bin/pg_isready

1 Like

thanks @dragonfly
that worked for us too

1 Like

Last command has a typo. Should be

sudo rm /usr/bin/pg_isready

1 Like