Server stops/crashes after start without exception

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

Moderators: Lapo, Bax

genar
Posts: 137
Joined: 13 Jul 2017, 11:49

Server stops/crashes after start without exception

Postby genar » 08 Jan 2019, 23:31

Good evening !

Following problem : Since one month my smartfoxserver ran smooth and there werent any problems with it. I am using jelastic as a hoster. I lately restarted the server to upload some updates... it restarted, pulled some entrys out of the database and then it shuts down without any exception !

The problem with jelastic is that i cannot see the realtime logs like i did in my local server when starting the sfs2x batch... this is a huge problem... i only see the logs generated hours ago and they always looked fine. So i waited some hours till the server generated new ones and i got this :

Code: Select all

==========================================
LICENSE DETAILS
------------------------------------------
Type : Community Edition
Max users : 100
==========================================

08 Jan 2019 | 22:46:02,528 | INFO | main | entities.managers.SFSBannedUserStorage | | BanUserStorage initialized
08 Jan 2019 | 22:46:02,652 | INFO | main | entities.managers.SFSBannedUserManager | | BanUser data loaded: 0 records.
08 Jan 2019 | 22:46:02,680 | INFO | main | smartfoxserver.v2.SmartFoxServer | | Protocol Type is: BINARY
08 Jan 2019 | 22:46:02,721 | INFO | main | v2.config.DefaultConfigLoader | | Loading: zones/ParallelOriginWorld.zone.xml
08 Jan 2019 | 22:46:03,017 | INFO | main | entities.managers.SFSZoneManager | |

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
>> Zone: ParallelOriginWorld
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

08 Jan 2019 | 22:46:03,113 | WARN | main | entities.managers.SFSZoneManager | | { Zone: ParallelOriginWorld } - Could not override maxUserIdleTime. The provided value (120 sec) is < sessionMaxIdleTime (300 sec). You must provide a value > sessionMaxIdleTime. Please double check your configuration.
08 Jan 2019 | 22:46:07,240 | INFO | main | entities.managers.SFSRoomManager | | Room created: { Zone: ParallelOriginWorld }, [ Room: GlobalChat, Id: 0, Group: Chat, isGame: false ], type = SFSRoom
08 Jan 2019 | 22:46:07,259 | INFO | main | entities.managers.SFSRoomManager | | Room created: { Zone: ParallelOriginWorld }, [ MMORoom: World, Id: 1, Group: World, AOI: (0.005, 0.005, 0.0) ], type = MMORoom
08 Jan 2019 | 22:46:07,283 | INFO | main | Extensions | | {Game}: <GameExtension : Initiated>
08 Jan 2019 | 22:46:07,353 | INFO | main | Extensions | | {Game}: <GameExtension : Filling Config Data >
08 Jan 2019 | 22:46:08,547 | INFO | main | Extensions | | {Game}: <GameExtension : Loading buildings... Amount left [33820] ... created fragments [1] ... fragment size [5000]>
08 Jan 2019 | 22:46:09,022 | INFO | main | Extensions | | {Game}: <GameExtension : Loading buildings... Amount left [28820] ... created fragments [2] ... fragment size [5000]>
08 Jan 2019 | 22:46:09,240 | INFO | main | Extensions | | {Game}: <GameExtension : Loading buildings... Amount left [23820] ... created fragments [3] ... fragment size [5000]>
08 Jan 2019 | 22:46:09,674 | INFO | main | Extensions | | {Game}: <GameExtension : Loading buildings... Amount left [18820] ... created fragments [4] ... fragment size [5000]>
08 Jan 2019 | 22:46:10,049 | INFO | main | Extensions | | {Game}: <GameExtension : Loading buildings... Amount left [13820] ... created fragments [5] ... fragment size [5000]>
08 Jan 2019 | 22:46:10,237 | INFO | main | Extensions | | {Game}: <GameExtension : Loading buildings... Amount left [8820] ... created fragments [6] ... fragment size [5000]>
08 Jan 2019 | 22:46:10,561 | INFO | main | Extensions | | {Game}: <GameExtension : Loading buildings... Amount left [3820] ... created fragments [7] ... fragment size [5000]>
08 Jan 2019 | 22:46:11,083 | INFO | main | Extensions | | {Game}: <GameExtension : Loading buildings... Amount left [-1180] ... created fragments [8] ... fragment size [3820]>
08 Jan 2019 | 22:46:13,466 | INFO | main | Extensions | | {Game}: <GameExtension : Config Filled (loaded stuff from database), took 6111 ms>
08 Jan 2019 | 22:46:14,822 | INFO | main | Extensions | | {null}: <ChunkManager : Filling with buildings fragment [0]>
08 Jan 2019 | 22:46:28,242 | INFO | main | Extensions | | {null}: <ChunkManager : Finished fragment [0] with [8] buildings... next fragment is starting>
08 Jan 2019 | 22:46:28,244 | INFO | main | Extensions | | {null}: <ChunkManager : Filling with buildings fragment [1]>
08 Jan 2019 | 22:46:41,053 | INFO | main | Extensions | | {null}: <ChunkManager : Finished fragment [1] with [8] buildings... next fragment is starting>
08 Jan 2019 | 22:46:41,054 | INFO | main | Extensions | | {null}: <ChunkManager : Filling with buildings fragment [2]>
08 Jan 2019 | 22:46:54,970 | INFO | main | Extensions | | {null}: <ChunkManager : Finished fragment [2] with [8] buildings... next fragment is starting>
08 Jan 2019 | 22:46:54,972 | INFO | main | Extensions | | {null}: <ChunkManager : Filling with buildings fragment [3]>
08 Jan 2019 | 22:47:06,465 | INFO | main | Extensions | | {null}: <ChunkManager : Finished fragment [3] with [8] buildings... next fragment is starting>
08 Jan 2019 | 22:47:06,466 | INFO | main | Extensions | | {null}: <ChunkManager : Filling with buildings fragment [4]>
08 Jan 2019 | 22:47:08,051 | INFO | main | Extensions | | {null}: <Building : Owner ID from building [20814] is null while extracting, trying search by owner name>
08 Jan 2019 | 22:47:08,061 | INFO | main | Extensions | | {null}: <Building : Owner ID from building [20816] is null while extracting, trying search by owner name>
08 Jan 2019 | 22:47:08,066 | INFO | main | Extensions | | {null}: <Building : Owner ID from building [20817] is null while extracting, trying search by owner name>
08 Jan 2019 | 22:47:20,957 | INFO | main | Extensions | | {null}: <ChunkManager : Finished fragment [4] with [8] buildings... next fragment is starting>
08 Jan 2019 | 22:47:20,958 | INFO | main | Extensions | | {null}: <ChunkManager : Filling with buildings fragment [5]>
08 Jan 2019 | 22:47:35,543 | INFO | main | Extensions | | {null}: <ChunkManager : Finished fragment [5] with [8] buildings... next fragment is starting>
08 Jan 2019 | 22:47:35,543 | INFO | main | Extensions | | {null}: <ChunkManager : Filling with buildings fragment [6]>
08 Jan 2019 | 22:47:47,866 | INFO | main | Extensions | | {null}: <ChunkManager : Finished fragment [6] with [8] buildings... next fragment is starting>
08 Jan 2019 | 22:47:47,866 | INFO | main | Extensions | | {null}: <ChunkManager : Filling with buildings fragment [7]>
08 Jan 2019 | 22:47:57,131 | INFO | main | Extensions | | {null}: <ChunkManager : Finished fragment [7] with [8] buildings... next fragment is starting>
08 Jan 2019 | 22:47:57,146 | INFO | pool-1-thread-1 | Extensions | | {Game}: <SequantialSaver : New saving approach >
08 Jan 2019 | 22:47:57,156 | INFO | pool-1-thread-1 | Extensions | | {Game}: <SequantialSaver : Game State Saved >
08 Jan 2019 | 22:47:57,180 | INFO | main | Extensions | | {Signup}: <SignUpExtension : Initiated>
08 Jan 2019 | 22:47:57,341 | INFO | main | entities.managers.SFSRoomManager | | Room created: { Zone: --=={{{ AdminZone }}}==-- }, [ Room: AdminRoom, Id: 2, Group: default, isGame: false ], type = SFSRoom
08 Jan 2019 | 22:47:57,644 | INFO | main | v2.core.AdminToolService | | AdminTool Service started
08 Jan 2019 | 22:47:57,925 | INFO | SFSWorker:Sys:1 | smartfoxserver.v2.SmartFoxServer | | Listening Sockets: { 0.0.0.0:9933, (Tcp) } { 0.0.0.0:9933, (Udp) } { 10.202.4.190:11062, (Tcp) } { 10.202.4.190:11062, (Udp) }
08 Jan 2019 | 22:47:57,927 | INFO | SFSWorker:Sys:1 | smartfoxserver.v2.SmartFoxServer | |
_____ _____ _____ ___ __ __
| __| __| __| |_ | | |
|__ | __|__ | | _|- -|
|_____|__| |_____| |___|__|__|
_____ _____ _____ ____ __ __
| __ | __| _ | \| | |
| -| __| | | |_ _|
|__|__|_____|__|__|____/ |_|
[ 2.13.3 ]

08 Jan 2019 | 22:47:57,934 | INFO | SFSWorker:Sys:1 | smartfoxserver.v2.SmartFoxServer | | SmartFoxServer 2X (2.13.3) READY!
08 Jan 2019 | 22:48:05,232 | INFO | main | bluebox.v3.SessionFilter | | BlueBox-2X Service (3.1.0) READY.
08 Jan 2019 | 22:48:07,511 | INFO | Thread-0 | entities.managers.SFSZoneManager | | BuddyList saveAll...
08 Jan 2019 | 22:48:07,515 | INFO | Thread-1 | entities.managers.SFSBannedUserManager | | BanUser data saved.
08 Jan 2019 | 22:48:07,516 | WARN | SFS2X ShutdownHook | v2.core.SFSShutdownHook | | SFS2X is shutting down. The process may take a few seconds...


This is where it gets exciting... as you can see the server started sucessfully and loaded everything from my database & processes it. And suddenly after telling me that BlueBox is ready it saves the buddy list, the ban users data and shuts down the server. I didnt restarted that server, so i did not tell him to shut down...

my server.xml looks like this :

Code: Select all

<serverSettings>
  <socketAddresses>
    <socket address="0.0.0.0" port="9933" type="TCP"/>
    <socket address="0.0.0.0" port="9933" type="UDP"/>
   <socket address="ip-v4" port="9933" type="TCP"/>
    <socket address="ip-v4" port="9933" type="UDP"/>
  </socketAddresses>
  <ipFilter>
    <addressBlackList>
      <string>1.2.3.4</string>
    </addressBlackList>
    <addressWhiteList>
      <string>0.0.0.0</string>
     <string>127.0.0.1</string>
      <string>10.202.1.1</string>
      <string>10.202.1.21</string>
    </addressWhiteList>
    <maxConnectionsPerAddress>1</maxConnectionsPerAddress>
  </ipFilter>
  <flashCrossdomainPolicy>
    <useMasterSocketPolicy>true</useMasterSocketPolicy>
    <policyXmlFile>crossdomain.xml</policyXmlFile>
  </flashCrossdomainPolicy>
  <systemControllerRequestQueueSize>20000</systemControllerRequestQueueSize>
  <extensionControllerRequestQueueSize>20000</extensionControllerRequestQueueSize>
  <schedulerThreadPoolSize>4</schedulerThreadPoolSize>
  <protocolCompressionThreshold>1024</protocolCompressionThreshold>
  <protocolMode>BINARY</protocolMode>
  <useBinaryProtocol>true</useBinaryProtocol>
  <remoteAdmin>
    <administrators>
      <adminUser>
        <login>admin</login>
        <password>mypassword</password>
        <allowHalt>true</allowHalt>
        <disabledModules/>
      </adminUser>
    </administrators>
    <allowedRemoteAddresses>
      <string>127.0.0.1</string>
      <string>0.0.0.0</string>
     <string>server-ip</string>
    </allowedRemoteAddresses>
    <adminTcpPort>9933</adminTcpPort>
    <useEncryption>false</useEncryption>
  </remoteAdmin>
  <bannedUserManager>
    <isAutoRemove>true</isAutoRemove>
    <isPersistent>true</isPersistent>
    <customPersistenceClass></customPersistenceClass>
  </bannedUserManager>
  <mailer>
    <isActive>false</isActive>
    <mailHost>your.smtp.here</mailHost>
    <mailUser>username</mailUser>
    <mailPass>password</mailPass>
    <smtpPort>25</smtpPort>
    <workerThreads>1</workerThreads>
  </mailer>
  <webServer>
    <isActive>false</isActive>
    <blueBoxPollingTimeout>26</blueBoxPollingTimeout>
    <blueBoxMsgQueueSize>40</blueBoxMsgQueueSize>
    <isWSActive>true</isWSActive>
    <useWSBinaryProtocol>true</useWSBinaryProtocol>
    <gHttpPort>8080</gHttpPort>
    <gHttpsPort>8443</gHttpsPort>
  </webServer>
  <startExtensionFileMonitor>true</startExtensionFileMonitor>
  <useDebugMode>true</useDebugMode>
  <extensionRemoteDebug>true</extensionRemoteDebug>
  <useFriendlyExceptions>true</useFriendlyExceptions>
  <sessionMaxIdleTime>300</sessionMaxIdleTime>
  <userMaxIdleTime>600</userMaxIdleTime>
  <licenseCode></licenseCode>
  <licenseEmails></licenseEmails>
  <maxCcuAlert>false</maxCcuAlert>
  <ghostHunterEnabled>true</ghostHunterEnabled>
  <statsExtraLoggingEnabled>true</statsExtraLoggingEnabled>
  <enableSmasherController>true</enableSmasherController>
  <analytics>
    <isActive>false</isActive>
    <runOnDay>[everyday]</runOnDay>
    <runAtHour>2</runAtHour>
    <runOnStartup>false</runOnStartup>
    <rebuildDB>false</rebuildDB>
    <skipGeolocation>false</skipGeolocation>
    <sourceFolder></sourceFolder>
    <locale></locale>
  </analytics>
  <systemThreadPoolSettings>
    <name>Sys</name>
    <coreThreads>4</coreThreads>
    <backupThreads>16</backupThreads>
    <maxBackups>64</maxBackups>
    <queueSizeTriggeringBackup>100</queueSizeTriggeringBackup>
    <secondsTriggeringBackup>50</secondsTriggeringBackup>
    <backupThreadsExpiry>3600</backupThreadsExpiry>
    <queueSizeTriggeringBackupExpiry>60</queueSizeTriggeringBackupExpiry>
    <logActivity>true</logActivity>
    <queueFullWarningInterval>300</queueFullWarningInterval>
    <prestartAllCoreThreads>false</prestartAllCoreThreads>
  </systemThreadPoolSettings>
  <extensionThreadPoolSettings>
    <name>Ext</name>
    <coreThreads>4</coreThreads>
    <backupThreads>16</backupThreads>
    <maxBackups>64</maxBackups>
    <queueSizeTriggeringBackup>100</queueSizeTriggeringBackup>
    <secondsTriggeringBackup>50</secondsTriggeringBackup>
    <backupThreadsExpiry>3600</backupThreadsExpiry>
    <queueSizeTriggeringBackupExpiry>60</queueSizeTriggeringBackupExpiry>
    <logActivity>true</logActivity>
    <queueFullWarningInterval>300</queueFullWarningInterval>
    <prestartAllCoreThreads>false</prestartAllCoreThreads>
  </extensionThreadPoolSettings>
  <serverName>Parallel Origin - Game Server</serverName>
  <allowClientUdpPortChanges>false</allowClientUdpPortChanges>
  <clientBlueBoxSettings>
    <useBlueBox>true</useBlueBox>
    <blueBoxPollingRate>700</blueBoxPollingRate>
  </clientBlueBoxSettings>
</serverSettings>


I already tried to start the sfs2x instance using the web ssh... without sucess i only get a port error which tells me that there is already a instance running...

How the hell does this happen and is there anything i can do to prevent this ? Its really important !
User avatar
Lapo
Site Admin
Posts: 23026
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Server stops/crashes after start without exception

Postby Lapo » 09 Jan 2019, 08:34

Hi,
logs are generated in realtime so there's no need to wait for them to be "generated". You can check the logs via the AdminTool, by the way, either from the realtime view or by downloading them.

To exclude that the shutdown is caused by your Extension, try running the server without extensions and see if it works. If it doesn't shutdown there's definitely a problem with your code and it might have to do with exceptions (or probably errors, which are special category of exceptions) that may not be caught by the logger.

Hope it helps
Lapo
--
gotoAndPlay()
...addicted to flash games
genar
Posts: 137
Joined: 13 Jul 2017, 11:49

Re: Server stops/crashes after start without exception

Postby genar » 10 Jan 2019, 14:31

Lapo wrote:Hi,
logs are generated in realtime so there's no need to wait for them to be "generated". You can check the logs via the AdminTool, by the way, either from the realtime view or by downloading them.

To exclude that the shutdown is caused by your Extension, try running the server without extensions and see if it works. If it doesn't shutdown there's definitely a problem with your code and it might have to do with exceptions (or probably errors, which are special category of exceptions) that may not be caught by the logger.

Found the problem... somehow enabling the webserver with port 80/443 crashed the whole server at startup, thanks !

Hope it helps
User avatar
Lapo
Site Admin
Posts: 23026
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Server stops/crashes after start without exception

Postby Lapo » 10 Jan 2019, 16:14

Found the problem... somehow enabling the webserver with port 80/443 crashed the whole server at startup, thanks !

That's because you likely have another webserver running which is already using those ports... or, under LInux, you're not running the server as root (which is required for binding ports < 1024)

Cheers
Lapo

--

gotoAndPlay()

...addicted to flash games

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 73 guests