500 Error on /api/v1/signshow during initial wizard

Infos:

  • Used Zammad version: 5.3.0
  • Used Zammad installation type: package
  • Operating system: debian 11
  • Browser + version: firefox (107.0)
  • Postgresql 13
  • Installed without elasticsearch

Expected behavior:

  • See the getting started wizard

Actual behavior:

  • return 500 Error on /api/v1/signshow

Steps to reproduce the behavior:

  • Follow the doc…

production logs:

I, [2022-12-01T22:53:34.633059 #3292-110500]  INFO -- : Started GET "/" for 10.69.10.67 at 2022-12-01 22:53:34 +0000
I, [2022-12-01T22:53:34.649458 #3292-110500]  INFO -- : Processing by InitController#index as HTML
I, [2022-12-01T22:53:34.658904 #3292-110500]  INFO -- :   Rendered init/index.html.erb within layouts/application (Duration: 0.1ms | Allocations: 47)
I, [2022-12-01T22:53:34.663909 #3292-110500]  INFO -- :   Rendered layout layouts/application.html.erb (Duration: 5.1ms | Allocations: 620)
I, [2022-12-01T22:53:34.665412 #3292-110500]  INFO -- : Completed 200 OK in 16ms (Views: 5.5ms | ActiveRecord: 0.8ms | Allocations: 1749)
I, [2022-12-01T22:53:34.866160 #3292-110500]  INFO -- : Started POST "/api/v1/signshow" for 10.69.10.67 at 2022-12-01 22:53:34 +0000
I, [2022-12-01T22:53:34.895517 #3292-110500]  INFO -- : Processing by SessionsController#show as JSON
I, [2022-12-01T22:53:34.895558 #3292-110500]  INFO -- :   Parameters: {"fingerprint"=>"1134648083"}
W, [2022-12-01T22:53:34.912614 #3292-110500]  WARN -- : Setting "timezone_default" is empty. Using UTC instead. Please set system timezone.
E, [2022-12-01T22:53:34.915107 #3292-110500] ERROR -- : undefined method `[]' for nil:NilClass (NoMethodError)
app/controllers/sessions_controller.rb:261:in `config_frontend'
app/controllers/sessions_controller.rb:49:in `rescue in show'
app/controllers/sessions_controller.rb:40:in `show'
app/controllers/application_controller/has_download.rb:21:in `block (4 levels) in <module:HasDownload>'
app/controllers/application_controller/has_download.rb:20:in `block (3 levels) in <module:HasDownload>'
app/controllers/application_controller/has_download.rb:19:in `block (2 levels) in <module:HasDownload>'
app/controllers/application_controller/handles_transitions.rb:16:in `handle_transaction'
E, [2022-12-01T22:53:34.922106 #3292-110500] ERROR -- : Error ID mJ-ctuxX: undefined method `[]' for nil:NilClass
I, [2022-12-01T22:53:34.922388 #3292-110500]  INFO -- : Completed 500 Internal Server Error in 27ms (Views: 0.2ms | ActiveRecord: 0.7ms | Allocations: 3192)

It fails on the following:

# NB: Explicitly include SAML display name config
#   This is needed because the setting is not frontend related,
#   but we still to display one of the options
# https://github.com/zammad/zammad/issues/4263
config['auth_saml_display_name'] = Setting.get('auth_saml_credentials')[:display_name]

It seems to be related with SSO auth which i do not use.
i’m completely new to zammad, maybe i did something wrong, but can’t find what…
Thanks !

I’m afraid I can’t reproduce the stated behavior. Please update Zammad to the latest possible version to rule out any fuck up. Looks like your setup wasn’t successful.

Note that you’re actively breaking Zammads package dependencies. This may cause unexpected behavior and explicitly is not supported. If you don’t want to use Elasticsearch that’s fine, just install it, disable the service and don’t configure it.

That’s imho the cleaner way to handle this.

I have the same issue.

I believe the documentation is either outdated or missing some steps since there was a lot of hurdles to set up Zammad via package on Ubuntu 22.04.

These are the relevant packages installed via APT:

zammad/unknown,now 5.4.0-1679572445.1ca664c4.jammy amd64 [installed]

elasticsearch/stable,now 7.17.9 amd64 [installed]

postgresql-14/jammy-updates,jammy-security,now 14.7-0ubuntu0.22.04.1 amd64 [installed,automatic]
postgresql-client-14/jammy-updates,jammy-security,now 14.7-0ubuntu0.22.04.1 amd64 [installed,automatic]
postgresql-client-common/jammy,now 238 all [installed,automatic]
postgresql-common/jammy,now 238 all [installed,automatic]
postgresql/jammy,now 14+238 all [installed,automatic]

These are the steps I followed so far:

  1. Provision a fresh Ubuntu 22.04 VPS
  2. Install Postgres on it (postgresql-14) and set it up - addional steps required for my linux distro:
    • Cluster must be created: pg_createcluster 14 zammad
    • Service must be enabled: systemctl enable postgresql@14-zammad
  3. Install Elasticsearch and ingest attachment - I followed the instructions in docs.
  4. Install Zammad as a package, following the instructions.
    • This shows only the Nginx default site page in the browser.
  5. Fix the Nginx default page issue by updating server_name to IP address in /etc/nginx/sites-enabled/zammad.
  6. Load http://<ip address>/ in browser, which gives a 500.

In the Zammad logs I see the following:

E, [2023-03-24T07:44:38.965238#23070-111440] ERROR -- : undefined method `[]' for nil:NilClass

    config['auth_saml_display_name'] = Setting.get('auth_saml_credentials')[:display_name]
                                                                           ^^^^^^^^^^^^^^^ (NoMethodError)
app/controllers/sessions_controller.rb:265:in `config_frontend'
app/controllers/sessions_controller.rb:17:in `rescue in show'
app/controllers/sessions_controller.rb:8:in `show'
app/controllers/application_controller/has_download.rb:21:in `block (4 levels) in <module:HasDownload>'
app/controllers/application_controller/has_download.rb:20:in `block (3 levels) in <module:HasDownload>'
app/controllers/application_controller/has_download.rb:19:in `block (2 levels) in <module:HasDownload>'
app/controllers/application_controller/handles_transitions.rb:16:in `handle_transaction'
E, [2023-03-24T07:44:38.989453#23070-111440] ERROR -- : Error ID BhTvG1mO: undefined method `[]' for nil:NilClass

    config['auth_saml_display_name'] = Setting.get('auth_saml_credentials')[:display_name]
                                                                           ^^^^^^^^^^^^^^^
I, [2023-03-24T07:44:38.990582#23070-111440]  INFO -- : Completed 500 Internal Server Error in 41ms (Views: 0.3ms | ActiveRecord: 3.1ms | Allocations: 17362)

At some point in my troubleshooting, I had to run the following to get Zammad to bootstrap the db:
export DISABLE_DATABASE_ENVIRONMENT_CHECK=1; zammad run rake zammad:bootstrap:init

Please open your own thread.
If you follow the Zammad documentation closely the installation process is no problem at all.

Especially the mentioned steps are not required and thus makes me believe you’re not following our actual documentation at Install from package — Zammad documentation

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