MasterServer

Hello and thanks in advance for your help.

There are several post about masterserver here ,
so I dont know if I have to start a new one , scuse me if I am not in the right place,
I am new here .

I have ,I think ,
a masterserver running on my dedicated OVH server .

I compiled , from here

all was needed and ran it as daemon.

And that runs , I think.

But I have no idea what to do now to use it .
I mean :
Having a client able to connect a “game” from my server’s IP witch is 87.98.158.40

I guess I have first to start hosting a game ,
but I cant find the way.

I tried many tutorials from that forum or from others ressources ,
and I have built several unity files from them ,
and I understand a bit some *.js files , but I can’t figure what must be my next step .

Thanx in advance

alain

from the sources here

I compiled and ran , for my dedicated Linux server

the for grpup of files

  • MasterServer
    …masterserver# ./MasterServer
    07-09-2011 13:44:58 INFO Writing PID to MasterServer.pid
    IP address: 127.0.0.1
    IP address: 94.23.39.112
    IP address: 87.98.158.40
    07-09-2011 13:44:58 LOG Unity master server version 2.0.1f1
    07-09-2011 13:44:58 LOG Master server port set to 23466
    07-09-2011 13:44:58 LOG 1000 connection count limit
    07-09-2011 13:44:58 LOG To quit press Ctrl-C

Seems ok …

I have probs with

  • Facilitator :
    I got first

IP address: 87.98.158.40
05-09-2011 16:01:42 LOG Unity Facilitator version 2.0.0
05-09-2011 16:01:42 LOG Listen port set to 50005
05-09-2011 16:01:42 LOG 1000 connection count limit
05-09-2011 16:01:42 LOG To quit press Ctrl-C

It was OK but after trying to clean something there ,
now I get "permission denied to recompile that ,
and the /Facilitator/Facilitator is missing now , so I can’t run it

  • ProxyServer :

…ProxyServer# ./ProxyServer
07-09-2011 14:39:17 INFO Writing PID to ProxyServer.pid
07-09-2011 14:39:17 Proxy Server version 2.0.0b1
07-09-2011 14:39:17 Listen port set to 10746
07-09-2011 14:39:17 Server relay ports set to 50110 to 50120
07-09-2011 14:39:17 Using facilitator at 67.225.180.24:50005
IP address: 127.0.0.1
IP address: 94.23.39.112
IP address: 87.98.158.40
07-09-2011 14:39:17 To exit the proxy server press Ctrl-C

07-09-2011 14:39:17 LOG Connecting to 67.225.180.24:50005
07-09-2011 14:39:17 LOG Sent connect request to facilitator at 67.225.180.24:50005
07-09-2011 14:39:17 LOG Connected to 67.225.180.24:50005

***see below what is that 67.225.180.24 ,
I have some other file to clean …

  • ConnTester :

…/ConnTester/

05-09-2011 16:16:17 INFO Writing PID to ConnTester.pid
05-09-2011 16:16:17 LOG Connection Tester version 2.0.0
05-09-2011 16:16:17 LOG Listen port set to 10737
05-09-2011 16:16:17 LOG Max connection count set to 1000
IP address: 127.0.0.1
IP address: 94.23.39.112
IP address: 87.98.158.40
05-09-2011 16:16:17 ERROR Not enough IP addresses to bind to.
05-09-2011 16:16:17 ERROR To run the connection tester you need four public IP addresses available.

*********What is that ???

Other question :

…it was strange to see my unity files tests trying to connect to 67.225.180.24:10737

I saw that it is the old unity server ,
so I changed/edited these files :
ConnTester\config\unity-conntester
ProxyServer\config\unity-proxyserver
Facilitator\config\unity-facilitator
MasterServer\config\unity-masterserver

for my rights HOMEDIR= and USERNAME=

Anyways I understand what is my HOMEDIR , but not sure what is my USERNAME …

And not sure if I recompiled all correctly …


Last question :

are the files here

really ready now for Linux and for the last version of unity ???

I don’t want to lost my time if the are just good for the previous version …


Last last question :

are ConnTester , Facilitator and ProxyServer absolutly necessary or not ?
If the MasterServer is running , is it sufficient to use it ??? To connect it , I mean.

I will soon delete all my files on my server and recompile all .

But as I have read many posts about all that ,
I got another ConnTester.cpp that the one from unity …
from here

http://anders.tonfeldt.se/?p=679

I must clean all

Any help ??? all that is not easy :frowning:

Hey alaindum,

it’s hard to follow your steps…

Could u send me your script files? What did you changed and where did you changed something?

How you compiled it?

Re hello , Shigeru ,
Thanks for your patience

We crossed on simom’s thread , but I am sure he will succeed :slight_smile:

Now I will stay here to stop to bore him :slight_smile:

Well …

about me , …

I downloaded the for group of files from unity ,

Master Server
Facilitator
Connection Tester
Proxy Server

to have a masterserver on my dedicated server .
Witch is in Linux .
I compiled with Putty.exe

but I will soon delete all and will re compile ,
because I think we have many things to change from the unity files .

And I followed too what the guy , anders ,
http://anders.tonfeldt.se/?p=679

said about another ConnTester.cpp file

So , my first next step is to have a masterserver running well on my dedicated server .

Indeed the masterserver seems running ,
But not the ConnTester , not the Facilitator , not The Proxyserver ,
and I guess they are needed ( ??? )

Then , I need a client and a server unity file to connect ,
and for that , I tried many tutorials , M2H etc ,
but that always says " failed to connect 87.98.158.40 " , that is my server …

Well… first you just need the masterserver, the other files are normally not needed.

You try to connect to an external ip adress… did you forwared your ports in your router?
First try to use an internal ip adress (like 127.0.0.1)

Shigeru

If I just need the masterserver , it seems running

IP address: 87.98.158.40
07-09-2011 13:44:58 LOG Unity master server version 2.0.1f1
07-09-2011 13:44:58 LOG Master server port set to 23466
07-09-2011 13:44:58 LOG 1000 connection count limit
07-09-2011 13:44:58 LOG To quit press Ctrl-C

what sort of *.unity file I could try to test ??? I have so many , I am lost to know witch one to use

Just use a simple script with connect.

LOL give me a good script :slight_smile: I tried tons , and I guess I complicated too much :slight_smile:

Just add an empty gameobject to the scene and add this javascript file

Where 127.0.0.1 is your ip
and 25000 is your port

Check firewall if port is opened

???

But I dont want to connect to my local PC , Shigeru , ( 127.0.0.1)

I want to connect and having friends able to connect to

IP address: 87.98.158.40
07-09-2011 13:44:58 LOG Unity master server version 2.0.1f1
07-09-2011 13:44:58 LOG Master server port set to 23466

what’s the hell ??

This was just an example script.

As I said you have to replace the ip and port with yours…

I checked your port:
87.98.158.40 isn’t responding on port 23466 ().

So your firewall is blocking, or router isnt configured well

OK I beg your pardon ,
and thanx for your patience

I know checked how was my master server ,
on my dedicated server ,
and got :

…mixed3d/masterserver# ./MasterServer
09-09-2011 21:15:21 INFO Writing PID to MasterServer.pid
IP address: 127.0.0.1
IP address: 94.23.39.112
IP address: 87.98.158.40
09-09-2011 21:15:21 LOG Unity master server version 2.0.1f1
09-09-2011 21:15:21 LOG Master server port set to 23466
09-09-2011 21:15:21 LOG 1000 connection count limit
09-09-2011 21:15:21 LOG To quit press Ctrl-C

I added your script on a unityfile ,
but that needs something to tell me if it is OK or not

sort of Debug

I added that one
function OnServerInitialized() {
Debug.Log(“Server initialized and ready”);
}
but that says nothing more , my world just open in the editor or in a webplayer.

Have you a sript for a client to test if we could connect ???

I am ashame to bore you :frowning:

Btw I have another question :
how you could check if the port is open ?
normaly , on a dedicated server all the ports are open , am I false ?

Not if the server is using a firewall…

“OnServerInitialized” is used when you are hosting a server… but you already have a master server!
You could try

If theres no output then the connection was sucessfully.

Also you can test this script. It will test your connection:

Good luck

Edit: Thers also that one

with the first sripts I got

Limited NAT punchthrough capabilities. Cannot
connect to all types of NAT servers. Running a server
is ill advised as not everyone can connect.
When starting a server the NAT
punchthrough feature should be enabled (useNat parameter)

Is the Facilitator not needed to be used ???

I will look at your second link

Thanx for your help , you are very patient :slight_smile:

No you dont need the facilitator.

But now I know what the error is…

You cant connect to the master server as a client!

You have to connect as a server to the master server.

The master server will list all servers! And then you connect to the single servers.

So if you just want one server you dont need a master server, its just for lobbys etc…
^^

Look here:

MasterServer.RegisterHost = Register a server on master server!9

You should read this:

http://unity3d.com/support/documentation/Components/net-MasterServer.html

There are the single steps:

  • Register a server on master server
  • connect to one of these servers…

etc…

sorry for the delay , Shigeru , and thanx for your help .
I wanted to tell you good news , because simom85 helped me too ,
and , yes , I forgot the masterserver way ,
ans will use another way ,
but I am fighting now to have ports open on my linux server !

And I dont find the way .

Scuse for that post not very useful , LOL ,
but it is polite to tell you merci , and that I will succeed one day :slight_smile:

@Shigeru
Hi,
Please help me to connect to my master server. I was able to setup my own master server and got the port as 23466 but on calling “Network.InitializeServer (2, 23466, !Network.HavePublicAddress());” I am receiving the following error:
“The connection request to 67.225.180.24:50005 failed. Are you sure the server can be connected to?”
I am not sure why it is showing the error for 67.225.180.24:50005 when I added the MasterServer.ipAddress andMasterServer.port to my own server’s address.
Please help me and Thanks in advance.