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

Cannot connect to new created server. UFW okay, port seems not opened

  • 465 Views
  • Last Post 24 December 2021
  • Topic Is Solved
m1scha posted this 16 December 2021

Hi, I am struggeling with since the beginning. Tried it on one of my existing Ubuntu machine, was not able to connect to my servers. Now tried it on a new installed machine also with Ubuntu.

Here the staus of the ufw firewall: doesn´t change when I disable ufw

Status: Aktiv

Zu                         Aktion      Von
--                         ------      ---
8080/tcp                   ALLOW       Anywhere
2223/tcp                   ALLOW       Anywhere                   # AMP:ADS01:FileManagerPlugin.SFTP.SFTPPortNumber
12820/udp                  ALLOW       Anywhere                   # AMP:ADS01:ADSModule.Network.MetricsServerPort
2224/tcp                   ALLOW       Anywhere                   # AMP:br1:FileManagerPlugin.SFTP.SFTPPortNumber
19132/tcp                  ALLOW       Anywhere                   # AMP:br1:MinecraftModule.Minecraft.PortNumber
19132/udp                  ALLOW       Anywhere                   # AMP:br1:MinecraftModule.Minecraft.PortNumber
22/tcp                     ALLOW       Anywhere
2225/tcp                   ALLOW       Anywhere                   # AMP:cs1:FileManagerPlugin.SFTP.SFTPPortNumber
27015/udp                  ALLOW       Anywhere                   # AMP:cs1:srcdsModule.SRCDS.ServerPortBinding
27020/udp                  ALLOW       Anywhere                   # AMP:cs1:srcdsModule.SourceTV.SourceTVPort
8080/tcp (v6)              ALLOW       Anywhere (v6)
2223/tcp (v6)              ALLOW       Anywhere (v6)              # AMP:ADS01:FileManagerPlugin.SFTP.SFTPPortNumber
12820/udp (v6)             ALLOW       Anywhere (v6)              # AMP:ADS01:ADSModule.Network.MetricsServerPort
2224/tcp (v6)              ALLOW       Anywhere (v6)              # AMP:br1:FileManagerPlugin.SFTP.SFTPPortNumber
19132/tcp (v6)             ALLOW       Anywhere (v6)              # AMP:br1:MinecraftModule.Minecraft.PortNumber
19132/udp (v6)             ALLOW       Anywhere (v6)              # AMP:br1:MinecraftModule.Minecraft.PortNumber
22/tcp (v6)                ALLOW       Anywhere (v6)
2225/tcp (v6)              ALLOW       Anywhere (v6)              # AMP:cs1:FileManagerPlugin.SFTP.SFTPPortNumber
27015/udp (v6)             ALLOW       Anywhere (v6)              # AMP:cs1:srcdsModule.SRCDS.ServerPortBinding
27020/udp (v6)             ALLOW       Anywhere (v6)              # AMP:cs1:srcdsModule.SourceTV.SourceTVPort

Looks like port was not opened:

  CubeCoders AMP  💻amp@abox  📁~  ampinstmgr ports
[Info] AMP Instance Manager v2.3.0.6 built 02/12/2021 15:38
[Info] Release spec: Release - built by CUBECODERS/buildbot on CCL-DEV
Please enter value for Instance Name
>br1

[Info] Port usage for br1 (br1)
[Info] Instance is currently running.
[Info] LISTENING        8081    TCP     (Core.Webserver.Port)
[Info] LISTENING        2224    TCP     (FileManagerPlugin.SFTP.SFTPPortNumber)
[Info] CLOSED           19132   Both    (MinecraftModule.Minecraft.PortNumber)

ampinstmgr

  CubeCoders AMP  💻amp@a-box  📁~  ampinstmgr -l | grep -e Module -e URL
Module             │ ADS
URL                │ http://127.0.0.1:8080/
Module             │ Minecraft
URL                │ http://127.0.0.1:8081/
Module             │ srcds
URL                │ http://127.0.0.1:8082/
  CubeCoders AMP  💻amp@a-box  📁~ 

ampinstmgr dumpfirewall

b*@abox:~$ ampinstmgr dumpfirewall
[Info] AMP Instance Manager v2.3.0.6 built 02/12/2021 15:38
[Info] Release spec: Release - built by CUBECODERS/buildbot on CCL-DEV
[Info] Using UFW firewall.
[Info] No firewall rules to display.
b*@abox:~$

I hope somebody can point me in the right direction. It´s my first MC server and have no idea, whats wrong.

m1scha

Order By: Standard | Newest | Votes
Mike posted this 17 December 2021

Have you followed the tutorial for setting up a Minecraft server? https://youtube.com/cubecoders

m1scha posted this 17 December 2021

Hi Mike, yes I followed this video.

m1scha

AbhorrentJoel posted this 17 December 2021

First of all, I want to mention that ampinstmgr dumpfirewall - to my knowledge - needs to be run as the root user or with a user with sudo access. If you are not running the command is a root user or with sudo, it will not return any rules.

Judging by the port number, am I right assuming that you are trying to run the Bedrock version? I cannot see any immediate issues with the firewall (ufw). If the server was running, it would show as LISTENING on 19132, however.

For the Minecraft instance, is the instance showing the server in a running state? What are you seeing in the logs?

m1scha posted this 18 December 2021

Hi, yes. you are right. With sudo ampinstmgr dumpfirewall looks fine. Correct, at this point there was one bedrock server running, also a cs server, but just to test, if this has the same issue. I now istalled a mc java server, but same problem. Cannot connect to it with my client. I have a mc java server on my synology in a docker running. No issues to connect to that one. I will try to find the Minecraft logs and see, if i find something there.

    [Info] AMP Instance Manager v2.3.0.6 built 02/12/2021 15:38
[Info] Release spec: Release - built by CUBECODERS/buildbot on CCL-DEV
[Info] Using UFW firewall.
[Info] TCP/2223 (AMP:ADS01:FileManagerPlugin.SFTP.SFTPPortNumber)
[Info] UDP/12820 (AMP:ADS01:ADSModule.Network.MetricsServerPort)
[Info] TCP/2224 (AMP:br1:FileManagerPlugin.SFTP.SFTPPortNumber)
[Info] TCP/19132 (AMP:br1:MinecraftModule.Minecraft.PortNumber)
[Info] UDP/19132 (AMP:br1:MinecraftModule.Minecraft.PortNumber)
[Info] TCP/2225 (AMP:cs1:FileManagerPlugin.SFTP.SFTPPortNumber)
[Info] UDP/27015 (AMP:cs1:srcdsModule.SRCDS.ServerPortBinding)
[Info] UDP/27020 (AMP:cs1:srcdsModule.SourceTV.SourceTVPort)
[Info] TCP/2226 (AMP:mcj:FileManagerPlugin.SFTP.SFTPPortNumber)
[Info] TCP/25565 (AMP:mcj:MinecraftModule.Minecraft.PortNumber)
[Info] UDP/25565 (AMP:mcj:MinecraftModule.Minecraft.PortNumber)
[Info] TCP/2223 (AMP:ADS01:FileManagerPlugin.SFTP.SFTPPortNumber)
[Info] UDP/12820 (AMP:ADS01:ADSModule.Network.MetricsServerPort)
[Info] TCP/2224 (AMP:br1:FileManagerPlugin.SFTP.SFTPPortNumber)
[Info] TCP/19132 (AMP:br1:MinecraftModule.Minecraft.PortNumber)
[Info] UDP/19132 (AMP:br1:MinecraftModule.Minecraft.PortNumber)
[Info] TCP/2225 (AMP:cs1:FileManagerPlugin.SFTP.SFTPPortNumber)
[Info] UDP/27015 (AMP:cs1:srcdsModule.SRCDS.ServerPortBinding)
[Info] UDP/27020 (AMP:cs1:srcdsModule.SourceTV.SourceTVPort)
[Info] TCP/2226 (AMP:mcj:FileManagerPlugin.SFTP.SFTPPortNumber)
[Info] TCP/25565 (AMP:mcj:MinecraftModule.Minecraft.PortNumber)
[Info] UDP/25565 (AMP:mcj:MinecraftModule.Minecraft.PortNumber)

Mike posted this 18 December 2021

And the status in AMP is "Ready" and you can see the MC servers console output?

m1scha posted this 19 December 2021

The Status is Running and its green. Here the Console output, when I stopped the instance and startet it again

What I also see is in Minceft Java, whe I try to conntect I get "Connection refused", when I try to connect to a MC server port that does not exist I get a timeout.

  Application State: Services Running
:admin10:20:39
Stopping instance mcj...
10:20:45
Instance mcj has stopped.
10:20:53
f541fe49c4852f159eb2d98d07e612fc305d67c5d416dc511786ef1eab4e862f

m1scha posted this 19 December 2021

I did find the Minecraft logs now, but didn´t find anything strange. Or is maybe this an issue?: Starting Minecraft server on 127.0.0.1:25565

This are the Seeting shown for the instance:

Module  Minecraft
Binding 127.0.0.1:8083
Endpoint    10.0.0.29:25565

The logfiles are a little log, I did cut out some stuff

m1scha posted this 19 December 2021

[08:21:16] [ServerMain/INFO]: Found new data pack file/bukkit, loading it automatically [08:21:17] [ServerMain/INFO]: Reloading ResourceManager: Default, bukkit [08:21:18] [Worker-Main-2/INFO]: Loaded 7 recipes [08:21:21] [Server thread/INFO]: Starting minecraft server version 1.18.1 [08:21:21] [Server thread/INFO]: Loading properties [08:21:21] [Server thread/INFO]: This server is running CraftBukkit version 3368-Spigot-8965a50-2a2caa7 (MC: 1.18.1) (Implementing API version 1.18.1-R0.1-SNAPSHOT) [08:21:22] [Server thread/INFO]: Debug logging is disabled [08:21:22] [Server thread/INFO]: Server Ping Player Sample Count: 12 [08:21:22] [Server thread/INFO]: Using 4 threads for Netty based IO [08:21:22] [Server thread/INFO]: Default game type: SURVIVAL [08:21:22] [Server thread/INFO]: Generating keypair [08:21:22] [Server thread/INFO]: Starting Minecraft server on 127.0.0.1:25565 [08:21:22] [Server thread/INFO]: Using epoll channel type [08:21:23] [Server thread/INFO]: Preparing level "world"

Mike posted this 19 December 2021

You've incorrectly bound the Minecraft server to 127.0.0.1 instead of 0.0.0.0. This means nothing except localhost can connect to it.

m1scha posted this 20 December 2021

I changed it to

Default AMP IP Binding
0.0.0.0 (Any IPv4 Address)

Default Application IP Binding
0.0.0.0 (Any IPv4 Address)

Docker External IP
0.0.0.0 (Any IPv4 Address)

Now it shows:

Binding 0.0.0.0:8081
Endpoint    0.0.0.0:25565

But same issue. I get connection refused. I deleted instances and created new to have tne new binding

AbhorrentJoel posted this 20 December 2021

Right, the default AMP IP binding can be 127.0.0.1 in cases where you are only accessing the AMP panel over localhost or using proxy (Nginx by default, over HTTPS). Setting it to 0.0.0.0 will, if the ports are open for the AMP Service, allow the non-proxied (HTTP) to be accessible on the web.

The other two settings look fine.

Now you've created a new instance, is the server starting completely? What is the status when you try to connect?

m1scha posted this 21 December 2021

I do not see anything strange. The instance is running. When I try to connect the error message is: Connection refused

Stopping instance mcj1...
09:09:13
Instance mcj1 has stopped.
09:09:18
Deleting instance 23f046d7-7d72-4217-8d0b-2602a0063d09
09:09:31
Using cached archive: /home/amp/.ampdata/instances/AMPCache-2306.zip
09:09:35
su: ignoring --preserve-environment, it's mutually exclusive with --login
09:09:37
[?1h=[08:09:37] [Core Info] ???????????: Starting AMP version 2.3.0.6 (Triton), built 02/12/2021 15:36
[08:09:37] [Core Info] ???????????: Stream: Mainline (Release) - built by CUBECODERS/buildbot on CCL-DEV
[08:09:37] [Core Info] ???????????: Running in a Docker environment.
[08:09:37] [Core Info] ???????????: OS: Linux / x86_64
[08:09:37] [Core Info] ???????????: CPU: Intel(R) Pentium(R) CPU G3220T @ 2.60GHz (2C/2T)
[08:09:37] [Core Info] ???????????: AMP Instance ID: 628fc3b3-91cd-430c-8cee-c672cff3daeb
[08:09:37] [Core Info] ???????????: Performing first-time setup for this instance, please wait...
09:09:38
[08:09:38] [Core Info] ???????????: AMP has completed its first time setup. Saving settings and shutting down.
09:09:39
[?1l>
09:09:40
e5e74df209ca0882fe76439016f56ba6897518aa411ee74e2896c5cef920d044

Mike posted this 21 December 2021

Connection refused means that instance isn't running, so you'll need to check that instances specific logs to see why it can't start.

m1scha posted this 21 December 2021

I´m sorry, but really lost here. I checked the logs in VDSmcj2 AMP_Logs

[19:15:04] [Core Info]            : CPU: Intel(R) Pentium(R) CPU G3220T @ 2.60GHz (2C/2T)
[19:15:04] [Core Info]            : AMP Instance ID: e9145f9b-bd..
[19:15:06] [ModuleLoader Info]    : Loaded ADSModule version 1.0.0.0 by CubeCoders Limited
[19:15:06] [ModuleLoader Info]    : Loaded FileManagerPlugin version 1.0.0.0 by CubeCoders Limited
[19:15:06] [ModuleLoader Info]    : Loaded EmailSenderPlugin version 1.0.0.0 by CubeCoders Limited
[19:15:06] [ModuleLoader Info]    : Loaded WebRequestPlugin version 1.0.0.0 by CubeCoders Limited
[19:15:06] [ModuleLoader Info]    : Loaded LocalFileBackupPlugin version 1.0.0.0 by CubeCoders Limited
[19:15:06] [ModuleLoader Info]    : Loaded CommonCorePlugin version 1.0.0.0 by CubeCoders Limited
[19:15:06] [ModuleLoader Info]    : ADSModule requests dependency InstanceManagerPlugin...
[19:15:06] [ModuleLoader Info]    : Loaded InstanceManagerPlugin version 1.0.0.0 by CubeCoders Limited
[19:15:06] [ModuleLoader Info]    : ADSModule requests dependency SystemUserManagerPlugin...
[19:15:07] [ModuleLoader Info]    : Loaded SystemUserManagerPlugin version 1.0.0.0 by CubeCoders Limited
[19:15:07] [ModuleLoader Info]    : Loaded steamcmdplugin version 1.0.0.0 by CubeCoders Limited
[19:15:07] [Core Info]            : Metrics server started OK on port 12820
[19:15:11] [FileManager Notice]   : Using keypair with fingerprint ./.=
[19:15:11] [FileManager Info]     : SFTP Server started on 0.0.0.0:2223
[19:15:11] [WebServer Info]       : Websockets are enabled.
[19:15:11] [WebServer Info]       : Webserver started on http://0.0.0.0:8080
[19:15:11] [Logger Warning]       : RouterTimer@10Hz with 2 jobs started
[19:15:11] [Core Info]            : Checking for AMP updates...
[19:15:11] [Core Info]            : AMP is up-to-date.
[19:24:32] [FileManager:admin Activity] : Downloaded file __VDS__ADS01/AMP_Logs/AMPLOG 2021-12-21 19-15-02.log (API mode)
[19:31:16] [Core:admin Info]      : 95a4c0.dbbb1a57c
[19:32:30] [FileManager Activity] : Downloaded file __VDS__ADS01/AMP_Logs/AMPLOG 2021-12-21 19-15-02.log (Direct mode)

m1scha posted this 21 December 2021

I saw thomething that looked like a an license issue and reentered my license key In the logs under VDSADS01 AMP_Logs I found this, but no idea what that means

[19:40:40] [APIService:Anonymous Warning] : Access denied: You do not have permission to use this method (FileManagerPlugin.GetDirectoryListing) at this time. This method requires the Session.LoggedIn permission. (Origin: 10.0.0.132:61873)
[19:40:44] [APIService:Anonymous Warning] : Access denied: You do not have permission to use this method (FileManagerPlugin.GetDirectoryListing) at this time. This method requires the Session.LoggedIn permission. (Origin: 10.0.0.132:61873)

AbhorrentJoel posted this 21 December 2021

You're downloading the logs for the ADS, not the instance itself.

And the access denied logs I am not sure about, but I would presume that it may caused by caused by going back and forth in your browser - Mike would probably be able to confirm.

Let's step back a little. Create an instance for Minecraft Java Edition, enter that instance, update it, launch the server, and go to the console. See if there is anything outstanding there. From there, we can work to see what the problem is.

m1scha posted this 21 December 2021

Thanks for the patience! I deleted all instances, created a new one, updated, and started it. That looks fine to me in the console

20:35:52
Using cached archive: /home/amp/.ampdata/instances/AMPCache-2308.zip
20:35:57
su: ignoring --preserve-environment, it's mutually exclusive with --login
20:35:58
[?1h=[19:35:58] [Core Info] ???????????: Starting AMP version 2.3.0.8 (Triton), built 21/12/2021 15:39
[19:35:58] [Core Info] ???????????: Stream: Mainline (Release) - built by CUBECODERS/buildbot on CCL-DEV
20:35:59
[19:35:59] [Core Info] ???????????: Running in a Docker environment.
[19:35:59] [Core Info] ???????????: OS: Linux / x86_64
[19:35:59] [Core Info] ???????????: CPU: Intel(R) Pentium(R) CPU G3220T @ 2.60GHz (2C/2T)
[19:35:59] [Core Info] ???????????: AMP Instance ID: 9710651f-7446-4e91-bc6f-4e3d002b4e7e
[19:35:59] [Core Info] ???????????: Performing first-time setup for this instance, please wait...
20:36:00
[19:36:00] [Core Info] ???????????: AMP has completed its first time setup. Saving settings and shutting down.
20:36:01
[?1l>
20:36:02
eac4166d6c5b126e769635f9bbf684df8f901016960d2e95e07602b1626fdf43
20:37:09
Upgrading instance java-new
20:37:10
Stopping instance java-new...
20:37:15
Instance java-new has stopped.
Using cached archive: /home/amp/.ampdata/instances/AMPCache-2308.zip
20:38:00
ec7fcf22fbb734ff1ab417b6fa16c88272671a4d93fce9fb0dfaebe8e3ea00d8

m1scha posted this 21 December 2021

Then tried to connect and get connection refused I see three logs in the instance. First one looks fine. In the secon I find this, which is weired, since this is Minecraft Java, and it looks fore something from bedrock

[19:36:05] [Core Info]            : Checking for AMP updates...
[19:36:05] [Core Info]            : AMP is up-to-date.
[19:36:28] [Minecraft Warning]    : Unable to get Bedrock version data from https://minecraft.net/en-us/download/server/bedrock
[19:36:28] [Core Error]           : TaskCanceledException
[19:36:28] [Core Error]           : [0] (TaskCanceledException) : The operation was canceled.
[19:36:28] [Core Error]           :   at MinecraftModule.UpdateManager.GetBedrockVersion () 
[19:36:28] [Core Error]           : ObjectDisposedException
[19:36:28] [Core Error]           : [1] (ObjectDisposedException) : Cannot access a disposed object.
Object name: 'MobileAuthenticatedStream'.
[19:36:28] [Core Error]           :   at Net.Http.HttpConnection.FillAsync () 
  at Net.Http.HttpConnection.ReadNextResponseHeaderLineAsync (Boolean foldedHeadersAllowed) 
[19:36:28] [Minecraft Info]       : Updating Modpack cache for 89 modpacks...
[19:36:31] [Minecraft Info]       : Update complete.

AbhorrentJoel posted this 21 December 2021

Have you stared the Minecraft server itself? I know it sounds like a stupid question, but you're showing logs from the AMP itself and not from the Minecraft console/log.

m1scha posted this 21 December 2021

I´m sure the problem is something stupid.. When I look into the Minecraft folder I find a plugins folder, and the server.properties, which is empty.

This is the status on the right side:

Refresh
java-new
Module  Minecraft
Endpoint    10.0.0.29:25565
Autostart   Yes
CPU Usage   
0%
Memory Usage    
0\1024 MB
Active Users    
0\10
Status: Running<>
Create Instance
+
java-new
Instance Name   java-new
Friendly Name   java-new
Description 
Running Yes
Module  Minecraft
Binding 0.0.0.0:8081
Endpoint    10.0.0.29:25565
Management Mode Managed by ADS
Start on Boot   Yes
Suspended   No

m1scha posted this 21 December 2021

Ahhhhh, sorry. This was dumb. In fact the server was not started itself. Now I was able to join. Really sorry. I was thinking instance running means that the server is running. Earlier I did this right, but that was at the point where my network settings were incorrect: Thank you so much. I can connect to the Java server, will also try bedrock now.

THANKS!!

AbhorrentJoel posted this 21 December 2021

Update here if there issues relating to Bedrock, but it should work if you follow the same procedure. If all is good, then mark this as solved.

m1scha posted this 24 December 2021

Hi, everything works now perfectly. Thank you both so much for the support. Really great tool, and very happe to be able to use it now. Have nice holidays!

Close