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

Unable to connect bot to server due to proxy settings hindering the connection process (Bug) #3437

Open
1 task done
OmegaM1 opened this issue Aug 13, 2024 · 15 comments
Open
1 task done

Comments

@OmegaM1
Copy link

OmegaM1 commented Aug 13, 2024

  • The FAQ doesn't contain a resolution to my issue

Your current code

I get the error code below when I try to execute my main node

     Error: connect ECONNREFUSED 54.38.216.200:25565
        at createConnectionError (node:net:1648:14)
        at afterConnectMultiple (node:net:1678:16) {
      errno: -111,
      code: 'ECONNREFUSED',
      syscall: 'connect',
      address: '54.38.216.200',
      port: 25565
    }
  ]
}
AggregateError [ECONNREFUSED]: 
    Error: connect ECONNREFUSED 54.38.216.200:25565
        at createConnectionError (node:net:1648:14)
        at afterConnectMultiple (node:net:1678:16) {
      errno: -111,
      code: 'ECONNREFUSED',
      syscall: 'connect',
      address: '54.38.216.200',
      port: 25565
    }
  ]
}
Chunk size is 5 but only 1 was read ; partial packet : {"name":0}; buffer :0005000001
Chunk size is 259 but only 1 was read ; partial packet : {"name":123}; buffer :7b2274657874223a22c2a737c2a76d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d5c6ec2a763496e76616c696420686f73746e616d652e5c6ec2a763506c6561736520726566657220746f206f757220646f63756d656e746174696f6e20617420646f63732e746370736869656c642e636f6d5c6e5c6ec2a76644446f532070726f74656374696f6e20627920c2a762c2a76e544350536869656c642e636f6d5c6ec2a737c2a76d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d227d

Would be appreciated for your solution

@OmegaM1 OmegaM1 added possible bug Stage1 just created by someone new to the project, we don't know yet if it deserves an implementation / a f labels Aug 13, 2024
@BallisticOK

This comment has been minimized.

@OmegaM1

This comment has been minimized.

@BallisticOK

This comment has been minimized.

@extremeheat
Copy link
Member

Please verify that you can connect to the server with a vanilla client first

@extremeheat extremeheat added waiting info from op and removed possible bug Stage1 just created by someone new to the project, we don't know yet if it deserves an implementation / a f labels Aug 16, 2024
@OmegaM1
Copy link
Author

OmegaM1 commented Aug 17, 2024

Please verify that you can connect to the server with a vanilla client first

I can always connect to the server with my mc client without any problems but idk why the bots can't
I think there's a firewall from the server side that may blocking the bots connection

@TinyTank800
Copy link

Same issue as this one here. ive done testing on this and it happens when server is running 1.19 or higher and bot tries to join with anything above 1.18. Clients can join just fine but not bots. Bots on 1.18 can join the server since the server has via version on it and work fine just cant go below the world limit of 1.18.

#3435

@OmegaM1
Copy link
Author

OmegaM1 commented Aug 18, 2024

I've tried every version still getting the same error

Chunk size is 5 but only 1 was read ; partial packet : {"name":0}; buffer :0005000001
serializer.js:76
Chunk size is 259 but only 1 was read ; partial packet : {"name":123}; buffer :7b2274657874223a22c2a737c2a76d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d5c6ec2a763496e76616c696420686f73746e616d652e5c6ec2a763506c6561736520726566657220746f206f757220646f63756d656e746174696f6e20617420646f63732e746370736869656c642e636f6d5c6e5c6ec2a76644446f532070726f74656374696f6e20627920c2a762c2a76e544350536869656c642e636f6d5c6ec2a737c2a76d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d227d
Error: connect ETIMEDOUT 142.54.229.243:4145
    at TCPConnectWrap.afterConnect [as oncomplete] (c:\net.js:1595:16)
    at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {errno: -4039, code: 'ETIMEDOUT', syscall: 'connect', address: '142.54.229.243', port: 4145, …}

@Alexandersys
Copy link

Same issue and same error here, When I use socks proxies for my mineflayer bot I keep getting the error above but it works fine when I don't configure proxies for my bot.

@extremeheat
Copy link
Member

If the connection is refused this is an issue with the server or your network connection. Try on a different server and see if you can reproduce. There are other comments on this issue that are not related to OP problem.

@extremeheat
Copy link
Member

If it's a proxy issue then we can't fix it, we can only fix problems directly caused by the code

@OmegaM1
Copy link
Author

OmegaM1 commented Aug 20, 2024

Yeah I just realized it works without setting proxy but the issue is there's a minecraft server that doesn't let you join your bots with your same IP so somehow you gotta bypass it using proxies.

@Maximapple
Copy link

Yeah I just realized it works without setting proxy but the issue is there's a minecraft server that doesn't let you join your bots with your same IP so somehow you gotta bypass it using proxies.

Are you setting the proxy right within the mineflayer script or are you using something like proxychains4?

@OmegaM1
Copy link
Author

OmegaM1 commented Aug 20, 2024

It was working fine for me a few weeks or months ago, but since I updated my version of mineflayer to the latest version, it keeps sending me this error, and I've been ensured several times that there isn't any problem with proxies.

@OmegaM1
Copy link
Author

OmegaM1 commented Aug 20, 2024

Are you setting the proxy right within the mineflayer script or are you using something like proxychains4?

I'm currently using socks5-client

@OmegaM1
Copy link
Author

OmegaM1 commented Aug 20, 2024

This is the code example of how I configure the proxies

const mineflayer = require('mineflayer')
const Socks = require("socks5-client");

const bot = mineflayer.createBot({
stream: Socks.createConnection({
  host: "192.168.1.1",
  port: "25565",
  socksHost: "1.0.0.1",
  socksPort: 4145
}),
  username: 'IamBot',
  password: '',
  version: 1.20,
})

@OmegaM1 OmegaM1 changed the title Bot doesn't join server Unable to connect bot to server due to proxy settings hindering the connection process (Bug) Aug 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants