Sign in to follow this  
Coolboy

WUA - Web-based admin tool

Recommended Posts

Whenever I try to change the power of a player it gives me the error:

Unable to change players power.

The player in question is currently at level 4 (Arch GM) and I want to demote back to level 0 (player). This character is not logged in.

Share this post


Link to post
Share on other sites

Right now the way I have it implemented the player needs to be logged in, I'll update the code tonight or sometime tomorrow so the player doesn't need to be logged into changing their power. There're a few functions that require the player to be logged in, and on top of my head those functions are change power, change kingdom, give item.


  • Like 1

Share this post


Link to post
Share on other sites

Getting closer and closer to actually using this, lol. Love seeing progress!


Share this post


Link to post
Share on other sites

I concur. I too found a few bugs but I think they are for things that aren't implemented yet. Great progress you're making though.


Share this post


Link to post
Share on other sites

Thanks guys and Adambean what bugs did you find?


 


Also getting pretty close to an official version 1.0.0-Alpha for this, right now just been little revisions here and there hence why it's been 0.0.x but hopefully by next week it'll be in the major state :D


Edited by Coolboy

Share this post


Link to post
Share on other sites

Hi Coolboy, a few actions cause this error pop-up:



java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:

(the nested exception details is not shown)


 


Stuff that appears to cause this so far:


  • Changing a player's power level
  • Adding an item to a player

All happening because I guess they aren't implemented, so not really bugs. :)


 


Bugs I've noticed:


  • When changing the home server kingdom, the span with ID serverKingdom does not contain the new value. This is only cosmetic, because if I refresh the page the correctly chosen kingdom will then appear in the span, and the setting really has changed correctly.
  • Changing your own password does not ask you to confirm your new password. (thought I read in the change log that got added)

Your toolkit is coming along very nicely though, and I'm happy to keep it running permanently as it's becoming a very viable and useful toolkit to have. Any other feedback I have would merely be suggestions, not issues.


 


Thanks again for your work. :3


Edited by Adambean
  • Like 1

Share this post


Link to post
Share on other sites

If you've updated to the latest version then those functions are implemented.


 


Can you verify the following things?


  • Your server.jar contains the latest webinterface classes?
  • Some of the features require the player to be logged in to work, can you log in with a player and test those features and see if you get the same error? 
  • Is your WUAHelper on the latest version?

As for the bugs, changing home serve kingdom has been fixed, thanks for letting me know :) The problem was the variable wasn't being updated. And confirm password as only added to when creating a new application member. But I have added confirm password to change password as well.


 


Those bug fixes have been released in 0.0.18-Alpha. I still need to work on making some webinterfaces not requiring the user to be logged in.


Share this post


Link to post
Share on other sites

I was using 0.0.16-Alpha, so perhaps I was missing some features. I will upgrade shortly and try them out in 0.0.18.

Edit: Tried, the two issues with java.rmi.ServerException still happen, but the kingdom label and confirm password are both present now.

I've inspected the document around java.rmi.ServerException, doesn't look like any further details or stack trace appear.

(I've done a git clone now so I can at least keep up to date more often)

Edited by Adambean

Share this post


Link to post
Share on other sites

I was using 0.0.16-Alpha, so perhaps I was missing some features. I will upgrade shortly and try them out in 0.0.18.

Edit: Tried, the two issues with java.rmi.ServerException still happen, but the kingdom label and confirm password are both present now.

I've inspected the document around java.rmi.ServerException, doesn't look like any further details or stack trace appear.

(I've done a git clone now so I can at least keep up to date more often)

 

Okay do me a favor, in the webadmin go to a player and either do change power or add item, once you do that go to where your wurm server is, then go into your map/Logs/ folder. You will see a log file called wurm.log.0, open that with a text editor (I would recommend notepad++). Scroll all the way to the bottom and look for "wuaChangePower" if you changed the player's power or "wuaGiveItem" if you gave an item. Copy-paste the error in here, if there is an error, if not then let me know.

Share this post


Link to post
Share on other sites

"wuaChangePower" does not appear in the log file after trying this. It isn't in there at all in fact (for previous ones either).


Share this post


Link to post
Share on other sites

Okay, then it's something to do with WUAHelper, RMI connection, or your server.jar.


 


Did you place the WebInterface.class, WebinterfaceImpl$1.class, and WebInterfaceImpl.class in your server.jar in com/wurmonline/server/webinterface?


Another thing to check is if the RMI is running on the server.


Lastly make sure the WUAHelper is still in the includes folder and make sure the rmiConfig in the config.php is correct.


  • Like 1

Share this post


Link to post
Share on other sites

Ah no, I have not modified my game server's JAR because I didn't read the instructions. I shall do that now. The rest was fine, not modifying the game server's JAR was the cause.


 


I get a real error message logged this time, tried to set myself to level 0.



Nov 15, 2015 7:29:42 PM com.wurmonline.server.webinterface.WebInterfaceImpl wuaChangePower
WARNING: Failed to save the player information. Power not changed - Adambean
com.wurmonline.server.NoSuchPlayerException: Adambean
at com.wurmonline.server.Players.getPlayer(Players.java:597)
at com.wurmonline.server.webinterface.WebInterfaceImpl.wuaChangePower(WebInterfaceImpl.java:3633)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
at sun.rmi.transport.Transport$1.run(Unknown Source)
at sun.rmi.transport.Transport$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$256(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Share this post


Link to post
Share on other sites

Yup there you go, you should be all set now! :)


 


The reason you're getting that error is because you're not logged in, the way I wrote the method it only changes the players power when they're logged in. I haven't had the time to update it the webinterface cause been a busy week / weekend. I should have some time tomorrow to update it :)


 


That being said, if you log in to your account and then try changing your powers you should be all set.


  • Like 2

Share this post


Link to post
Share on other sites

Ah ok, no I don't think I was logged in. (I was about to) This message also caused the server process to crash.


 


Thanks again for the update. I hope you're not pushing yourself too hard to get more done, you are doing it for free after all :) (and every time you work on it you've provided a good nugget for us)


Share this post


Link to post
Share on other sites

Hmmm I haven't had my server crash yet but I'll look into it, is there any other error's that come up in the wurm.log?. Has anyone else experienced the server crashing when using the admin tool?


 


Haha no worries :) and nah I'm only working on this when I have free time so not pushing myself hard at all lol :D


  • Like 1

Share this post


Link to post
Share on other sites

Have you added the ability to shut down the server? If so, are you able to pass a time (countdown) and server message to display?


Share this post


Link to post
Share on other sites

Have you added the ability to shut down the server? If so, are you able to pass a time (countdown) and server message to display?

Yes, you can shut down the server along with a message and time so all the players are informed. Only thing is you can't start a server from the interface as of yet.

  • Like 1

Share this post


Link to post
Share on other sites

Would you mind sharing how you managed that bit? I'm trying to write a script to do automatic timed restarts in order to perform backups (since the server doesn't write to the databases while it's on, ti seems).


Share this post


Link to post
Share on other sites

Would you mind sharing how you managed that bit? I'm trying to write a script to do automatic timed restarts in order to perform backups (since the server doesn't write to the databases while it's on, ti seems).

The way I did it is by creating a RMI client (WUAHelper) which connects to the server RMI (Webinterface) which has the command to shutdown with parameters for reason and delay.

Edited by Coolboy
  • Like 1

Share this post


Link to post
Share on other sites

Hmm... I'm trying to be able to do it in the command line for the server, but it doesn't seem to be available to use more parameters (or I'm entering them incorrectly). Oh well, I'll try elsewhere... I realize you have your project to work on, haha. Thanks!


Share this post


Link to post
Share on other sites

Hmm... I'm trying to be able to do it in the command line for the server, but it doesn't seem to be available to use more parameters (or I'm entering them incorrectly). Oh well, I'll try elsewhere... I realize you have your project to work on, haha. Thanks!

If you want you can use WUAHelper in the command line. Open a command prompt and go to where you have WUA/includes folder then run this command:

java -jar "WUAHelper.jar" "RMI IP" "RMI PORT" "RMI PASS" "shutDown" "yourName,shutdownDelayInSeconds,ReasonForShutDown"

  • Like 1

Share this post


Link to post
Share on other sites

not to interrupt your chat, but wanted to say "great job"!!!  This looks fantastic in your screen shots and can't wait to try it out.


  • Like 3

Share this post


Link to post
Share on other sites

not to interrupt your chat, but wanted to say "great job"!!!  This looks fantastic in your screen shots and can't wait to try it out.

Haha no worries and thank you :)

  • Like 2

Share this post


Link to post
Share on other sites

not to interrupt your chat, but wanted to say "great job"!!!  This looks fantastic in your screen shots and can't wait to try it out.

 

Positive feedback and constructive criticism always welcome in these threads :P

  • Like 3

Share this post


Link to post
Share on other sites

So an update since I haven't posted / pushed any updates to GitHub in awhile. I've been slowly working on WUA and trying to get to 1.0.0-Alpha before I release another update. I'll also try to keep the screenshots update-to-date as I make more changes.

 

As for when I think 1.0 will be released, based on my schedule and the amount of free time I have I should have it done by end of this month (hopefully)

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
Sign in to follow this