I am making a simple remote control to vlc and running into troubles on
ubuntu. This all works in windows however but not in ubuntu. I have no
idea what could be different. When I use net/telnet I get a connection
refused but if I use telnet everything works fine.
with ruby:
irb(main):004:0> telet = Net::Telnet.new(“Host” => “localhost”, “Port”
=> 4444, “Prompt” => //)
Errno::ECONNREFUSED: Connection refused - connect(2)
from /usr/lib/ruby/1.8/net/telnet.rb:352:in initialize' from /usr/lib/ruby/1.8/net/telnet.rb:352:inopen’
from /usr/lib/ruby/1.8/net/telnet.rb:352:in initialize' from /usr/lib/ruby/1.8/timeout.rb:67:intimeout’
from /usr/lib/ruby/1.8/timeout.rb:101:in timeout' from /usr/lib/ruby/1.8/net/telnet.rb:351:ininitialize’
from (irb):4:in `new’
from (irb):4
from :0
with commandline:
telnet localhost 4444
Trying ::1…
Connected to localhost.
Escape character is ‘^]’.
VLC media player 1.1.9 The Luggage
Remote control interface initialized. Type `help’ for help.
telnet localhost 4444
Trying ::1…
Connected to localhost.
Escape character is ‘^]’.
VLC media player 1.1.9 The Luggage
Remote control interface initialized. Type `help’ for help.
I’m just guessing… but that “Trying ::1” line hints that
/usr/bin/telnet is trying both ipv4 and ipv6 and I’d bet dollars to
donuts that net/telnet is only trying ipv4. You can probably confirm
with ‘netstat -an | grep 4444.*LISTEN’
telnet localhost 4444
Trying ::1…
Connected to localhost.
Escape character is ‘^]’.
VLC media player 1.1.9 The Luggage
Remote control interface initialized. Type `help’ for help.
I’m just guessing… but that “Trying ::1” line hints that
/usr/bin/telnet is trying both ipv4 and ipv6 and I’d bet dollars to
donuts that net/telnet is only trying ipv4. You can probably confirm
with ‘netstat -an | grep 4444.*LISTEN’