Forums Archived

This forum has been archived. No new posts can be made and no new users can sign up. It remains here for reference only.

Find the new forums here

Minecraft server not waking from external connection

  • Last Post 07 January 2022
  • Topic Is Solved
Badwolf15002 posted this 03 October 2021

Windows 10 OS: 20H2 Product Name/Version: AMP v2.2.1

Hey so i have my minecraft server and it sleeps after 30 Min. It is hosted on my Min computer. I can connect to the server while its asleep and it wakes up. But when a friend connects to from my external ip it it refuses connection and it doesnt wake up. Is there a way to fix this?

Order By: Standard | Newest | Votes
Mike posted this 03 October 2021

Your firewall rules are probably wrong. Make sure that the port is open, that it's a java edition server (sleep doesn't work with Bedrock) - check that AMP is listening on that port when in sleep mode using ampinstmgr ports on the command line.

Badwolf15002 posted this 05 October 2021

Allow the port number of the instance? Because i have allowed the port number of the MC Server through so he can connect (25565) .

Mike posted this 06 October 2021

Did you check the command I gave you when it's sleeping?

Badwolf15002 posted this 06 October 2021

It is listening to 8080, 2223, 12820.

But even when its running its still listening to those ports yet my friend can connect to the server fine externally when its awake but not sleeping.

Mike posted this 06 October 2021

What's using port 12820? I think you've got the wrong type of server set up... Unless you manually change it, AMP only uses ports higher than the one specified as the default.

Badwolf15002 posted this 07 October 2021

For whatever reason when i installed AMP it wouldnt launch any instances unless i used ampinstmgr quickstart in CMD. It then launches but not "as service". Nor does it start when i boot up.

Mike posted this 13 October 2021

I'm not sure what we're talking about here - we seem to have gone from one issue to another?

Mike posted this 14 October 2021

Whether or not it's a service won't make any odds.

Have you tried connecting yourself from a different machine on a different connection rather than relying on your friend to test this? If your friend is using a modded client for example then sleep may not work correctly.

Otherwise you can just disable sleep mode.

Badwolf15002 posted this 19 December 2021

Hey. Can you show me how to change or modify the ports the Minecraft is listening to.

Its been a while and you might remember you helping me with getting Minecraft 1.18 server working by fixing my Java issue and getting the Nightly build. It all works great thanks!

But i still would like to fix the server sleeping issue and not waking when connecting externally.

The current ports its listening after running ampinstmgr ports is 8080, 2223, 12820

Can i remove the unnecessary ports and put the correct 25565 port in there?

Mike posted this 20 December 2021

Right click the instance in ADS and select "edit ports" - 12820 I think is actually the Bedrock port. The other ports are not unnecessary and are part of AMP.

Badwolf15002 posted this 20 December 2021

In the AMP Instance Manager there are no options for Edit Ports when i right click the AMP ADS Instance.

The only ports i can edit are under the Networking tab.

Badwolf15002 posted this 23 December 2021

Where do i rightclick? in the Instance manager or web UI?

AbhorrentJoel posted this 24 December 2021

In the AMP ADS Web UI, right click the instance you want to change the ports for and click Edit Port Bindings.

Badwolf15002 posted this 24 December 2021

That would be my Minecraft instance. When i click Edit Port Bindings.

8080, 2223, 12820 port numbers are not there. The Minecraft instance is already looking for the 25565 port. But the main instance AMPInstance1-ADS is not searching for 25565. I do not know how to edit those port numbers.

AbhorrentJoel posted this 24 December 2021

That would be my Minecraft instance. When i click Edit Port Bindings. 8080, 2223, 12820 port numbers are not there.

That's because, by default, AMP uses ports 8080/TCP and 2223/TCP for the ADS. 12820/UDP is for the Network Metrics on the ADS. You don't need to change any of these.

AMPInstance1-ADS is not searching for 25565

It won't be. Try as Mike says, as he asked you to run ampinstmgr ports for the Minecraft instance you're having trouble with when the server is asleep. You would do that by running ampinstmgr ports [INSTANCENAME] once it is asleep.

Out of curiosity, which Minecraft version are you using?

Badwolf15002 posted this 27 December 2021

After running the ampinstmgr ports again with the Mc instance i got 8081, 2224, 25565.

Originally i thought Mike said to run the command against the ADS instance. But looking here now it is looking for the 25565 port. Then what is causing external connections to not wake the MC server when its sleeping?

I am using Minecraft 1.18 version

AbhorrentJoel posted this 31 December 2021

Being hosted on a desktop computer behind a consumer router makes things a bit more complicated since there could be various software blocking applications and the router may also be configured to drop "unsolicited" inbound packets.

When AMP puts the server to sleep, Java is no longer running on port 25565 - it is the AMP process itself now listening on 25565. Therefore, the AMP executable must be allowed through the firewall on the system it is running on. I do not use AMP on Windows, but I would imagine the firewall may need to be configured to allow external connections in order for sleep mode to work properly.

Badwolf15002 posted this 07 January 2022

Problem seems to have resolved itself. I just restarted the computer (since it hasnt been restarted in 20 days) and i guess it fixed itself.

My friends can wake the server from sleep. No idea what was fixed but glad its fixed.

Thanks for yalls help!