After upgrade to 2.2.0 versione webui don't work
Describe the bug
After upgrade to 2.2.0 versione webui don't work and the browser sho HTTP ERROR 502
A clear and concise description of what the bug is.
To Reproduce
postal upgrade
Expected behaviour
A clear and concise description of what you expected to happen.
Screenshots
web-1 | Puma starting in single mode...
web-1 | * Puma version: 6.4.2 (ruby 3.2.1-p31) ("The Eagle of Durango")
web-1 | * Min threads: 5
web-1 | * Max threads: 5
web-1 | * Environment: production
web-1 | * PID: 8
web-1 | ! Unable to load application: NameError: uninitialized constant Postal::Config
web-1 | bundler: failed to load command: puma (/usr/local/bundle/bin/puma)
web-1 | /usr/local/bundle/gems/zeitwerk-2.6.7/lib/zeitwerk/loader/helpers.rb:135:in `const_get': uninitialized constant Postal::Config (NameError)
web-1 |
web-1 | parent.const_get(cname, false)
web-1 | ^^^^^^^^^^
web-1 | Did you mean? RbConfig
web-1 | from /usr/local/bundle/gems/zeitwerk-2.6.7/lib/zeitwerk/loader/helpers.rb:135:in `cget'
web-1 | from /usr/local/bundle/gems/zeitwerk-2.6.7/lib/zeitwerk/loader/eager_load.rb:169:in `block in actual_eager_load_dir'
web-1 | from /usr/local/bundle/gems/zeitwerk-2.6.7/lib/zeitwerk/loader/helpers.rb:40:in `block in ls'
web-1 | from /usr/local/bundle/gems/zeitwerk-2.6.7/lib/zeitwerk/loader/helpers.rb:25:in `each'
web-1 | from /usr/local/bundle/gems/zeitwerk-2.6.7/lib/zeitwerk/loader/helpers.rb:25:in `ls'
web-1 | from /usr/local/bundle/gems/zeitwerk-2.6.7/lib/zeitwerk/loader/eager_load.rb:164:in `actual_eager_load_dir'
web-1 | from /usr/local/bundle/gems/zeitwerk-2.6.7/lib/zeitwerk/loader/eager_load.rb:17:in `block (2 levels) in eager_load'
web-1 | from /usr/local/bundle/gems/zeitwerk-2.6.7/lib/zeitwerk/loader/eager_load.rb:16:in `each'
web-1 | from /usr/local/bundle/gems/zeitwerk-2.6.7/lib/zeitwerk/loader/eager_load.rb:16:in `block in eager_load'
web-1 | from /usr/local/bundle/gems/zeitwerk-2.6.7/lib/zeitwerk/loader/eager_load.rb:10:in `synchronize'
web-1 | from /usr/local/bundle/gems/zeitwerk-2.6.7/lib/zeitwerk/loader/eager_load.rb:10:in `eager_load'
web-1 | from /usr/local/bundle/gems/zeitwerk-2.6.7/lib/zeitwerk/loader.rb:297:in `block in eager_load_all'
web-1 | from /usr/local/bundle/gems/zeitwerk-2.6.7/lib/zeitwerk/loader.rb:295:in `each'
web-1 | from /usr/local/bundle/gems/zeitwerk-2.6.7/lib/zeitwerk/loader.rb:295:in `eager_load_all'
web-1 | from /usr/local/bundle/gems/railties-6.1.7.6/lib/rails/application/finisher.rb:133:in `block in <module:Finisher>'
web-1 | from /usr/local/bundle/gems/railties-6.1.7.6/lib/rails/initializable.rb:32:in `instance_exec'
web-1 | from /usr/local/bundle/gems/railties-6.1.7.6/lib/rails/initializable.rb:32:in `run'
web-1 | from /usr/local/bundle/gems/railties-6.1.7.6/lib/rails/initializable.rb:61:in `block in run_initializers'
web-1 | from /usr/local/lib/ruby/3.2.0/tsort.rb:228:in `block in tsort_each'
web-1 | from /usr/local/lib/ruby/3.2.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
web-1 | from /usr/local/lib/ruby/3.2.0/tsort.rb:431:in `each_strongly_connected_component_from'
web-1 | from /usr/local/lib/ruby/3.2.0/tsort.rb:349:in `block in each_strongly_connected_component'
web-1 | from /usr/local/lib/ruby/3.2.0/tsort.rb:347:in `each'
web-1 | from /usr/local/lib/ruby/3.2.0/tsort.rb:347:in `call'
web-1 | from /usr/local/lib/ruby/3.2.0/tsort.rb:347:in `each_strongly_connected_component'
web-1 | from /usr/local/lib/ruby/3.2.0/tsort.rb:226:in `tsort_each'
web-1 | from /usr/local/lib/ruby/3.2.0/tsort.rb:205:in `tsort_each'
web-1 | from /usr/local/bundle/gems/railties-6.1.7.6/lib/rails/initializable.rb:60:in `run_initializers'
web-1 | from /usr/local/bundle/gems/railties-6.1.7.6/lib/rails/application.rb:391:in `initialize!'
web-1 | from /opt/postal/app/config/environment.rb:5:in `<top (required)>'
web-1 | from config.ru:3:in `require_relative'
web-1 | from config.ru:3:in `block in <main>'
web-1 | from /usr/local/bundle/gems/rack-2.2.6.4/lib/rack/builder.rb:116:in `eval'
web-1 | from /usr/local/bundle/gems/rack-2.2.6.4/lib/rack/builder.rb:116:in `new_from_string'
web-1 | from /usr/local/bundle/gems/rack-2.2.6.4/lib/rack/builder.rb:105:in `load_file'
web-1 | from /usr/local/bundle/gems/rack-2.2.6.4/lib/rack/builder.rb:66:in `parse_file'
web-1 | from /usr/local/bundle/gems/puma-6.4.2/lib/puma/configuration.rb:368:in `load_rackup'
web-1 | from /usr/local/bundle/gems/puma-6.4.2/lib/puma/configuration.rb:290:in `app'
web-1 | from /usr/local/bundle/gems/puma-6.4.2/lib/puma/runner.rb:162:in `load_and_bind'
web-1 | from /usr/local/bundle/gems/puma-6.4.2/lib/puma/single.rb:44:in `run'
web-1 | from /usr/local/bundle/gems/puma-6.4.2/lib/puma/launcher.rb:194:in `run'
web-1 | from /usr/local/bundle/gems/puma-6.4.2/lib/puma/cli.rb:75:in `run'
web-1 | from /usr/local/bundle/gems/puma-6.4.2/bin/puma:10:in `<top (required)>'
web-1 | from /usr/local/bundle/bin/puma:25:in `load'
web-1 | from /usr/local/bundle/bin/puma:25:in `<top (required)>'
web-1 | from /usr/local/bundle/gems/bundler-2.4.9/lib/bundler/cli/exec.rb:58:in `load'
web-1 | from /usr/local/bundle/gems/bundler-2.4.9/lib/bundler/cli/exec.rb:58:in `kernel_load'
web-1 | from /usr/local/bundle/gems/bundler-2.4.9/lib/bundler/cli/exec.rb:23:in `run'
web-1 | from /usr/local/bundle/gems/bundler-2.4.9/lib/bundler/cli.rb:492:in `exec'
web-1 | from /usr/local/bundle/gems/bundler-2.4.9/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
web-1 | from /usr/local/bundle/gems/bundler-2.4.9/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
web-1 | from /usr/local/bundle/gems/bundler-2.4.9/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
web-1 | from /usr/local/bundle/gems/bundler-2.4.9/lib/bundler/cli.rb:34:in `dispatch'
web-1 | from /usr/local/bundle/gems/bundler-2.4.9/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
web-1 | from /usr/local/bundle/gems/bundler-2.4.9/lib/bundler/cli.rb:28:in `start'
web-1 | from /usr/local/bundle/gems/bundler-2.4.9/exe/bundle:45:in `block in <top (required)>'
web-1 | from /usr/local/bundle/gems/bundler-2.4.9/lib/bundler/friendly_errors.rb:117:in `with_friendly_errors'
If applicable, add screenshots to help explain your problem.
Environment details
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
- Type [e.g. desktop, mobile etc...]
Additional information/context
Add any other context about the problem here. It is particularily useful to include log extracts (after removing private information).
Samer issue. Seems to impact the web and worker services
How to for rollback ?
Same issue. Can maintainers please merge the pull so we can get our services back. Thanks
How to for rollback ?
Terminal:
postal stop
postal set-version 2.1.6
postal upgrade
Hi, Same problem on my side, my past installations work well (old version), but it is not possible to do a new installation. Do you have a solution for the new installations or an idea of ​​when it will be fixed?
Hi,
Same problem on my side, my past installations work well (old version), but it is not possible to do a new installation.
Do you have a solution for the new installations or an idea of ​​when it will be fixed?
You can set Postal to a specific version by using the command postal set-version 2.1.2 (Or whatever version you want)
I use these lines in my .sh file :
git clone https://postalserver.io/start/install /opt/postal/install
sudo ln -s /opt/postal/install/bin/postal /usr/bin/postal
What command should I replace it with?
I use these lines in my .sh file :
git clone https://postalserver.io/start/install /opt/postal/install sudo ln -s /opt/postal/install/bin/postal /usr/bin/postalWhat command should I replace it with?
That's just for the help script so you can call postal from the terminal
After you've done that you should just need run postal set-version 2.1.6
I added sudo postal set-version 2.1.6 just before sudo postal initialize in my script and it works.
Thank you for your help ;)
In my situation, the upgrade fails even with sudo privileges because it automatically checks for the latest version of postal and updates accordingly. The following steps worked for me:
sudo vim /bin/postal
Navigate to line number 127 within the upgrade) case.
#set-postal-version $latest_version
set-postal-version "2.1.6"
Save your changes and exit the editor.
Now, execute sudo postal upgrade. It should proceed without errors. Once the upgrade is completed successfully, remember to revert the changes.
How to for rollback ?
Terminal:
postal stop postal set-version 2.1.6 postal upgrade
Does not really works:
root@post:/opt/postal/config# postal set-version 2.1.6
root@post:/opt/postal/config# postal upgrade
warning: redirecting to https://github.com/postalserver/install/
From https://postalserver.io/start/install
* branch main -> FETCH_HEAD
Already up to date.
No version specified, using latest available version...
Upgrading to 2.2.0
[+] Running 5/5
â ¿ requeuer Skipped - Image is already being pulled by cron 0.0s
â ¿ web Skipped - Image is already being pulled by cron 0.0s
â ¿ smtp Skipped - Image is already being pulled by cron 0.0s
â ¿ worker Skipped - Image is already being pulled by cron 0.0s
â ¿ cron Pulled 0.7s
Migrating database
-------------------------------------------------------------------
1: UHL Agency (uhl-sites)
-------------------------------------------------------------------
Nothing to do.
[+] Running 5/5
â ¿ Container postal-smtp-1 Started 2.3s
â ¿ Container postal-cron-1 Started 2.2s
â ¿ Container postal-worker-1 Started 1.7s
â ¿ Container postal-web-1 Started 2.7s
â ¿ Container postal-requeuer-1 Started
The last command must be postal start
Not postal upgrade
Il sab 3 feb 2024, 19:18 Viorel-Cosmin Miron @.***> ha scritto:
How to for rollback ?
Terminal:
postal stop postal set-version 2.1.6 postal upgrade
Does not really works:
@.:/opt/postal/config# postal set-version 2.1.6 @.:/opt/postal/config# postal upgrade warning: redirecting to https://github.com/postalserver/install/ From https://postalserver.io/start/install
- branch main -> FETCH_HEAD Already up to date. No version specified, using latest available version... Upgrading to 2.2.0 [+] Running 5/5 â ¿ requeuer Skipped - Image is already being pulled by cron 0.0s â ¿ web Skipped - Image is already being pulled by cron 0.0s â ¿ smtp Skipped - Image is already being pulled by cron 0.0s â ¿ worker Skipped - Image is already being pulled by cron 0.0s â ¿ cron Pulled 0.7s Migrating database
1: UHL Agency (uhl-sites)
Nothing to do. [+] Running 5/5 â ¿ Container postal-smtp-1 Started 2.3s â ¿ Container postal-cron-1 Started 2.2s â ¿ Container postal-worker-1 Started 1.7s â ¿ Container postal-web-1 Started 2.7s â ¿ Container postal-requeuer-1 Started
— Reply to this email directly, view it on GitHub https://github.com/postalserver/postal/issues/2774#issuecomment-1925420305, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACBYF6AIDLPWPC5VMQ5IXRLYRZ5OBAVCNFSM6AAAAABCVPI6RWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMRVGQZDAMZQGU . You are receiving this because you authored the thread.Message ID: @.***>
The last command must be postal start Not postal upgrade Il sab 3 feb 2024, 19:18 Viorel-Cosmin Miron @.> ha scritto: … How to for rollback ? Terminal: postal stop postal set-version 2.1.6 postal upgrade Does not really works: @.:/opt/postal/config# postal set-version 2.1.6 @.:/opt/postal/config# postal upgrade warning: redirecting to https://github.com/postalserver/install/ From https://postalserver.io/start/install * branch main -> FETCH_HEAD Already up to date. No version specified, using latest available version... Upgrading to 2.2.0 [+] Running 5/5 ⠿ requeuer Skipped - Image is already being pulled by cron 0.0s ⠿ web Skipped - Image is already being pulled by cron 0.0s ⠿ smtp Skipped - Image is already being pulled by cron 0.0s ⠿ worker Skipped - Image is already being pulled by cron 0.0s ⠿ cron Pulled 0.7s Migrating database ------------------------------------------------------------------- 1: UHL Agency (uhl-sites) ------------------------------------------------------------------- Nothing to do. [+] Running 5/5 ⠿ Container postal-smtp-1 Started 2.3s ⠿ Container postal-cron-1 Started 2.2s ⠿ Container postal-worker-1 Started 1.7s ⠿ Container postal-web-1 Started 2.7s ⠿ Container postal-requeuer-1 Started — Reply to this email directly, view it on GitHub <#2774 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACBYF6AIDLPWPC5VMQ5IXRLYRZ5OBAVCNFSM6AAAAABCVPI6RWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMRVGQZDAMZQGU . You are receiving this because you authored the thread.Message ID: @.>
Maybe best is for those who gave the solution to edit their answers. I still managed to get it working. I restored a backup... When all fails, wont have time to debug something that was working fine. Clearly this last upgrade messed up for more people, and a patch will be ideal.
@adamcooke maybe can help us as to give us more insights why this fails.
This is a confirmed bug in 2.2.0. I will work on a fix now.
This is resolved in 2.2.1 now.
Great, I have successfully upgraded. I did receive an error initially after running
postal upgrade
error: Your local changes to the following files would be overwritten by merge: templates/docker-compose.yml Please commit your changes or stash them before you merge. Aborting
So I ran the following command -
git stash save ""
Don't know if thats what I should have ran, but it worked and afterwards the upgrade succeeded and postal is up to date and online reporting version 2.2.1.