Webadmin does not load
#1
Hello,

i installed MCServer on a RaspberryPi and it works (i can log in to the server), but i can not log in to the webadmin:
i started it from the root diretory:

pi@raspberrypi ~/MCServer $ ./MCServer

This is the log:
Quote:[11:00:38] --- Started Log ---
[11:00:38] Creating new server instance...
[11:00:38] Reading server config...
[11:00:38] Starting server...
[11:00:38] Compatible clients: 1.2.4, 1.2.5, 1.3.1, 1.3.2, 1.4.2, 1.4.4, 1.4.5, 1.4.6, 1.4.7, 1.5, 1.5.1, 1.5.2, 1.6.1, 1.6.2, 1.6.3, 1.6.4, 1.7.2, 1.7.4
[11:00:38] Compatible protocol versions 29, 39, 47, 49, 51, 60, 61, 73, 74, 77, 78, 4
[11:00:38] Client IPv4 IPv4: Port 25565 is open for connections
[11:00:38] Client IPv6 IPv6: Cannot create listening socket for port 25565: "97: Address family not supported by protocol"
[11:00:40] WebServer IPv4 IPv4: Port 8080 is open for connections
[11:00:40] Regenerating users.ini, all users will be reset
[11:00:40] Cannot open file "crafting.txt", no crafting recipes will be available!
[11:00:40] Could not open the furnace recipes file "furnace.txt"
[11:00:40] -- Loading Plugins --
[11:00:40] Initialised Core v.14
[11:00:40] Initialized TransAPI v.1
[11:00:40] -- Loaded 3 Plugins --
[11:00:40] Initialize: Cannot read monsters.ini file, monster attributes not available
[11:00:40] World "world": Unknown mob type: slime
[11:00:40] [Physics] WaterSimulator not present or empty in world/world.ini, using the default of "Vanilla".
[11:00:40] [Physics] LavaSimulator not present or empty in world/world.ini, using the default of "Vanilla".
[11:00:40] [Physics] RedstoneSimulator not present or empty in world/world.ini, using the default of "incremental".
[11:00:40] [Generator] BiomeGen value not set in world.ini, using "MultiStepMap".
[11:00:40] [Generator] HeightGen value not set in world.ini, using "Biomal".
[11:00:40] Preparing spawn area in world "world"...
[11:00:41] 396 chunks to load, 0 chunks to generate
[11:00:43] 255 chunks to load, 0 chunks to generate
[11:00:45] 99 chunks to load, 0 chunks to generate
[11:00:46] Lighting spawn area in world "world"...
[11:00:46] 0 chunks remaining to light
[11:00:46] LUA: 6 - cannot open webadmin/template.lua: No such file or directory
[11:00:46] Can't load <webadmin_template> because of an error in file webadmin/template.lua
[11:00:46] Could not load WebAdmin template "webadmin/template.lua", using default template.

[11:00:46] Startup complete, took 8423 ms!

what did i wrong?
Reply
Thanks given by:
#2
Did you download a pre-built executable, or did you build yourself?

The server basically tells you that it cannot find the webadmin template file. You should have a "webadmin" folder right next to the executable, and it should contain the "webadmin.lua" file. Without it the webadmin *should* still work, but you will most probably not see anything when the page loads, just an empty page or maybe some unhelpful text.

Also, in order to be able to log into the webadmin, you need to edit the webadmin.ini file right next to the executable, it tells MCServer what users are allowed and what passwords they need to use; by default no-one is allowed to log in.
Reply
Thanks given by:
#3
i build it myself using this tutorial.
i have no webadmin folder "webadmin" in ~/MCServer.
i set the user and password in webadmin.ini, but i only see a blank page.

should i rebuild it or is there another solution, because building it takes several hours.
Reply
Thanks given by:
#4
I think the tutorial is stupid - it makes you delete the server after building, which is a dumb thing to do - you'll want to compile again when the source is updated, so it makes sense to actually leave everything as-is.

Anyway, to fix you problem, download this file and save it as webadmin/template.lua: https://raw.githubusercontent.com/mc-ser...mplate.lua
Reply
Thanks given by:
#5
if i dont delete it, how can i update it faster?
Reply
Thanks given by:
#6
The fastest way to update it is to use my pre-built executable at ci.bearbin.net.
Reply
Thanks given by:
#7
When you want to do an update, you need to execute this in the "mc-server" folder where you originally cloned the sources from GitHub:
Code:
git pull
git submodule update --init
make
"git pull" will download the changes in the source code for the main project, "git submodule ..." will download changes in the libraries and default plugins that the server uses, and the "make" command will compile the server from the changed sources. It will overwrite the old executable in the "MCServer" folder, so you should normally copy the entire folder somewhere else for running the server, and after the build overwrite that folder with the contents of the build folder:
Code:
mkdir ~/MCServer
cp -r ~/mc-server/MCServer* ~/MCServer
Reply
Thanks given by:
#8
One last question:
when i try to copypaste it, it says me:


pi@raspberrypi ~/mc-server$ sudo cp -r ~/mc-server/MCServer* ~/MCServer
cp: cannot overwrite non-directory `/home/pi/MCServer/MCServer' with directory `/home/pi/mc-server/MCServer'
Reply
Thanks given by:
#9
I might have gotten the command slightly wrong, perhaps someone more versed in linux can fix it. It was meant to simply copy the entire ~/mc-server/MCServer folder as ~/MCServer. I think the asterisk shouldn't be there.
Reply
Thanks given by:
#10
Why dost thou not recommend precompiled builds (and the autoupdate script)? They are more user friendly.
Reply
Thanks given by:




Users browsing this thread: 1 Guest(s)