Database won’t connect Linux

Need help with SmartFoxServer? You didn't find an answer in our documentation? Please, post your questions here!

Moderators: Lapo, Bax

Elitis
Posts: 24
Joined: 09 Jan 2014, 11:26
Contact:

Database won’t connect Linux

Postby Elitis » 28 Sep 2019, 08:27

Hi

I recently moved from a windows installation for my SFS to Linux, however since I switched to Linux I get database errors and cNt start my SFS

--- [ Zones & Rooms ] -------------------------------------

14:44:35.621 - [ INFO ] > Default Buddy List Persister <INITED>
DB Manager Activated ( org.gjt.mm.mysql.Driver )
Can't load db driver: org.gjt.mm.mysql.Driver
14:44:35.625 - [ SEVERE ] > DbManager could not retrive a connection. java.sql.SQLException: Configuration file not found
it.gotoandplay.smartfoxserver.exceptions.DbManagerException: The Test SQL statement failed! Please check your configuration.
at it.gotoandplay.smartfoxserver.SmartFoxServer.setupZone(SmartFoxServer.java:1843)
at it.gotoandplay.smartfoxserver.lib.ConfigReader.parse_Zones(ConfigReader.java:806)
at it.gotoandplay.smartfoxserver.lib.ConfigReader.readZoneConfig(ConfigReader.java:174)
at it.gotoandplay.smartfoxserver.SmartFoxServer.initServerSocket(SmartFoxServer.java:339)
at it.gotoandplay.smartfoxserver.SmartFoxServer.run(SmartFoxServer.java:607)
Problems in config file: The Test SQL statement failed! Please check your configuration.
it.gotoandplay.smartfoxserver.exceptions.ConfigurationException: The Test SQL statement failed! Please check your configuration.
at it.gotoandplay.smartfoxserver.lib.ConfigReader.readZoneConfig(ConfigReader.java:199)
at it.gotoandplay.smartfoxserver.SmartFoxServer.initServerSocket(SmartFoxServer.java:339)
at it.gotoandplay.smartfoxserver.SmartFoxServer.run(SmartFoxServer.java:607)

Errors found in configuration files.
Unable to start the server.



That’s the error I get. Any idea?
Elitis
Posts: 24
Joined: 09 Jan 2014, 11:26
Contact:

Re: Database won’t connect Linux

Postby Elitis » 28 Sep 2019, 09:58

Update this is my config

Code: Select all

<!--

   SmartFoxServer PRO
   (c) 2004-2009 gotoAndPlay()
   www.gotoandplay.it
   www.smartfoxserver.com
   
   Main Configuration file
   version 1.6.6
   
   NOTE:
   You can find detailed informations on how to configure the server by reading
   the tutorials in section 2 of the documentation.
   ( http://www.smartfoxserver.com/docs/docPages/config/basics.htm )
   
-->

<SmartFoxConfig>
   
   <ServerSetup>
      <!--
         Specify an ip address or use an asterisk(*) to bind all available IPs
      -->
      <ServerIP>*</ServerIP>
      <ServerPort>9339</ServerPort>
      
      <AutoSendPolicyFile>true</AutoSendPolicyFile>
      <MaxUserIdleTime>1300</MaxUserIdleTime>
      <MaxSocketIdleTime>60</MaxSocketIdleTime>
      
      <!-- Server Variables limits (-1 = unlimited) -->
      <MaxRoomVars>-1</MaxRoomVars>
      <MaxUserVars>-1</MaxUserVars>
      <EnableZoneInfo>true</EnableZoneInfo>
      
      <!-- New since 1.6.3, optimizes user variables size -->
      <UserVarsOptimization>true</UserVarsOptimization>
      
      <AntiFlood active="false">
         <MinMsgTime tolerance="5">1000</MinMsgTime>
         <MaxRepeatedMessages>3</MaxRepeatedMessages>
         <WarningsBeforeKick>2</WarningsBeforeKick>
         <WarningMessage><![CDATA[No flooding allowed!)]]></WarningMessage>
         <KickMessage><![CDATA[You've been warned! No flooding! Now you're kicked]]></KickMessage>
         <BanMessage><![CDATA[Stop Flooding!! You're being banned]]></BanMessage>         
         <BanAfter timeSpan="1">3</BanAfter>
      </AntiFlood>
      
      <BadWordsFilter active="true">
         <FilterMode>filter</FilterMode> <!-- REMOVE or FILTER -->
         <StripCharacters><![CDATA[,.;:_!$%&/#*-+]]></StripCharacters>
         <Warnings>true</Warnings>
         <FilterRoomNames>true</FilterRoomNames>
         <FilterUserNames>true</FilterUserNames>
         <WarningsBeforeKick>3</WarningsBeforeKick>
         <WarningMessage><![CDATA[No swearing!)]]></WarningMessage>
         <KickMessage><![CDATA[You've been warned! No Swearing! Now you're kicked]]></KickMessage>
         <BanMessage><![CDATA[Stop Swearing! You're being banned!]]></BanMessage>   
         <BanAfter timeSpan="1">3</BanAfter>
         
         <BadWordsList>            
            <badWord>dickhead</badWord>
            <badWord>asshole</badWord>
            <badWord>shithead</badWord>
            <badWord>shit</badWord>
            <badWord>fucking</badWord>
            <badWord>fuck</badWord>
            <badWord>dickhead</badWord>
            <badWord>bastard</badWord>
            <badWord>nigger</badWord>
            <badWord>idiot</badWord>
            <badWord>bitch</badWord>
         </BadWordsList>
      </BadWordsFilter>
      
      <BanCleaning>auto</BanCleaning>
      <BanDuration>1800</BanDuration> <!-- 30 min -->
      <BannedLoginMessage>You have been banned!</BannedLoginMessage>
      
      <OutQueueThreads>1</OutQueueThreads>
      <ExtHandlerThreads>1</ExtHandlerThreads>
      <MaxWriterQueue>50</MaxWriterQueue>
      
      <!--
         New since 1.6.0
         Set the client queue size and the max. allowed dropped packets
      -->
      <ClientMessagQueue>
         <QueueSize>100</QueueSize>
         <MaxAllowedDroppedPackets>10</MaxAllowedDroppedPackets>
      </ClientMessagQueue>
      
      <MaxIncomingQueue>5000</MaxIncomingQueue>
      <DeadChannelsPolicy>strict</DeadChannelsPolicy>
      <MaxMsgLen>4096</MaxMsgLen>
      
      <LogMaxSize>5000000</LogMaxSize>
      <LogMaxFiles>5</LogMaxFiles>
      
      <!--
         Available options are:
         
         FINEST
         FINER
         FINE
         CONFIG
         INFO
         WARNING
         SEVERE

      -->
      <FileLoggingLevel>INFO</FileLoggingLevel>
      <ConsoleLoggingLevel>INFO</ConsoleLoggingLevel>   
      
      <!-- Adminisitrator login -->
      <AdminLogin>admin</AdminLogin>
      <AdminPassword></AdminPassword>
      
      <!-- Allowed administrator IP addresses -->
      <AdminAllowedAddresses>
         <AllowedAddress>*.*.*.*</AllowedAddress>
      </AdminAllowedAddresses>
      
      <!-- Allow remote debugging of extensions -->
      <ExtensionRemoteDebug>true</ExtensionRemoteDebug>
      
      <!--
         Allow global autoreload of extensions upon file save
         You should specify in each Zone if the autoreload is enabled.
      -->
      <AutoReloadExtensions>true</AutoReloadExtensions>
      
      <ExtensionRemoteDebug>true</ExtensionRemoteDebug>
      
      <IpFilter>3</IpFilter>
      
      <Mailer>
         <MailHost>test.mail.com</MailHost>
         <MailUser>foo</MailUser>
         <MailPass>bar</MailPass>
         <SmtpPort>25</SmtpPort>
         <WorkerThreads>1</WorkerThreads>
      </Mailer>
      
      <!-- Enable / Disable remote zone info -->
      <EnableZoneInfo>false</EnableZoneInfo>
      
      <!-- Enable / Disable embedded webserver -->
      <WebServer active="true">
         <CfgFile>webserver/cfg/jetty.xml</CfgFile>
      </WebServer>
      
      <!--  raw custom protocol separator -->
      <RawProtocolSeparator><![CDATA[%]]></RawProtocolSeparator>
      
      <!-- Enable NPCs -->
      <EnableNPC>true</EnableNPC>
      
      <!-- Use concurrent map for properties objects -->
      <DynamicPropertiesClass>java.util.concurrent.ConcurrentHashMap</DynamicPropertiesClass>
      
      <!-- Send a message to client, on wrong Zone. DISABLE THIS ONE IN PRODUCTION
      <WarnOnWrongZoneRequest><![CDATA[Invalid zone: %s]]></WarnOnWrongZoneRequest>
      -->
   </ServerSetup>
   
   
   
   <!--
      Zones Configuration.
   -->
   <Zones>   
   
      <Zone name="AzerronMMO" uCountUpdate="true" buddyList="20" maxUsers="4000" customLogin="true">
         <AutoReloadExtensions>true</AutoReloadExtensions>
         <Rooms>
            <Room name="Limbo" maxUsers="1000" limbo="true" autoJoin="true" isTemp="false"/>   
         </Rooms>
         
         <Extensions>
            <extension name="World" className="AzerronMain.as" type="script" />
         </Extensions>
         
         <DatabaseManager active="true">
            
            <Driver>org.gjt.mm.mysql.Driver</Driver>
            
            <ConnectionString>jdbc:mysql://127.0.0.1:3306/azerron</ConnectionString>
            <UserName>root</UserName>
            <Password></Password>
            <TestSQL><![CDATA[SELECT NOW()]]></TestSQL>
            
            <MaxActive>10</MaxActive>
            <MaxIdle>10</MaxIdle>
            
            <OnExhaustedPool>fail</OnExhaustedPool>
            <BlockTime>5000</BlockTime>
               
         </DatabaseManager>
      </Zone>
   
   </Zones>
   
   
</SmartFoxConfig>
User avatar
Lapo
Site Admin
Posts: 21016
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Database won’t connect Linux

Postby Lapo » 30 Sep 2019, 15:47

Hi,
is it the same database? From Windows to Linux?

Also have you tried changing the Test SQL expression, maybe using a "SELECT 1" instead or a SELECT from an existing table?

Thanks
Lapo
--
gotoAndPlay()
...addicted to flash games
Elitis
Posts: 24
Joined: 09 Jan 2014, 11:26
Contact:

Re: Database won’t connect Linux

Postby Elitis » 30 Sep 2019, 17:26

managed to fix it, the issue was is that I had to specify the mysql connector path in my start.sh

Return to “SmartFoxServer 1.x Discussions and Help”

Who is online

Users browsing this forum: No registered users and 19 guests