This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

ident timeout on local telnet

Old posts that have not been replied to for several years.
Locked
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

ident timeout on local telnet

Post by De Kus »

[14:13:36] net: connect! sock 3
[14:13:36] DNS resolved 127.0.0.1 to localhost
[14:13:36] Telnet-Verbindung: localhost/2171
[14:13:37] dequeue_sockets(): errno = 128 (Transport endpoint is not connected) on 13
[14:14:02] Zeitueberschreitung/EOF bei der Ident-Verbindung
[14:14:10] Eingeloggt: De_Kus (telnet@localhost/2171)
The problem is I always have to wait the 30 seconds until the request times out. The strange thing is, if I try manually connect to localhost:113 I will get imediedly response that port is closed, so I wonder why the bot waits 30s, if he should know within less than 1 there will not come any response because opening TCP port failed?!
.tcl proc smalconnecttest {idx input} {putdcc 13 "\[[clock format [clock seconds] -format %T]\] '$input'"}
...
.tcl control [connect localhost 113] smalconnecttest
[16:42:01] tcl: builtin dcc call: *dcc:tcl De_Kus 13 control [connect localhost 113] smalconnecttest
[16:42:01] tcl: evaluate (.tcl): control [connect localhost 113] smalconnecttest
[16:42:01] WARNING: open_telnet_raw() is about to block in gethostbyname()!
Tcl:
I tried this and got no call for smalconnecttest. It seems it's a general problem with the handling of telnet connections. Is it possible I missconfigured something in my .conf or can this safely be posted to bugzilla? I think control should REALLY call the proc and giving him an empty string to significate the connecting has been closed (and close it!).
because when I do some minuets later this:

Code: Select all

[16:49:37] #De_Kus# dccstat
SOCK ADDR     PORT  NICK      HOST              TYPE
---- -------- ----- --------- ----------------- ----
...
14   00000000   113 *         localhost         scri  smalconnecttest
ADDR hasn't been edited!

btw. the testproc works as identifer for call of it:
[16:41:28] tcl: evaluate (.tcl): smalconnecttest 235 test
[16:41:28] 'test'
Tcl:
De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens...
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

add "127.0.0.1 localhost" to /etc/hosts in your CYGWIN environment
User avatar
user
 
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

Re: ident timeout on local telnet

Post by user »

De Kus wrote:The strange thing is, if I try manually connect to localhost:113 I will get imediedly response that port is closed, so I wonder why the bot waits 30s, if he should know within less than 1 there will not come any response because opening TCP port failed?!
Are you connecting from the same address when you do it "manually"?
My old 1.6.13 eggdrop seems to work just fine:
[17:35:03] <usr> .tcl bind dcc n test1 test1; proc test1 {h i1 a} {set i2 "usage: .test1 <addr>:<port>";if {[scan $a {%[^:]:%d} a p]!=2||[catch {connect $a $p} i2]} {putdcc $i1 "Err: $i2"} {control $i2 [list test2 $i1]}}; proc test2 {i1 i2 a} {if {$a==""} {putdcc $i1 "Lost it"} else {putdcc $i1 "Got data: $a"; killdcc $i2}; return 1}
[17:35:03] <bot> Tcl:
[17:35:06] <usr> .test1 0:22
[17:35:06] <bot> Got data: SSH-2.0-OpenSSH_3.9p1
[17:35:08] <usr> .test1 0:24
[17:35:08] <bot> Lost it
Keep in mind that if your connection IS accepted by an identd, there will be no output unless you send a request first.
Have you ever read "The Manual"?
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

Re: ident timeout on local telnet

Post by De Kus »

demond wrote:add "127.0.0.1 localhost" to /etc/hosts in your CYGWIN environment
I have one in C:\WINDOWS\system32\drivers\etc\hosts which is correctly read (Cygwin creates a symbolic link to it as /etc/hosts which refers to the Windows one) correctly:
[14:13:36] DNS resolved 127.0.0.1 to localhost
$ more < /etc/hosts
# Copyright (c) 1993-1999 Microsoft Corp.
...
user wrote:Are you connecting from the same address when you do it "manually"?
[18:39:16] tcl: evaluate (.tcl): socket localhost 113
Tcl error: couldn't open socket: connection refused
I have no timespamps here, I'd say it takes 0.5-1s for response. same when using PuTTY. both should connect from 127.0.0.1 to 127.0.0.1 as well I hope :D.
user wrote:Keep in mind that if your connection IS accepted by an identd, there will be no output unless you send a request first.
IdentD is not running, port is CLOSED. but good suggestion anyway *enables mIRC to run identd permantly*.
De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens...
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

no, I meant /etc/hosts in CYGWIN, not its Windows counterpart (which is not used by the CYGWIN resolver lib I think)

repeat your tests with 127.0.0.1 instead of localhost; if you don't experience the 30s delay, my guess been right and there's resolving problem
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

Post by De Kus »

demond wrote:no, I meant /etc/hosts in CYGWIN, not its Windows counterpart (which is not used by the CYGWIN resolver lib I think)
I edited my post while you were answering to state it clear, Cygwin uses this file because it has a symbolic link to it.
$ ls -l /etc
total 41
...
lrwxrwxrwx 1 De Kus Benutzer 37 Jan 24 23:14 hosts -> C:\WINDOWS\system32\drivers\etc\hosts
...

$ grep . /etc/hosts
# Copyright (c) 1993-1999 Microsoft Corp.
...
De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens...
User avatar
user
&nbsp;
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

Re: ident timeout on local telnet

Post by user »

De Kus wrote:both should connect from 127.0.0.1 to 127.0.0.1 as well I hope :D.
the connection made by 'connect' will be from the address returned by 'myip' (127.0.0.1 == 2130706433)
the connection made by 'socket' will be from what ever 'info hostname' resolves to (iirc)
De Kus wrote:IdentD is not running, port is CLOSED. but good suggestion anyway *enables mIRC to run identd permantly*.
No..that's not what I meant...I don't think leaving it running is a good idea as you'll be vulnerable to dos attacks. What I meant was...if you 'connect' to a identd that accepts your connection, nothing will happen before it times out (using your/my test script), as the identd gives no output without any input.
Have you ever read "The Manual"?
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

Re: ident timeout on local telnet

Post by De Kus »

user wrote:the connection made by 'connect' will be from the address returned by 'myip' (127.0.0.1 == 2130706433)
the connection made by 'socket' will be from what ever 'info hostname' resolves to (iirc)
I see I see, thats why its 00000000, becaue I haven't set anything for my-*, since I am behind NAT and the doc forbids me to set it, if using set NAT-IP. But I believe the system will use 127.0.0.1 automatically even "source" is 0.0.0.0, wont it?

user wrote:No..that's not what I meant...I don't think leaving it running is a good idea as you'll be vulnerable to dos attacks. What I meant was...if you 'connect' to a identd that accepts your connection, nothing will happen before it times out (using your/my test script), as the identd gives no output without any input.
yeah, but if there isn't any IdentD there to response it's meaningless what I put to the port.
[19:28:44] tcl: evaluate (.tcl): control [set {smalconnecttest:s} [connect localhost 113]] smalconnecttest
[19:28:44] WARNING: open_telnet_raw() is about to block in gethostbyname()!
Tcl:
[19:28:50] tcl: evaluate (.tcl): putdcc ${smalconnecttest:s} ""
Tcl:
[19:28:50] dequeue_sockets(): errno = 128 (Transport endpoint is not connected) on 14
[19:28:55] tcl: evaluate (.tcl): putdcc ${smalconnecttest:s} ""
Tcl:
...
[22:26:42] #De_Kus# dccstat
...
14 00000000 113 * localhost scri smalconnecttest
trying to write to the port won't change anything. If I hurry to put something I get "dequeue_sockets(): errno = 128 (Transport endpoint is not connected)" (remeber it from the telnet log?). It simply idles instead of closing the port (internaly). or do you believe it is simply an issue with Cygwin?
De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens...
Locked