Quantcast
Channel: Photon Server — Photon Engine
Viewing all 1557 articles
Browse latest View live

How to connect to photon with a webGL game?

$
0
0
I have a webgl game, I embedded it into my website and the game worked until I got to the point where I had to connect to photon server.

My question is: Is there any specific ways I have to connect to photon with a webgl game?
(I am using Web Sockets Secure in my photon settings)

Unity Editor and Build Cant find each others room

$
0
0
My project was connecting fine about 3 hours ago when suddenly my Editor build and exported build were no longer able to join the same room.

To connect to photon I use
public void ConnectToPhoton() { PhotonNetwork.GameVersion = gameVersion; PhotonNetwork.ConnectUsingSettings(); Debug.Log("ConnectToPhoton"); } public override void OnConnectedToMaster() { PhotonNetwork.JoinLobby(); Debug.Log("OnConnectedToMaster"); //PhotonNetwork.JoinRandomRoom(null,0); } public override void OnJoinedLobby() { Debug.Log("OnJoinedLobby"); //PhotonNetwork.JoinRandomRoom(null, 0); PhotonNetwork.JoinRandomRoom(null, 0); } public override void OnJoinRandomFailed(short returnCode, string message) { print(message + " " + returnCode); Debug.Log("OnPhotonRandomJoinFailed() was called by PUN. No random room available, so we create one. Calling: PhotonNetwork.CreateRoom(null, new RoomOptions() {maxPlayers = 4}, null);"); PhotonNetwork.CreateRoom(null, new RoomOptions() { MaxPlayers = 4 }, null); }

The error code from OnRandomJoinFailed gives me 32760 No rooms
Typically I was able to use either the exported build or the Editor build to host. At the time I was working i wasnt affecting any code related to this. I have even gone back to my previous git pull and am still unable to get my builds to connect to each other. I can't seem to find the cause and would be glad to help.

Logging

$
0
0
HI!

I cant out my message into log file.

1. I modify constructor WebHooksPlugin (example plugin with sdk)
public WebHooksPlugin()
{
this.UseStrictMode = true;

this.PluginHost.LogDebug("HEllo!!!!!!");
this.PluginHost.LogInfo("H123Ello!!!!!!");
}

2. Add to log4net.config file



















File PluginsTest.log automaticaly create, but it is empty... What do I doing wrong?

Server monitor tool

$
0
0
Hello,
we are looking for way to monitor our servers, what we need to know is:
1) count of rooms and players during period of time (day, 0.5 of day and so)
2) average ping
3) possible memory leaks

Is there a way to get this info as report in Photon Server?

Thanks!

Noobie Linux Server Setup

$
0
0
Hello, I am trying to setup Photon for a project at school and I can't seem to figure it out or find much for documentation. I have an Ubuntu 18.04 server without a GUI. I want to setup a self-hosted Photon Engine Server for our game. If I could get some help trying to set this up, I'd appreciate it very much.

"Send buffer full" on unreliable UDP traffic

$
0
0
I have a Photon application, lets call it S1. S1 generates an unreliable UDP message that is ~1400 bytes every 50ms, and gets sent to all connecting clients. I'm testing right now with 40 clients. Doing this results in error message: "Disconnecting Peer=T:ClientPhotonPeer,ConnId:2,ip:34.217.214.13:63783: Send buffer full" Using wireshark on my local machine as 1 of the clients, I see that the ~1400 bytes message is being fragmented into 2 packets, 1 of 1200 bytes and the other as the rest. If I decrease the message size to <1200 bytes (i.e. lower that the configured MTU), this problem goes away. Some questions 1) why this is happening only for fragmented packets? I generate this message every 50ms, which seems like enough time to send out both packets successfully 2) I wondered if the "DataSendingDelayMilliseconds" was causing some packets to build up. However, I set it to 0 and the problem persists. If I set "DataSendingDelay" to 0, does that translate to "send as soon as you get it"?

Build a modular server where every module is a sub-server

$
0
0
Hello, can you bring me some info how can I build a modular server. I want to develop a small mmo and I want to have a chat server, a world server (region + physics) , auth server.. . Can you give me some advices . Ty

File does not exist photon.loadbalancing.dll.config

$
0
0
Hey all Just a quick question, trying to set my ip for to local ip using the Game server IP Config > Set Local IP... every time i try i get confronted with File does not exist: ..\Loadbalancing\GameServer\bin\Photon.loadbalancing.dll.config When navigating to this file it does exist. I have set the ip config previously in the past but has stoped allowing me to do so the last couple of days Thanks for any help

How to get total count of rooms, players and public IP on server?

$
0
0
Hello, Im wondering - is that possible to get total count of rooms, players and public IP of photon server? We need that for our internal analytics system, so I would like to send that data every 20-30 mins via job to our analytics center. I guess it should be somewhere on Application level, am I right?

Adding remote slave to Photon Load Balancing

$
0
0
Hello, we run our own Photon Load Balancing server for use with PUN. I'm attempting to get this ready to scale so I have the Master and Client1 on one machine and I wish to put Client2 on another machine. Right now the Master and Client1 are connecting just fine and work correctly. However Client2 cannot connect to the Master. I have disabled the firewall on both machines and allowed all traffic and the problem still occurs so this makes me think it is a problem with my config setup. Can I double check some of my choices please? The log I see on Client2 is 2018-10-02 14:30:51,091 [20] INFO Photon.LoadBalancing.GameServer.GameApplication [(null)] - Connecting to master at [CORRECT_PUBLIC_IP]:4520, serverId=7cbff663-5778-4c9a-8d28-358b105eb266 2018-10-02 14:31:12,103 [14] WARN Photon.LoadBalancing.GameServer.GameApplication [(null)] - Master connection failed with err 121: The semaphore timeout period has expired., serverId=7cbff663-5778-4c9a-8d28-358b105eb266 The PhotonServer.config file has these lines (I've removed the opening brackets so the HTML doesn't get stripped), !-- DON'T EDIT THIS. TCP listener for GameServers on Master application --> TCPListener IPAddress="0.0.0.0" Port="4520"> /TCPListener> so I have left the Photon.LoadBalancing.dll.config lines !-- Gameserver-to-Master connections. --> setting name="OutgoingMasterServerPeerPort" serializeAs="String"> value>4520 /setting> For the rest of the fields in Photon.LoadBalancing.dll.config in Photon.LoadBalancing.GameServer.GameServerSettings I make sure the ports for GamingTcpPort, GamingUdpPort, and GamingWebSocketPort are all in the master server's PhotonServer.config in the relevant Listeners blocks and these ports are in the Master's socket-policy.xml. At this point I can't see anything else I need to configure. Can anyone shed some light on what I may be missing? Thanks for all your help, and sorry if this is a bit dense! Brian

How can Unity headless server interact with Photon Server?

$
0
0
Hi, I'm developing a server authoritative game. Lately, I'm wondering if that's possible to let the game server run a headless Unity for each room as a dedicated server, that seems could simplify the development. However, the headless server only takes string arguments on start, I still have no idea about how to let it handles IPluginHost. Please tell me which one is viable. a) HivePlugin executes "MyGame.exe" and passes some variable to it b) Run HivePlugin/SDK directly inside "MyGame.exe", just like the load balancing API.

Self Hosted Photon Server

$
0
0
I'm desperately trying to find how to write Server API for my game. Starting SelfHosted server and write client logic is okay. There is no difference from Photon Cloud. But how to write my own Server Logic for example to generate InGame events or something like that? I can't see any examples... Thanks for any help!

WinForm and Udp

$
0
0
I am trying to a test client in winform(or console app) so i can test my client handlers without having to load up Unity and test from there. When I try to connect to my server using the same server address and application and Upd(which is working in unity). I am unable able to see the connection getting to the CreatePeer function in my application. If i switch to use Tcp, and use one of the Tcp ports(which are use for the admin, and S2S peers), I am able to connect to my server. I need to find a way to connect to my server via Udp and not Tcp.

General Questions: Photon Server SDK LoadBalancing

$
0
0
I'm evaluating self-hosted Photon Server for my Unity project, and have a few general questions: 1) I don't really see how to launch additional Game Servers with LoadBalancing (MyCloud). Is there documentation or a tutorial that covers how this works? 2) The docs say to "delete the /deploy/LoadBalancing/GameServer2 directory", but there isn't one. Are the docs out of date? 3) The docs say "you should not host 2 Game Server applications on one server", but will this take advantage of all of the CPU cores when using Unity? I'm used to having to launch multiple Unity servers on a single machine in order to make use of multiple CPU cores. 4) When I launch the TestClient, I see 5 or 6 warnings "OnOperationReturn: JoinGame failed: ReturnCode: 32758 (Game does not exists). Disconnecting...". Is this expected because it's trying to join the room before creating it, or should that not be showing up? 5) Am I still limited to "500 messages per second and room" when self-hosting, or is that only for Photon cloud? Thanks for any help!

Trouble connecting to ip Iran

$
0
0
Hi, I have problems with Iranian servers To resolve this problem, you said that you would use dedicated hosts Please describe how to build a dedicated hosting or self-host?

Photon LoadBalancing Strange Issue

$
0
0
Hi, we are currently running a modified LoadBalancing app and we have started encountering an issue regarding the creation of rooms. We have found that on occasion when a player joins a game they are unable to send any operations to the server thus making it impossible to play in the game. Currently when the game does this we receive this notification in our server logs after a considerable delay of the disconnect of the last player. Error: 2018-10-13 18:49:02,409 [33] DEBUG Photon.Hive.HivePeer - OnDisconnect: conId=3, reason=TimeoutDisconnect, reasonDetail= 0000000009C8DCB0 Sent: 3826629296 now: 3826656218 (diff: 26922 >= max: 30000) new rtt timeout: 3200 since last touch:27937 Disc: Seq: 12 CH: 255 RTT: 192 VAR: 72 Now: 3826656218 Sent: 3826629296 Diff: 26922 Resends: 8 Resend: Seq: 12 CH: 255 RTT: 192 VAR: 72 Now: 3826652890 Timeout: 3200 Resend: 8 Resend: Seq: 12 CH: 255 RTT: 192 VAR: 72 Now: 3826648828 Timeout: 3200 Resend: 7 Resend: Seq: 12 CH: 255 RTT: 192 VAR: 72 Now: 3826644671 Timeout: 3200 Resend: 6 Resend: Seq: 12 CH: 255 RTT: 192 VAR: 72 Now: 3826640859 Timeout: 3200 Resend: 5 Resend: Seq: 12 CH: 255 RTT: 192 VAR: 72 Now: 3826636796 Timeout: 3200 Resend: 4 Resend: Seq: 12 CH: 255 RTT: 192 VAR: 72 Now: 3826632734 Timeout: 3200 Resend: 3 Resend: Seq: 12 CH: 255 RTT: 192 VAR: 72 Now: 3826630781 Timeout: 1920 Resend: 2 Resend: Seq: 12 CH: 255 RTT: 192 VAR: 72 Now: 3826629796 Timeout: 960 Resend: 1 ACK: Seq: 11 CH: 255 RTT: 192 VAR: 72 Now: 3826628281 Sent: 3826628140 Diff: 141 ACK: Seq: 10 CH: 255 RTT: 199 VAR: 79 Now: 3826627125 Sent: 3826626859 Diff: 266 ACK: Seq: 9 CH: 255 RTT: 190 VAR: 83 Now: 3826625843 Sent: 3826625546 Diff: 297 ACK: Seq: 8 CH: 255 RTT: 175 VAR: 75 Now: 3826624531 Sent: 3826624406 Diff: 125 ACK: Seq: 7 CH: 255 RTT: 182 VAR: 84 Now: 3826623390 Sent: 3826623250 Diff: 140 ACK: Seq: 6 CH: 255 RTT: 188 VAR: 98 Now: 3826622234 Sent: 3826622109 Diff: 125 ACK: Seq: 5 CH: 255 RTT: 196 VAR: 110 Now: 3826621093 Sent: 3826620968 Diff: 125 ACK: Seq: 4 CH: 255 RTT: 206 VAR: 123 Now: 3826619953 Sent: 3826619828 Diff: 125 ACK: Seq: 3 CH: 255 RTT: 217 VAR: 137 Now: 3826618812 Sent: 3826618671 Diff: 141 ACK: Seq: 2 CH: 255 RTT: 227 VAR: 157 Now: 3826617656 Sent: 3826617531 Diff: 125 ACK: Seq: 1 CH: 255 RTT: 241 VAR: 175 Now: 3826616515 Sent: 3826616406 Diff: 109 ACK: Seq: 6 CH: 0 RTT: 259 VAR: 189 Now: 3826615390 Sent: 3826615265 Diff: 125 ACK: Seq: 5 CH: 0 RTT: 278 VAR: 207 Now: 3826615250 Sent: 3826615187 Diff: 63 ACK: Seq: 4 CH: 0 RTT: 308 VAR: 205 Now: 3826615250 Sent: 3826615187 Diff: 63 ACK: Seq: 3 CH: 0 RTT: 342 VAR: 191 Now: 3826615171 Sent: 3826615109 Diff: 62 ACK: Seq: 2 CH: 0 RTT: 381 VAR: 161 Now: 3826614859 Sent: 3826614765 Diff: 94 ACK: Seq: 1 CH: 0 RTT: 422 VAR: 120 Now: 3826614734 Sent: 3826614578 Diff: 156 ACK: Seq: 0 CH: 255 RTT: 459 VAR: 71 Now: 3826614562 Sent: 3826614390 Diff: 172 Init: RTT: 500 Here is part of our logs: GSGame: https://pastebin.com/6Dqx7yxJ NSMaster: https://pastebin.com/iBxryJGW We have also started to notices that regardless of weather or not people are able to send operations in the room, when that room is destroyed we receive : 2018-10-13 18:49:02,409 [33] DEBUG Photon.Hive.Caching.RoomCacheBase - Removed room instance: roomId=asd 2018-10-13 18:49:02,409 [33] DEBUG Photon.Hive.Room - Tried to remove room: roomName=asd, removed=True 2018-10-13 18:49:02,409 [33] DEBUG Photon.Hive.HiveHostGame - we are actually beeing released - not sure this should be called. I had initially thought it could be to do with a timer that we run server sided and when OnClose is called we stop the server, could this possibly be an issue? I am not quite sure what this is meaning: "we are actually beeing released - not sure this should be called." We have been having this issue quite regularly and seems to consistently happen the first time we create a room after the server has been rebooted (through photon control not a system reboot). Any help would be greatly appreciated. Many thanks, Leon

Old client can't connect to new server

$
0
0
I'm trying to revive an old project that used a previous version of the server. It worked on an old version (in 2016), and it still works on the cloud, but when I spin up the OnPremise v4 SDK and try to connect to the local IP, it fails to connect to master, and having spent two days on it, I can't seem to fix it. Has anything changed in terms of how you're supposed to connect to a local server? If all else fails, is there a place I can download back versions of the OnPremise server SDK?

Why can't I connect to my server anymore?

$
0
0
I can connect from the host machine for obvious reasons (as seen from this error message below) but only the host machine.. I am hosting over tcp and the connection is NOT set to 127.0.0.1 in the photon settings in unity, it's set to the ip address that it should be, I'm not sure why it is trying to connect to 127.0.0.1... where do I need to change the ip it's connecting to? Connect() to '127.0.0.1' failed: System.Net.Sockets.SocketException (0x80004005): No connection could be made because the target machine actively refused it. at System.Net.Sockets.Socket.Connect (System.Net.EndPoint remoteEP) [0x000b6] in <93cc5a601cf645d2a15a96c4600351ac>:0 at System.Net.Sockets.Socket.Connect (System.Net.IPAddress address, System.Int32 port) [0x00008] in <93cc5a601cf645d2a15a96c4600351ac>:0 at ExitGames.Client.Photon.SocketTcp.DnsAndConnect () [0x00088] in <5bac2b0d73684de1adac4ad02bdde90d>:0 UnityEngine.Debug:LogError(Object) NetworkingPeer:DebugReturn(DebugLevel, String) (at Assets/Extensions/Networking/Photon Unity Networking/Plugins/PhotonNetwork/NetworkingPeer.cs:1574) ExitGames.Client.Photon.SocketTcp:DnsAndConnect() System.Threading.ThreadHelper:ThreadStart()

HivePlugin cache event bugs

$
0
0
Hi, I've found 2 bugs when using HivePlugin to broadcast. 1. When cacheOp==AddToRoomCacheGlobal, the HivePlugin is going to wrap custom event twice for the cached event, that makes the data struct inconsistency. https://imgur.com/9DtTxPd 2. When cacheOp==RemoveFromCacheForActorsLeft, the GSGame.log print unsupported, I've no idea about how to remove a room cache. https://imgur.com/X70rkay I'm making an authoritative game where player can join/leave any time, so I want to cache those instantiate events in case player who joined later can see everything.

Moved: Why can't I connect to my server anymore?

Viewing all 1557 articles
Browse latest View live