- Home /
Game as server under Linux
Hi there,
I'am working in a multiplayer FPS using Unity 4 (Free version).
I did the networking part, I have compiled the game for Linux and I started the game from Linux as server, from a machine in local networking area. All looks great, on local area network (private IPs) the game clients and game server it's working as expected.
But when I tried to start the game (as server or client, whatever) from a machine having a public IP the game is refusing to start.
Do you know what is the reason?
Note the machine in local area network (where game it's running succesful), have a graphic card. The second machine (where game it's not working; in fact, a hosting dedicated server), have no graphic card. Maybe this is the reason, or there is some limitations due the license, a network problem, or something else? I know the graphic may be important, but there is no log message saying about missing graphic card.
Details (under the above server with public IP and no graphic card):
When I try to start the game compiled without Development Build option, the only returned messages is two lines about Mono path[0] & Mono path[1] - and game it's quiting with no process started and running.
When I compile the game with Development Build option, the output messages is (PUBLIC_IP is my IP of the server, port 55321 differ - allocated each time when try to launch the game):
PlayerConnection initialized from /opt/UnityServer/GameServer/TestGameDev_Data (debug = 0)
PlayerConnection initialized network socket : 0.0.0.0 55321
Multi-casting "[IP] PUBLIC_IP [Port] 55321 [Flags] 3 [Guid] 1585969332 [EditorId] 2608317149 [Version] 1048832 [Id] LinuxPlayer(PUBLIC_IP) [Debug] 1" to [225.0.0.222:54997]...
Waiting for connection from host on [PUBLIC_IP:55321]...
Timed out. Continuing without host connection.
Using monoOptions --debugger-agent=transport=dt_socket,embedding=1,defer=y,address=0.0.0.0:56332
PlayerConnection already initialized - listening to [PUBLIC_IP:55321]
and again, game it's quiting with no process started and running.
On local newtworking using machine with graphic card, the messages looks like (192.168.1.5 it's local IP where game it's running):
PlayerConnection initialized from /opt/UnityServer/GameServer/TestGameDev_Data (debug = 0)
PlayerConnection initialized network socket : 0.0.0.0 55159
Multi-casting "[IP] 192.168.1.5 [Port] 55159 [Flags] 3 [Guid] 3972647406 [EditorId] 2608317149 [Version] 1048832 [Id] LinuxPlayer(192.168.1.5) [Debug] 1" to [225.0.0.222:54997]...
Waiting for connection from host on [192.168.1.5:55159]...
PlayerConnection accepted from [192.168.1.2]
Using monoOptions --debugger-agent=transport=dt_socket,embedding=1,defer=y,address=0.0.0.0:56406
PlayerConnection already initialized - listening to [192.168.1.5:55159]
and game it's working well.
Note MasterServer and Facilitator is running in the same machine (PUBLIC_IP) and looks working great.
Thanks in advance for any idea where problem is.
Iulian
Answer by Briermay · Mar 17, 2013 at 08:50 PM
I don't know much about unity master server setup as all the stuff I'm working with the servers have dedicated non nat'd static ips but looks to me a config error
the whole PUBLIC_IP string to me smells of a config option in something.
I'd look through any and all config files for that string and check to make sure its defined someplace if not then something is not able to detect your external ip address is my best guess.
Your answer
Follow this Question
Related Questions
Unity networking tutorial? 6 Answers
Problem with update project on VPS 0 Answers
Headless linux server 2 Answers
Networking with Linux 1 Answer
Deploying Unity game server on Ubuntu VPS with commands 0 Answers