SmartlyDressedGames / Unturned-3.x-Community

Community portion of the Unturned-3.x repo. If you have access to the source code you can find it here:
https://github.com/SmartlyDressedGames/Unturned-3.x/
84 stars 18 forks source link

Pterodactyl and Unturned 3.21.19.0 Not Connecting to Steam #2639

Closed Alex-Thunderhunter closed 3 years ago

Alex-Thunderhunter commented 3 years ago

I have a VPS with Ubuntu 18.04 LTS installed running Pterodactyl that has an Unturned server allocated/installed. Everything works on the server end but the server will not show up properly in the Server Browser in-game (Comes up on the master server list, but when you actually go into the listing it doesn't show any information, also you can't click the join button without it saying "Lost connection to host or Steam Network") and it doesn't show up in the Steam server browser. I can connect to the server just fine with the IP address in-game. Now I noticed when the server is launching the error "[S_API FAIL] Tried to access Steam interface SteamNetworkingUtils003 before SteamAPI_Init succeeded." shows when the server is launching, then proceeds to finish launching the server. I know there was a post a while back about someone's steamclient.so being messed up, but never said how they fixed the issue. If anyone has a solution to this problem that would be great, Thanks!

SDGNelson commented 3 years ago

Unturned uses the configured port +1 and +2 for the Steam server browser, for example 27015 also uses 27016 and 27017, so do you have those ports open?

kulkaGM commented 3 years ago

That is problem with steamclient.so, try use another version of file.

Alex-Thunderhunter commented 3 years ago

Unturned uses the configured port +1 and +2 for the Steam server browser, for example 27015 also uses 27016 and 27017, so do you have those ports open?

All of those ports are open, but 27015 and 27016 are assigned to different games.

SDGNelson commented 3 years ago

If another game is using the same ports then the traffic will not go to the correct recipient. You can change Unturned's port by editing the Commands.dat file and adding a line "Port 27018" to use ports 27018 through 27020.

Alex-Thunderhunter commented 3 years ago

If another game is using the same ports then the traffic will not go to the correct recipient. You can change Unturned's port by editing the Commands.dat file and adding a line "Port 27018" to use ports 27018 through 27020.

I've currently got the port set to 27025 in the Commands.dat as well as on the startup parameter with ports 27026 and 27027 also assigned to the Unturned allocation.

Alex-Thunderhunter commented 3 years ago

That is problem with steamclient.so, try use another version of file.

I'm not 1000% sure on how to retrieve that file through pterodactyl, is there somewhere I can go grab a different version?

kulkaGM commented 3 years ago

It depends on which Unturned Egg you using for your Pterodactyl panel.

But this should work..... Remove steamclient.so in /home/container/ And then copy steamclient.so from /home/container/linux64/ to /home/container/

Alex-Thunderhunter commented 3 years ago

It depends on which Unturned Egg you using for your Pterodactyl panel.

But this should work..... Remove steamclient.so in /home/container/ And then copy steamclient.so from /home/container/linux64/ to /home/container/

Even after doing that for some reason I'm still running into the same issue. I am using the egg by parker@parkervcp.com though so idk if that has anything to do with it.

SDGNelson commented 3 years ago

You should not need to tamper with the steamclient.so file. Occasionally there have been issues when Valve forgets to update the redist version of steamclient.so or breaks server APIs with the regular version of steamclient.so (e.g. when all Source game Linux servers and Unturned broke temporarily a few weeks ago), but currently there are no problems with steamclient.so.

Okay so to double-check: no other game is using ports 27025-27027 on your server right? What happens now when someone tries to connect using port 27025?

Now that the ports are sorted out if you can attach your Server_ (id) .log file from the Logs folder there may be more error details.

Alex-Thunderhunter commented 3 years ago

Server_Default.log

SDGNelson commented 3 years ago

Thankfully no significant errors. It does lose connection to the Steam servers a couple times.

What happens when sometime tries to connect now though? The original issue was that the server details are empty, but now that the ports are properly configured the details should be working fine?

It may also be worth trying removing the "bind" command from the command-line and Commands.dat file, but the value you set (0) should be fine.

Alex-Thunderhunter commented 3 years ago

Well after further investigation it appears that the server is showing up in the in-game server browser just fine, it's just not showing up on steam.

SDGNelson commented 3 years ago

Glad to hear it is working now! It must have just been the port overlap.