Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to restart due elasticsearch-init container #212

Closed
johannes-darms opened this issue Sep 7, 2023 · 1 comment · Fixed by #215 or #226
Closed

Unable to restart due elasticsearch-init container #212

johannes-darms opened this issue Sep 7, 2023 · 1 comment · Fixed by #215 or #226

Comments

@johannes-darms
Copy link

After a cluster restart zammad is unable to restart, since the elasticsearch-init container does not complete without an error code. The logs [1] show an error associated with a read only file system (/opt/zammad/lib/static_assets.rb:177:in initialize': Read-only file system @ rb_sysopen - /opt/zammad/public/assets/images/02be6b7d09f0d0eed30936e7b9ec676b.png (Errno::EROFS)). The manifest [2] does not list a mount for /opt/zammad/public/`.

❯ kubectl logs -f zammad-demo2-0 -c elasticsearch-init
/opt/zammad/lib/static_assets.rb:177:in `initialize': Read-only file system @ rb_sysopen - /opt/zammad/public/assets/images/02be6b7d09f0d0eed30936e7b9ec676b.png (Errno::EROFS)
	from /opt/zammad/lib/static_assets.rb:177:in `open'
	from /opt/zammad/lib/static_assets.rb:177:in `sync'
	from /opt/zammad/config/initializers/logo.rb:11:in `block in <main>'
	from /usr/local/bundle/gems/activesupport-6.1.7.4/lib/active_support/callbacks.rb:427:in `instance_exec'
	from /usr/local/bundle/gems/activesupport-6.1.7.4/lib/active_support/callbacks.rb:427:in `block in make_lambda'
	from /usr/local/bundle/gems/activesupport-6.1.7.4/lib/active_support/callbacks.rb:198:in `block (2 levels) in halting'
	from /usr/local/bundle/gems/activesupport-6.1.7.4/lib/active_support/callbacks.rb:604:in `block (2 levels) in default_terminator'
	from /usr/local/bundle/gems/activesupport-6.1.7.4/lib/active_support/callbacks.rb:603:in `catch'
	from /usr/local/bundle/gems/activesupport-6.1.7.4/lib/active_support/callbacks.rb:603:in `block in default_terminator'
	from /usr/local/bundle/gems/activesupport-6.1.7.4/lib/active_support/callbacks.rb:199:in `block in halting'
	from /usr/local/bundle/gems/activesupport-6.1.7.4/lib/active_support/callbacks.rb:512:in `block in invoke_before'
	from /usr/local/bundle/gems/activesupport-6.1.7.4/lib/active_support/callbacks.rb:512:in `each'
	from /usr/local/bundle/gems/activesupport-6.1.7.4/lib/active_support/callbacks.rb:512:in `invoke_before'
	from /usr/local/bundle/gems/activesupport-6.1.7.4/lib/active_support/callbacks.rb:105:in `run_callbacks'
	from /usr/local/bundle/gems/activesupport-6.1.7.4/lib/active_support/reloader.rb:88:in `prepare!'
	from /usr/local/bundle/gems/railties-6.1.7.4/lib/rails/application/finisher.rb:124:in `block in <module:Finisher>'
	from /usr/local/bundle/gems/railties-6.1.7.4/lib/rails/initializable.rb:32:in `instance_exec'
	from /usr/local/bundle/gems/railties-6.1.7.4/lib/rails/initializable.rb:32:in `run'
	from /usr/local/bundle/gems/railties-6.1.7.4/lib/rails/initializable.rb:61:in `block in run_initializers'
	from /usr/local/lib/ruby/3.1.0/tsort.rb:228:in `block in tsort_each'
	from /usr/local/lib/ruby/3.1.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
	from /usr/local/lib/ruby/3.1.0/tsort.rb:431:in `each_strongly_connected_component_from'
	from /usr/local/lib/ruby/3.1.0/tsort.rb:349:in `block in each_strongly_connected_component'
	from /usr/local/lib/ruby/3.1.0/tsort.rb:347:in `each'
	from /usr/local/lib/ruby/3.1.0/tsort.rb:347:in `call'
	from /usr/local/lib/ruby/3.1.0/tsort.rb:347:in `each_strongly_connected_component'
	from /usr/local/lib/ruby/3.1.0/tsort.rb:226:in `tsort_each'
	from /usr/local/lib/ruby/3.1.0/tsort.rb:205:in `tsort_each'
	from /usr/local/bundle/gems/railties-6.1.7.4/lib/rails/initializable.rb:60:in `run_initializers'
	from /usr/local/bundle/gems/railties-6.1.7.4/lib/rails/application.rb:391:in `initialize!'
	from /opt/zammad/config/environment.rb:7:in `<main>'
	from /usr/local/bundle/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
	from /usr/local/bundle/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
	from /usr/local/bundle/gems/zeitwerk-2.6.8/lib/zeitwerk/kernel.rb:38:in `require'
	from /usr/local/bundle/gems/activesupport-6.1.7.4/lib/active_support/dependencies.rb:332:in `block in require'
	from /usr/local/bundle/gems/activesupport-6.1.7.4/lib/active_support/dependencies.rb:299:in `load_dependency'
	from /usr/local/bundle/gems/activesupport-6.1.7.4/lib/active_support/dependencies.rb:332:in `require'
	from /usr/local/bundle/gems/railties-6.1.7.4/lib/rails/application.rb:367:in `require_environment!'
	from /usr/local/bundle/gems/railties-6.1.7.4/lib/rails/command/actions.rb:28:in `require_environment!'
	from /usr/local/bundle/gems/railties-6.1.7.4/lib/rails/command/actions.rb:15:in `require_application_and_environment!'
	from /usr/local/bundle/gems/railties-6.1.7.4/lib/rails/commands/runner/runner_command.rb:33:in `perform'
	from /usr/local/bundle/gems/thor-1.2.2/lib/thor/command.rb:27:in `run'
	from /usr/local/bundle/gems/thor-1.2.2/lib/thor/invocation.rb:127:in `invoke_command'
	from /usr/local/bundle/gems/thor-1.2.2/lib/thor.rb:392:in `dispatch'
	from /usr/local/bundle/gems/railties-6.1.7.4/lib/rails/command/base.rb:69:in `perform'
	from /usr/local/bundle/gems/railties-6.1.7.4/lib/rails/command.rb:48:in `invoke'
	from /usr/local/bundle/gems/railties-6.1.7.4/lib/rails/commands.rb:18:in `<main>'
	from /usr/local/bundle/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
	from /usr/local/bundle/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
	from bin/rails:5:in `<main>'
I, [2023-09-07T06:23:12.247824 #7]  INFO -- : ActionCable is using the redis instance at redis://:zammad@zammad-demo2-redis-master:6379.
I, [2023-09-07T06:23:12.287383#7-5380]  INFO -- : Using memcached as Rails cache store.
I, [2023-09-07T06:23:12.287586#7-5380]  INFO -- : Using the Redis back end for Zammad's web socket session store.
I, [2023-09-07T06:23:13.067920#7-5380]  INFO -- : Setting.set('product_logo', "02be6b7d09f0d0eed30936e7b9ec676b.png")

[2]

❯ kubectl describe zammad-demo2-0
[....]
  elasticsearch-init:
    Container ID:   containerd://9ab2f83c104140fff7475b600447f1663253ac3a8ec1b1b3a64173a2879c42d5
    Image:          ghcr.io/zammad/zammad:6.0.0-66
    Image ID:       ghcr.io/zammad/zammad@sha256:bed9869ffcb67fd0a97801d6542b47fa69cf0b401034b0555a302cae447883a0
    Port:           <none>
    Host Port:      <none>
    State:          Waiting
      Reason:       CrashLoopBackOff
    Last State:     Terminated
      Reason:       Error
      Exit Code:    1
      Started:      Thu, 07 Sep 2023 08:23:07 +0200
      Finished:     Thu, 07 Sep 2023 08:23:13 +0200
    Ready:          False
    Restart Count:  22
    Environment:
      REDIS_PASSWORD:           <set to the key 'redis-password' in secret 'zammad-demo2-redis-pass'>  Optional: false
      MEMCACHE_SERVERS:         zammad-demo2-memcached:11211
      REDIS_URL:                redis://:$(REDIS_PASSWORD)@zammad-demo2-redis-master:6379
      POSTGRESQL_PASS:          <set to the key 'postgresql-pass' in secret 'zammad-demo2-postgresql-pass'>  Optional: false
      DATABASE_URL:             postgres://zammad:$(POSTGRESQL_PASS)@zammad-demo2-postgresql:5432/zammad_production
      KUBERNETES_SERVICE_HOST:  PRIVATE!~
    Mounts:
      /docker-entrypoint.sh from zammad-demo2-init (ro,path="elasticsearch-init")
      /opt/zammad/var from zammad-demo2-var (rw)
      /var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-j6j7j (ro)
[....]
@monotek
Copy link
Member

monotek commented Sep 25, 2023

will be fixed in: #215

@monotek monotek closed this as completed Sep 25, 2023
monotek pushed a commit that referenced this issue Sep 26, 2023
monotek added a commit that referenced this issue Sep 26, 2023
* Fixes #212, fixes #200 - Switch to Zammad 6.1.

* Solve #203 - attachment upload

* set rofs to true again & fix tmp dir issues

Signed-off-by: André Bauer <[email protected]>

---------

Signed-off-by: André Bauer <[email protected]>
Co-authored-by: André Bauer <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants