Sign in to follow this  
Coolboy

WUA - Web-based admin tool

Recommended Posts

On 1/26/2017 at 6:11 PM, LifesaverM said:

I pulled the latest version and edited the conf file. RMI is enabled on my server, as I have something else using it as well so I that part works. I get the login page used the default credential and then get an unable to connect to database error. Other times I try to go to my URL and it forces you to http://hostname/wua/server/select has a page title of OneApp and the page is blank, rather than getting the login prompt. Running this with PHP 5.6, also viewing my phpinfo page I can see the PDO drivers are available.

 

Any suggestions?

 

 

Can you tell me what OS you're trying to run this on? Windows or Linux? I think the reason you're getting this error is because WUA can't read/write to your Wurm Unlimited databases. If you're running it on Windows, please make sure IIS_IUSERS and Users have read and write permissions to the sqlite folder for Wurm Unlimited.

 

On 1/31/2017 at 1:18 PM, Xyp said:

Hey coolboy, latest version works great but using this on a large server there are some added features I suggest.

 

Ability to sort tickets/villages by active.

 

Ability to show which players are online so you can choose from a list of only those.

 

Sub menus for tickets to select only responded/active  in other words not resolved tickets.

 

Great work man.

 

Thanks! And I'll add these to the roadmap that I put somewhere on my computer :D Should probably move it to GitHub. When you say sort, would you like some checkboxes that you can check/uncheck to show the different types of tickets? As for players online, I was trying to get that working in 1.0 release didn't have too much time spending on getting it working so left it out. Would you or anyone on the forums know if the RMI has a method I can call to get a list of players that are online or would I have to code it in?

 

On 1/31/2017 at 1:20 PM, Xyp said:

Would also be nice if we could add a note to player accounts that is held in the database for WUA.

On 1/31/2017 at 1:24 PM, Xyp said:

Also ability to setmuter and make a ca via admin interface too :P

 

 

Added to the roadmap

Share this post


Link to post
Share on other sites

the last one is redundant mostly but I put it in there for completeness lol.

 

I think you would need to code that into the RMI, as other servers other than the one you are on when doing /who generally only sends a number of players not a list. I would think for far future efforts the ability to see what online players there are with their name clickable to take you directly to their player account would be a nifty feature. In theory that should not be increadibly difficult but most of us modders have real jobs too which makes simple tasks take forever lol.

I was also doing some further thinking, and a slightly more difficult RMI modding task would be to update/resolve tickets rather than just view them. So say I am on my phone checking in (which is what I am using this for at the moment mostly) I can add a note to a ticket so a player is not waiting for a GM to get to them as much.

 

My first thought on the villages was just a sort column, though a checkbox may be nice, since it is only 2 states, active or disbanded, sort  column should suffice. Sort column to sort by date founded and alphabetical may be handy for some users as well.

 

Again with that, in tickets, the problem I had the most was New and Responded tickets were buried in the list. However since there is more than 2 states a sort column may not do well enough. Checkboxes for new, responded, resolved and bugs (yes I found bug reports have no state whatsoever) would be a better choice on tickets.

None of this is urgent, so far no bugs. It refreshes very slow but I think that is an RMI limitation and not much can be done about that. I think it has to wait until there is enough free threads to process the requests. Cause players and such that comes from the databases are instant. But online players, # of tickets etc takes quite a bit of time to refresh. Oh wait 1 bug.... When you first log in, that new ticket block shows New tickets + bugs, no matter how old the bug report was, no matter if the bug report was resolved, as stated bug reports have no status so I think they are counting as new.

 

As you know you are welcome to check the back end of my server just hit me up, if you want to see how things look on a server with a huge history and lots of database entries.

Edited by Xyp

Share this post


Link to post
Share on other sites
1 hour ago, Coolboy said:

 

Can you tell me what OS you're trying to run this on? Windows or Linux? I think the reason you're getting this error is because WUA can't read/write to your Wurm Unlimited databases. If you're running it on Windows, please make sure IIS_IUSERS and Users have read and write permissions to the sqlite folder for Wurm Unlimited.

 

 

WUA as far as I can tell does not need to write to the Wurm Unlimited Databases. It needs to read them but writing is done through the RMI (figured this was a you being tired miss response). 

To me if he is running windows, perhaps he is using / in the config file for the file locations like the examples show rather than the windows \ method.

Remember the mess we had trying to set up the first version on my winblows server hahahaha. Took 3 of us, all experienced IT professionals a couple hours to figure out the issue (think you were the one that found the fubar iirc)

Edited by Xyp

Share this post


Link to post
Share on other sites

I am having an issue.

Firstly I am running on Ubuntu Server 32 bit 16.04.1

I have the wua mod loaded and the config.php updated and Wurm.ini with the enable RMI setting.

I see in the server log that the mod is loading, RMI interface is up.

 

On the wua web page I get a 404 not found error on assets/js/wua.js

After login I also get a 404 error as it is trying to send me back to the site root but the url isn't right:  account/login//website/ (Website happends to be the site root)

manually changing the url brings me to the dashboard.

I get a 500 server error on the post to the Dashboard.php page.

 

The Dashboard Widgets don't work.  (Likely from the above 500 server error) The Players and Villages Tabs list players and Villages so the site must be able to read from the Databases.  However, attempting to give a player money or any other action results in an error modal.

Clicking on the servers tab also gives me an Error modal:

Failed

It looks like we couldn't proccess your request at this time. Please try again later.

 

I have a feeling that perhaps the site isn't connecting via the RMI.  I tried using the localHost IP and the Servers Public IP with no change in results.

 

Any idea as to what could be the issue?  Is there any logs anywhere that I can post that will show what is misconfigured?

Share this post


Link to post
Share on other sites

Looking at the apache error log I have the following.  I have made sure that the permissions are 755 for all the folders so it shouldn't be a permissions thing:

 

[Sun Feb 05 22:43:11.027183 2017] [:error] [pid 4622] [client 69.41.201.2:53972] PHP Warning:  include(/var/www/html/website/classes/class.Rmi.inc.php): failed to open stream: No such file or directory in /var/www/html/website/classes/class.Server.inc.php on line 3, referer: http://melori.zapto.org/website/server/
[Sun Feb 05 22:43:11.027231 2017] [:error] [pid 4622] [client 69.41.201.2:53972] PHP Warning:  include(): Failed opening '/var/www/html/website/classes/class.Rmi.inc.php' for inclusion (include_path='.:/usr/share/php') in /var/www/html/website/classes/class.Server.inc.php on line 3, referer: http://melori.zapto.org/website/server/
[Sun Feb 05 22:43:11.027278 2017] [:error] [pid 4622] [client 69.41.201.2:53972] PHP Warning:  include(/var/www/html/website/classes/class.Rmi.inc.php): failed to open stream: No such file or directory in /var/www/html/website/classes/class.Database.inc.php on line 3, referer: http://melori.zapto.org/website/server/
[Sun Feb 05 22:43:11.027295 2017] [:error] [pid 4622] [client 69.41.201.2:53972] PHP Warning:  include(): Failed opening '/var/www/html/website/classes/class.Rmi.inc.php' for inclusion (include_path='.:/usr/share/php') in /var/www/html/website/classes/class.Database.inc.php on line 3, referer: http://melori.zapto.org/website/server/
[Sun Feb 05 22:43:11.027440 2017] [:error] [pid 4622] [client 69.41.201.2:53972] PHP Fatal error:  Uncaught Error: Class 'RMI' not found in /var/www/html/website/classes/class.Server.inc.php:93\nStack trace:\n#0 /var/www/html/website/classes/class.Server.inc.php(73): SERVER->GetPlayerCount()\n#1 /var/www/html/website/server/view.php(14): SERVER->GetServer()\n#2 {main}\n  thrown in /var/www/html/website/classes/class.Server.inc.php on line 93, referer: http://melori.zapto.org/website/server/
 

Share this post


Link to post
Share on other sites

I fixed 1 problem. The loading of the RMI class had wrong case. The filename was class.RMI.inc.php but it was trying to load class.Rmi.inc.php

Share this post


Link to post
Share on other sites
On 2/4/2017 at 4:03 PM, Xyp said:

 

WUA as far as I can tell does not need to write to the Wurm Unlimited Databases. It needs to read them but writing is done through the RMI (figured this was a you being tired miss response). 

To me if he is running windows, perhaps he is using / in the config file for the file locations like the examples show rather than the windows \ method.

Remember the mess we had trying to set up the first version on my winblows server hahahaha. Took 3 of us, all experienced IT professionals a couple hours to figure out the issue (think you were the one that found the fubar iirc)

Yes I am running it on a Windows server. I have gotten further but not all the way now. I did use the correct slash in the config file (and believe me as a Windows and Linux admin I have made that mistake a few times, lol), what seems to fix things was even though IUSR had perms the IIS user group needed the perms. It allowed me to login, when I went to change the default admin password I get this error message now:

 

SQLSTATE[HY000]: General error: 8 attempt to write a readonly database

 

IIS_IUSRS does have write perms to the app.db

Edited by LifesaverM
app perms

Share this post


Link to post
Share on other sites

IIS_IUSRS is needed for both the file and the database.

 

The oddity here is IUSR is not a part of IIS_IUSRS group, and PDO SQLite needs to be able to write to the file to create transactional data, because sqlite is basically a file not a database server application. So if you add IUSR to write permissions to the folder and the database it works fine.

 

From a security standpoint I do not like this, I am a paranoid when it comes to my server lol, so my suggestion is to get all of your accounts set up, have all of your staff change their passwords, then remove the permissions. The only thing currently being held in this database is the users and passwords for the website access.

 

Edit:

Just in case I was not completely clear, and more for the benefit of others with less server admin experience, the folder includes->sqlite needs to have IIS_IUSRS and IUSR permissions to write BOTH of them need it. The database itself app.db also needs IIS_IUSRS and IUSR permissions. WHY... I DONT KNOW...sqlite is what it is, easy for end users to set up their thingy but not nearly as secure as an app driven database.

Edited by Xyp

Share this post


Link to post
Share on other sites

I fixed 1 problem. The loading of the RMI class had wrong case. The filename was class.RMI.inc.php but it was trying to load class.Rmi.inc.php

 

I wish I could help you bro, on winblows I got this, but when it comes to Linux, and don't get me wrong I love linux, but as a server admin I am dumb as a rock on Linux. However, from your logs it seems the RMI class was the entire issue, which is strange nobody else is having that problem, nice fix though. What is the issue you have now?

Share this post


Link to post
Share on other sites

Thanks Xyp that nudge did indeed get me situated. Once my team all have their passwords change I'm yanking the access as I don't feel comfortable having the IIS user or group having that level of access for security reason.

 

Really looking forward to the continued development of this tool. Would love to see a permission system more detailed where you could configure what people can do at the various levels more. Love being able to see things now without being in game like the tickets.

Share this post


Link to post
Share on other sites

I would like to see a MySQL option for more serious admins to take advantage of, but I can always write it myself haha.

Share this post


Link to post
Share on other sites

Some feedback from our team, our wish list if you will if any of these are possible. :)

 

  • Ability for the last seen field to work, would be so helpful to determine if a player is still active
  • Ability to see last saved coordinates for a player
  • Ability to see how many days are left on a deed
  • Ability to see how much money is in a deed's upkeep fund

Sure your super busy and mentioned something about backing off from this for a while and honestly don't know how difficult these requests would be. They should would be helpful though, the 1st and 3rd ones in particular. Thanks so much.

Share this post


Link to post
Share on other sites

Seeing the info is fairly easy, sending things to the server is more interesting. All you gotta do is interprit the data for the correct database for viewing of info. Then of course some web dev to make it pretty on the front end lol.

Share this post


Link to post
Share on other sites

Has anyone run into an issue where only a certain # of players are being displayed? We have over 200 characters now and my  Ys and Zs don't display.

Share this post


Link to post
Share on other sites

Hello there,

 

Is the current build compatible with WU since the recent database upgrade? I only ask as I get "SQLSTATE[HY000]: General error: 1 no such table: accounts" when trying to log in to the admin web tool now.

Share this post


Link to post
Share on other sites

Heh nevermind that, turns out it was because the config file has completely changed. (The "app.db" file was no longer specified within the correct array.)

On another topic -- Is there anything changed that may have stopped the player listing from working? Not sure if this tool has an error log I can inspect.

Share this post


Link to post
Share on other sites

I think this puppy is dead sadly.

Share this post


Link to post
Share on other sites

Indeed and I had added some custom elements. The web side code I can deal with but the mod..... not my area of expertise.

Share this post


Link to post
Share on other sites

I'm working on a API to interface with the Wurm RMI. It's not too far along, but it's getting there... no mod required at least.

 

If you're interested, you can check out my site I'm using to test it on:

http://garrett.from-ut.com/

I've also managed to add a dynamic map with the data. It will show the live positions of any connected players on refresh.

 

I'll release the source code for the website once I'm happy with it and I've already posted the RMI API on Github, it's just a matter of loading the information onto a website if you'd like to create your own.

 

There are a few more commands I need to add to the WebRMI before it is complete.

It's an early work in progress... https://github.com/Garrett92/WurmWebRMI

Edited by ImRaginBro
  • Like 1

Share this post


Link to post
Share on other sites

I would not recommend opening RMI to outside connections. That is the entire need for the interface. You can use an RMI agent to interact with the wurm server, then interact with a web server on the local machine. From there you can put the web server connection to the outside world to interact as a tunnel into the localhost. RMI at best can be encrypted via network tunnel, that security is a joke. Anyone with a little bit of injection knowledge that gets ahold of your RMI connection can ruin your server in an instant. I love the work you are doing, but need to get some java help to make a proper interface for you. You can also decompile the mapviewer I just updated, while I was digging around inside it I noticed jonneh had started RMI webhooks in there, and the mapviewer is already set up with a web server and all the json decoding. It would be a good starting point, he had hooked into a lot, I did not bother to look enough to see how finished it was, I was looking for something else hehe.

 

I notice you still have the black holes on the mapviewer, grab my update :D. The work on the site is looking good (believe me I know how tedious css and php can be). One idea for you maybe, somewhere someone at one point had worked out grabbing steam id's it would be nice to use that and the steam web api's to use login/steam account authentication on the site, for players to hook into their own accounts, just a thought.

 

Keep up the good work, and tool devs are welcome on the modder discord too! We just have fun in there.

  • Like 1

Share this post


Link to post
Share on other sites

@Coolboydoes this still work and if so where do i put WUAHelper  I have been trying to figure this ot for about a hour now and just cant seem to get it running.  Maybe im just not doing it right, but it seems like this is the tool I have been looking for.  If you could help me out I could then make a youtube video for it that might help others in the future

Share this post


Link to post
Share on other sites

This tool looks like it would be amazing but I have been completely unable to get it fully working. I can get the web interface working and the mod loaded perhaps? But if I edit wurm.ini to enable incoming RMI, the server crashes on startup with less-than-descriptive errors.

 

If there is any kind of answer others who've had a similar issue could offer, I would be immensely thankful.

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