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

What is the reason for this error and how can I fix it? #492

Open
EsmitJonz opened this issue Feb 6, 2025 · 4 comments
Open

What is the reason for this error and how can I fix it? #492

EsmitJonz opened this issue Feb 6, 2025 · 4 comments
Labels
question Further information is requested

Comments

@EsmitJonz
Copy link
Contributor

root@BOT:~/BOT# bash start.sh
[main] INFO com.namelessmc.bot.Main - Starting Nameless Link version 5
[main] INFO com.namelessmc.bot.connections.StorageInitializer - Environment variable SHARDS not set, using default value 1
[main] INFO com.namelessmc.bot.Main - Initializing shard 0
[JDA [0 / 1] RateLimit-Elastic-Worker 1] ERROR net.dv8tion.jda.internal.requests.Requester - There was an I/O error while executing a REST request: Read timed out
Exception in thread "main" net.dv8tion.jda.api.exceptions.ErrorResponseException: -1: java.net.SocketTimeoutException
        at net.dv8tion.jda.internal.requests.RestActionImpl.complete(RestActionImpl.java:233)
        at net.dv8tion.jda.api.requests.RestAction.complete(RestAction.java:639)
        at net.dv8tion.jda.internal.JDAImpl.verifyToken(JDAImpl.java:403)
        at net.dv8tion.jda.internal.JDAImpl.login(JDAImpl.java:327)
        at net.dv8tion.jda.internal.JDAImpl.login(JDAImpl.java:293)
        at net.dv8tion.jda.api.JDABuilder.build(JDABuilder.java:1847)
        at com.namelessmc.bot.Main.main(Main.java:155)
Caused by: java.net.SocketTimeoutException: Read timed out
        at java.base/sun.nio.ch.NioSocketImpl.timedRead(NioSocketImpl.java:278)
        at java.base/sun.nio.ch.NioSocketImpl.implRead(NioSocketImpl.java:304)
        at java.base/sun.nio.ch.NioSocketImpl.read(NioSocketImpl.java:346)
        at java.base/sun.nio.ch.NioSocketImpl$1.read(NioSocketImpl.java:796)
        at java.base/java.net.Socket$SocketInputStream.read(Socket.java:1099)
        at java.base/sun.security.ssl.SSLSocketInputRecord.read(SSLSocketInputRecord.java:489)
        at java.base/sun.security.ssl.SSLSocketInputRecord.readHeader(SSLSocketInputRecord.java:483)
        at java.base/sun.security.ssl.SSLSocketInputRecord.decode(SSLSocketInputRecord.java:160)
        at java.base/sun.security.ssl.SSLTransport.decode(SSLTransport.java:111)
        at java.base/sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl.java:1506)
        at java.base/sun.security.ssl.SSLSocketImpl.readHandshakeRecord(SSLSocketImpl.java:1421)
        at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:455)
        at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:426)
        at okhttp3.internal.connection.RealConnection.connectTls(RealConnection.kt:379)
        at okhttp3.internal.connection.RealConnection.establishProtocol(RealConnection.kt:337)
        at okhttp3.internal.connection.RealConnection.connect(RealConnection.kt:209)
        at okhttp3.internal.connection.ExchangeFinder.findConnection(ExchangeFinder.kt:226)
        at okhttp3.internal.connection.ExchangeFinder.findHealthyConnection(ExchangeFinder.kt:106)
        at okhttp3.internal.connection.ExchangeFinder.find(ExchangeFinder.kt:74)
        at okhttp3.internal.connection.RealCall.initExchange$okhttp(RealCall.kt:255)
        at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.kt:32)
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
        at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.kt:95)
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
        at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.kt:83)
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
        at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.kt:76)
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
        at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:201)
        at okhttp3.internal.connection.RealCall.execute(RealCall.kt:154)
        at net.dv8tion.jda.internal.requests.Requester.execute(Requester.java:202)
        at net.dv8tion.jda.internal.requests.Requester.execute(Requester.java:276)
        at net.dv8tion.jda.internal.requests.Requester.execute(Requester.java:157)
        at net.dv8tion.jda.internal.requests.Requester.execute(Requester.java:140)
        at net.dv8tion.jda.internal.requests.Requester$WorkTask.execute(Requester.java:406)
        at net.dv8tion.jda.api.requests.SequentialRestRateLimiter$Bucket.execute(SequentialRestRateLimiter.java:478)
        at net.dv8tion.jda.api.requests.SequentialRestRateLimiter$Bucket.run(SequentialRestRateLimiter.java:518)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
        at java.base/java.lang.Thread.run(Thread.java:1583)
        Suppressed: java.net.SocketTimeoutException: Read timed out
                ... 40 more
        Suppressed: java.net.SocketTimeoutException: Read timed out
                ... 40 more
        Suppressed: java.net.SocketTimeoutException: Read timed out
                ... 40 more
        Suppressed: java.net.SocketTimeoutException: Read timed out
                ... 40 more
Caused by: net.dv8tion.jda.api.exceptions.ContextException
        at net.dv8tion.jda.api.exceptions.ContextException.here(ContextException.java:54)
        at net.dv8tion.jda.api.requests.Request.<init>(Request.java:78)
        at net.dv8tion.jda.api.requests.RestFuture.<init>(RestFuture.java:40)
        at net.dv8tion.jda.internal.requests.RestActionImpl.submit(RestActionImpl.java:215)
        at net.dv8tion.jda.internal.requests.RestActionImpl.complete(RestActionImpl.java:225)
        at net.dv8tion.jda.api.requests.RestAction.complete(RestAction.java:639)
        at net.dv8tion.jda.internal.JDAImpl.verifyToken(JDAImpl.java:403)
        at net.dv8tion.jda.internal.JDAImpl.login(JDAImpl.java:327)
        at net.dv8tion.jda.internal.JDAImpl.login(JDAImpl.java:293)
        at net.dv8tion.jda.api.JDABuilder.build(JDABuilder.java:1847)
        at com.namelessmc.bot.Main.main(Main.java:155)
@Mtp-dev
Copy link

Mtp-dev commented Feb 6, 2025

It looks like your Nameless Link bot is failing to start due to a socket timeout error when trying to connect to Discord's API.

Check your firewall and that you're using the correct bot token.

@EsmitJonz
Copy link
Contributor Author

It looks like your Nameless Link bot is failing to start due to a socket timeout error when trying to connect to Discord's API.

Check your firewall and that you're using the correct bot token.

I tried but it didn't work.

@EsmitJonz
Copy link
Contributor Author

Even Docker has this problem.

root@BOT:~/BOT# docker compose up
[+] Running 1/0
 ✔ Container bot-link-1  Recreated                                                                                          0.0s 
Attaching to bot-link-1
bot-link-1  | [main] INFO Core - Starting Nameless Link version 4
bot-link-1  | [main] INFO Configuration - Environment variable DEFAULT_LANGUAGE not set, using default value 'en_UK'
bot-link-1  | [main] INFO Configuration - Environment variable SHARDS not set, using default value 1
bot-link-1  | [main] INFO Core - Initializing shard 0
bot-link-1  | [java.net.SocketTimeoutException: Read timed out, java.net.SocketTimeoutException: Read timed out, java.net.SocketTimeoutException: Read timed out, java.net.SocketTimeoutException: Read timed out]
bot-link-1  | [java.net.SocketTimeoutException: Read timed out, java.net.SocketTimeoutException: Read timed out, java.net.SocketTimeoutException: Read timed out, java.net.SocketTimeoutException: Read timed out]
bot-link-1  | [JDA [0 / 1] RateLimit-Worker 1] ERROR net.dv8tion.jda.internal.requests.Requester - There was an I/O error while executing a REST request: Read timed out
bot-link-1  | Exception in thread "main" 
bot-link-1  | net.dv8tion.jda.api.exceptions.ErrorResponseException: -1: java.net.SocketTimeoutException
bot-link-1  |   at net.dv8tion.jda.internal.requests.RestActionImpl.complete(RestActionImpl.java:227)
bot-link-1  |   at net.dv8tion.jda.api.requests.RestAction.complete(RestAction.java:632)
bot-link-1  |   at net.dv8tion.jda.internal.JDAImpl.verifyToken(JDAImpl.java:407)
bot-link-1  |   at net.dv8tion.jda.internal.JDAImpl.login(JDAImpl.java:331)
bot-link-1  |   at net.dv8tion.jda.internal.JDAImpl.login(JDAImpl.java:297)
bot-link-1  |   at net.dv8tion.jda.api.JDABuilder.build(JDABuilder.java:1828)
bot-link-1  |   at com.namelessmc.bot.Main.main(Main.java:158)
bot-link-1  | Caused by: java.net.SocketTimeoutException: Read timed out
bot-link-1  |   at java.base/sun.nio.ch.NioSocketImpl.timedRead(NioSocketImpl.java:288)
bot-link-1  |   at java.base/sun.nio.ch.NioSocketImpl.implRead(NioSocketImpl.java:314)
bot-link-1  |   at java.base/sun.nio.ch.NioSocketImpl.read(NioSocketImpl.java:355)
bot-link-1  |   at java.base/sun.nio.ch.NioSocketImpl$1.read(NioSocketImpl.java:808)
bot-link-1  |   at java.base/java.net.Socket$SocketInputStream.read(Socket.java:966)
bot-link-1  |   at java.base/sun.security.ssl.SSLSocketInputRecord.read(SSLSocketInputRecord.java:484)
bot-link-1  |   at java.base/sun.security.ssl.SSLSocketInputRecord.readHeader(SSLSocketInputRecord.java:478)
bot-link-1  |   at java.base/sun.security.ssl.SSLSocketInputRecord.decode(SSLSocketInputRecord.java:160)
bot-link-1  |   at java.base/sun.security.ssl.SSLTransport.decode(SSLTransport.java:111)
bot-link-1  |   at java.base/sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl.java:1510)
bot-link-1  |   at java.base/sun.security.ssl.SSLSocketImpl.readHandshakeRecord(SSLSocketImpl.java:1425)
bot-link-1  |   at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:455)
bot-link-1  |   at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:426)
bot-link-1  |   at okhttp3.internal.connection.RealConnection.connectTls(RealConnection.kt:379)
bot-link-1  |   at okhttp3.internal.connection.RealConnection.establishProtocol(RealConnection.kt:337)
bot-link-1  |   at okhttp3.internal.connection.RealConnection.connect(RealConnection.kt:209)
bot-link-1  |   at okhttp3.internal.connection.ExchangeFinder.findConnection(ExchangeFinder.kt:226)
bot-link-1  |   at okhttp3.internal.connection.ExchangeFinder.findHealthyConnection(ExchangeFinder.kt:106)
bot-link-1  |   at okhttp3.internal.connection.ExchangeFinder.find(ExchangeFinder.kt:74)
bot-link-1  |   at okhttp3.internal.connection.RealCall.initExchange$okhttp(RealCall.kt:255)
bot-link-1  |   at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.kt:32)
bot-link-1  |   at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
bot-link-1  |   at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.kt:95)
bot-link-1  |   at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
bot-link-1  |   at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.kt:83)
bot-link-1  |   at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
bot-link-1  |   at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.kt:76)
bot-link-1  |   at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
bot-link-1  |   at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:201)
bot-link-1  |   at okhttp3.internal.connection.RealCall.execute(RealCall.kt:154)
bot-link-1  |   at net.dv8tion.jda.internal.requests.Requester.execute(Requester.java:190)
bot-link-1  |   at net.dv8tion.jda.internal.requests.Requester.execute(Requester.java:264)
bot-link-1  |   at net.dv8tion.jda.internal.requests.Requester.execute(Requester.java:145)
bot-link-1  |   at net.dv8tion.jda.internal.requests.Requester.execute(Requester.java:128)
bot-link-1  |   at net.dv8tion.jda.internal.requests.Requester$WorkTask.execute(Requester.java:378)
bot-link-1  |   at net.dv8tion.jda.api.requests.SequentialRestRateLimiter$Bucket.execute(SequentialRestRateLimiter.java:450)
bot-link-1  |   at net.dv8tion.jda.api.requests.SequentialRestRateLimiter$Bucket.run(SequentialRestRateLimiter.java:494)
bot-link-1  |   at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
bot-link-1  |   at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
bot-link-1  |   at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
bot-link-1  |   at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
bot-link-1  |   at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
bot-link-1  |   at java.base/java.lang.Thread.run(Thread.java:840)
bot-link-1  |   Suppressed: java.net.SocketTimeoutException: Read timed out
bot-link-1  |           ... 43 more
bot-link-1  |   Suppressed: java.net.SocketTimeoutException: Read timed out
bot-link-1  |           ... 43 more
bot-link-1  |   Suppressed: java.net.SocketTimeoutException: Read timed out
bot-link-1  |           ... 43 more
bot-link-1  |   Suppressed: java.net.SocketTimeoutException: Read timed out
bot-link-1  |           ... 43 more
bot-link-1  | Caused by: net.dv8tion.jda.api.exceptions.ContextException
bot-link-1  |   at net.dv8tion.jda.api.exceptions.ContextException.here(ContextException.java:54)
bot-link-1  |   at net.dv8tion.jda.api.requests.Request.<init>(Request.java:72)
bot-link-1  |   at net.dv8tion.jda.api.requests.RestFuture.<init>(RestFuture.java:35)
bot-link-1  |   at net.dv8tion.jda.internal.requests.RestActionImpl.submit(RestActionImpl.java:209)
bot-link-1  |   at net.dv8tion.jda.internal.requests.RestActionImpl.complete(RestActionImpl.java:219)
bot-link-1  |   at net.dv8tion.jda.api.requests.RestAction.complete(RestAction.java:632)
bot-link-1  |   at net.dv8tion.jda.internal.JDAImpl.verifyToken(JDAImpl.java:407)
bot-link-1  |   at net.dv8tion.jda.internal.JDAImpl.login(JDAImpl.java:331)
bot-link-1  |   at net.dv8tion.jda.internal.JDAImpl.login(JDAImpl.java:297)
bot-link-1  |   at net.dv8tion.jda.api.JDABuilder.build(JDABuilder.java:1828)
bot-link-1  |   at com.namelessmc.bot.Main.main(Main.java:158)
bot-link-1 exited with code 0

@PadowYT2
Copy link
Contributor

PadowYT2 commented Feb 7, 2025

Looks like your machine is unable to connect to Discord servers

@Derkades Derkades added the question Further information is requested label Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants