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.

Error flushing

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
a
a_aa
Voice
Posts: 16
Joined: Sat May 16, 2015 10:57 am
Location: Canada

Error flushing

Post by a_aa »

Just started receiving the following error, any ideas?

Error flushing "sock2322280": connection reset by peer ( https://earthquake.usgs.gov/earthquakes ... 5_day.atom )
User avatar
SpiKe^^
Owner
Posts: 831
Joined: Fri May 12, 2006 10:20 pm
Location: Tennessee, USA
Contact:

Post by SpiKe^^ »

What script is that?
SpiKe^^

Get BogusTrivia 2.06.4.7 at www.mytclscripts.com
or visit the New Tcl Acrhive at www.tclarchive.org
.
a
a_aa
Voice
Posts: 16
Joined: Sat May 16, 2015 10:57 am
Location: Canada

Post by a_aa »

SpiKe^^ wrote:What script is that?
Sorry forgot to mention it is "Earthquake Announcer v1.2 by SpiKe^^ "
User avatar
SpiKe^^
Owner
Posts: 831
Joined: Fri May 12, 2006 10:20 pm
Location: Tennessee, USA
Contact:

Earthquake Announcer v1.2 by SpiKe^^

Post by SpiKe^^ »

OK, that would be my script:)

Can you tell us a little about your setup? eggdrop ver, tcl ver, os, and anything else you think may help.

Has this script been working for you before without error?
Has anything in the setup changed that may have caused this error?

Please test this possible patch from OUTs1der:
try a plain ::http::register https 443 ::tls::socket on line 135

Code: Select all

replace:

::http::register https 443 [list ::tls::socket -tls1 1]  ;# added: plat_ #

with:

::http::register https 443 ::tls::socket

SpiKe^^

Get BogusTrivia 2.06.4.7 at www.mytclscripts.com
or visit the New Tcl Acrhive at www.tclarchive.org
.
a
a_aa
Voice
Posts: 16
Joined: Sat May 16, 2015 10:57 am
Location: Canada

Re: Earthquake Announcer v1.2 by SpiKe^^

Post by a_aa »

OK here goes...
I edited the ::http line above
eggdrop 1.8.1
tcl 8.6.0+9
Ubuntu 16.04.5 lts

The script definitely worked before and in all honesty other than running apt-get updates and apt-get upgrades I have not manually changed a thing. That's what makes it a bit of a head scratcher. I receive no errors restarting the bot.
User avatar
SpiKe^^
Owner
Posts: 831
Joined: Fri May 12, 2006 10:20 pm
Location: Tennessee, USA
Contact:

Post by SpiKe^^ »

and after the above ::http edit, are you still getting the same error?

Does the script still say anything to the channel?
SpiKe^^

Get BogusTrivia 2.06.4.7 at www.mytclscripts.com
or visit the New Tcl Acrhive at www.tclarchive.org
.
a
a_aa
Voice
Posts: 16
Joined: Sat May 16, 2015 10:57 am
Location: Canada

Post by a_aa »

Yes still getting the error after the edit.
The error reporting to the channel is:

Error flushing "sock2322280": connection reset by peer ( https://earthquake.usgs.gov/earthquakes ... 5_day.atom )

It does not not matter if I change the reporting from 1.0, 2.5, 4.0 or 5.0 from within the script, all that changes in the error is what I am trying for, say those greater than 4.0. Hope that makes sense? eg: When set to report greater than 4.0 I get,

Error flushing "sock2322280": connection reset by peer ( https://earthquake.usgs.gov/earthquakes ... 0_day.atom )

Thanks...
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Code: Select all

catch { set t [::http::geturl $::eqnews::ary(page) -timeout 30000] } error
After this add:

Code: Select all

putlog "Earthquake error: $error"
and reply back with what you see on the dcc chat/telnet with the bot.
Once the game is over, the king and the pawn go back in the same box.
a
a_aa
Voice
Posts: 16
Joined: Sat May 16, 2015 10:57 am
Location: Canada

Post by a_aa »

I added the line as follows,

catch { set t [::http::geturl $::eqnews::ary(page) -timeout 30000] } error
putlog "Earthquake error: $error"

but no reporting back when I am in telnet with the bot? I can't dcc directly from channel but have no problems to telnet in.
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

So you see a blank space like "Earthquake error:" ?
Once the game is over, the king and the pawn go back in the same box.
a
a_aa
Voice
Posts: 16
Joined: Sat May 16, 2015 10:57 am
Location: Canada

Post by a_aa »

caesar wrote:So you see a blank space like "Earthquake error:" ?
Edit....
I just edited my console to show messages in the partyline, I now get this when typing the trigger. Since the script calls to check every 5 minutes, I am getting the error sent to the partyline at 5 minute intervals, so I know the script is running, just getting the error.

[07:25:00] Earthquake error: error flushing "sock18d3e50": connection reset by peer

BTW all my other scripts work, ie weather, news etc. Channel #test is set +earthquake. When script used to run it ran in #satellite but is temporarily disabled.

Quick edit, here is a status from telnet session.

Config file: evilbot
OS: Linux 4.17.17-x86_64-linode116
Process ID: 16134 (parent 1)
Tcl library: /usr/share/tcltk/tcl8.6
Tcl version: 8.6.5 (header version 8.6.5)
Tcl is threaded.
TLS support is enabled.
TLS library: OpenSSL 1.0.2g 1 Mar 2016
IPv6 support is enabled.
Socket table: 20/100
Loaded module information:
Channels: #satellite (need ops), #pool (need ops), #test
Online as: evilbot!evilbot@Clk------------.org (Evil Bot)
Server [irc.---------.ca]:+6669 (connected for 00:24)
#satellite : 17 members, enforcing "+tn" (greet)
#pool : 16 members, enforcing "+tn" (greet)
#test : 2 members, enforcing "+tn" (greet)

Thanks
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

I tried various things to no avail, and then tried this code:

Code: Select all

proc tls:socket args {
	set opts [lrange $args 0 end-2]
	set host [lindex $args end-1]
	set port [lindex $args end]
	::tls::socket -servername $host {*}$opts $host $port
}
taken from here.

Add this to your code and change the:

Code: Select all

::http::register https 443 [list ::tls::socket -tls1 1]  ;# added: plat_ #
or whatever you got there now to:

Code: Select all

::http::register https 443 tls:socket
and it will work just fine.
Once the game is over, the king and the pawn go back in the same box.
a
a_aa
Voice
Posts: 16
Joined: Sat May 16, 2015 10:57 am
Location: Canada

Post by a_aa »

Hey Caesar,

I tried the edits that you posted and I still get the error. I tried all 3 options that were on the link provided to the TCL page and still no luck.

I'm not sure if it matters where the the code is put but here is mine. I placed it before the catch statement.

Code: Select all

  # Sept 10 added the following
   proc tls:socket args { 
      set opts [lrange $args 0 end-2] 
      set host [lindex $args end-1] 
      set port [lindex $args end] 
       ::tls::socket -servername $host {*}$opts $host $port 
     # ::tls::socket -ssl3 false -ssl2 false -tls1 true -servername $host {*}$opts $host $port
     # ::tls::socket -ssl3 false -ssl2 false -tls1 true -tls1.2 false -tls1.1 false \
     # -servername $host {*}$opts $host $port            
   } 

Code: Select all

      # ::http::register https 443 [list ::tls::socket -tls1 1]  ;# added: plat_ # 
      ::http::register https 443 ::tls::socket
This is my status report from telnet and then running !eq
Admin: evilbot <email: testbot@testbotnet.org>
Config file: testbot
OS: Linux 4.17.17-x86_64-linode116
Process ID: 22819 (parent 1)
Tcl library: /usr/share/tcltk/tcl8.6
Tcl version: 8.6.5 (header version 8.6.5)
Tcl is threaded.
TLS support is enabled.
TLS library: OpenSSL 1.0.2g 1 Mar 2016
IPv6 support is enabled.
Socket table: 20/100
Loaded module information:
Channels: #test (need ops)
Online as: testbot!testbot@Clk-E646DB59.org (Test Bot)
Server [irc.---------.ca]:+6669 (connected for 00:02)
#test : 2 members, enforcing "+tn" (greet)
And finally the error after I edited the script and do a rehash.
[17:05:51] #aa# rehash
Rehashing.
[17:05:51] Writing user file...
[17:05:51] Writing channel file...
[17:05:51] Rehashing ...
[17:05:51] Writing channel file...
[17:05:51] Listening at telnet port 8000 (all).
[17:05:51] Loading dccwhois.tcl...
[17:05:51] Loaded dccwhois.tcl
[17:05:51] m00nie::weather 2.6 loaded
[17:05:51] bseen1.4.2c: -- Bass's SEEN loaded --
[17:05:51] Earthquake Announcer v1.2 loaded.
[17:05:51] m00nie::news 1.0 loaded
[17:05:51] Userinfo TCL v1.07 loaded (URL BF GF IRL EMAIL DOB PHONE ICQ).
[17:05:51] use '.help userinfo' for commands.
[17:05:51] Writing channel file...
[17:05:51] Userfile loaded, unpacking...
[17:05:56] Earthquake error: error flushing "sock154d510": connection reset by peer
Thanks again for trying.
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

I said:

Code: Select all

::http::register https 443 tls:socket 
notice the lack of :'s, it's not a mistake but it's done on purpose to use this new function instead. :wink:
Once the game is over, the king and the pawn go back in the same box.
User avatar
SpiKe^^
Owner
Posts: 831
Joined: Fri May 12, 2006 10:20 pm
Location: Tennessee, USA
Contact:

Post by SpiKe^^ »

Caesar: Thank You Very Much for the Help:)

I loaded the script and applied the patches you suggested.
That changed the error to:

Invalid command name "tls:socket" ( https://earthquake.usgs.gov/earthquakes ... 5_day.atom )

I changed the line you posted to:

Code: Select all

::http::register https 443 ::eqnews::tls:socket
And now the script works as expected.
Good Job Caesar!

I will try to update the script on the forum and archive.
SpiKe^^

Get BogusTrivia 2.06.4.7 at www.mytclscripts.com
or visit the New Tcl Acrhive at www.tclarchive.org
.
Post Reply