Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bot Spamming: Requested failed with exception, e=null,class=class java.lang.NullPointerException #111

Closed
daedric7 opened this issue Sep 30, 2023 · 7 comments · Fixed by #112
Assignees
Labels
bug Something isn't working question Further information is requested

Comments

@daedric7
Copy link

Out of nowhere the bot is spamming the Matrix room every 5 minutes with:

Requested failed with exception, e=null,class=class java.lang.NullPointerException

In red.

No errors on the docker logs, still replies to !help

image

How can i debug this further ??

Docker compose:

services:
    botdarr:
        image: shayaantx/botdarr:latest
        container_name: botdarr

I have Lidarr, Radarr and Sonarr(v3), as well as Matrix settings.

@shayaantx
Copy link
Owner

@daedric7 can you mount a logs folder in the container and reproduce and post the zip of the logs


    volumes:
       - <BOTDARR_HOME>/logs:/home/botdarr/logs
       - <BOTDARR_HOME>/database:/home/botdarr/database

@daedric7
Copy link
Author

daedric7 commented Oct 1, 2023

Yes, of course:

botdarr-issue111.tar.gz

@shayaantx shayaantx self-assigned this Oct 1, 2023
@shayaantx shayaantx added bug Something isn't working question Further information is requested labels Oct 1, 2023
@shayaantx
Copy link
Owner

@daedric7 looks like the NPE is being thrown cause of a null episode overview from sonarr

#112

I just released a new version (you can pull latest or 5.6.10), let me know if you still have the issue

2023-Oct-01 11:55:58 AM [pool-3-thread-1] ERROR com.botdarr.connections.ConnectionHelper - Error trying to process response
java.lang.NullPointerException: null
	at com.botdarr.api.sonarr.SonarrApi$7.getDownloadBasedApiQueue(SonarrApi.java:251) ~[botdarr-release.jar:?]
	at com.botdarr.api.sonarr.SonarrApi$7.getResponse(SonarrApi.java:277) ~[botdarr-release.jar:?]
	at com.botdarr.api.DownloadsStrategy.parseContent(DownloadsStrategy.java:35) ~[botdarr-release.jar:?]
	at com.botdarr.api.sonarr.SonarrApi$7$1.onSuccess(SonarrApi.java:296) ~[botdarr-release.jar:?]
	at com.botdarr.api.sonarr.SonarrApi$7$1.onSuccess(SonarrApi.java:284) ~[botdarr-release.jar:?]
	at com.botdarr.connections.ConnectionHelper.makeRequest(ConnectionHelper.java:50) ~[botdarr-release.jar:?]
	at com.botdarr.connections.ConnectionHelper.makeGetRequest(ConnectionHelper.java:21) ~[botdarr-release.jar:?]
	at com.botdarr.api.sonarr.SonarrApi$7.getContentDownloads(SonarrApi.java:282) ~[botdarr-release.jar:?]
	at com.botdarr.api.DownloadsStrategy.downloads(DownloadsStrategy.java:27) ~[botdarr-release.jar:?]
	at com.botdarr.api.sonarr.SonarrApi.downloads(SonarrApi.java:24) ~[botdarr-release.jar:?]
	at com.botdarr.scheduling.Scheduler.lambda$initApiNotifications$0(Scheduler.java:40) ~[botdarr-release.jar:?]

@daedric7
Copy link
Author

daedric7 commented Oct 1, 2023

I tried to work around the issue somehow... and discovered that there's a Sonar V4 in development.

The results with this versions are different:

image

For the sake of this issue, i kept both the config and compose of the v3 i had.

network.log:

2023-Oct-01 22:35:58 PM [pool-3-thread-1] ERROR com.botdarr.connections.ConnectionHelper - Non 200 status code returned from request, code=404, reason=Not Found
2023-Oct-01 22:35:58 PM [pool-2-thread-1] ERROR com.botdarr.connections.ConnectionHelper - Non 200 status code returned from request, code=404, reason=Not Found
2023-Oct-01 22:35:58 PM [pool-2-thread-1] ERROR com.botdarr.connections.ConnectionHelper - Non 200 status code returned from request, code=404, reason=Not Found
2023-Oct-01 22:37:59 PM [pool-2-thread-1] ERROR com.botdarr.connections.ConnectionHelper - Non 200 status code returned from request, code=404, reason=Not Found
2023-Oct-01 22:37:59 PM [pool-2-thread-1] ERROR com.botdarr.connections.ConnectionHelper - Non 200 status code returned from request, code=404, reason=Not Found
2023-Oct-01 22:39:59 PM [pool-2-thread-1] ERROR com.botdarr.connections.ConnectionHelper - Non 200 status code returned from request, code=404, reason=Not Found
2023-Oct-01 22:39:59 PM [pool-2-thread-1] ERROR com.botdarr.connections.ConnectionHelper - Non 200 status code returned from request, code=404, reason=Not Found
2023-Oct-01 22:40:58 PM [pool-3-thread-1] ERROR com.botdarr.connections.ConnectionHelper - Non 200 status code returned from request, code=404, reason=Not Found
2023-Oct-01 22:41:59 PM [pool-2-thread-1] ERROR com.botdarr.connections.ConnectionHelper - Non 200 status code returned from request, code=404, reason=Not Found
2023-Oct-01 22:41:59 PM [pool-2-thread-1] ERROR com.botdarr.connections.ConnectionHelper - Non 200 status code returned from request, code=404, reason=Not Found
2023-Oct-01 22:43:59 PM [pool-2-thread-1] ERROR com.botdarr.connections.ConnectionHelper - Non 200 status code returned from request, code=404, reason=Not Found
2023-Oct-01 22:43:59 PM [pool-2-thread-1] ERROR com.botdarr.connections.ConnectionHelper - Non 200 status code returned from request, code=404, reason=Not Found
2023-Oct-01 22:45:59 PM [pool-3-thread-1] ERROR com.botdarr.connections.ConnectionHelper - Non 200 status code returned from request, code=404, reason=Not Found
2023-Oct-01 22:46:00 PM [pool-2-thread-1] ERROR com.botdarr.connections.ConnectionHelper - Non 200 status code returned from request, code=404, reason=Not Found
2023-Oct-01 22:46:00 PM [pool-2-thread-1] ERROR com.botdarr.connections.ConnectionHelper - Non 200 status code returned from request, code=404, reason=Not Found

matrix.log:

2023-Oct-01 20:40:15 PM [pool-3-thread-1] ERROR com.botdarr.clients.matrix.MatrixChatClient - Missing event id for room !SqYVCqqApQFJpFePxl:aguiarvieira.pt and message com.botdarr.clients.matrix.transactions.MatrixSendMessageRequest@5ab47cb8
2023-Oct-01 20:47:26 PM [pool-3-thread-1] ERROR com.botdarr.clients.matrix.MatrixChatClient - Error trying to make matrix request
org.apache.http.conn.HttpHostConnectException: Connect to aguiarvieira.pt:443 [aguiarvieira.pt/130.61.129.53] failed: Connection timed out (Connection timed out)
        at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:156) ~[botdarr-release.jar:?]
        at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:376) ~[botdarr-release.jar:?]
        at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:393) ~[botdarr-release.jar:?]
        at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236) ~[botdarr-release.jar:?]
        at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:186) ~[botdarr-release.jar:?]
        at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89) ~[botdarr-release.jar:?]
        at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110) ~[botdarr-release.jar:?]
        at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185) ~[botdarr-release.jar:?]
        at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83) ~[botdarr-release.jar:?]
        at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:108) ~[botdarr-release.jar:?]
        at com.botdarr.connections.ConnectionHelper.makeRequest(ConnectionHelper.java:46) ~[botdarr-release.jar:?]
        at com.botdarr.clients.matrix.MatrixChatClient.sendMessage(MatrixChatClient.java:144) ~[botdarr-release.jar:?]
        at com.botdarr.clients.matrix.MatrixChatClient.sendMatrixResponse(MatrixChatClient.java:135) ~[botdarr-release.jar:?]
        at com.botdarr.clients.matrix.MatrixChatClient.sendToConfiguredChannels(MatrixChatClient.java:55) ~[botdarr-release.jar:?]
        at com.botdarr.scheduling.Scheduler.lambda$initApiNotifications$0(Scheduler.java:43) ~[botdarr-release.jar:?]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_342]
        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [?:1.8.0_342]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [?:1.8.0_342]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [?:1.8.0_342]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_342]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_342]
        at java.lang.Thread.run(Thread.java:750) [?:1.8.0_342]
Caused by: java.net.ConnectException: Connection timed out (Connection timed out)
        at java.net.PlainSocketImpl.socketConnect(Native Method) ~[?:1.8.0_342]
        at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) ~[?:1.8.0_342]
        at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) ~[?:1.8.0_342]
        at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) ~[?:1.8.0_342]
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) ~[?:1.8.0_342]
        at java.net.Socket.connect(Socket.java:607) ~[?:1.8.0_342]
        at org.apache.http.conn.ssl.SSLConnectionSocketFactory.connectSocket(SSLConnectionSocketFactory.java:368) ~[botdarr-release.jar:?]
        at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:142) ~[botdarr-release.jar:?]
        ... 21 more
2023-Oct-01 20:47:26 PM [pool-3-thread-1] ERROR com.botdarr.clients.matrix.MatrixChatClient - Missing event id for room !SqYVCqqApQFJpFePxl:aguiarvieira.pt and message com.botdarr.clients.matrix.transactions.MatrixSendMessageRequest@6e00329c
2023-Oct-01 20:54:36 PM [pool-3-thread-1] ERROR com.botdarr.clients.matrix.MatrixChatClient - Error trying to make matrix request
org.apache.http.conn.HttpHostConnectException: Connect to aguiarvieira.pt:443 [aguiarvieira.pt/130.61.129.53] failed: Connection timed out (Connection timed out)
        at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:156) ~[botdarr-release.jar:?]
        at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:376) ~[botdarr-release.jar:?]
        at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:393) ~[botdarr-release.jar:?]
        at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236) ~[botdarr-release.jar:?]
        at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:186) ~[botdarr-release.jar:?]
        at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89) ~[botdarr-release.jar:?]
        at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110) ~[botdarr-release.jar:?]
        at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185) ~[botdarr-release.jar:?]
        at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83) ~[botdarr-release.jar:?]
        at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:108) ~[botdarr-release.jar:?]
        at com.botdarr.connections.ConnectionHelper.makeRequest(ConnectionHelper.java:46) ~[botdarr-release.jar:?]
        at com.botdarr.clients.matrix.MatrixChatClient.sendMessage(MatrixChatClient.java:144) ~[botdarr-release.jar:?]
        at com.botdarr.clients.matrix.MatrixChatClient.sendMatrixResponse(MatrixChatClient.java:135) ~[botdarr-release.jar:?]
        at com.botdarr.clients.matrix.MatrixChatClient.sendToConfiguredChannels(MatrixChatClient.java:55) ~[botdarr-release.jar:?]
        at com.botdarr.scheduling.Scheduler.lambda$initApiNotifications$0(Scheduler.java:43) ~[botdarr-release.jar:?]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_342]
        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [?:1.8.0_342]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [?:1.8.0_342]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [?:1.8.0_342]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_342]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_342]
        at java.lang.Thread.run(Thread.java:750) [?:1.8.0_342]
Caused by: java.net.ConnectException: Connection timed out (Connection timed out)
        at java.net.PlainSocketImpl.socketConnect(Native Method) ~[?:1.8.0_342]
        at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) ~[?:1.8.0_342]
        at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) ~[?:1.8.0_342]
        at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) ~[?:1.8.0_342]
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) ~[?:1.8.0_342]
        at java.net.Socket.connect(Socket.java:607) ~[?:1.8.0_342]
        at org.apache.http.conn.ssl.SSLConnectionSocketFactory.connectSocket(SSLConnectionSocketFactory.java:368) ~[botdarr-release.jar:?]
        at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:142) ~[botdarr-release.jar:?]
        ... 21 more
2023-Oct-01 20:54:36 PM [pool-3-thread-1] ERROR com.botdarr.clients.matrix.MatrixChatClient - Missing event id for room !SqYVCqqApQFJpFePxl:aguiarvieira.pt and message com.botdarr.clients.matrix.transactions.MatrixSendMessageRequest@7de55530

Do you wish me to return to v3 until this is properly solved ?

@shayaantx
Copy link
Owner

shayaantx commented Oct 2, 2023

@daedric7 I'm a little confused, can you confirm the following:

  1. Please go back to v3 sonarr and pull latest image of botdarr and see if the original error from your original post reproduces (I pushed a fix i mentioned here Bot Spamming: Requested failed with exception, e=null,class=class java.lang.NullPointerException #111 (comment))
  2. If you want to use v4 sonarr, you need to set env variable SONARR_V4=true

if you want, can you post matrix username or discord username and we can look at the issue live?

@daedric7
Copy link
Author

daedric7 commented Oct 2, 2023

@daedric7 I'm a little confused, can you confirm the following:

  1. Please go back to v3 sonarr and pull latest image of botdarr and see if the original error from your original post reproduces (I pushed a fix i mentioned here Bot Spamming: Requested failed with exception, e=null,class=class java.lang.NullPointerException #111 (comment))
  2. If you want to use v4 sonarr, you need to set env variable SONARR_V4=true

if you want, can you post matrix username or discord username and we can look at the issue live?

I'm sorry for the confusion.

Your fix solved it, botdarr is now working with Sonarr V3.

Thank you about the hint for V4.

Nevertheless, you can always find me with @daedric:aguiarvieira.pt on Matrix.

@shayaantx shayaantx linked a pull request Oct 3, 2023 that will close this issue
@shayaantx
Copy link
Owner

@daedric7 sounds good, let me know of any other issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants