You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
JAVA_OPTS="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005" bundle exec rails c
That is, launching Rails through bundler with Java debugging agent, JVM dies to the following error:
Listening for transport dt_socket at address: 5005
ERROR: transport error 202: bind failed: Address already in use
ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510)
JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized [../../../src/share/back/debugInit.c:750]
FATAL ERROR in native method: JDWP No transports initialized, jvmtiError=AGENT_ERROR_TRANSPORT_INIT(197)
This seems to be because bundler ultimately loads Rails::ScriptRailsLoader which starts Rails by running exec RUBY, SCRIPT_RAILS, *ARGV if in_rails_application? which then spawns another JVM and probably the port has not been properly released when the second JVM tries to open it.
I can side-step the problem by JRUBY_OPTS="-J-Djruby.launch.inproc=true -J-Djruby.native.exec=false", but this is slightly unsatisfactory.
The text was updated successfully, but these errors were encountered:
Your workaround is not terrible but the in process mode breaks some aspects
of e.g. console.
There must be a way to get Rails to launch directly, but I wouldn't know
it. I may ponder other solutions, but @kares is right about it being a hard
problem.
When starting Rails (3.2.18 on OS X) with
That is, launching Rails through bundler with Java debugging agent, JVM dies to the following error:
This seems to be because bundler ultimately loads
Rails::ScriptRailsLoader
which starts Rails by runningexec RUBY, SCRIPT_RAILS, *ARGV if in_rails_application?
which then spawns another JVM and probably the port has not been properly released when the second JVM tries to open it.I can side-step the problem by
JRUBY_OPTS="-J-Djruby.launch.inproc=true -J-Djruby.native.exec=false"
, but this is slightly unsatisfactory.The text was updated successfully, but these errors were encountered: