Socket::gethostname throws a SocketError
----------------------------------------
Key: JRUBY-951
URL: http://jira.codehaus.org/browse/JRUBY-951
Project: JRuby
Issue Type: Bug
Components: Core Classes/Modules
Affects Versions: JRuby 1.0.0RC1, JRuby 1.x
Environment: Ubuntu Feisty Fawn, java 1.5 and java 6
Reporter: Matt Williams
Webrick won't start because Socket::gethostname fails (line 37 of config.rb)
Here's a script of testing Matz' Ruby, then both 1.0RC1 and Jruby trunk with
Java 1.5 and 1.6 (with irb) to show that Socket::gethostname is failing:
Script started on Fri 18 May 2007 01:59:59 PM EDT
[EMAIL PROTECTED]:~/tools/jruby$ hostname
hunin
[EMAIL PROTECTED]:~/tools/jruby$ irb
>> Socket::gethostname
=> "hunin"
[EMAIL PROTECTED]:~/tools/jruby$
[EMAIL PROTECTED]:~/tools/jruby$ svn up
At revision 3679.
[EMAIL PROTECTED]:~/tools/jruby$ java -version
java version "1.6.0"
Java(TM) SE Runtime Environment (build 1.6.0-b105)
Java HotSpot(TM) Server VM (build 1.6.0-b105, mixed mode)
[EMAIL PROTECTED]:~/tools/jruby$ jirb
irb(main):001:0> Socket::gethostname
SocketError: No message available
from /home/matt/tools/jruby/lib/ruby/1.8/irb/workspace.rb:0:in `binding'
Maybe IRB bug!!
irb(main):002:0> quit
[EMAIL PROTECTED]:~/tools/jruby$ sudo rm /etc/alternatives/java
[EMAIL PROTECTED]:~/tools/jruby$ sudo ln -s /etc/alternatives/java.1.5
/etc/alternativ es/java
[EMAIL PROTECTED]:~/tools/jruby$ java -version
java version "1.5.0_11"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_11-b03)
Java HotSpot(TM) Server VM (build 1.5.0_11-b03, mixed mode)
[EMAIL PROTECTED]:~/tools/jruby$ jirb
irb(main):001:0> Socket::gethostname
SocketError: No message available
from /home/matt/tools/jruby/lib/ruby/1.8/irb/workspace.rb:0:in `binding'
Maybe IRB bug!!
irb(main):002:0> quit
[EMAIL PROTECTED]:~/tools/jruby$ JRUBY_HOME=/usr2/common/jruby
[EMAIL PROTECTED]:~/tools/jruby$ PATH=$JRUBY_HOME/bin:$PATH
[EMAIL PROTECTED]:~/tools/jruby$ which jruby
/usr2/common/jruby/bin/jruby
[EMAIL PROTECTED]:~/tools/jruby$ jruby -version
ruby 1.8.5 (2007-05-06 rev 3631) [i386-jruby1.0.0RC1]
[EMAIL PROTECTED]:~/tools/jruby$ jirb
irb(main):001:0> Socket::gethostname
SocketError: No message available
from /usr2/common/jruby/lib/ruby/1.8/irb/workspace.rb:0:in `binding'
Maybe IRB bug!!
irb(main):002:0> quit
[EMAIL PROTECTED]:~/tools/jruby$ exit
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email