docusealco / docuseal

Open source DocuSign alternative. Create, fill, and sign digital documents ✍️
https://www.docuseal.co
GNU Affero General Public License v3.0
5.61k stars 372 forks source link

Can't launch after update #224

Closed ac2323 closed 4 months ago

ac2323 commented 4 months ago

I updated my Docker Docuseal image recently and noticed that it doesn't start. I'm on an Ubuntu LXC 22.04.4 Below is the error log:

WARNING: Nokogiri was built against libxml version 2.11.6, but has dynamically loaded 2.11.7
=> Booting Puma
=> Rails 7.1.2 application starting in production 
=> Run `bin/rails server --help` for more startup options
Exiting
/usr/local/bundle/gems/rack-2.2.8/lib/rack/server.rb:446:in `delete': Resource busy @ apply2files - /dev/null (Errno::EBUSY)
        from /usr/local/bundle/gems/rack-2.2.8/lib/rack/server.rb:446:in `check_pid!'
        from /usr/local/bundle/gems/rack-2.2.8/lib/rack/server.rb:307:in `start'
        from /usr/local/bundle/gems/railties-7.1.2/lib/rails/commands/server/server_command.rb:38:in `start'
        from /usr/local/bundle/gems/railties-7.1.2/lib/rails/commands/server/server_command.rb:145:in `block in perform'
        from <internal:kernel>:90:in `tap'
        from /usr/local/bundle/gems/railties-7.1.2/lib/rails/commands/server/server_command.rb:136:in `perform'
        from /usr/local/bundle/gems/thor-1.3.0/lib/thor/command.rb:28:in `run'
        from /usr/local/bundle/gems/thor-1.3.0/lib/thor/invocation.rb:127:in `invoke_command'
        from /usr/local/bundle/gems/railties-7.1.2/lib/rails/command/base.rb:178:in `invoke_command'
        from /usr/local/bundle/gems/thor-1.3.0/lib/thor.rb:527:in `dispatch'
        from /usr/local/bundle/gems/railties-7.1.2/lib/rails/command/base.rb:73:in `perform'
        from /usr/local/bundle/gems/railties-7.1.2/lib/rails/command.rb:71:in `block in invoke'
        from /usr/local/bundle/gems/railties-7.1.2/lib/rails/command.rb:149:in `with_argv'
        from /usr/local/bundle/gems/railties-7.1.2/lib/rails/command.rb:69:in `invoke'
        from /usr/local/bundle/gems/railties-7.1.2/lib/rails/commands.rb:18:in `<main>'
        from <internal:/usr/local/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
        from <internal:/usr/local/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
        from /usr/local/bundle/gems/bootsnap-1.17.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
        from /app/bin/rails:4:in `<main>'

Any ideas?

omohokcoj commented 4 months ago

@ac2323 what's your docker version?

ac2323 commented 4 months ago

@ac2323 what's your docker version?

Docker version 25.0.3, build 4debf41

ac2323 commented 4 months ago

Noticed this error as well: A server is already running. Check /app/tmp/pids/server.pid

I was able to resolve this by searching for that server.pid file and removing all copies of it. Docuseal was then able to launch correctly.

ac2323 commented 4 months ago

Reopening since the issue persists after a reboot. The server.pid file gets recreated and Docuseal will not start until those files are removed. Furthermore, updating the docker image yields the same error as my original post and there is no server.pid file to delete.

omohokcoj commented 4 months ago

@ac2323 which version of docuseal docker image are you using, also on what is your docker host OS?

ac2323 commented 4 months ago

@ac2323 which version of docuseal docker image are you using, also on what is your docker host OS?

Using the latest (1.4.5). OS is Ubuntu 22.04.4 LXC

omohokcoj commented 4 months ago

@ac2323 looks like /dev/null is not available on LXC - but it should work with docker

ac2323 commented 4 months ago

I have other containers working just fine.

I was able to restore to a previous backup running Docuseal 1.4.2 which requires deleting those 2 server.pid files.

omohokcoj commented 4 months ago

In the latest 1.4.5 we use /dev/null as server pid file - and looks like it's causing issues in LXC (/dev/null is not available on LXC). Afaik there are no easy ways to disable PID file - /dev/null was the only solution @ac2323

ac2323 commented 4 months ago

Confirmed that this is limited to 1.4.5 as I was able to launch 1.4.4 just fine

omohokcoj commented 4 months ago

@ac2323 to fix it on LXC and an 1.4.5 version use -e PIDFILE=/tmp/server.pid in order to write pid file into tmp folder instead of /dev/null

econcepcion commented 3 months ago

Can you point me in the right direction? How do I accomplish this?

use -e PIDFILE=/tmp/server.pid in order to write pid file into tmp folder instead of /dev/null

omohokcoj commented 3 months ago

@econcepcion yep, correct

econcepcion commented 3 months ago

I am lost. Do I add this to the compose file?

omohokcoj commented 3 months ago

@econcepcion yep: - PIDFILE=/tmp/server.pid image

econcepcion commented 3 months ago

I added this... - PIDFILE=/tmp/server.pid SCR-20240313-hvcm

I am sure I have not added it correctly, cause it is not working.

omohokcoj commented 3 months ago

@econcepcion did you try --force-recreate

econcepcion commented 3 months ago

Just tried --force-recreate but still getting this error.

ERROR: for app Container "59b55cdd4dd5" is unhealthy. ERROR: Encountered errors while bringing up the project.

omohokcoj commented 3 months ago

@econcepcion looks like now that's a new error that is not related to /dev/null

econcepcion commented 3 months ago

oh ok. Thanks for the help. You are a Legend.