V6.0.0 Zammad-rails return empty values

  • Used Zammad version: 6.0.0
  • Used Zammad installation type: docker-compose
  • Operating system: Ubuntu 22.04.2 LTS
  • Browser + version: N/A

Expected behavior:

docker exec -it zammad-docker-compose-zammad-railsserver-1 sh
$ rails c
I, [2023-07-07T16:15:16.080217#91-5400] INFO – : Using the Redis back end for Zammad’s web socket session store.
Loading production environment (Rails
irb(main):001:0> Ticket::Priority.pluck(:name)

Actual behavior:

docker exec -it zammad-docker-compose-zammad-railsserver-1 sh
irb(main):001:0> Ticket::Priority.pluck(:name)

Steps to reproduce the behavior:

Install lastest docker & docker compose version
git clone GitHub - zammad/zammad-docker-compose: Zammad Docker images for docker-compose
cd zammad-docker-compose
docker compose up -d
zammad initial configuration

Any rails get commads returns a empty values (no errors). And put commands dont works. ¿Any idea?


Hi @pabloR_77, did you wait long enough for the Zammad init container to be ready + shut down?

Hi fliebe92.

Yeah. The containers have been running for many hours. And zammad is working fine. But I cant use the rails console.


Hi @pabloR_77. I was able to check this in a test environment, currently, I have no idea what’s going on there. I’ll try to clarify this in the next week.


Hi all,

I can confirm this behaviour, tried to exec the different container and rails c, any commands issued return empty value


Please have a look here: Added postgres env data by Finnlife · Pull Request #357 · zammad/zammad-docker-compose · GitHub

You need to provide the correct credentials for the database, otherwise, the nulldb adapter is used and you’re not getting any results. Maybe this helps.


Hi @fliebe92 , thank you for your swift responses,

For your suggestion, I modified the .env and docker-compose.yml (since I use external DB), because zammad wont running with the existing .env. Here is my container info

And rails console returns empty

Thanks @fliebe92 .

I have modified the docker-compose.yml file as explined in Added postgres env data by Finnlife · Pull Request #357 · zammad/zammad-docker-compose · GitHub.

And execute:
docker compose down
docker compose up -d

After that, the rails server docker still have this conf regarding nulldb:

And continue returning empty values.

Note: changes made:

Any idea?.

Thanks a lot!

Hi @pabloR_77 , tried to exec to railserver container, edit the config/database.yml with my adapter and other information related to DB. It works, but I dont like the solution.

Hi. Thanks for your reply.

But I not sure about what adapter información I need to set. What adapter, or what databa info?

Any help were welcome.


Pablo R.

I assume u’re using docker-compose.yml provided, so it is postgresql

1 Like


Thanks @wwicak . Now it’s working.
Old config:

docker exec -u 0 -it zammad-docker-compose-zammad-railsserver-1 /bin/bash
apt-get update
apt-get install vim
vi config/database.yml

adapter: postgresql
database: zammad_production
pool: 50
timeout: 5000
encoding: utf8
username: zammad
password: zammad
host: zammad-postgresql
port: 5432

¿Optional?: docker compose up -d

And magic, it works!..

Just my 2 cents but you shouldn’t need to adjust the database.yml of Zammads docker-compose at all.
As far as I’m aware the init container is adjusting it itself already.

Not sure what’s going wrong here but this might be a bug.

Complety agree @MrGeneration.

These changes are only a work around til docker-compose.yml is been correcly modified.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.