Skip to content

Issue: Socket open error creating socket to server

Austinb edited this page Nov 14, 2012 · 2 revisions

Problem

In debug mode GameQ returns an exception that looks similar to the following: PHP Fatal error: Uncaught exception 'GameQException' with message 'GameQ::socket_open Error creating socket to server tcp://xxx.xxx.xxx.xxx:xxxxx. Error: ' in /path/to/GameQ/GameQ.php...

Issue

The issue that causes this error is one or a combination of the following:

  • A bad route from the queried server back to the server initiating the query.
  • The connection attempt is being blocked/dropped by a network appliance such as a router/firewall or the attempt is being blocked/dropped but the actual server running the game server instance.

Resolution

Unfortunately there is no real way to troubleshoot the issue unless you have direct access to the machine running the game server and the network routers, firewalls, etc in front of it (at your datacenter). If you do not have the ability to have configurations changed there will be little you can do to make the connection with the other server.

If you do have direct access and can change firewall rules, routes, etc... then you will have to open up the proper ports for the query to make it to the server. Also you will have to make sure the response can get back out to the server that initiated the query request.