ago

[RELEASED] Client mod loader

Recommended Posts

I am also getting the issue as Nappy was getting in his further post

 

Although it is somewhat different, my packs download locally just fine but the server hosted on Citadel servers does not send them and I do not recieve a wierd PM. As I said, locally this works just fine.

 

My config files are:

rspack.properties (on the server)

classname=com.rednecksolutions.wurmunlimited.rspack.Pack
classpath=rspack.jar
serverPacks=rednecksolutions.jar

 

serverpacks.properties (on the server)

classname=org.gotti.wurmunlimited.mods.serverpacks.ServerPackMod
classpath=serverpacks.jar

#Set a fixed port. If no port is selected a random free port will be used
serverPort=27118

 

If it counts for anything, the Pack class is empty but it doesn't seem to matter because locally it works just fine. Its somewhat confusing as to what is going on or why its failing because there is no additional output in the server console besides successful sent packs.

 

Edit:

I have just recieved this error in console on the Citadel hosted server.

 

Server connected to steam

Client was Authenticated

Nov 23, 2015 9:30:14 PM org.gotti.wurmunlimited.modloader.ServerHook fireOnPlayerLogin

SEVERE: onPlayerLogin handler for mod ServerPackMod failed

java.lang.NullPointerException

at org.gotti.wurmunlimited.mods.serverpacks.ServerPackMod$1.run(ServerPackMod.java:107)

at org.gotti.wurmunlimited.mods.serverpacks.ServerPackMod.onPlayerLogin(ServerPackMod.java:119)

at org.gotti.wurmunlimited.modloader.ServerHook.fireOnPlayerLogin(ServerHook.java:70)

at org.gotti.wurmunlimited.modloader.ProxyServerHook$3$1.invoke(ProxyServerHook.java:162)

at org.gotti.wurmunlimited.modloader.classhooks.HookManager.invoke(HookManager.java:231)

at com.wurmonline.server.LoginHandler.sendLoggedInPeople(LoginHandler.java)

at com.wurmonline.server.LoginHandler.loadPlayer(LoginHandler.java:2322)

at com.wurmonline.server.Server.sendFinals(Server.java:2576)

at com.wurmonline.server.Server.run(Server.java:2413)

at java.util.TimerThread.mainLoop(Unknown Source)

at java.util.TimerThread.run(Unknown Source)

Edited by WesncIsMe

Share this post


Link to post
Share on other sites

No idea why it will go this far with an empty class.

 

If you don't have an actual mod you can just add the pack to the serverpacks mod.

 

Copy nameofpack.jar to mods/serverpacks and add "serverPacks=nameofpack.jar" to serverpacks.properties

Share this post


Link to post
Share on other sites
8 minutes ago, WesncIsMe said:

I am also getting the issue as Nappy was getting in his further post

 

Although it is somewhat different, my packs download locally just fine but the server hosted on Citadel servers does not send them and I do not recieve a wierd PM. As I said, locally this works just fine.

 

My config files are:

rspack.properties (on the server)

classname=com.rednecksolutions.wurmunlimited.rspack.Pack
classpath=rspack.jar
serverPacks=rednecksolutions.jar

 

serverpacks.properties (on the server)

classname=org.gotti.wurmunlimited.mods.serverpacks.ServerPackMod
classpath=serverpacks.jar

#Set a fixed port. If no port is selected a random free port will be used
serverPort=27118

 

If it counts for anything, the Pack class is empty but it doesn't seem to matter because locally it works just fine. Its somewhat confusing as to what is going on or why its failing because there is no additional output in the server console besides successful sent packs.

 

 

Did you open a support ticket with citadel for them to assign you a port? For my windows citadel server I wasn't allowed to use 8787. They assigned me two port numbers for me to choose from for this. 27000+ range.

Share this post


Link to post
Share on other sites
Just now, Nappy said:

 

Did you open a support ticket with citadel for them to assign you a port? For my windows citadel server I wasn't allowed to use 8787. They assigned me two port numbers for me to choose from for this. 27000+ range.

 

Just noticied your port number so I am guessing you did indeed.

Share this post


Link to post
Share on other sites
15 minutes ago, WesncIsMe said:

I am also getting the issue as Nappy was getting in his further post

 

Although it is somewhat different, my packs download locally just fine but the server hosted on Citadel servers does not send them and I do not recieve a wierd PM. As I said, locally this works just fine.

 

My config files are:

rspack.properties (on the server)

classname=com.rednecksolutions.wurmunlimited.rspack.Pack
classpath=rspack.jar
serverPacks=rednecksolutions.jar

 

serverpacks.properties (on the server)

classname=org.gotti.wurmunlimited.mods.serverpacks.ServerPackMod
classpath=serverpacks.jar

#Set a fixed port. If no port is selected a random free port will be used
serverPort=27118

 

If it counts for anything, the Pack class is empty but it doesn't seem to matter because locally it works just fine. Its somewhat confusing as to what is going on or why its failing because there is no additional output in the server console besides successful sent packs.

 

Edit:

I have just recieved this error in console on the Citadel hosted server.

 

Server connected to steam

Client was Authenticated

Nov 23, 2015 9:30:14 PM org.gotti.wurmunlimited.modloader.ServerHook fireOnPlayerLogin

SEVERE: onPlayerLogin handler for mod ServerPackMod failed

java.lang.NullPointerException

at org.gotti.wurmunlimited.mods.serverpacks.ServerPackMod$1.run(ServerPackMod.java:107)

at org.gotti.wurmunlimited.mods.serverpacks.ServerPackMod.onPlayerLogin(ServerPackMod.java:119)

at org.gotti.wurmunlimited.modloader.ServerHook.fireOnPlayerLogin(ServerHook.java:70)

at org.gotti.wurmunlimited.modloader.ProxyServerHook$3$1.invoke(ProxyServerHook.java:162)

at org.gotti.wurmunlimited.modloader.classhooks.HookManager.invoke(HookManager.java:231)

at com.wurmonline.server.LoginHandler.sendLoggedInPeople(LoginHandler.java)

at com.wurmonline.server.LoginHandler.loadPlayer(LoginHandler.java:2322)

at com.wurmonline.server.Server.sendFinals(Server.java:2576)

at com.wurmonline.server.Server.run(Server.java:2413)

at java.util.TimerThread.mainLoop(Unknown Source)

at java.util.TimerThread.run(Unknown Source)

are there any other errors in the log? Apparently the mod can't create the web server. Is 27118 really an unused port or is this by chance the steam query port?

Share this post


Link to post
Share on other sites

Update: Tried the client against another working server supplied by another WU player. Works fine. Hex file downloaded to client.

 

Off to check my server setup again including reloading the mods. Important to note that I am not patching the server executable at all. Not sure if others are also abstaining from that step.

 

~Nappy

Share this post


Link to post
Share on other sites
23 hours ago, WesncIsMe said:

Got this error when trying to connect in the console

  1. Exception in thread "Sound Loader 0" org.gotti.wurmunlimited.modloader.classhooks.HookException: java.lang.IllegalAccessException: Class org.gotti.wurmonline.clientmods.serverpacks.ServerPacksMod$2$1 can not access a member of class com.wurmonline.client.resources.Resources with modifiers "private"
  2.         at org.gotti.wurmunlimited.modloader.classhooks.HookManager.invoke(HookManager.java:241)
  3.         at com.wurmonline.client.resources.Resources.findResource(Resources.java)
  4.         at com.wurmonline.client.resources.Resources.getResource(Resources.java:129)
  5.         at com.wurmonline.client.sound.SoundEngine$4.run(SoundEngine.java:384)
  6.         at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
  7.         at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
  8.         at java.lang.Thread.run(Unknown Source)
  9. Caused by: java.lang.IllegalAccessException: Class org.gotti.wurmonline.clientmods.serverpacks.ServerPacksMod$2$1 can not access a member of class com.wurmonline.client.resources.Resources with modifiers "private"
  10.         at sun.reflect.Reflection.ensureMemberAccess(Unknown Source)
  11.         at java.lang.reflect.AccessibleObject.slowCheckMemberAccess(Unknown Source)
  12.         at java.lang.reflect.AccessibleObject.checkAccess(Unknown Source)
  13.         at java.lang.reflect.Method.invoke(Unknown Source)
  14.         at org.gotti.wurmonline.clientmods.serverpacks.ServerPacksMod$2$1.invoke(ServerPacksMod.java:92)
  15.         at org.gotti.wurmunlimited.modloader.classhooks.HookManager.invoke(HookManager.java:231)
  16.         ... 6 more

 

 

Did not recieve the packs either.

I tested this locally and it works just fine, I'm not sure why there is any difference with the dedicated setup, files are mostly 1:1

 

That's a race condition caused by concurrent access from the mod and the sound loader thread. I'll fix this in the next version

Share this post


Link to post
Share on other sites

I did what was suggested, I removed rspack and moved the graphics pack rednecksolutions.jar to serverpacks folder and added serverPacks=rednecksolutions.jar to the serverpacks.properties

 

port 27119 gave a bind error that did not previously show up. I tried two other ports but nothing happened, no errors or output to the console.

 

Locally, works fine but not on the Citadel servers it does not.

 

 

Share this post


Link to post
Share on other sites

I think the ports on the citadel server are probably firewalled so while you can get the server part running the client will probably never connect and all error messages in the client go to the java logging facilities that are not logged anywhere by default

Share this post


Link to post
Share on other sites

I just redownloaded and installed all server side mods on the linux box. Still no luck getting files to the client.

 

Any chance we can turn have a few more diagnostic messages on server and client to help with troubleshooting?

  • Like 1

Share this post


Link to post
Share on other sites

Just verified with Citadel that ports are indeed open on their end.

Share this post


Link to post
Share on other sites

https://github.com/ago1024/WurmClientModLauncher/releases/tag/v0.2.1

 

Adds more debug output. Log message are forwarded to the console window

 

There is a console command to force an install or download of a pack: "mod serverpacks installpack A0553A65523FE3159852CCAF022C54E021E81492:http://server:port/packs/A0553A65523FE3159852CCAF022C54E021E81492"

replace the packids, server and port with the ones for your server and pack.

 

Errors should be in the console aswell as the success message. The messages also go to the console.playername.log in PlayerFiles

 

Edited by ago

Share this post


Link to post
Share on other sites

Ok, when connecting to the linux server I get the following:

 

(snip)

 

INFO: Got server pack A0553A65523FE3159852CCAF022C54E021E81492:http://[0:0:0:0:0
:0:0:0]:8787/packs/A0553A65523FE3159852CCAF022C54E021E81492
Resized terrain FBOs to 1024
SEVERE: Connection refused: connect
java.net.ConnectException: Connection refused: connect
        at java.net.DualStackPlainSocketImpl.connect0(Native Method)
        at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
        at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
        at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
        at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
        at java.net.PlainSocketImpl.connect(Unknown Source)
        at java.net.SocksSocketImpl.connect(Unknown Source)
        at java.net.Socket.connect(Unknown Source)
        at java.net.Socket.connect(Unknown Source)
        at sun.net.NetworkClient.doConnect(Unknown Source)
        at sun.net.www.http.HttpClient.openServer(Unknown Source)
        at sun.net.www.http.HttpClient.openServer(Unknown Source)
        at sun.net.www.http.HttpClient.<init>(Unknown Source)
        at sun.net.www.http.HttpClient.New(Unknown Source)
        at sun.net.www.http.HttpClient.New(Unknown Source)
        at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown
Source)
        at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(Unknown Sou
rce)
        at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Sour
ce)
        at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(Unknown S
ource)
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown So
urce)
        at java.net.URL.openStream(Unknown Source)
        at org.gotti.wurmonline.clientmods.serverpacks.PackDownloader.run(PackDo
wnloader.java:34)
        at java.lang.Thread.run(Unknown Source)

 

(end snip)

 

I am configuring apache to have it listen on port 8787 as well. A little surprised by the http ip address in the following from above:

 

INFO: Got server pack A0553A65523FE3159852CCAF022C54E021E81492:http://[0:0:0:0:0
:0:0:0]:8787/packs/A0553A65523FE3159852CCAF022C54E021E81492

 

 

Share this post


Link to post
Share on other sites

Following server reboot noticed the following in the modlauncher.log on server:

 

[06:54:48 PM] SEVERE org.gotti.wurmunlimited.mods.serverpacks.ServerPackMod: null

 

 

Share this post


Link to post
Share on other sites

Logging from client to the Citadel Windows server I receive a different message:

 

INFO: Got server pack A0553A65523FE3159852CCAF022C54E021E81492:http://ns501552:2
7048/packs/A0553A65523FE3159852CCAF022C54E021E81492
Resized terrain FBOs to 1024
SEVERE: ns501552
java.net.UnknownHostException: ns501552
        at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
        at java.net.PlainSocketImpl.connect(Unknown Source)
        at java.net.SocksSocketImpl.connect(Unknown Source)
        at java.net.Socket.connect(Unknown Source)
        at java.net.Socket.connect(Unknown Source)
        at sun.net.NetworkClient.doConnect(Unknown Source)
        at sun.net.www.http.HttpClient.openServer(Unknown Source)
        at sun.net.www.http.HttpClient.openServer(Unknown Source)
        at sun.net.www.http.HttpClient.<init>(Unknown Source)
        at sun.net.www.http.HttpClient.New(Unknown Source)
        at sun.net.www.http.HttpClient.New(Unknown Source)
        at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown
Source)
        at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(Unknown Sou
rce)
        at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Sour
ce)
        at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(Unknown S
ource)
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown So
urce)
        at java.net.URL.openStream(Unknown Source)
        at org.gotti.wurmonline.clientmods.serverpacks.PackDownloader.run(PackDo
wnloader.java:34)
        at java.lang.Thread.run(Unknown Source)

 

Here are the contents of the client.log as well

 

(snip)

 

[12:28:50 AM] INFO org.gotti.wurmunlimited.modloader.ModLoader: Loaded org.gotti.wurmonline.clientmods.serverpacks.ServerPacksMod as serverpacks
[12:28:51 AM] WARNING java.util.prefs: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0x80000002. Windows RegCreateKeyEx(...) returned error code 5.
[12:29:17 AM] INFO org.gotti.wurmonline.clientmods.serverpacks.ServerPacksMod: Got server pack A0553A65523FE3159852CCAF022C54E021E81492:http://ns501552:27048/packs/A0553A65523FE3159852CCAF022C54E021E81492
[12:29:20 AM] SEVERE org.gotti.wurmonline.clientmods.serverpacks.ServerPacksMod: ns501552

 

(end snip)

Edited by Nappy

Share this post


Link to post
Share on other sites

Ok, on linux server, discovered I was listening on IPv6 instead of IPv4. Fixed that by adding the following line to .profile for my user that runs the server.

 

export _JAVA_OPTIONS="-Djava.net.preferIPv4Stack=true"

 

Still having connection error. At least one cause is eliminated now.

 

Share this post


Link to post
Share on other sites

Ok, using powershell and a wget command I can actually retrieve the file from the linux server while running the command on the windows command prompt.

 

C:\Users\J\Documents>powershell
Windows PowerShell
Copyright (C) 2015 Microsoft Corporation. All rights reserved.

PS C:\Users\J\Documents> wget -outf index.html http://superuser.com
PS C:\Users\J\Documents> wget -outf a055pack http://ActualServerIPAddress:8787/pack
s/A0553A65523FE3159852CCAF022C54E021E81492
PS C:\Users\J\Documents>

 

Looking inside the file retrieved using notepad shows the following in the very first line of the file:

 

HitchingPost/Hitching_Post.dae

 

Renaming the file to .zip and opening it with zip gives me what looks like the expected client download

 

mappings.txt

HitchingPost Folder containing:

Hitching_Post.dae

Hitching_Post_Unf.dae

WoodenFence.jpg

WoodenFenceDmg.jpg
 

To me it appears that outside of wurm I can now use the client computer to download the required pack using the actual server IP address showing end-to-end works outside of wurm

 

In client.log I have this line:

 

[01:43:14 AM] INFO org.gotti.wurmonline.clientmods.serverpacks.ServerPacksMod: Got server pack A0553A65523FE3159852CCAF022C54E021E81492:http://0.0.0.0:8787/packs/A0553A65523FE3159852CCAF022C54E021E81492

 

When I change it to http://ActualServerIPAddress:8787/packs/A0553A65523FE3159852CCAF022C54E021E81492 it works.

 

What do we do next?

Edited by Nappy

Share this post


Link to post
Share on other sites

I just came to a similar conclusion and i think i know how it got there.

 

Awhile ago there was a wurm update that broke local dedicated server usage. The quick fix was to put 0.0.0.0 in one of the wurmlogin.db fields. I am checking the db right now (and also downloading your fix).

 

 

Share this post


Link to post
Share on other sites
8 hours ago, Nappy said:

Following server reboot noticed the following in the modlauncher.log on server:

 

[06:54:48 PM] SEVERE org.gotti.wurmunlimited.mods.serverpacks.ServerPackMod: null

 

 

 

The reason was probably the apache server that used 8787 too.

 

I've update the logging properties to include the exception

handlers=java.util.logging.FileHandler,java.util.logging.ConsoleHandler
.level=INFO

java.util.logging.FileHandler.pattern = modlauncher.log
java.util.logging.FileHandler.count = 1
java.util.logging.FileHandler.formatter = java.util.logging.SimpleFormatter

# Limit the message that are printed on the console to INFO and above.
java.util.logging.ConsoleHandler.level = INFO
java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter

java.util.logging.SimpleFormatter.format=[%1$tr] %4$s %3$s: %5$s%6$s%n

 

Share this post


Link to post
Share on other sites

INFO: Got server pack A0553A65523FE3159852CCAF022C54E021E81492:http://167.114.15
6.13:8787/packs/A0553A65523FE3159852CCAF022C54E021E81492
INFO: Added server pack A0553A65523FE3159852CCAF022C54E021E81492

 

Looks like it is working now.

 

Both IP address fields in the wurmlogin.db database were blank. Likely a legacy from initial attempts to get the server working on linux.

 

sqlite3

.open wurmlogin.db

UPDATE SERVERS set EXTERNALIP = "actual_server_IP" where server=server_number;

 

Added your new mod version and restarted server.

 

Works now with pack file on client. A quick check of the hitching post shows it there too!

 

Thanks for the help and patience. I am ready for creatures mod when it comes out (as well as other interesting client side mods).

 

~Nappy

Share this post


Link to post
Share on other sites
15 minutes ago, ago said:

 

The reason was probably the apache server that used 8787 too.

 

Agreed. When I saw that one I turned off apache listening on port 8787 and that error went away too.

Share this post


Link to post
Share on other sites
On 11/24/2015, 6:15:16, WesncIsMe said:

Thanks for the update Ago, it works now!

 

 

What did you change?   Im still broken.   The clients get the modlauncher tab but not getting the files.

 

I also added this to the /mods/serverpacks.properties 

 

**snip***

classname=org.gotti.wurmunlimited.mods.serverpacks.ServerPackMod
classpath=serverpacks.jar
#Set a fixed port. If no port is selected a random free port will be used

serverPort=8787

publicServerAddress="my public facing IP"  

publicServerPort=8787

 

 

I did notice that in the DB viewer my external ip is grabbing the internal address of the server.   RFC 1918 address.  Not the public.   When I tried to hard code this to the acutal public facing IP address of the router thats doing the PAT'ing the server would not start.        

 

 

Im a special case here and need special help.    Anyone?  Ago? 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now