Frustration (Connection refused)

Status
This thread has been locked.

iiredfox

Feedback score
0
Posts
75
Reactions
11
Resources
0
Hi,

I'm using Pterodactyl panel and all i know is if you allocate a port and bind it to a server it will open the port,
The developer made a plugin that Sends a list of the participating clans to the clan war server (from survival server) and used these ports: 25580, 25581 and still closed. even though tried it with external ip.
Bind it to a server and still says connection refuse. Also, we're not using MySQL for this.

Here's the code for the plugin that we're using to connect: https://hastebin.com/ozehiwixet.cs
It has all the documentation that explains the issue.
Error: https://paste.md-5.net/qehecihiya.avrasm

Contacted with Pterodactyl support but they couldn't help me since some of them not familiar with Minecraft, I'm using Bungee and bungee has the external IP and the rest has a local ip.

Any thoughts? Any idea of how to fix this?
 
PebbleHost
High performance, consistent uptime and fast support. Minecraft hosting that just works.

O-T

IT Consultant
Supreme
Feedback score
51
Posts
168
Reactions
124
Resources
0
First of all, let me clear this up: 127.0.0.1 is localhost, yes, but 0.0.0.0 is not localhost, at all. 0.0.0.0 means bind to all interfaces, and so to all IPs, so if you have IP A and IP B and IP C assigned to that server, 0.0.0.0 will basically tell the application that all IPs A, B and C have to be listened to and so the app will be accessible from these three IPs. While if you were to tell the app to listen to IP A only then the app wouldn't be reachable on IPs B and C for example.

Second of all, pterodactyl doesn't accept localhost by default and so it is not resolved, so all you need to do to fix that issue of yours is use the server's external IP in that piece of code, and not either of the two forms for localhost or 0.0.0.0.
 

Mooselk

Motocross enthusiast
Premium
Feedback score
9
Posts
298
Reactions
213
Resources
0
"Also tried using "0.0.0.0" and "localhost", but I believe all are the same thing"

0.0.0.0 will bind to all addresses, localhost is the same as 127.0.0.1 which will only allow connections from the machine it's self or what ever.
 

iiredfox

Feedback score
0
Posts
75
Reactions
11
Resources
0
First of all, let me clear this up: 127.0.0.1 is localhost, yes, but 0.0.0.0 is not localhost, at all. 0.0.0.0 means bind to all interfaces, and so to all IPs, so if you have IP A and IP B and IP C assigned to that server, 0.0.0.0 will basically tell the application that all IPs A, B and C have to be listened to and so the app will be accessible from these three IPs. While if you were to tell the app to listen to IP A only then the app wouldn't be reachable on IPs B and C for example.

Second of all, pterodactyl doesn't accept localhost by default and so it is not resolved, so all you need to do to fix that issue of yours is use the server's external IP in that piece of code, and not either of the two forms for localhost or 0.0.0.0.
Already used the external IP but i'm using it on the bungee and it didn't accept it at all.
 

ItsHoney

Premium
Feedback score
8
Posts
189
Reactions
35
Resources
0
Pterodactyl makes use of Docker containers which may be why It's not allowing, try going into pterodactyl control panel and find a place where we could allocate ports.

I faced a similar issue sometime ago but It was with MySQL
 

iiredfox

Feedback score
0
Posts
75
Reactions
11
Resources
0
Pterodactyl makes use of Docker containers which may be why It's not allowing, try going into pterodactyl control panel and find a place where we could allocate ports.

I faced a similar issue sometime ago but It was with MySQL
Already allocated ports but the ports still closed.
 

ItsHoney

Premium
Feedback score
8
Posts
189
Reactions
35
Resources
0
Do you have a self-managed VPS?

If so, try this, to rule out the possibility that pterodactyl may not be at fault here, try running a server using the VPS console and then see if the connection fails that way as well. Also make sure that If you setup a firewall then that specific port is open
 

Mark

System Admin
Supreme
Feedback score
16
Posts
80
Reactions
18
Resources
0
Try using this ip inside of bungee config: 172.18.0.1
 

iiredfox

Feedback score
0
Posts
75
Reactions
11
Resources
0
That won't work unless he's wanting to locally host the server and have it communicate with the host machine, that's just pterodactyl's bridged interface. Using 127.0.0.1 will only work inside of the container since the network is isolated on a per container basis...

The easiest way around this is to use the WAN IP address on eth0 or equivalent interface, docker should take care of all of the networking needs such as opening ports and the such for you.
Do you have any tutorial that would help me out to open ports using docker?
 
Status
This thread has been locked.
Top