Accessing the Admin Tool

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

Erwin
Posts: 17
Joined: 29 Nov 2013, 17:03

Accessing the Admin Tool

Postby Erwin » 20 Jun 2014, 14:28

Hello,

My SmartFoxServer shut down last night and I had to manually reboot it. Now when I try to access the admin tool, I get an error that says:

HTTP ERROR: 404
Problem accessing /. Reason:
NOT_FOUND

I went into the file manager for the site and the admin directory and its files are there. It was working before it got rebooted. The only thing that I did was run the command for starting the service -- ./sfs2x-service start.

I also went to the log directory and it did not log the boot process or it is not logging any of regular actions in the smartfox log.

How can I fix this?

Thanks.
Erwin
Posts: 17
Joined: 29 Nov 2013, 17:03

Re: Accessing the Admin Tool

Postby Erwin » 20 Jun 2014, 14:39

I just copied the admin directory into the main directory of the website and then ran the index.html file from that location and it works that way. So I am wondering why it doesn't work from logging in with wizardlyworld.com:8080 and why nothing is being logged anymore.
Erwin
Posts: 17
Joined: 29 Nov 2013, 17:03

Re: Accessing the Admin Tool

Postby Erwin » 20 Jun 2014, 14:55

Even though I can get the admin tool working, now if I try to make a change I get an error:

An unexpected error occurred in the Admin Tool server-side extension, please check the server-side logs; the extension reported: config/_backups/2014-06-20-10-06-54__server.xml (Permission denied).

I suppose this is because I am running the admin tool from a different location, so it cannot find the file.
User avatar
Lapo
Site Admin
Posts: 23009
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Accessing the Admin Tool

Postby Lapo » 20 Jun 2014, 16:09

Did the server boot up correctly when you started it again?

I also went to the log directory and it did not log the boot process or it is not logging any of regular actions in the smartfox log.

This I don't understand.
There must be log information about the server startup, even a couple of lines.
Check the day and hour of the startup to make sure you're looking at the relevant information.

I just copied the admin directory into the main directory of the website and then ran the index.html file from that location and it works that way. So I am wondering why it doesn't work from logging in with wizardlyworld.com:8080 and why nothing is being logged anymore

Nah, this is not a good idea.
It will make things more complicate to debug. Stick with the AdminTool on the SFS webserver.

Try pointing the browser directly to http://<Your-Ip-Address>:8080/admin/index.html
(if you're not using the default port 8080, change that as well)

cheers
Lapo
--
gotoAndPlay()
...addicted to flash games
Erwin
Posts: 17
Joined: 29 Nov 2013, 17:03

Re: Accessing the Admin Tool

Postby Erwin » 20 Jun 2014, 18:19

I think it booted up correctly. Since I don't have access to the boot log, is there a way that I can see what is happening when it boots. Using the start service, nothing is displayed on the SSH screen during the process.

Here is the reason from the log that the server was shutdown:
19 Jun 2014 | 02:33:35,405 | WARN | SFS2X ShutdownHook | v2.core.SFSShutdownHook | | SFS2X is shutting down. The process may take a few seconds...


What would have caused the server shutdown?

I tried getting to the admin tool by using the IP address:8080/admin/index.html and still got the same error message.

If the server is booting correctly, how do I get the logs back working? Would I need to reinstall smartfoxserver?
Erwin
Posts: 17
Joined: 29 Nov 2013, 17:03

Re: Accessing the Admin Tool

Postby Erwin » 24 Jun 2014, 13:21

I am still having trouble accessing the admin tool. I was able to access it up until a couple of days ago. Now when I try to go there, I get an error saying it is not found. I looked it up and the file is there. I can move the admin directory to the root directory where my HTML files are and I can run it from there. I cannot make any configuration changes from that location however. I have rebooted the server and still have the same problem. I looked at the log and it says that there may be 2 instances running. I stopped it before I restarted and ran the status command and it said the service was not running. I have attached part of the log file here.

One of the things in the file is
22 Jun 2014 | 00:18:23,231 | INFO | main | v2.core.AdminToolService | | AdminTool Service started
22 Jun 2014 | 00:18:24,443 | WARN | main | org.mortbay.log | | failed SelectChannelConnector@0.0.0.0:8080: java.net.BindException: Address already in use
22 Jun 2014 | 00:18:24,444 | WARN | main | org.mortbay.log | | failed Server@1585b0d: java.net.BindException: Address already in use
22 Jun 2014 | 00:18:24,445 | ERROR | main | smartfoxserver.v2.SmartFoxServer | | java.net.BindException:
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Exception: java.net.BindException
Message: Address already in use
Description: The specified TCP port cannot be bound to the configured IP address.
Possible Causes: Probably you are running another instance of SFS2X. Please double check using the AdminTool.
Start a new browser page at http://<your-sfs-domain>/admin/


I found the following topic in the forum: http://smartfoxserver.com/forums/viewtopic.php?f=18&t=13990&p=57203&hilit=access+admin+tool#p57203

I followed what it said by changing the port in jetty to 8081 and then changed it in the sfs-config file and it still does not work. Now I get an error saying the page cannot be displayed.

What can I do to fix this? I need to be able to add rooms.
User avatar
Lapo
Site Admin
Posts: 23009
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Accessing the Admin Tool

Postby Lapo » 24 Jun 2014, 13:30

The error you have reported simply indicates that SmartFoxServer is already running and you're trying to run a second instance which fails.

It seems very much like your installation is corrupt. Since I have no idea of what might be going exactly, which have files have been moved around etc... I would probably recommend to reinstall the server.

Before you do that however you could still try to simply run the AdminTool from the local html file, directly. This in turn will open in your browser.
Maybe you have already done this. If that's the case or even this doesn't work for you a new installation is in order.

Best thing to do is to install in a different folder so that you can migrate your zone files, if necessary.

Hope it helps
Lapo

--

gotoAndPlay()

...addicted to flash games
User avatar
Carl Lydon
Posts: 298
Joined: 12 Nov 2007, 16:15
Location: NYC
Contact:

Re: Accessing the Admin Tool

Postby Carl Lydon » 14 Jan 2016, 01:05

Today I tried to create a new zone using the admin tool and assign an extension to the zone. I find this always to be a dangerous thing to do as any little error and my SF won't restart...

Although my extension shows no errors in eclipse, maybe the extension caused SF to fail to restart. I suspect it was my extension trying to access an unavailable database, even though that was in a try/catch statement.

Anyway, I removed the offending extension from the zone using ftp....

Then I used the mac terminal to ssh in and restart the server.

Now I have the problem similar to the OP here. Whenever I try to delete a zone, or make really any changes to the server I get a permissions error. I also see when I do "./sfs2x.sh" in terminal, it does mention that there is probably a 2nd version of the server running now, and I guess that's the one that has permissions?

Anyway, how can I shut down that 2nd version? In terminal, when I do "ps -Al" (list processes), I can't tell what is a smart fox server process.

Thanks.
User avatar
Lapo
Site Admin
Posts: 23009
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Accessing the Admin Tool

Postby Lapo » 14 Jan 2016, 07:59

The most simple way to manage your running SmartFox instance is by using the ./sfs2x-service command as explained in the docs here:
http://docs2x.smartfoxserver.com/Gettin ... tall-linux

...which allows you to start/stop and restart the server.

as regards finding the process id of your running instance use this instead:

Code: Select all

ps -ax |grep java

which will give you back only the running java processes. Unless you have other java apps running you should only see the SFS process.
Even if you have java apps you still will be able to determine which is which by the details in the output.

cheers
Lapo

--

gotoAndPlay()

...addicted to flash games
User avatar
Carl Lydon
Posts: 298
Joined: 12 Nov 2007, 16:15
Location: NYC
Contact:

Re: Accessing the Admin Tool

Postby Carl Lydon » 14 Jan 2016, 14:52

Thanks, I will use that in the future. I was able to stop all the Smartfox instances by restarting the machine, which one might not always want to do.
armanbm
Posts: 17
Joined: 17 Nov 2016, 06:32

Re: Accessing the Admin Tool

Postby armanbm » 12 Mar 2017, 16:18

its too late to answer this question, but the reason you could not edit anything in AdminTool is because of permission.
you probably have login to ftp by a higher permission user than the one you have installed SFS with.
for example your ftp acc data may be for ROOT user while you have installed SFS with a superuser. then admin tool will not be able to edit some files.
i suggest to use a superuser for all of your works.

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 76 guests