Would you like to react to this message? Create an account in a few clicks or log in to continue.

Official Community Forums
 
HomeHome  SearchSearch  Latest imagesLatest images  RegisterRegister  Log in  The Wiki  Website  github Project  

 

 Connecting to a Master Server and Patching the Client

Go down 
3 posters
AuthorMessage
Xangis
Foundation Developer
Xangis


Posts : 124
Join date : 2011-12-30
Location : Beaverton, OR

Connecting to a Master Server and Patching the Client Empty
PostSubject: Connecting to a Master Server and Patching the Client   Connecting to a Master Server and Patching the Client EmptyThu 3 May - 16:34

I have the master server running on a Linux system on the local network. It seems to die after a while and has to be restarted (logs make me think maybe a there's a problem with the database keepalive), but it runs and seems to be working OK otherwise. The world server is also running on that same Linux system.

I have the patch files and HTML hosted on another Linux server on the web. It runs an Nginx web server with no fancy settings and has the sampleworld files on it.

Here's how the world table in my multiverse database is configured:
Code:
mysql> select * from world;
+----------+--------+-------------+-------------------+---------------------+-----------------+-------------+--------+----------+----------------------------------------------------+---------------------------------------------+------------------------------------------+------------------------------------+---------------+
| world_id | dev_id | world_name  | pretty_name      | description        | server_name    | server_port | public | approved | patcher_URL                                        | media_URL                                  | logo_URL                                | detail_URL                        | display_order |
+----------+--------+-------------+-------------------+---------------------+-----------------+-------------+--------+----------+----------------------------------------------------+---------------------------------------------+------------------------------------------+------------------------------------+---------------+
|        1 |      1 | sampleworld | XangisSampleWorld | Xangis sampleworld. | 192.168.0.111  |        5040 |      1 |        1 | http://trollwarrior.com/patcher/world_patcher.html | http://trollwarrior.com/sampleworld/update/ | http://trollwarrior.com/Trollwarrior.png | http://trollwarrior.com/about.html |          NULL |
+----------+--------+-------------+-------------------+---------------------+-----------------+-------------+--------+----------+----------------------------------------------------+---------------------------------------------+------------------------------------------+------------------------------------+---------------+

If I run the client this way:
multiverseclient.exe --master 192.168.0.111 --world sampleworld

Then it shows a screen and lets me log in.

Connecting to a Master Server and Patching the Client SampleworldLoginPage

If I run the client using only the master server like this:
multiverseclient.exe --master 192.168.0.111

Then it shows the Multiverse "worlds in progress" screen.

Connecting to a Master Server and Patching the Client LoginScreenNoWorldSpecified

I checked the source for URLs and I didn't see any that corresponded to what was being shown for the worlds in progress login screen, so not sure where that comes from.

Connecting to a Master Server and Patching the Client UrlsInCode

After I log in, it shows the patching page hosted on my web server and specified in the patcher_URL field in the database and starts downloading files.

Connecting to a Master Server and Patching the Client PatcherWorking

When I first created the page it just said "Testing 1 2 3" and didn't have the required JavaScript and divs noted in the patcher wiki page here: http://www.multiversemmo.com/wiki/Patcher_Page_Reference

After updating the file on the server the patcher wouldn't load the new HTML. It looks like the .NET WebBrowser control caches pages and I had to start Internet Explorer and clear its cache to get the page to refresh in the patcher. It looks like this method could invalidate the cache: http://social.msdn.microsoft.com/Forums/en/winforms/thread/1185f4cb-4ad6-418d-8cc1-3f405e13c18e I tried it and it didn't work for me, but I didn't dig too deeply. I suspect the easiest way to handle this is to set the expiration on my web server to something shortish (I think it's set at 30 days for static HTML pages in my nginx config). I imagine this will matter for people who want to change their patcher page when they add new content (I'm thinking along the lines of Star Trek Online, which does that).

It gets most of the way through the patch process and throws an error about a missing file.

Connecting to a Master Server and Patching the Client MissingFile

Almost successful. I have some questions:

1. Where do the text and images for the login screen come from? Is it compiled into the binary or is it located somewhere?
2. Same question, but for the Multiverse "worlds in progress" world browser screen... where are the resources for that?
3. Should I be very worried about files not matching the patch list? The mv.patch file came from the same Media/sampleworld folder from source control as all the rest of the sampleworld resources I put on the patch server. It seems like I just need to do some cleanup to make the file contents match the patch config file exactly.
Back to top Go down
http://zetacentauri.com
Xangis
Foundation Developer
Xangis


Posts : 124
Join date : 2011-12-30
Location : Beaverton, OR

Connecting to a Master Server and Patching the Client Empty
PostSubject: Re: Connecting to a Master Server and Patching the Client   Connecting to a Master Server and Patching the Client EmptyTue 8 May - 12:25

Thanks to Shane's mention of the website files in the master server thread I was able to get my own login page to show up by using the --login_url client command-line parameter.

I still have to learn more about the .js files that accompany login.jsp and how they come up with the world list (which is yoovolution, multiverse places, shop wiki, lunar quest, sinners and saints, fantasy demo, robosnow, and force of arms with the base client).

One thing I noticed is that no matter what, the client always loads this URL:
http://update.multiverse.net/mvupdate.client/patch_version.txt

I'm not sure whether there's a command line parameter that lets you set that.
Back to top Go down
http://zetacentauri.com
Delurin
Head of Platform Development
avatar


Posts : 424
Join date : 2011-08-03

Connecting to a Master Server and Patching the Client Empty
PostSubject: Re: Connecting to a Master Server and Patching the Client   Connecting to a Master Server and Patching the Client EmptyWed 9 May - 0:17

I believe there is I think it is update_url URL_ADDRESS
Back to top Go down
CobaltBlues
Moderator
Moderator
CobaltBlues


Posts : 202
Join date : 2011-11-21
Location : Chicago Land

Connecting to a Master Server and Patching the Client Empty
PostSubject: Re: Connecting to a Master Server and Patching the Client   Connecting to a Master Server and Patching the Client EmptyWed 9 May - 1:59

The login screen you saw with images and worlds, is from the old Multiverse.net login screen. None of that is valid any longer. The newest client distribution available on sourceforge connects you to the Multiverse Foundation login screen which is blank with a simple drop down (for now).

logn.jsp is actually just an html file. You can edit it as such and thus design your login screen to look how you want. The drop down is currently hard coded with a list of worlds... eventually it should be dynamic. The world id must match what you have in your master server, e.g. not the number id but the world name e.g. sampleworld for the drop down id.

Shane

Xangis wrote:
Thanks to Shane's mention of the website files in the master server thread I was able to get my own login page to show up by using the --login_url client command-line parameter.

I still have to learn more about the .js files that accompany login.jsp and how they come up with the world list (which is yoovolution, multiverse places, shop wiki, lunar quest, sinners and saints, fantasy demo, robosnow, and force of arms with the base client).

One thing I noticed is that no matter what, the client always loads this URL:
http://update.multiverse.net/mvupdate.client/patch_version.txt

I'm not sure whether there's a command line parameter that lets you set that.
Back to top Go down
http://www.multiversemmo.com
Xangis
Foundation Developer
Xangis


Posts : 124
Join date : 2011-12-30
Location : Beaverton, OR

Connecting to a Master Server and Patching the Client Empty
PostSubject: Re: Connecting to a Master Server and Patching the Client   Connecting to a Master Server and Patching the Client EmptySun 20 May - 10:00

I've gotten a little farther, but not quite there yet.

I have the login HTML hosted here:
http://trollwarrior.com/login/login.htm
http://trollwarrior.com/login/multiverse-devlogin.js

I use this command line with the client:
Code:
multiverseclient.exe --login_url http://trollwarrior.com/login/login.htm --world sampleworld --master trollwarrior.com

It shows the login screen, and when I login it gets past the username and password stage. It might have been documented somewhere, but I missed that "suspended" can't be NULL for a user account -- it has to be 0 or logins will fail. Wiki updated. Smile

Next thing that happens is that I get a JavaScript error:

Connecting to a Master Server and Patching the Client JavaScriptError

This is where the JS calls out to LoginMaster() in Multiverse.Base.LoginHelper.cs starting on line ~75. I added a few logging statements and got as far as being able to tell that things never get past TcpMasterConnect in Multiverse.Network.NetworkHelper.cs starting on line ~1240. First suspicion is that something goes wrong in the cryptography section.

I'll dig more as I have time, but if anyone has gotten past this before I'd be interested in hearing what you had to do.
Back to top Go down
http://zetacentauri.com
Xangis
Foundation Developer
Xangis


Posts : 124
Join date : 2011-12-30
Location : Beaverton, OR

Connecting to a Master Server and Patching the Client Empty
PostSubject: Re: Connecting to a Master Server and Patching the Client   Connecting to a Master Server and Patching the Client EmptySun 20 May - 18:36

OK, it looked like I had to sort out the master key config according to the logs:

Code:
DEBUG [2012-05-19 18:43:54,898] pool-1-thread-21    cookie=-1 version=1
DEBUG [2012-05-19 18:43:54,898] pool-1-thread-21    MasterServer.handleAuth: username len=6
DEBUG [2012-05-19 18:43:54,898] pool-1-thread-21    MasterServer.handleAuth: login username=Xangis
DEBUG [2012-05-19 18:43:54,900] pool-1-thread-21    dataLen=38
DEBUG [2012-05-19 18:43:54,900] pool-1-thread-21    data=AAAABlhhbmdpcwAAAAEAAAAUDPL8FHTEr8k3QwuRCmO9tSTZZsE=
DEBUG [2012-05-19 18:43:55,247] pool-1-thread-21    password=******
DEBUG [2012-05-19 18:43:55,247] pool-1-thread-21    authResponse=NCTJ8xrRp9MtOOJc3/lNEfWqf/k=
DEBUG [2012-05-19 18:43:55,247] pool-1-thread-21    authenticator=NCTJ8xrRp9MtOOJc3/lNEfWqf/k=
ERROR [2012-05-19 18:43:55,247] pool-1-thread-21    SecureTokenManager.generateToken: master key not initialized
ERROR [2012-05-19 18:43:55,248] pool-1-thread-21    MasterServer.run caught exception java.lang.RuntimeException: master key not initialized
      at multiverse.server.util.SecureTokenManager.generateToken(SecureTokenManager.java:225)
      at multiverse.server.engine.MasterServer$SocketHandler.handleAuth(MasterServer.java:254)
      at multiverse.server.engine.MasterServer$SocketHandler.run(MasterServer.java:336)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      at java.lang.Thread.run(Thread.java:662)
DEBUG [2012-05-19 18:43:55,248] pool-1-thread-21    SocketHandler: closed socket: Socket[addr=/99.123.5.118,port=57466,localport=9005

At one point I had the auto-generate key code from the master server thread in my master_server.sh, but I must have wiped it out and reverted to trunk at some point. Changing master/master_server.py to this made the login work and got me to the patch process:

Code:
from multiverse.server.engine import *
from multiverse.server.util import *

ms = MasterServer.getMasterServer()
#ms.setTCPPort(9005)
#ms.setRDPPort(9010)

# Uncomment if you want to set a log level for this process
# that is different from the server's default log level
#Log.setLogLevel(1)

pair = SecureTokenUtil.generateMasterKeyPair()
encodedPrivKey = SecureTokenUtil.encodeMasterPrivateKey(12, pair.getPrivate())

SecureTokenManager.getInstance().initMaster(encodedPrivKey)

I wonder, is there any reason not to have that be the default master_server.py? Is there any situation where you would not want to auto-generate the key pair?

The patch process eventually completes, then I get the Multiverse splash screen and then an "unable to connect to server" screen. Looks like I'll be digging into that next.
Back to top Go down
http://zetacentauri.com
Xangis
Foundation Developer
Xangis


Posts : 124
Join date : 2011-12-30
Location : Beaverton, OR

Connecting to a Master Server and Patching the Client Empty
PostSubject: Re: Connecting to a Master Server and Patching the Client   Connecting to a Master Server and Patching the Client EmptyMon 21 May - 4:59

It looks like the master server, custom pages, patch process, and redirecting to the world server is all working for me now, so mission accomplished on that.

Now I'm on to trying to sort out why the world manager is not listening on port 5040, this issue here:
https://multiverse.forumotion.co.uk/t151-so-near-but-so-far#997
Back to top Go down
http://zetacentauri.com
Sponsored content





Connecting to a Master Server and Patching the Client Empty
PostSubject: Re: Connecting to a Master Server and Patching the Client   Connecting to a Master Server and Patching the Client Empty

Back to top Go down
 
Connecting to a Master Server and Patching the Client
Back to top 
Page 1 of 1
 Similar topics
-
» Connecting the client to a server which is not localhost
» I have 2 issues.
» Master Server?
» Sampleworld, Times Square non-functioning
» Master server question

Permissions in this forum:You cannot reply to topics in this forum
 :: Development :: Client World Browser-
Jump to: