This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Using NetBeans IDE 6.0, bundled JRuby and Mongrel 1.1.3 (Java). When I click the Run Main Project button, the IDE successfully starts up the Mongrel server, but does not show the application in a browser. For a short while, the IDE flashes in the lower left margin of the IDE "could not connect to the web server. Cannot show http://localhost:3000. I can then go to my browser, enter the url http://localhost:3000 and the application displays. Also every time I click Run Main Program, the IDE starts up another mongrel server. Martin said: This sounds like a bug. Probably there is kind of timeout which is to short for JVM with Mongrel to start up.
I too have this problem. I initially thought I had a problem with windows and did a totally new install. The problem still exists on a brand new install
Reproducible, I'll look into this. For the record, http://jira.codehaus.org/browse/JRUBY-1277 prevented me from reproducing this on Linux, but after upgrading to JRuby 1.0.3 I can see the described problem.
I am also able to reproduce it with WEBrick. First run doesn't show browser, second run opens browser.
Should be fixed in trunk now, please give it a try. Was caused by two things: for Mongrel 1.1.3 the detection of server startup failed and for WEBrick the timeout was too short (it is now 60 seconds instead of 20). http://ruby.netbeans.org/source/browse/ruby/railsprojects/src/org/netbeans/modules/ruby/railsprojects/server/ RailsServer.java?r1=1.19&r2=1.20 http://ruby.netbeans.org/source/browse/ruby/railsprojects/test/unit/src/org/netbeans/modules/ruby/railsprojects/server/ RailsServerTest.java?r1=1.1&r2=1.2 http://ruby.netbeans.org/source/browse/ruby/railsprojects/src/org/netbeans/modules/ruby/railsprojects/server/ RailsServer.java?r1=1.18&r2=1.19 http://ruby.netbeans.org/source/browse/ruby/railsprojects/test/unit/src/org/netbeans/modules/ruby/railsprojects/server/ RailsServerTest.java?rev=1.1&content-type=text/vnd.viewcvs-markup http://ruby.netbeans.org/source/browse/ruby/railsprojects/src/org/netbeans/modules/ruby/railsprojects/server/ RailsServer.java?r1=1.17&r2=1.18
Tried the nightly build and its still doesn't work I have installed ruby/rails/gems/mongrel/mongrel cluster and added it as an addtional platform and set my project to use it however the problem still exists let me know if you need any more info Ade.
cheops2006 : can you see any message in the lower left margin (e.g. "could not connect to ...")? Also, it would help if you could paste the server startup message here. It is also possible that the changes I committed are not yet in the last nightly build, so could you please try with the next nightly build or with a continuos build?
*** Issue 124381 has been marked as a duplicate of this issue. ***
I worked for me both with WEBrick and Mongrel. First I tested WEBrick and then I used 'Tools|Ruby Gems' to install mongrel. Product Version: NetBeans IDE Dev (Build 20080118054535) Java: 1.6.0_04; Java HotSpot(TM) Client VM 10.0-b19 System: Windows XP version 5.1 running on x86; Cp1250; cs_CZ (nb)
OK, I'm marking this as fixed again - cheops2006, please try again with the latest nightly build and reopen (preferably with the server startup log) if you still see the issue. I suspect that the fix was not yet included in the build you tried. Thanks!
Created attachment 55236 [details] Capture of latest build(note the build no.)
Thanks for the attachment, clearly you are still experiencing the issue. Could you still attach the list of mongrel related gems that you have installed? It looks like you might run into this issue the version no. for the 'mongrel' gem could not be retrieved.
Erno, often we are using in Ruby logging: http://wiki.netbeans.org/wiki/view/FaqRubyNBLogging So you might add the logging, e.g. the list of the gems and their version you need when the problem occurred (and possibly update the FaqRubyNBLogging to include the package/module you need). After you commit, user will get new version and give you detailed output log. I'm doing this quite often and quite often it helps. But not sure how much appropriate here, I do not watch closely.
Hi, Here are a list of all my installed gems. Let me know if you need anything else. actionmailer (2.0.2) actionpack (2.0.2) activerecord (2.0.2) activeresource (2.0.2) activesupport (2.0.2) capistrano (2.1.0) cgi_multipart_eof_fix (2.5.0) fastthread (1.0.1) fxri (0.3.6) fxruby (1.6.13, 1.6.12) gem_plugin (0.2.3) highline (1.4.0) hpricot (0.6) log4r (1.0.5) mongrel (1.1.3) mongrel_cluster (1.0.5) mysql (2.7.3) needle (1.3.0) net-sftp (1.1.0) net-ssh (1.1.2) rails (2.0.2) rake (0.8.1, 0.7.3) ruby-debug-base (0.9.3) ruby-debug-ide (0.1.9) sources (0.0.1) win32-api (1.0.5, 1.0.0) win32-clipboard (0.4.3) win32-dir (0.3.2) win32-eventlog (0.4.7, 0.4.6) win32-file (0.5.2) win32-file-stat (1.2.7, 1.2.5) win32-process (0.5.5, 0.5.3) win32-sapi (0.1.4) win32-sound (0.4.1) windows-api (0.2.0) windows-pr (0.7.4, 0.7.1) Ade.
Unfortunately I still cannot reproduce the problem. I added some logging to track down the issue, it should make it to tomorrow's nightly build (for today's build it is probably too late), so it would be great if you could try it with the following startup parameters (for enabling logging): -J-Dorg.netbeans.modules.ruby.level=300 -J-Dorg.netbeans.api.ruby.platform.level=300 and post the log here then. Please see http://wiki.netbeans.org/wiki/view/FaqRubyNBLogging for more details on how to turn on logging or feel free to ask if it is unclear. Of course, even better would be if you could test it with a continuous build from http://deadlock.netbeans.org/hudson/job/trunk so that there would be more time to fix this for 6.1M1 (Sunday is the last day for that). The extra logging will be available in a few hours in the upcoming build #5303, possibly in #5302 already.
Marking as incomplete for now, please attach the log file when you have a chance to try this again.
Created attachment 55310 [details] Log File From Debug Info Enabled
Hi, I have attached the log file from the debug info enabled. The thing that strikes me is the fact that it cannot run autotest.bat. Please let me know your thoughts.
Thanks for following up on this. It looks like the culprit is that for some reason GemManager can't see that Mongrel is indeed installed, but I will still need to add more logging there to find out what exactly goes wrong. Do you see the same problem with all your rails projects and platforms (i.e. ruby and jruby), including newly created projects?
Yes it does it on existing projects and newly created ones so is quite easily repeatable. Ade.
Hi there. Could you repeat the procedure you did before and attach the log again. Erno put there some more logging which should help to debug the problem.
> The thing that strikes me is the fact that it cannot run autotest.bat. What does this exactly mean? Do you thinks so from the log, or it is a real problem. Please in the second case, file a bug. If the first case, do not believe that logging, it is a little confusing. I'm going to enhance it a little bit.
> Hi there. Could you repeat the procedure you did before and attach the log again. Erno put there some more logging which > should help to debug the problem. But not just yet;) The logging I added will not be in today's nightly build. But if you don't mind trying a continuous build (no installer, just a zip), here's a link to the build that contains the added logging: http://deadlock.netbeans.org/hudson/job/trunk/5337/artifact/nbbuild/dist/zip/
Yup, I meant build from Hudson. I would encourage everybody to use builds from Hudson: http://deadlock.netbeans.org/hudson/job/ruby/ I actually do not know any reason for preferring nightly builds. They are often quite old ;)
Created attachment 55348 [details] A new attached log file from the hudson link of netbeans
Thanks for the great feedback. Now it's clear. There is a bug in the version parsing. It might be theoretically encountered on non-windows as well and is not actually a mongrel specific. This is the problem which I would like to solve with providing either a special wrapper script written in Ruby which we would call from the NetBeans (similar to platform/release/platfrom_info.rb for platform's information gathering). The script would use RubyGems's API and have output produced and consumed by us. Current situation when we parse the output of gem tool is not usable for longer time. If gem tool is e.g. localized our GemManager's "parser" would fails. This case is another one. Might be that bringing support of Gem Path would be the next problem. Might be we can still stay with some simple solution (some clever regexp - however not sure if it there is a good solution) or it is time to switch to the wrapper. Or another solution is to call gem tool in some special way, but would need probably more calls which would be slow. Actually I forgot why we do not use e.g. "gem list --local --versions" for parsing gems and their versions, and looking into the guts for the Repository instead.
I can confirm that the same problem exists on linux(ubuntu) as I tried it out today. Thanks Ade.
I'm working on this, but after discussion with the QE we agreed that the fix won't be integrated to the M1 branch.
Hopefully fixed now, please give it a try (with a build >= 6274): http://deadlock.netbeans.org/hudson/job/ruby/
Works for me now. Build 6247 on Windows XP warped to my Firefox browser.
Created attachment 55399 [details] Tried the new version but it still doesn't work attached a log again. Ade
Strange, it looks like Mongrel is now recognized correctly on your machine as well. Does the same error message still flash in the lower left corner? Also, just to be sure that we are not doing anything differently, could you please post the exact steps how you can reproduce the problem (from the scratch, i.e. with a new project)? Thanks a lot.
Hi All I did was create a new rails project and ran the application, yes cannot connect to the web server etc...in the corner as usual. ade
I added still more logging, changed slightly the regex used for detecting Mongrel startup and increased the server startup timeout. So again, please try with a continuous build 6286 or higher and attach the log file here. http://ruby.netbeans.org/source/browse/ruby/railsprojects/src/org/netbeans/modules/ruby/railsprojects/server/ RailsServer.java?r1=1.21&r2=1.22 http://ruby.netbeans.org/source/browse/ruby/railsprojects/src/org/netbeans/modules/ruby/railsprojects/server/ RailsServer.java?r1=1.22&r2=1.23
Created attachment 55485 [details] Brand new log file - failing to start mongrel in 121 seconds
Thanks for the log file. Now this is hopefully fixed, finally. Turns out that on your setup the output lines contained end of line characters and the regex for detecting server startup failed due to them. Strange is that this worked for jskrivanek with a similar setup (the same JDK + WinXp). In any case, the fix should be integrated in build 6305 (should be availabe in an hour or so), please verify when you have a chance. Checking in test/unit/src/org/netbeans/modules/ruby/railsprojects/server/RailsServerTest.java; /cvs/ruby/railsprojects/test/unit/src/org/netbeans/modules/ruby/railsprojects/server/RailsServerTest.java,v <-- RailsServerTest.java new revision: 1.3; previous revision: 1.2 done Checking in src/org/netbeans/modules/ruby/railsprojects/server/RailsServer.java; /cvs/ruby/railsprojects/src/org/netbeans/modules/ruby/railsprojects/server/RailsServer.java,v <-- RailsServer.java new revision: 1.24; previous revision: 1.23 done
Mongrel Fixed but Webrick now Broken.
Could you please attach the log file once again?
Created attachment 55529 [details] Broken Webrick Log File, Thanyou for fixing Mongrel Much Appreciated. Ade
How did you force Webrick to be started by script/server? Currently we expect that the script will start Mongrel if it is installed and if no extra params are passed, so this fails for Webrick now in your case since you have Mongrel installed but script/server starts Webrick. Note that we are currenly working on making the target server selectable via the UI, so this will be available in 6.1.
I used this ARGV[0]="webrick" in scripts/server file Ade
Just want to add a note that info about the Mongrel server is at http://wiki.netbeans.org/FaqRailsMongrel (including the part about ARGV[0]="webrick"
I see, that's definitely a valid use case. Need to make some changes to the current logic to handle this case, I will address it together with the other upcoming changes in the server integration area. In any case, I'm dowgrading this to P2 as there is a workaround.
BTW, better to leave the original problem/issue as closed (since it really was "Wrong parsing of version from multidashed gem .spec's filenames") and file a new one then to mutate the issue into another, actually unrelated, one. So we can point users which encounter this in older versions of NetBeans (with e.g. non-rails gems) that it is fixed, with clear subject.
True, it occurred to me after I changed the summary. But actually there were more than one original problems; there was a problem with detecting the server startup when the startup msg included a version number (and too short timeout for webrick) which caused problems on all platforms. So one could argue that in fact already the first change of the summary confused things and that a separate issue would be needed for the multidashed gem name problem as well. Not to say that the second change made things any less confusing:) So let me file issues for them both..
Yup, right. Ehm, who did the first change... ups, me :) Thanks for handling it.
OK, so I filed #125992 and #125996 for the original problems. Could've closed this one and filed new one for the issue in the summary, but I've grown so attached to this one that I didn't have the heart to close it just yet.
Fixed, changeset 246655140938.