egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Error flushing
Goto page 1, 2  Next
 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
a_aa
Voice


Joined: 16 May 2015
Posts: 14
Location: Canada

PostPosted: Wed Sep 05, 2018 11:19 pm    Post subject: Error flushing Reply with quote

Just started receiving the following error, any ideas?

Error flushing "sock2322280": connection reset by peer ( https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/2.5_day.atom )
Back to top
View user's profile Send private message
SpiKe^^
Owner


Joined: 12 May 2006
Posts: 563
Location: Tennessee, USA

PostPosted: Wed Sep 05, 2018 11:50 pm    Post subject: Reply with quote

What script is that?
_________________
SpiKe^^

Get BogusTrivia 2.06.4.7 at www.mytclscripts.com
Back to top
View user's profile Send private message Visit poster's website
a_aa
Voice


Joined: 16 May 2015
Posts: 14
Location: Canada

PostPosted: Thu Sep 06, 2018 8:44 am    Post subject: Reply with quote

SpiKe^^ wrote:
What script is that?


Sorry forgot to mention it is "Earthquake Announcer v1.2 by SpiKe^^ "
Back to top
View user's profile Send private message
SpiKe^^
Owner


Joined: 12 May 2006
Posts: 563
Location: Tennessee, USA

PostPosted: Thu Sep 06, 2018 12:01 pm    Post subject: Earthquake Announcer v1.2 by SpiKe^^ Reply with quote

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:
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
Back to top
View user's profile Send private message Visit poster's website
a_aa
Voice


Joined: 16 May 2015
Posts: 14
Location: Canada

PostPosted: Thu Sep 06, 2018 8:27 pm    Post subject: Re: Earthquake Announcer v1.2 by SpiKe^^ Reply with quote

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.
Back to top
View user's profile Send private message
SpiKe^^
Owner


Joined: 12 May 2006
Posts: 563
Location: Tennessee, USA

PostPosted: Fri Sep 07, 2018 8:37 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message Visit poster's website
a_aa
Voice


Joined: 16 May 2015
Posts: 14
Location: Canada

PostPosted: Sat Sep 08, 2018 10:06 am    Post subject: Reply with quote

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/feed/v1.0/summary/2.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/feed/v1.0/summary/4.0_day.atom )

Thanks...
Back to top
View user's profile Send private message
caesar
Ass Kicker


Joined: 14 Oct 2001
Posts: 3489
Location: Area 51

PostPosted: Sat Sep 08, 2018 11:59 am    Post subject: Reply with quote

Code:

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

After this add:
Code:

putlog "Earthquake error: $error"

and reply back with what you see on the dcc chat/telnet with the bot.
_________________
You may say anything about me, but at least don't misspell my name. xD
Back to top
View user's profile Send private message
a_aa
Voice


Joined: 16 May 2015
Posts: 14
Location: Canada

PostPosted: Sat Sep 08, 2018 7:18 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
caesar
Ass Kicker


Joined: 14 Oct 2001
Posts: 3489
Location: Area 51

PostPosted: Sun Sep 09, 2018 4:03 am    Post subject: Reply with quote

So you see a blank space like "Earthquake error:" ?
_________________
You may say anything about me, but at least don't misspell my name. xD
Back to top
View user's profile Send private message
a_aa
Voice


Joined: 16 May 2015
Posts: 14
Location: Canada

PostPosted: Sun Sep 09, 2018 9:48 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
caesar
Ass Kicker


Joined: 14 Oct 2001
Posts: 3489
Location: Area 51

PostPosted: Mon Sep 10, 2018 4:41 am    Post subject: Reply with quote

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

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:

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

or whatever you got there now to:
Code:

::http::register https 443 tls:socket

and it will work just fine.
_________________
You may say anything about me, but at least don't misspell my name. xD
Back to top
View user's profile Send private message
a_aa
Voice


Joined: 16 May 2015
Posts: 14
Location: Canada

PostPosted: Mon Sep 10, 2018 8:06 pm    Post subject: Reply with quote

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:

  # 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:

      # ::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
Quote:

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.
Quote:

[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.
Back to top
View user's profile Send private message
caesar
Ass Kicker


Joined: 14 Oct 2001
Posts: 3489
Location: Area 51

PostPosted: Tue Sep 11, 2018 12:59 am    Post subject: Reply with quote

I said:
Code:

::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
_________________
You may say anything about me, but at least don't misspell my name. xD
Back to top
View user's profile Send private message
SpiKe^^
Owner


Joined: 12 May 2006
Posts: 563
Location: Tennessee, USA

PostPosted: Tue Sep 11, 2018 8:40 am    Post subject: Reply with quote

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/feed/v1.0/summary/2.5_day.atom )

I changed the line you posted to:
Code:
::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
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests All times are GMT - 4 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber