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

2.0.0 Fails to kill servers if no aux.pid #916

Open
MaxLap opened this issue Sep 10, 2024 · 1 comment
Open

2.0.0 Fails to kill servers if no aux.pid #916

MaxLap opened this issue Sep 10, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@MaxLap
Copy link

MaxLap commented Sep 10, 2024

So I'm trying to upgrade from 1.3.4 to 2.0.0.beta2 (and then to the latest commit on github) do see if I encounter issues.

I have an error during boot (uninitialized constant Bridgetown::Rack::Roda, but I haven't investigated that yet), but that error triggers #kill_processes. However, because this is my first start in 2.0.0, and the error isvery early, there are no tmp/aux.pid file created yet. This causes the following exception:

[Bridgetown]   Exception raised: Errno::ENOENT
[Bridgetown] No such file or directory @ rb_sysopen - /home/max/projects/documold/docs/bridgetown/tmp/pids/aux.pid
[Bridgetown]                  1: /home/max/.rvm/gems/ruby-3.3.5/bundler/gems/bridgetown-3ec30e28aac3/bridgetown-foundation/lib/bridgetown/foundation/packages/pid_tracker.rb:15:in `readlines'
[Bridgetown]                  2: /home/max/.rvm/gems/ruby-3.3.5/bundler/gems/bridgetown-3ec30e28aac3/bridgetown-foundation/lib/bridgetown/foundation/packages/pid_tracker.rb:15:in `read_pidfile'
[Bridgetown]                  3: /home/max/.rvm/gems/ruby-3.3.5/bundler/gems/bridgetown-3ec30e28aac3/bridgetown-core/lib/bridgetown-core/utils/aux.rb:51:in `kill_processes'
[Bridgetown]                  4: /home/max/.rvm/gems/ruby-3.3.5/bundler/gems/bridgetown-3ec30e28aac3/bridgetown-core/lib/bridgetown-core/commands/start.rb:104:in `block (2 levels) in start'
[Bridgetown]                  5: /home/max/.rvm/gems/ruby-3.3.5/bundler/gems/bridgetown-3ec30e28aac3/bridgetown-core/lib/bridgetown-core/commands/start.rb:11:in `ensure in start'

I solved that error by manually creating the file tmp/pids/aux.pid, which lets me see the actual error causing trouble (uninitialized constant Bridgetown::Rack::Roda, which I will investigate and create a distinct issue for if needed). In any case, this error hides an actual problem, so I would suggest having a rescue or a exist check somewhere to return an empty Array.

@MaxLap MaxLap added the bug Something isn't working label Sep 10, 2024
@KonnorRogers
Copy link
Member

I hit this error as well and fixing the uninitialized constant should fix this error.

#910

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants