Sign in to follow this  
Irexistus

WARNING: Failed to increase all demands due to [SQLITE_ERROR] SQL error or missing database (no such function: GREATEST)

Recommended Posts

My dedicated server keeps shutting itself down every couple of days after running into the following error:

 

Nov 24, 2015 1:14:30 PM com.wurmonline.server.Server run
INFO: Polling shop demands
Nov 24, 2015 1:14:30 PM com.wurmonline.server.economy.LocalSupplyDemand increaseAllDemands
WARNING: Failed to increase all demands due to [SQLITE_ERROR] SQL error or missing database (no such function: GREATEST)
java.sql.SQLException: [SQLITE_ERROR] SQL error or missing database (no such function: GREATEST)
        at org.sqlite.core.DB.newSQLException(DB.java:890)
        at org.sqlite.core.DB.newSQLException(DB.java:901)
        at org.sqlite.core.DB.throwex(DB.java:868)
        at org.sqlite.core.NativeDB.prepare(Native Method)
        at org.sqlite.core.DB.prepare(DB.java:211)
        at org.sqlite.core.CorePreparedStatement.<init>(CorePreparedStatement.java:40)
        at org.sqlite.jdbc3.JDBC3PreparedStatement.<init>(JDBC3PreparedStatement.java:29)
        at org.sqlite.jdbc4.JDBC4PreparedStatement.<init>(JDBC4PreparedStatement.java:18)
        at org.sqlite.jdbc4.JDBC4Connection.prepareStatement(JDBC4Connection.java:47)
        at org.sqlite.jdbc3.JDBC3Connection.prepareStatement(JDBC3Connection.java:254)
        at org.sqlite.jdbc3.JDBC3Connection.prepareStatement(JDBC3Connection.java:226)
        at com.wurmonline.server.economy.LocalSupplyDemand.increaseAllDemands(LocalSupplyDemand.java:326)
        at com.wurmonline.server.Server.pollShopDemands(Server.java:2497)
        at com.wurmonline.server.Server.run(Server.java:2210)
        at java.util.TimerThread.mainLoop(Timer.java:555)
        at java.util.TimerThread.run(Timer.java:505)

Nov 24, 2015 1:14:35 PM com.wurmonline.server.zones.TilePoller calcRest
INFO: Current polltile=0, rest=0 pollmodifier=29053, pollround=33
Nov 24, 2015 1:14:35 PM com.wurmonline.server.zones.TilePoller calcRest
INFO: tiles=4194304, mask=4194303 ticksperday=3456000, Nthick=1, rest=738304, manypertick=true
Nov 24, 2015 1:14:35 PM com.wurmonline.server.zones.TilePoller checkPolltile
INFO: New pollModifier: 42527 eruptions=false
Nov 24, 2015 1:14:39 PM com.wurmonline.server.statistics.Statistics run
INFO: current mem in use: 1241M free mem: 673M Max mem: 2010M
player count: 1
bytes in: 0 bytes out: 0 total in: 6129238 total out: 27261720
Server uptime: 86400 seconds. Unanswered questions:0
Nov 24, 2015 1:14:40 PM com.wurmonline.server.skills.SkillStat$1 run
WARNING: Polling 145 skills for stats v2 took 1 ms.
Nov 24, 2015 1:14:42 PM com.wurmonline.server.Items countEggs
INFO: Current number of eggs is 52 (max eggs is 1000) That took 37.75788 ms.
Nov 24, 2015 1:14:47 PM com.wurmonline.server.epic.EpicServerStatus pollExpiredMissions
INFO: Deleting last mission for deity 1 since it could not be found
Nov 24, 2015 1:14:47 PM com.wurmonline.server.epic.EpicServerStatus pollExpiredMissions
INFO: Deleting last mission for deity 2 since it could not be found
Nov 24, 2015 1:14:47 PM com.wurmonline.server.epic.EpicServerStatus pollExpiredMissions
INFO: Deleting last mission for deity 4 since it could not be found
Nov 24, 2015 1:14:58 PM com.wurmonline.server.Server run
SEVERE: null
java.lang.NullPointerException
        at com.wurmonline.mesh.GrassData.encodeGrassTileData(GrassData.java:572)
        at com.wurmonline.server.zones.TilePoller.checkForGrassGrowth(TilePoller.java:763)
        at com.wurmonline.server.zones.TilePoller.checkEffects(TilePoller.java:404)
        at com.wurmonline.server.zones.TilePoller.pollNextTile(TilePoller.java:235)
        at com.wurmonline.server.zones.TilePoller.pollNext(TilePoller.java:165)
        at com.wurmonline.server.Server.run(Server.java:1709)
        at java.util.TimerThread.mainLoop(Timer.java:555)
        at java.util.TimerThread.run(Timer.java:505)

Nov 24, 2015 1:14:58 PM com.wurmonline.server.Server run
SEVERE: Server is shutting down but there is no information in the Exception so creating a new one
java.lang.Exception
        at com.wurmonline.server.Server.run(Server.java:2471)
        at java.util.TimerThread.mainLoop(Timer.java:555)
        at java.util.TimerThread.run(Timer.java:505)

Nov 24, 2015 1:14:58 PM com.wurmonline.server.Server shutDown
INFO: Shutting down at:
java.lang.Exception
        at com.wurmonline.server.Server.shutDown(Server.java:3278)
        at com.wurmonline.server.Server.run(Server.java:2473)
        at java.util.TimerThread.mainLoop(Timer.java:555)
        at java.util.TimerThread.run(Timer.java:505)

Nov 24, 2015 1:14:58 PM com.wurmonline.server.Server shutDown

Seems the issue is that the server is trying to use the 'GREATEST' SQL function which Sqlite doesn't support (though you could simply use MAX in it's place to a degree). Any ideas if it's something I can fix on my end (I'd like to keep using sqlite) or if it needs to be patched by the devs?

Share this post


Link to post
Share on other sites

I'd say this needs to be fixed by the devs. It may be possible to temporarily fix it yourself by decompiling the server jar and doing a search for GREATEST, replace it with MAX and then recompile it but calling an unsupported function is a bug. Your log is clear enough so I don't think it'll be long before it's fixed.

Share this post


Link to post
Share on other sites

I have seen that error show up multiple times before in my console and in the log but it hasn't resulted in a shutdown.

 

I did have another (has happened at least 3x before) unscheduled shutdown this morning though.

 

My error log snippet

 

Nov 28, 2015 5:54:56 AM com.wurmonline.server.statistics.Statistics run
INFO: current mem in use: 1108M free mem: 194M Max mem: 2010M
player count: 3
bytes in: 115024 bytes out: 615124 total in: 494226 total out: 4450992
Server uptime: 14100 seconds. Unanswered questions:0
Nov 28, 2015 5:55:01 AM com.wurmonline.server.creatures.CreaturePos saveCreaturePosition
WARNING: SaveCreaturePos took  19.453856 ms for 501 updates.
Nov 28, 2015 5:57:28 AM com.wurmonline.server.zones.TilePoller calcRest
INFO: Current polltile=0, rest=0 pollmodifier=21785, pollround=24
Nov 28, 2015 5:57:28 AM com.wurmonline.server.zones.TilePoller calcRest
INFO: tiles=4194304, mask=4194303 ticksperday=3456000, Nthick=1, rest=738304, manypertick=true
Nov 28, 2015 5:57:28 AM com.wurmonline.server.zones.TilePoller checkPolltile
INFO: New pollModifier: 56235 eruptions=false
Nov 28, 2015 5:57:31 AM com.wurmonline.server.Server run
SEVERE: null
java.lang.NullPointerException
	at com.wurmonline.mesh.GrassData.encodeGrassTileData(GrassData.java:572)
	at com.wurmonline.server.zones.TilePoller.checkForGrassGrowth(TilePoller.java:763)
	at com.wurmonline.server.zones.TilePoller.checkEffects(TilePoller.java:400)
	at com.wurmonline.server.zones.TilePoller.pollNextTile(TilePoller.java:235)
	at com.wurmonline.server.zones.TilePoller.pollNext(TilePoller.java:165)
	at com.wurmonline.server.Server.run(Server.java:1709)
	at java.util.TimerThread.mainLoop(Unknown Source)
	at java.util.TimerThread.run(Unknown Source)

Nov 28, 2015 5:57:31 AM com.wurmonline.server.Server run
SEVERE: Server is shutting down but there is no information in the Exception so creating a new one
java.lang.Exception
	at com.wurmonline.server.Server.run(Server.java:2471)
	at java.util.TimerThread.mainLoop(Unknown Source)
	at java.util.TimerThread.run(Unknown Source)

Nov 28, 2015 5:57:31 AM com.wurmonline.server.Server shutDown
INFO: Shutting down at: 
java.lang.Exception
	at com.wurmonline.server.Server.shutDown(Server.java:3278)
	at com.wurmonline.server.Server.run(Server.java:2473)
	at java.util.TimerThread.mainLoop(Unknown Source)
	at java.util.TimerThread.run(Unknown Source)

Nov 28, 2015 5:57:31 AM com.wurmonline.server.Server shutDown
INFO: Shutting down - Polling Battles
Nov 28, 2015 5:57:31 AM com.wurmonline.server.creatures.ai.CreaturePathFinderNPC run
INFO: Shutting down NPC pathfinder
Nov 28, 2015 5:57:31 AM com.wurmonline.server.creatures.ai.CreaturePathFinderAgg run
INFO: Shutting down Agg pathfinder
Nov 28, 2015 5:57:31 AM com.wurmonline.server.creatures.ai.CreaturePathFinder run
INFO: Shutting down Norm pathfinder
Nov 28, 2015 5:57:31 AM com.wurmonline.server.Server shutDown
INFO: Shutting down - Saving Players
Nov 28, 2015 5:57:31 AM com.wurmonline.server.Players savePlayersAtShutdown
INFO: Saving Players
Nov 28, 2015 5:57:31 AM com.wurmonline.server.Players savePlayersAtShutdown
INFO: Finished saving Players
Nov 28, 2015 5:57:31 AM com.wurmonline.server.Server shutDown
INFO: Shutting down - Clearing Item Database Batches
Nov 28, 2015 5:57:32 AM com.wurmonline.server.items.DbItem clearBatches
INFO: Saved last maintained batch size 593
Nov 28, 2015 5:57:32 AM com.wurmonline.server.Server shutDown
INFO: Shutting down - Saving Creatures
Nov 28, 2015 5:57:32 AM com.wurmonline.server.Server shutDown
INFO: Shutting down - Clearing Creature Database Batches
Nov 28, 2015 5:57:32 AM com.wurmonline.server.creatures.CreaturePos saveCreaturePosition
WARNING: SaveCreaturePos took  8.079676 ms for 234 updates.
Nov 28, 2015 5:57:32 AM com.wurmonline.server.creatures.CreaturePos saveCreaturePosition

 

Share this post


Link to post
Share on other sites

I think that tilePoller error is related to flowers, believe one of the recent News posts mention it.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this