Raspberry PI: unable to telnet to FHEM

Begonnen von Guest, 03 November 2012, 23:37:20

Vorheriges Thema - Nächstes Thema

Guest

Originally posted by: <email address deleted>

I am using FHEM and it runs perfectly on my Raspberry.
But since some days (I think it was already before upgrading to 5.3) I am
no more able to connect to FHEM using telnet from my RPI.
FHEM is running by "perl fhem.pl fhem.cfg" and I can connect to
telnet 192.168.2.118 7072
from my iMac via local network, but when I try to connect directly from my
RPI using
telnet localhost 7072
my RPI responds:
Trying 127.0.0.1...
telnet: Unable to connect to remote host: Connection timed out
So I am no more able to e.g shutdown my FHEM using
perl fhem.pl 7072 "shutdown"
or any other command.
Any ideas?
Thanks in advance

--
To unsubscribe from this group, send email to
fhem-users+unsubscribe@googlegroups.com

Guest

Originally posted by: <email address deleted>

the syntax for telnet configuration in fhem.cfg has changed in 5.3:

e.g. define tPort telnet 7072 global

On Sat, Nov 3, 2012 at 11:37 PM, dirkc wrote:
> I am using FHEM and it runs perfectly on my Raspberry.
> But since some days (I think it was already before upgrading to 5.3) I am no
> more able to connect to FHEM using telnet from my RPI.
> FHEM is running by "perl fhem.pl fhem.cfg" and I can connect to
> telnet 192.168.2.118 7072
> from my iMac via local network, but when I try to connect directly from my
> RPI using
> telnet localhost 7072
> my RPI responds:
> Trying 127.0.0.1...
> telnet: Unable to connect to remote host: Connection timed out
> So I am no more able to e.g shutdown my FHEM using
> perl fhem.pl 7072 "shutdown"
> or any other command.
> Any ideas?
> Thanks in advance
>
> --
> To unsubscribe from this group, send email to
> fhem-users+unsubscribe@googlegroups.com

--
To unsubscribe from this group, send email to
fhem-users+unsubscribe@googlegroups.com

rudolfkoenig

                                                   

> the syntax for telnet configuration in fhem.cfg has changed in 5.3:
>
> e.g. define tPort telnet 7072 global

This is correct, but still does not explain, why he cannot connect via
localhost, only from remote. I propose to check how fhem opened the ports via
lsof by executing the following as root:
  lsof -p | grep TCP

The result should look like:
  # lsof -p 7294 | grep TCP
  perl    7294 fhem    5u  IPv4  10226      0t0    TCP *:7072 (LISTEN)
  perl    7294 fhem    6u  IPv4  10227      0t0    TCP *:8083 (LISTEN)
  perl    7294 fhem    7u  IPv4  10228      0t0    TCP *:8084 (LISTEN)
  perl    7294 fhem    8u  IPv4  10229      0t0    TCP *:8085 (LISTEN)

The * is telling us that fhem opened the 7072 port on all available interfaces.
Btw. you did checked the fhem log for errors, didn't you?

--
To unsubscribe from this group, send email to
fhem-users+unsubscribe@googlegroups.com

Guest

Originally posted by: <email address deleted>

Thanks very much for your feedback.  
Unfortunately it doesn't yet help me.
The log file logs:
2012.11.04 13:05:18 3: telnetPort: port 7072 opened
2012.11.04 13:05:18 3: WEB: port 8083 opened
2012.11.04 13:05:19 3: WEBphone: port 8084 opened
2012.11.04 13:05:19 3: WEBtablet: port 8085 opened  

and lsof -p 9817 | grep TCP returns
perl    9817 root    6u  IPv4 284166      0t0    TCP *:7072 (LISTEN)
perl    9817 root    8u  IPv4 284167      0t0    TCP *:8083 (LISTEN)
perl    9817 root    9u  IPv4 284168      0t0    TCP *:8084 (LISTEN)
perl    9817 root   10w  IPv4 284169      0t0    TCP *:8085 (LISTEN)

the fhem.cfg simply looks like
define telnetPort telnet 7072 global

--
To unsubscribe from this group, send email to
fhem-users+unsubscribe@googlegroups.com

rudolfkoenig

                                                   

> perl    9817 root    6u  IPv4 284166      0t0    TCP *:7072 (LISTEN)

This means that fhem can be reached from localhost (if there is one :)

--
To unsubscribe from this group, send email to
fhem-users+unsubscribe@googlegroups.com

Guest

Originally posted by: <email address deleted>

>
> Thanks to you all, I got it!
>
> I forgot to add
> auto lo
> iface lo inet loopback
> to
>
/etc/networking/interfaces
>
 

--
To unsubscribe from this group, send email to
fhem-users+unsubscribe@googlegroups.com