Error 10054 with Photon Server
The whole answer can be found below.
Try Our
Documentation
Please check if you can find an answer in our extensive documentation on Photon Server.
Join Us
on Discord
Meet and talk to our staff and the entire Photon-Community via Discord.
Read More on
Stack Overflow
Find more information on Stack Overflow (for Circle members only).
Error 10054 with Photon Server
NotQuiteSmith
2017-09-17 08:10:36
If I use "Photon Cloud" to run two instances of my app on my home network, they connect fine and I see both players in a scene, etc. If I switch to "Self Hosted" with the IP of my home server running the 64 bit "Load Balancing (MyCloud)" Photon Control, the app instance on the server connects OK, but on the second machine I get:
Receive issue. State: Connected. Server: '127.0.0.1' ErrorCode: 10054 SocketErrorCode: ConnectionReset Message: An existing connection was forcibly closed by the remote host.
System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host.
at System.Net.Sockets.Socket.Receive (System.Byte[] buffer) [0x00000] in
at ExitGames.Client.Photon.SocketUdp.ReceiveLoop () [0x00000] in
UnityEngine.Debug:LogError(Object)
NetworkingPeer:DebugReturn(DebugLevel, String) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/NetworkingPeer.cs:1522)
ExitGames.Client.Photon.<>c__DisplayClass145_0:
ExitGames.Client.Photon.EnetPeer:DispatchIncomingCommands()
ExitGames.Client.Photon.PhotonPeer:DispatchIncomingCommands()
PhotonHandler:Update() (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonHandler.cs:157)
Photon Control is running as admin and has added the firewall exceptions ok.
Please help!
Thanks!
Comments
NotQuiteSmith
2017-09-17 08:35:38
Two minutes. Just two minutes after I posted this, I figured it out. Bah! Edited the references to "127.0.0.1" in Photon Control (/deploy/LoadBalancing/GameServer/bin/Photon.LoadBalancing.dll.config).
I must have missed the document regarding setup of PhotonControl - could someone please send a link so I can see what else I missed?! Thanks!
gland that you found it
best,
ilya
Hi @NotQuiteSmith,
"Game Server IP Config" in "Starting Photon in 5 Minutes"
PedroLazari
2021-10-14 15:13:35
Hi @NotQuiteSmith
What references did you edited on the Photon.LoadBalancing.dll.config? I opened this file and get lost on what exactly edit...
Thanks for your support
@PedroLazari
what version of sdk are you using?
best,
ilya
AndreaPassini
2022-07-13 15:23:00
Hi, i got the same ErrorCode and i'm using SDK version: 5.0.12.7770.
"What references did you edited on the Photon.LoadBalancing.dll.config? I opened this file and get lost on what exactly edit..."
Same problem here.
hi, @AndreaPassini
you have to modify GameServer.xml.config now. Look for PublicIPAddress and update it to correct server ip
best,
ilya
Hi, I am using photon server V-5 host on AWS but it not working. I tried on local machine it work but when i put it on server (AWS-Windows machine) it not working. Also i put my server public IP address on GameServer.xml.config and restart but it not working. Please help me.
hi, @atik_swt
did you setup firewall?
did you setup AWS specific policy for port?
did you try to connect from same machine to photon?
what protocol are you using? what client lib?
best,
ilya
Hi @chvetsov
I setup firewall. now, its working on unity editor if i use ws:// protocol. But i need to use wss:// web socket secure protocol.
Can you help me to resolve this issue? how can i resolve wss:// issue on editor / server.
hi, @atik_swt
with wss it is tricky. so, we have instructions how to get it working on local machine with self signed certificate. but on production I do not have cases when developers managed to get self-signed certificate working
so, for production you have to by real certificate
best,
ilya
I have real certificate and i store it "deploy\bin_Win64\certs" here. but when i try to connect it not working.
please tell me how can i do it with real certificate. I have to release my game ASAP and only thing is left is connect with WSS.
@chvetsov
@atik_swt did you check this doc page: https://doc.photonengine.com/server/v5/operations/certificate-setup
please write e-mail to [email protected] with logs from bin_Win64/log folder. please remove all of them and than start server and test
best,
ilya
@chvetsov
Optionally add <ServerCertificate>
node(s) per listener for advanced configuration of your certificate(s). Read more here for details.
how to do this, any idea? and it is mandatory?
@atik_swt not sure what is not clear there.
but here is some comments:
you need an extra section if your certificate file is called not server.pem. if it is placed not in bin_Win64/certs, if it has an extra password to access it.
in our case for development we use something like this:
<ServerCertificates>
<ServerCertificate Certificate="server.pem" Password="custom_password"/>
</ServerCertificates>
all this just because of password
entire listener configuration looks like this:
<HTTPListener
Name="*:[PORT]"
IPAddress="0.0.0.0"
Port="443"
DisableNagle="true"
InactivityTimeout="10000"
Secure="true"
DefaultDomain="exitgames.com"
>
<Routing>
<Route
Name="Master"
Url="/master/+"
OverrideApplication="Master"
PeerType="WebSocket"
Counters="true"
/>
<Route
Name="Game"
Url="/game/+"
OverrideApplication="Game"
PingEvery="2000"
PeerType="WebSocket"
Counters="true"
/>
<Route Url="/photon/m" Ping="true" Counters="false"/>
<Route
Name = "NameServer"
Url="/+"
OverrideApplication="NameServer"
PingEvery="2000"
PeerType="WebSocket"
Counters="true"
/>
</Routing>
<ServerCertificates>
<ServerCertificate Certificate="server.pem" Password="custom_password"/>
</ServerCertificates>
</HTTPListener>
we add this section because custom password is set. not sure how it is in your case
best,
ilya
Back to top