shibdib / Dramiel

EVE Discord Bot
MIT License
42 stars 26 forks source link

Not fetching or posting killmails? #68

Closed KongGal closed 7 years ago

KongGal commented 7 years ago

after finally get the bot up and running but noticed it didn't post any killmails in the channel I created a channel for the bot to post mails in which the admin role got full rights to. plugin is enabled

This is the setting for getkillmails

"getKillmails" => array(
        "channel" => 236234773876441088, //killmails post to this channel
        "corpID" => 98171644, //corpid for killmails
        "allianceID" => 0, //allianceid for killmails (Leave as 0 if using it for a corp)
        "lossMails" => "true", //set as true to post both kills and losses, false to post only kills.
        "spamAmount" => 10, //Max amount of kills the bot will post every 10 minutes. Default is 15 and won't get the bot kicked for spamming.
        "startMail" => 0, //Put the zkill killID of your latest killmail. Otherwise it will pull from the beginning of time.
    ),

in the drameilLog.log i only see this

[2016-10-13 23:18:28] Dramiel.INFO: Logger Initiated [] []
[2016-10-13 23:18:28] Dramiel.INFO: Loading background plugins [] []
[2016-10-13 23:18:28] Dramiel.INFO: Loaded: 2 background plugins [] []
[2016-10-13 23:18:28] Dramiel.INFO: Loading in chat plugins [] []
[2016-10-13 23:18:28] Dramiel.INFO: Loaded: 8 chat plugins [] []
[2016-10-13 23:18:29] Dramiel.INFO: Discord WebSocket is ready!  [] []
[2016-10-13 23:18:34] Dramiel.INFO: Checking for new killmails. [] []
[2016-10-13 23:18:46] Dramiel.INFO: All kills posted, newest kill id is 56581518 [] []

but it haven't posted any mails in any channel nor did it post any errors

KongGal commented 7 years ago

After letting it run for a little this is the output from log

[2016-10-13 23:48:29] Dramiel.INFO: Memory in use: 5.2002410888672MB [] []
[2016-10-13 23:48:29] Dramiel.INFO: Memory in use after garbage collection: 5.0138473510742MB [] []
[2016-10-13 23:49:01] Dramiel.INFO: Checking for new killmails. [] []
[2016-10-13 23:49:13] Dramiel.INFO: All kills posted, newest kill id is 56581518 [] []
[2016-10-14 00:04:17] Dramiel.INFO: Checking for new killmails. [] []
[2016-10-14 00:04:29] Dramiel.INFO: All kills posted, newest kill id is 56581518 [] []
[2016-10-14 00:18:29] Dramiel.INFO: Memory in use: 5.0497665405273MB [] []
[2016-10-14 00:18:29] Dramiel.INFO: Memory in use after garbage collection: 5.0138473510742MB [] []
[2016-10-14 00:19:29] Dramiel.INFO: Checking for new killmails. [] []
[2016-10-14 00:19:41] Dramiel.INFO: All kills posted, newest kill id is 56581518 [] []
Maxcraft90 commented 7 years ago

Does the bot have rights to post messages into the channel? It seems he did everything good, but yeah.

KongGal commented 7 years ago

it do have rights to post and it but it started to post but not sure whats going on. just right now

[2016-10-14 16:09:38] Dramiel.INFO: Logger Initiated [] []
[2016-10-14 16:09:38] Dramiel.INFO: Loading background plugins [] []
[2016-10-14 16:09:38] Dramiel.INFO: Loaded: 2 background plugins [] []
[2016-10-14 16:09:38] Dramiel.INFO: Loading in chat plugins [] []
[2016-10-14 16:09:38] Dramiel.INFO: Loaded: 8 chat plugins [] []
[2016-10-14 16:09:39] Dramiel.INFO: Discord WebSocket is ready!  [] []
[2016-10-14 16:09:44] Dramiel.INFO: Checking for new killmails. [] []
[2016-10-14 16:10:28] Dramiel.INFO: Kill posting cap reached, newest kill id is 56511535 [] []
[2016-10-14 16:25:31] Dramiel.INFO: Checking for new killmails. [] []
[2016-10-14 16:26:09] Dramiel.INFO: Kill posting cap reached, newest kill id is 56511565 [] []
[2016-10-14 16:26:09] Dramiel.ERROR: exception 'ErrorException' with message 'fwrite(): SSL operation failed with code 1. OpenSSL Error messages: error:140D00CF:SSL routines:SSL_write:protocol is shutdown' in /home/dramiel/Dramiel/vendor/react/stream/src/Buffer.php:86 Stack trace: #0 [internal function]: React\Stream\Buffer->handleWrite(Resource id #168, Object(React\EventLoop\StreamSelectLoop)) #1 /home/dramiel/Dramiel/vendor/react/event-loop/src/StreamSelectLoop.php(240): call_user_func(Array, Resource id #168, Object(React\EventLoop\StreamSelectLoop)) #2 /home/dramiel/Dramiel/vendor/react/event-loop/src/StreamSelectLoop.php(201): React\EventLoop\StreamSelectLoop->waitForStreamActivity(0) #3 /home/dramiel/Dramiel/vendor/team-reflex/discord-php/src/Discord/Discord.php(1228): React\EventLoop\StreamSelectLoop->run() #4 /home/dramiel/Dramiel/Dramiel.php(211): Discord\Discord->run() #5 {main} [] []
[2016-10-14 16:26:10] Dramiel.INFO: Logger Initiated [] []
[2016-10-14 16:26:10] Dramiel.INFO: Loading background plugins [] []
[2016-10-14 16:26:10] Dramiel.INFO: Loaded: 2 background plugins [] []
[2016-10-14 16:26:10] Dramiel.INFO: Loading in chat plugins [] []
[2016-10-14 16:26:10] Dramiel.INFO: Loaded: 8 chat plugins [] []
[2016-10-14 16:26:11] Dramiel.INFO: Discord WebSocket is ready!  [] []
[2016-10-14 16:26:16] Dramiel.INFO: Checking for new killmails. [] []
[2016-10-14 16:27:12] Dramiel.INFO: Kill posting cap reached, newest kill id is 56511603 [] []
[2016-10-14 16:27:12] Dramiel.ERROR: exception 'ErrorException' with message 'fwrite(): SSL operation failed with code 1. OpenSSL Error messages: error:140D00CF:SSL routines:SSL_write:protocol is shutdown' in /home/dramiel/Dramiel/vendor/react/stream/src/Buffer.php:86 Stack trace: #0 [internal function]: React\Stream\Buffer->handleWrite(Resource id #168, Object(React\EventLoop\StreamSelectLoop)) #1 /home/dramiel/Dramiel/vendor/react/event-loop/src/StreamSelectLoop.php(240): call_user_func(Array, Resource id #168, Object(React\EventLoop\StreamSelectLoop)) #2 /home/dramiel/Dramiel/vendor/react/event-loop/src/StreamSelectLoop.php(201): React\EventLoop\StreamSelectLoop->waitForStreamActivity(0) #3 /home/dramiel/Dramiel/vendor/team-reflex/discord-php/src/Discord/Discord.php(1228): React\EventLoop\StreamSelectLoop->run() #4 /home/dramiel/Dramiel/Dramiel.php(211): Discord\Discord->run() #5 {main} [] []
[2016-10-14 16:27:13] Dramiel.INFO: Logger Initiated [] []
[2016-10-14 16:27:13] Dramiel.INFO: Loading background plugins [] []
[2016-10-14 16:27:13] Dramiel.INFO: Loaded: 2 background plugins [] []
[2016-10-14 16:27:13] Dramiel.INFO: Loading in chat plugins [] []
[2016-10-14 16:27:13] Dramiel.INFO: Loaded: 8 chat plugins [] []
[2016-10-14 16:27:14] Dramiel.INFO: Discord WebSocket is ready!  [] []
[2016-10-14 16:27:19] Dramiel.INFO: Checking for new killmails. [] []
[2016-10-14 16:28:05] Dramiel.INFO: Kill posting cap reached, newest kill id is 56511652 [] []

its like it bugs out when fetching mails and have to do a few attempts before posting mails at 14 16:26:09, fetched mails, bugs didn't post but intsead supervisor restarted, at 16:27:12 fetched mails, bugs didn't post the mails it fetched and restarted, at 16:28:05 fetched mails and posted the mails it just fetched so 20 killmails go tost

shibdib commented 7 years ago

that's nothing to do with mails and is something most people will see. Still working out kinks on the websocket timing out but it should auto restart if ur supervisor is setup correctly (like urs is)

On Fri, Oct 14, 2016 at 7:01 PM, KongGal notifications@github.com wrote:

it do have rights to post and it but it started to post but not sure whats going on. just right now

[2016-10-14 16:09:38] Dramiel.INFO: Logger Initiated [] [] [2016-10-14 16:09:38] Dramiel.INFO: Loading background plugins [] [] [2016-10-14 16:09:38] Dramiel.INFO: Loaded: 2 background plugins [] [] [2016-10-14 16:09:38] Dramiel.INFO: Loading in chat plugins [] [] [2016-10-14 16:09:38] Dramiel.INFO: Loaded: 8 chat plugins [] [] [2016-10-14 16:09:39] Dramiel.INFO: Discord WebSocket is ready! [] [] [2016-10-14 16:09:44] Dramiel.INFO: Checking for new killmails. [] [] [2016-10-14 16:10:28] Dramiel.INFO: Kill posting cap reached, newest kill id is 56511535 [] [] [2016-10-14 16:25:31] Dramiel.INFO: Checking for new killmails. [] [] [2016-10-14 16:26:09] Dramiel.INFO: Kill posting cap reached, newest kill id is 56511565 [] [] [2016-10-14 16:26:09] Dramiel.ERROR: exception 'ErrorException' with message 'fwrite(): SSL operation failed with code 1. OpenSSL Error messages: error:140D00CF:SSL routines:SSL_write:protocol is shutdown' in /home/dramiel/Dramiel/vendor/react/stream/src/Buffer.php:86 Stack trace: #0 [internal function]: React\Stream\Buffer->handleWrite(Resource id #168, Object(React\EventLoop\StreamSelectLoop)) #1 /home/dramiel/Dramiel/vendor/react/event-loop/src/StreamSelectLoop.php(240): call_user_func(Array, Resource id #168, Object(React\EventLoop\StreamSelectLoop)) #2 /home/dramiel/Dramiel/vendor/react/event-loop/src/StreamSelectLoop.php(201): React\EventLoop\StreamSelectLoop->waitForStreamActivity(0) #3 /home/dramiel/Dramiel/vendor/team-reflex/discord-php/src/Discord/Discord.php(1228): React\EventLoop\StreamSelectLoop->run() #4 /home/dramiel/Dramiel/Dramiel.php(211): Discord\Discord->run() #5 {main} [] [] [2016-10-14 16:26:10] Dramiel.INFO: Logger Initiated [] [] [2016-10-14 16:26:10] Dramiel.INFO: Loading background plugins [] [] [2016-10-14 16:26:10] Dramiel.INFO: Loaded: 2 background plugins [] [] [2016-10-14 16:26:10] Dramiel.INFO: Loading in chat plugins [] [] [2016-10-14 16:26:10] Dramiel.INFO: Loaded: 8 chat plugins [] [] [2016-10-14 16:26:11] Dramiel.INFO: Discord WebSocket is ready! [] [] [2016-10-14 16:26:16] Dramiel.INFO: Checking for new killmails. [] [] [2016-10-14 16:27:12] Dramiel.INFO: Kill posting cap reached, newest kill id is 56511603 [] [] [2016-10-14 16:27:12] Dramiel.ERROR: exception 'ErrorException' with message 'fwrite(): SSL operation failed with code 1. OpenSSL Error messages: error:140D00CF:SSL routines:SSL_write:protocol is shutdown' in /home/dramiel/Dramiel/vendor/react/stream/src/Buffer.php:86 Stack trace: #0 [internal function]: React\Stream\Buffer->handleWrite(Resource id #168, Object(React\EventLoop\StreamSelectLoop)) #1 /home/dramiel/Dramiel/vendor/react/event-loop/src/StreamSelectLoop.php(240): call_user_func(Array, Resource id #168, Object(React\EventLoop\StreamSelectLoop)) #2 /home/dramiel/Dramiel/vendor/react/event-loop/src/StreamSelectLoop.php(201): React\EventLoop\StreamSelectLoop->waitForStreamActivity(0) #3 /home/dramiel/Dramiel/vendor/team-reflex/discord-php/src/Discord/Discord.php(1228): React\EventLoop\StreamSelectLoop->run() #4 /home/dramiel/Dramiel/Dramiel.php(211): Discord\Discord->run() #5 {main} [] [] [2016-10-14 16:27:13] Dramiel.INFO: Logger Initiated [] [] [2016-10-14 16:27:13] Dramiel.INFO: Loading background plugins [] [] [2016-10-14 16:27:13] Dramiel.INFO: Loaded: 2 background plugins [] [] [2016-10-14 16:27:13] Dramiel.INFO: Loading in chat plugins [] [] [2016-10-14 16:27:13] Dramiel.INFO: Loaded: 8 chat plugins [] [] [2016-10-14 16:27:14] Dramiel.INFO: Discord WebSocket is ready! [] [] [2016-10-14 16:27:19] Dramiel.INFO: Checking for new killmails. [] [] [2016-10-14 16:28:05] Dramiel.INFO: Kill posting cap reached, newest kill id is 56511652 [] []

its like it bugs out when fetching mails and have to do a few attempts before posting mails at 14 16:26:09, fetched mails, bugs didn't post but intsead supervisor restarted, at 16:27:12 fetched mails, bugs didn't post the mails it fetched and restarted, at 16:28:05 fetched mails and posted the mails it just fetched so 20 killmails go tost

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/shibdib/Dramiel/issues/68#issuecomment-253816938, or mute the thread https://github.com/notifications/unsubscribe-auth/AFguZS4kRpQYgT3_4bSPGDOY20wIJH1Cks5qz5JdgaJpZM4KWZJL .

KongGal commented 7 years ago

I had it working for bit even that it skipped some mails but noticed today that everytime it tried to fetch killmails it would restart supervisor dramielLog.log

[2016-10-18 03:35:35] Dramiel.INFO: Loading in chat plugins [] []
[2016-10-18 03:35:35] Dramiel.INFO: Loaded: 8 chat plugins [] []
[2016-10-18 03:35:36] Dramiel.INFO: Discord WebSocket is ready!  [] []
[2016-10-18 03:35:41] Dramiel.INFO: Checking for new killmails. [] []
[2016-10-18 03:35:43] Dramiel.INFO: Logger Initiated [] []
[2016-10-18 03:35:43] Dramiel.INFO: Loading background plugins [] []
[2016-10-18 03:35:43] Dramiel.INFO: Loaded: 3 background plugins [] []
[2016-10-18 03:35:43] Dramiel.INFO: Loading in chat plugins [] []
[2016-10-18 03:35:43] Dramiel.INFO: Loaded: 8 chat plugins [] []
[2016-10-18 03:35:43] Dramiel.INFO: Discord WebSocket is ready!  [] []
[2016-10-18 03:35:48] Dramiel.INFO: Checking for new killmails. [] []
[2016-10-18 03:35:50] Dramiel.INFO: Logger Initiated [] []
[2016-10-18 03:35:50] Dramiel.INFO: Loading background plugins [] []
[2016-10-18 03:35:50] Dramiel.INFO: Loaded: 3 background plugins [] []
[2016-10-18 03:35:50] Dramiel.INFO: Loading in chat plugins [] []
[2016-10-18 03:35:50] Dramiel.INFO: Loaded: 8 chat plugins [] []
[2016-10-18 03:35:51] Dramiel.INFO: Discord WebSocket is ready!  [] []
[2016-10-18 03:35:56] Dramiel.INFO: Checking for new killmails. [] []
[2016-10-18 03:35:57] Dramiel.INFO: Logger Initiated [] []
[2016-10-18 03:35:57] Dramiel.INFO: Loading background plugins [] []
[2016-10-18 03:35:57] Dramiel.INFO: Loaded: 3 background plugins [] []
[2016-10-18 03:35:57] Dramiel.INFO: Loading in chat plugins [] []
[2016-10-18 03:35:57] Dramiel.INFO: Loaded: 8 chat plugins [] []
[2016-10-18 03:35:58] Dramiel.INFO: Discord WebSocket is ready!  [] []
[2016-10-18 03:36:03] Dramiel.INFO: Checking for new killmails. [] []
[2016-10-18 03:36:04] Dramiel.INFO: Logger Initiated [] []
[2016-10-18 03:36:04] Dramiel.INFO: Loading background plugins [] []
[2016-10-18 03:36:04] Dramiel.INFO: Loaded: 3 background plugins [] []
[2016-10-18 03:36:04] Dramiel.INFO: Loading in chat plugins [] []
[2016-10-18 03:36:04] Dramiel.INFO: Loaded: 8 chat plugins [] []
[2016-10-18 03:36:05] Dramiel.INFO: Discord WebSocket is ready!  [] []
[2016-10-18 03:36:10] Dramiel.INFO: Checking for new killmails. [] []
[2016-10-18 03:36:11] Dramiel.INFO: Logger Initiated [] []
[2016-10-18 03:36:11] Dramiel.INFO: Loading background plugins [] []
[2016-10-18 03:36:11] Dramiel.INFO: Loaded: 3 background plugins [] []
[2016-10-18 03:36:11] Dramiel.INFO: Loading in chat plugins [] []
[2016-10-18 03:36:11] Dramiel.INFO: Loaded: 8 chat plugins [] []
[2016-10-18 03:36:12] Dramiel.INFO: Discord WebSocket is ready!  [] []
[2016-10-18 03:36:17] Dramiel.INFO: Checking for new killmails. [] []
[2016-10-18 03:36:19] Dramiel.INFO: Logger Initiated [] []
[2016-10-18 03:36:19] Dramiel.INFO: Loading background plugins [] []
[2016-10-18 03:36:19] Dramiel.INFO: Loaded: 3 background plugins [] []
[2016-10-18 03:36:19] Dramiel.INFO: Loading in chat plugins [] []
[2016-10-18 03:36:19] Dramiel.INFO: Loaded: 8 chat plugins [] []
[2016-10-18 03:36:20] Dramiel.INFO: Discord WebSocket is ready!  [] []
[2016-10-18 03:36:25] Dramiel.INFO: Checking for new killmails. [] []
[2016-10-18 03:36:26] Dramiel.INFO: Logger Initiated [] []
[2016-10-18 03:36:26] Dramiel.INFO: Loading background plugins [] []
[2016-10-18 03:36:26] Dramiel.INFO: Loaded: 3 background plugins [] []
[2016-10-18 03:36:26] Dramiel.INFO: Loading in chat plugins [] []
[2016-10-18 03:36:26] Dramiel.INFO: Loaded: 8 chat plugins [] []
[2016-10-18 03:36:27] Dramiel.INFO: Discord WebSocket is ready!  [] []

in dramielError.log i just get this

PHP Fatal error:  Call to a member function sendMessage() on null in /home/dramiel/Dramiel/src/plugins/onTick/getKillmails.php on line 180
PHP Fatal error:  Call to a member function sendMessage() on null in /home/dramiel/Dramiel/src/plugins/onTick/getKillmails.php on line 180
PHP Fatal error:  Call to a member function sendMessage() on null in /home/dramiel/Dramiel/src/plugins/onTick/getKillmails.php on line 180
PHP Fatal error:  Call to a member function sendMessage() on null in /home/dramiel/Dramiel/src/plugins/onTick/getKillmails.php on line 180
PHP Fatal error:  Call to a member function sendMessage() on null in /home/dramiel/Dramiel/src/plugins/onTick/getKillmails.php on line 180
PHP Fatal error:  Call to a member function sendMessage() on null in /home/dramiel/Dramiel/src/plugins/onTick/getKillmails.php on line 180
PHP Fatal error:  Call to a member function sendMessage() on null in /home/dramiel/Dramiel/src/plugins/onTick/getKillmails.php on line 180
PHP Fatal error:  Call to a member function sendMessage() on null in /home/dramiel/Dramiel/src/plugins/onTick/getKillmails.php on line 180
PHP Fatal error:  Call to a member function sendMessage() on null in /home/dramiel/Dramiel/src/plugins/onTick/getKillmails.php on line 180
PHP Fatal error:  Call to a member function sendMessage() on null in /home/dramiel/Dramiel/src/plugins/onTick/getKillmails.php on line 180

Its like the bot can't post into the channel and keeps trying to post the killmails to the predefined channel i set but can't, but it can read my commands and reply to them without problems :/

shibdib commented 7 years ago

Sounds like a roles issue, make sure the bot is in a role that has posting rights to the channel (I usually just make a Bot role and give it admin)

Maxcraft90 commented 7 years ago

already suggested it, but he said the bot should have roles. here a screenshot how the role of my bot looks (configured in the server settings, not the channel settings) image

shibdib commented 7 years ago

any change? Definitely sounds like a roles issue

KongGal commented 7 years ago

Seems like it just dissapeared by it self, no problems for now