Server : 127.0.0.1 Errorcode : 10054 SocketErrorCode: ConnectionReset Message : connection reset

Hi, I am using a photon pun2 free asset from unity's asset store. Currently, I am testing it on my local Lan server, which has multiple machines connected. I am launching the server as a load balancing server and using a UDP connection. It's connecting to the master server but when I try to create a room I am getting, error "Server : 127.0.0.1 Errorcode : 10054 SocketErrorCode: ConnectionReset Message : connection reset by peer.

Let me know if I am missing any configuration

Comments

  • hi, @nick117

    do you start game server on same machine or on another server?

    best,
    ilya
  • Hi @chvetsov ,

    So I am launching a photon server (LoadBalancing -> start application) from a different machine that is on the same network.
    Also, I am selecting the server machine's Ip address from "GameServer IP config" from servers from the photos server option from quick launch after starting the server as the application.
  • hi, @nick117

    make sure that IPs you set to game servers are accessible from your network. When we get IP for machine we use external server that in the end give your public IP. That public IP can be IP of some providers machine, not your. so, when you try to connect it everything just fails

    set PublicIPAddress setting in GameServer.xml.config to address in your local network like 192.168...

    best,
    ilya
  • @chvetsov

    I am using it from the unity 3d tool, where I am configuring the same public id which I am using with my network. So Machines are connected via VPN which is configured on a local adapter and I am using my public VPN IP address as my server IP address which is accessible by other devices on the same VPN network.

    Do I need to put the same IP address again in GameServer.xml.config file, even if I have added in unity 3d's photon configuration file?
    In which tag I should put my public IP in GameServer.xml.config file?
    Here is my GameServer.xml.config file and its GameSever tag
    <GameServer>
    <!-- GameServer-to-Master connections. -->
    <S2S>
    <ConnectRetryInterval>15</ConnectRetryInterval>
    <!-- Set to the IP Address of the Photon instance where your Master application is running. -->
    <!--<MasterIPAddress>127.0.0.1</MasterIPAddress>-->
    <MasterIPAddress>10.0.0.70</MasterIPAddress>
    <OutgoingMasterServerPeerPort>4520</OutgoingMasterServerPeerPort>
    </S2S>

    <Master>
    <!-- LB stats - disabled, because vApps use their own app-stats-publishing-mechanism -->
    <AppStatsPublishInterval>1000</AppStatsPublishInterval>

    <GamingWsPath>Game</GamingWsPath>
    <!-- Client-to-Gameserver Secure WebSocket connections. Needs to match the secure WebSocketListener in PhotonServer.config -->
    <GamingSecureWebSocketPort>19091</GamingSecureWebSocketPort>
    <!-- Client-to-Gameserver TCP connections. Needs to match the TCPListener in PhotonServer.config -->
    <GamingTcpPort>4531</GamingTcpPort>
    <!-- Client-to-Gameserver UDP connections. Needs to match the UDPListener in PhotonServer.config -->
    <GamingUdpPort>5056</GamingUdpPort>
    <!-- Client-to-Gameserver WebSocket connections. Needs to match the WebSocketListener in PhotonServer.config -->
    <GamingWebSocketPort>9091</GamingWebSocketPort>

    <!--<PublicIPAddress>127.0.0.1</PublicIPAddress>-->
    <MasterIPAddress>10.0.0.70</MasterIPAddress>
    <PublicIPAddressIPv6></PublicIPAddressIPv6>
    <!-- the hostname for this gameserver. Required for HTTP & websocket connections. Change it to a useful entry, like hostname.mydomain.com, for a production scenario. -->
    <PublicHostName>localhost</PublicHostName>
    </Master>

    <HttpQueueSettings>
    <MaxErrorRequests>30</MaxErrorRequests>
    <MaxTimedOutRequests>30</MaxTimedOutRequests>
    <HttpRequestTimeout>30000</HttpRequestTimeout>
    <MaxBackoffTime>10000</MaxBackoffTime>
    <MaxQueuedRequests>5000</MaxQueuedRequests>
    <QueueTimeout>90000</QueueTimeout>
    <ReconnectInterval>60000</ReconnectInterval>
    <MaxConcurrentRequests>1</MaxConcurrentRequests>
    <LimitHttpResponseMaxSize>200000</LimitHttpResponseMaxSize>
    </HttpQueueSettings>

    <Limits>
    <Inbound>
    <EventCache>
    <EventsCount>10000</EventsCount>
    <SlicesCount>1000</SlicesCount>
    <ActorEventsCount>10000</ActorEventsCount>
    </EventCache>

    <Properties>
    <MaxPropertiesSizePerGame>51000</MaxPropertiesSizePerGame>
    </Properties>
    <Operations>
    </Operations>
    </Inbound>
    </Limits>


    <EnableNamedPipe>False</EnableNamedPipe>

    <LastTouchSecondsDisconnect>0</LastTouchSecondsDisconnect>
    <MaxEmptyRoomTTL>60000</MaxEmptyRoomTTL>

    <ServerStateFile>ServerState.txt</ServerStateFile>
    <WorkloadConfigFile>Workload.1Gbps.config</WorkloadConfigFile>

    </GameServer>

    Thank you.
  • you have to set <!--<PublicIPAddress>127.0.0.1</PublicIPAddress>--> to LAN address of your server

    best,
    ilya
  • Thanks, But the local IP keeps getting changed so what if it changes, do I have to keep updating those config files? What can I do as part of the release, I noticed photon has some release server guidelines, can you guide me on that?
  • it should not be changed if you do not ask in PhotonControl. or it is updated by it.
    On your live servers public IP defined by PhotonControl is usually same as machine public IP. so, you should not have any issue

    I'm not sure what release guide do you mean. all documentation is on this page:
    https://doc.photonengine.com/en-us/server/current/getting-started/photon-server-in-5min

    best,
    ilya