Looks like there is a bug in the MasterServer class. If you use this line of code: MasterServer.RequestHostList("myGameType123343"); and the master server will not be available for some reason, you will get this Error: "Failed to connect to master server at 67.225.180.24:23466". On the bottom of the Unity console, there is another error: "Error in file: /Applications/buildAgent/work/14194e8ce88cdf47/Runtime/Network/MasterServerInterface.cpp at line 227". After this fail, you will not be able to use the MasterServer object anymore. It will just not work (not any errors, nothing). Here is another topic about this by some other person, so it's not just my imagination http://answers.unity3d.com/questions/195601/failed-to-connect-to-master-server-at.html I have sent a report bug about this but I didn't get any confirmation (and I probably didn't provide enough information in the report). If someone from Unity Team could look at this it would be great. I would also like to inform you about something else. My game is using the Unity Public Master Server (I already bought a new server so I will use my own). The thing is that today something is not right with the Unity Master Server. It is not working 3 out of 4 times. Maybe someone could look at this as well. I would also like to ask if is it OK at all that I am using the unity master server not only for the testing purposes? I don't have too many players so I figured that if I will use it for the first month it shouldn't be a problem. Like I said I will use my own server since tomorrow, but maybe this information will be useful for someone else.
You are from Unity team? Is this the official standpoint? What if someone is doing open beta tests? Does It still count?
it looks that masterserver isn't working from yesterday. Hopefully unity's masterserver will be online soon. P.S. You can always run masterserver on your own operating system.
I have the exact same problem. I was testing a multiplayer game and it was working a minute ago. Now I cant connect to the master server.
http://docs.unity3d.com/Documentation/Components/net-MasterServer.html read the documentation at the bottom of this page in case of confusion
Uhm, if you're actually using a master server for your game, run your own. The one unity exposed publicly is only for limited testing.
Wait a minute! I am experiencing the same error and I could've sworn I was running the server on my own machine! So that means I was running it on Unity's Master Server? How do I run it on my own?
Install the master server on the computer and put this code into some Awake() function. Code (csharp): MasterServer.ipAddress = "00.00.00.00"; MasterServer.port = 23466; Network.natFacilitatorIP = "00.00.00.00"; Network.natFacilitatorPort = 50005; These are the default port numbers, if you want to change them you have to edit the *.h and *.cpp files of the master server and facilitator source code before the compilation.
you can always use the cheapest VPS offered by 1 1 or VPSLand (are there cheaper ones?) to host a master server. As long as you don't offer the proxy its pretty granted to work without the slightest problem
http://unity3d.com/master-server/ http://docs.unity3d.com/Documentation/Components/net-MasterServerBuild.html
The links go to a download location and description of the components. But no tutorial on how to get it actually running.
http://docs.unity3d.com/Documentation/Components/net-MasterServerBuild.html I don't know Linux too well, so it took me about 2 hours to run the server. I have packed the source codes to tar (using "tar" command) and then uploaded them to the server using "scp" command from the Terminal on my Mac. After this you have to unpack the tar archive on the server. Then you have to install the "make" command and gcc on the server (maybe they are already installed), I have used "apt-get" or "aptitude install" commands to do this, I am not sure. After this you have to go to the source code folder and use the make command (just type: "make"), after the compilation, type: "make install". Then run the server by typing: "./MasterServer ". If you want to be sure if the server is running type "ps aux". And that's about it. Now do the same thing for the Facilitator. I was actually surprised that it took my only 2 hours to run it (I have had to google for almost everything because I know only basic commands from Linux). The only problem I have is that I don't know how to put the master server to the foreground (to see the logs) I know that there are commands like "bg" "fg" and "jobs", but it's not possible to use them to do what i want after re-login. I should probably use something called "screen" but I didn't have time to read about this yet. Maybe someone here will know how to do what I want without using this "screen" command I am using a server from polish provider and it costs me about 6$ per month: http://vihost.pl/ Many people from Poland were recommending this company on forums.
I'm not that computer savy to things to my system outside of Unity. I'm also on Windows 7 so it might be different. Perhaps if there was a step by step guide on how to do it I might not be as hesitant. Also, if your running a MasterServer on your own computer, how come you need to pay a server provider?
Open solution in visual studio compile execute the exe as for 'on your own computer': In that case you don't need it. But question is if you want to run your machine 24/7 at home, if your line will easily take that (at a 1mbit upstream and alike I wouldn't risk it for a live game) and if you have a router that can cope with it.
My own server = the server that I am paying for I need the master server to work 24/7 and the best way to do this for me is to buy a VPS server. If you want to run it on your own machine with Windows 7 it should be easy, you need the Visual Studio to compile the source code, then just run the exe that you will get after the compilation But you probably don't want to run it on your own machine at home.
I have a trial version of visual studio. Which code do I need to compile? Is it the one called master Server of type c++ Source? The one that is not in any sub folders. If its to complicated I probably wont do it. I'm just trying to get the Master Server to connect properly because I'm only testing the network synchronization for a game. Unities master server keeps failing to connect.
You can probably use Visual Studio Express, it's free. There is a "VisualStudio" folder in the MasterServer sources and there you have a MasterServer.sln file, just run it and then click Build in the Visual Studio.
when I click on the MasterServer.sln file visual studio opens up and says I need to upgrade the project. Once I do, it leaves me with a blank screen in visual studio.
What do you mean by "blank screen"? Maybe you just didn't select any file, but the project has been opened properly. Just find some Build menu and try to build. Let us know what happened
Alright it looks like when trying to open it with visual studio express it has errors. But normal visual studio seems to open it. I went to the the build toolbar and clicked on build solution, it produced some code in the output window. Heres the last three lines. Not sure what to do next. 1> MasterServer.cpp 1> Generating Code... 1> MasterServer.vcxproj -> C:\Users\Luke\Documents\unityMasterServer\VisualStudio\Debug\MasterServer.exe ========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
Alright it started a command prompt and debuged this out. Sent 4 bytes to port 23466 14-07-2012 12:14:57 LOG Unity master server version 2.0.1f1 14-07-2012 12:14:57 LOG Master server port set to 23466 14-07-2012 12:14:57 LOG 1000 connection count limit 14-07-2012 12:14:57 LOG To quit press Ctrl-C ---------------------------------------------------- I have an awake function in my script with this in it. function Awake() { MasterServer.ipAddress = "00.00.00.00"; MasterServer.port = 23466; Network.natFacilitatorIP = "00.00.00.00"; Network.natFacilitatorPort = 50005; } However, im still getting mostly failed connections to the master server when I start my game. It says Failed to connect to master server at 67.225.180.24:23466
Is there someone from Unity Team who can tell me if you are going to fix this? This should be easy to fix.
I am talking about a bug in Unity. It's not crucial but should be fixed at some point And if the master server is sometimes not working, then people can't refresh the list because of this bug. So it's important after all.
I agree with Mariusz. This is something important. The real problem here is not about the use of Master Server, but this: I am using my own Master Server here, and after I got a "Failed to connect to master server at xxxx:yyy" error (let's say my server is down), the Master Server object stops working (even if I turn the Master Server on). When I call any MasterServer functions it doesn't trigger a new OnMasterServerEvent. And just to be clear about the problem: yes, if the master server is on since the first attempt to connect, it works perfectly. It's just important for error handling (it would sound weird if I have to ask to the player to restart the application/game if the master server do not respond at the first attempt). Hope someone can solve this issue...
It's 2014 now and this is still not fixed. Maybe it's time to fix this? It should not be difficult I think.
It's a big shame that a company like Unity, can't fix a simple bug in almost 2 years. They are doing a great job, but sometimes they fail for a reason I can't understand. I have reported this bug so long ago. Are they so busy? There is also another bug in Unity from about half a year ago, that needs to be fixed: http://issuetracker.unity3d.com/iss...ractive-cloth-in-the-scene-crashes-the-editor http://issuetracker.unity3d.com/issues/mesh-renderer-plus-cloth-renderer-causes-crash http://issuetracker.unity3d.com/issues/unity-crashes-when-adding-cloth-renderer-to-a-prefab
Don't get your hopes up. New networking and new physics are coming so anything that'll be replaced by that will likely stay broken.
Can confirm this bug is still here. I'm trying to implement a backup Master server in case the first one is offline. After OnFailedToConnectToMasterServer is called, MasterServer becomes silent, PollHostList will never be updated again. I tried to reload the scene, check if the updateRate wasn't set to zero. But is seems the MasterServer class is just stuck.