Connection refused error after updating to 1.6.X in a Rails project running inside docker
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 38/100
Piste de recherche
Reproduce the failure with the Ruby 3.1.2-slim Docker image and the listed rdbg command, then inspect debug-1.6.0/lib/debug/client.rb at connect_unix and compare its socket naming with debug 1.5.0. Done means rdbg -A attaches to the running Rails/Puma process after updating to a 1.6 release.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Your environment
ruby -v:ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [aarch64-linux]rdbg -v: working:rdbg 1.5.0, non-workingrdbg 1.6.X
Describe the bug
I'm using the official Ruby 3.1.2-slim docker image. After updating the debug gem from 1.5.0 to 1.6.X, I cannot attach to the running process any more.
I'm running a Rails project with the latest Rails version (7.0.4) and the Puma web server. This is the command I'm running:
rdbg --open --nonstop -c -- rails s -b '0.0.0.0'
Using debug 1.5.0, all is well:
❯ dc exec web rdbg -A
# No sourcefile available for /usr/local/bundle/gems/puma-5.6.5/lib/puma/single.rb
=>#0 [C] Thread#join at /usr/local/bundle/gems/puma-5.6.5/lib/puma/single.rb:61
#1 Puma::Single#run at /usr/local/bundle/gems/puma-5.6.5/lib/puma/single.rb:61
# and 15 frames (use `bt' command for all frames)
Stop by SIGURG
(rdbg:remote) c # continue command
Socket name (automatically chosen by the debug gem): /tmp/ruby-debug-sock-0/ruby-debug-ruby-debug-1
Using debug 1.6.X, the connection does not work any more:
/usr/local/lib/ruby/3.1.0/socket.rb:64:in `connect': Connection refused - connect(2) for /tmp/ruby-debug-sock-0/ruby-debug-UnknownUser-1 (Errno::ECONNREFUSED)
from /usr/local/lib/ruby/3.1.0/socket.rb:64:in `connect_internal'
from /usr/local/lib/ruby/3.1.0/socket.rb:137:in `connect'
from /usr/local/lib/ruby/3.1.0/socket.rb:1078:in `unix'
from /usr/local/bundle/gems/debug-1.6.0/lib/debug/client.rb:158:in `connect_unix'
from /usr/local/bundle/gems/debug-1.6.0/lib/debug/client.rb:108:in `initialize'
from /usr/local/bundle/gems/debug-1.6.0/exe/rdbg:31:in `new'
from /usr/local/bundle/gems/debug-1.6.0/exe/rdbg:31:in `<top (required)>'
from /app/bin/rdbg:29:in `load'
from /app/bin/rdbg:29:in `<main>'
Socket name (automatically chosen by the debug gem): /tmp/ruby-debug-sock-0/ruby-debug-UnknownUser-1
Notice the change in the socket name, maybe this has something to do with this issue? The socket does exist, though, and permissions seem correct.
To Reproduce
Update debug to 1.6.X. I've tried all released 1.6 versions, none of them is working. Going back to 1.5 resolves the issue for me.
Expected behavior
rdbg -A connects to the running process.
- Langage dominant
- Ruby
- Étoiles
- 1.3k
- Forks
- 146
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de ruby/debug
-
Difficulté 3/5 1-2 jours Accessibilité débutants 68/100
-
Support exceptionOptions in setExceptionBreakpoints to catch arbitrary exception classes via DAP Ouverte
Difficulté 4/5 3-5 jours Accessibilité débutants 55/100
-
Difficulté 3/5 1-2 jours Accessibilité débutants 45/100
-
Difficulté 4/5 3-5 jours Accessibilité débutants 52/100
-
Difficulté 4/5 3-5 jours Accessibilité débutants 35/100
Toutes les issues de ruby/debug
Issues similaires
-
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
palladius/rails8-app-on-gcp#145 ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
-
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
rubocop/rubocop-rspec#2236 ·
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100
riscv/riscv-unified-db#2624 · 1 réaction ·
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 88/100