How To Get SFS2X Working in Ubuntu Server?

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

Moderators: Lapo, Bax

JuliusBtesh
Posts: 58
Joined: 30 Sep 2014, 17:08

How To Get SFS2X Working in Ubuntu Server?

Postby JuliusBtesh » 13 Oct 2014, 20:23

I downloaded the correct files for the Smartfox Server and put it onto an Ubuntu Server. I have also downloaded the JRE and JDK but when I try running the patch installation (./install-linux.sh) or (./sfs2x.sh) I get this error:

Error occurred during initialization of VM
java/lang/NoClassDefFoundError: java/lang/Object

What am I missing?
JuliusBtesh
Posts: 58
Joined: 30 Sep 2014, 17:08

Re: How To Get SFS2X Working in Ubuntu Server?

Postby JuliusBtesh » 13 Oct 2014, 21:07

Ok I got it to sort of work... It doesn't give me that error anymore but now I get this

log4j:ERROR setFile(null,true) call failed.
java.io.FileNotFoundException: logs/smartfox.log (Permission denied)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:221)
at java.io.FileOutputStream.<init>(FileOutputStream.java:142)
at org.apache.log4j.FileAppender.setFile(FileAppender.java:290)
at org.apache.log4j.FileAppender.activateOptions(FileAppender.java:164)
at org.apache.log4j.DailyRollingFileAppender.activateOptions(DailyRollingFileAppender.java:216)
at org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:257)
at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:133)
at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:97)
at org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:689)
at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:647)
at org.apache.log4j.PropertyConfigurator.parseCatsAndRenderers(PropertyConfigurator.java:568)
at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:442)
at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:334)
at org.apache.log4j.PropertyConfigurator.configure(PropertyConfigurator.java:342)
at com.smartfoxserver.v2.SmartFoxServer.initialize(SmartFoxServer.java:592)
at com.smartfoxserver.v2.SmartFoxServer.start(SmartFoxServer.java:258)
at com.smartfoxserver.v2.Main.main(Main.java:26)
log4j:ERROR Either File or DatePattern options are not set for appender [fileAppender].
log4j:ERROR setFile(null,true) call failed.
java.io.FileNotFoundException: logs/boot/boot.log (Permission denied)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:221)
at java.io.FileOutputStream.<init>(FileOutputStream.java:142)
at org.apache.log4j.FileAppender.setFile(FileAppender.java:290)
at org.apache.log4j.FileAppender.activateOptions(FileAppender.java:164)
at org.apache.log4j.DailyRollingFileAppender.activateOptions(DailyRollingFileAppender.java:216)
at org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:257)
at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:133)
at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:97)
at org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:689)
at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:647)
at org.apache.log4j.PropertyConfigurator.parseCatsAndRenderers(PropertyConfigurator.java:568)
at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:442)
at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:334)
at org.apache.log4j.PropertyConfigurator.configure(PropertyConfigurator.java:342)
at com.smartfoxserver.v2.SmartFoxServer.initialize(SmartFoxServer.java:592)
at com.smartfoxserver.v2.SmartFoxServer.start(SmartFoxServer.java:258)
at com.smartfoxserver.v2.Main.main(Main.java:26)
log4j:ERROR Either File or DatePattern options are not set for appender [bootFileAppender].
16:14:49,567 INFO [main] v2.SmartFoxServer - Boot sequence starts...
16:14:50,164 ERROR [main] v2.SmartFoxServer - com.thoughtworks.xstream.converters.ConversionException:
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Exception: com.thoughtworks.xstream.converters.ConversionException
Message: docket : docket : docket : docket
---- Debugging information ----
message : docket : docket
cause-exception : com.thoughtworks.xstream.mapper.CannotResolveClassException
cause-message : docket : docket
class : com.smartfoxserver.v2.config.ServerSettings
required-type : java.util.ArrayList
path : /serverSettings/socketAddresses/docket
line number : 6
-------------------------------
Description: Unexpected error during Server boot. The server cannot start.
Solution: Please email us the content of this error message, including the stack trace to support[at]smartfoxserver.com
+--- --- ---+
Stack Trace:
+--- --- ---+
com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:89)
com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:63)
com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:76)
com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshallField(AbstractReflectionConverter.java:246)
com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.doUnmarshal(AbstractReflectionConverter.java:218)
com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshal(AbstractReflectionConverter.java:162)
com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:82)
com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:63)
com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:76)
com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:60)
com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:137)
com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal(AbstractTreeMarshallingStrategy.java:33)
com.thoughtworks.xstream.XStream.unmarshal(XStream.java:923)
com.thoughtworks.xstream.XStream.unmarshal(XStream.java:909)
com.thoughtworks.xstream.XStream.fromXML(XStream.java:861)
com.smartfoxserver.v2.config.DefaultConfigLoader.loadServerSettings(DefaultConfigLoader.java:49)
com.smartfoxserver.v2.config.SFSConfigurator.loadConfiguration(SFSConfigurator.java:51)
com.smartfoxserver.v2.SmartFoxServer.start(SmartFoxServer.java:261)
com.smartfoxserver.v2.Main.main(Main.java:26)
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

16:14:50,165 INFO [Thread-0] managers.SFSZoneManager - BuddyList saveAll...
16:14:50,166 WARN [SFS2X ShutdownHook] core.SFSShutdownHook - SFS2X is shutting down. The process may take a few seconds...
User avatar
Lapo
Site Admin
Posts: 23027
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: How To Get SFS2X Working in Ubuntu Server?

Postby Lapo » 14 Oct 2014, 07:50

You should follow the documentation:
http://docs2x.smartfoxserver.com/Gettin ... tall-linux

When installing under Linux it is highly recommended to install the server below your home folder. Any other place will likely give you permission problems. (which is what is happening in your log files)

There's no need to install the JRE or JDK. SmartFoxServer comes bundled with everything it needs.

Make sure you use the sfs2x-service command to start/stop/restart the server, as outlined in the doc page I've linked.

Thanks
Lapo
--
gotoAndPlay()
...addicted to flash games
JuliusBtesh
Posts: 58
Joined: 30 Sep 2014, 17:08

Re: How To Get SFS2X Working in Ubuntu Server?

Postby JuliusBtesh » 14 Oct 2014, 14:07

I followed that page and couldn't get it to work. I am also trying to access the admin panel (This is a remote system) and I have added the ip to the server.xml page but going to ip:8080 doesn't access anything
User avatar
Lapo
Site Admin
Posts: 23027
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: How To Get SFS2X Working in Ubuntu Server?

Postby Lapo » 14 Oct 2014, 14:12

You should give us the details of what is not working.
Is the server starting up? If not, what errors are in the logs.

If it is and you can't reach port 8080 then are you sure you don't have a firewall blocking the communication. Maybe you have an admin page in your hosting management panel that allows you to do that.

thnx
Lapo

--

gotoAndPlay()

...addicted to flash games
JuliusBtesh
Posts: 58
Joined: 30 Sep 2014, 17:08

Re: How To Get SFS2X Working in Ubuntu Server?

Postby JuliusBtesh » 14 Oct 2014, 14:52

Thank you, I will take a look

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 121 guests