Forum: Building VoltDB Applications

Post: failed to start a server

failed to start a server
paul
Dec 21, 2010
Try to start a server and failed, anyone has any idea what went wrong?
==================================
server:
[java] 44 [main] INFO HOST - Loading...
[java]
[java] _ __ ____ ____ ____
[java] | | / /___ / / /_/ __ \/ __ )
[java] | | / / __ \/ / __/ / / / __ |
[java] | |/ / /_/ / / /_/ /_/ / /_/ /
[java] |___/\____/_/\__/_____/_____/
[java]
[java] Initialization Log Output:
[java] --------------------------------
[java]
[java] 47 [main] INFO HOST - Build: 1.2.1.02 https://svn.voltdb.com/eng/bra nches/voltdb-1.2.1?revision=1411
[java] 48 [main] INFO HOST - Loading application catalog jarfile from /home/xxxx/MatchEng_v4/catalog.jar
[java] No logging configuration supplied via -Dlog4j.configuration. Supplying default config that logs INFO or higher to STDOUT
[java] 174 [main] INFO HOST - URL of deployment info: deployment.xml
[java] 349 [main] INFO HOST - Catalog leader: localhost hosts, sites 1, 2
[java] 461 [main] INFO HOST - HTTP admin console listening on port 8080
[java] 467 [main] INFO HOST - Creating host manager for 1 hosts using leader localhost/127.0.0.1
[java] 477 [Thread-12] INFO HOST - Connecting to VoltDB cluster as the leader...
[java] 477 [Thread-12] INFO HOST - Maximum clock/network skew is 0 milliseconds (according to leader)
[java] java.lang.Thread.dumpThreads(Native Method)
[java] java.lang.Thread.getAllStackTraces(Thread.java:1530)
[java] org.voltdb.VoltDB.crashVoltDB(VoltDB.java:343)
[java] org.voltdb.ExecutionSite.initializeEE(ExecutionSite.java:776)
[java] org.voltdb.ExecutionSite.(ExecutionSite.java:650)
[java] org.voltdb.RealVoltDB$ExecutionSiteRunner.run(RealVoltDB.java:216)
[java] java.lang.Thread.run(Thread.java:662)
[java] VoltDB has encountered an unrecoverable error and is exiting.
[java] The log may contain additional information.
[java] 506 [Site 2] INFO HOST - Attempting to load native VoltDB library voltdb-1.2.1.02. Expect to see a confirmation following this upon success. If none appears then you may need to compile VoltDB for your platform or you may be running a 32-bit JVM.
[java] 508 [Site 2] INFO HOST - Successfully loaded native VoltDB library voltdb-1.2.1.02.
[java] Creating Execution Engine on clusterIndex=1, site_id = 1...
[java] Creating Execution Engine on clusterIndex=1, site_id = 2...
[java] [ERROR] [../../src/ee//voltdbjni.cpp:333:Java_org_voltdb_jni_Executi onEngine_nativeLoadCatalog()] 2010-12-21 21:15:07 - loadCatalog failed
[java] 557 [Site 2] FATAL HOST - Failed to construct execution siteId 2 siteIndex 1
[java] Invalid characters
[java] [ERROR] [../../src/ee//voltdbjni.cpp:333:Java_org_voltdb_jni_Executi onEngine_nativeLoadCatalog()] 2010-12-21 21:15:07 - loadCatalog failed
[java] Java Result: 255
===========================
Sorry for the problem.
rbetts
Dec 21, 2010
Paul,
The SQL engine is rejecting the catalog you are supplying. The interesting log message is:
[java] [ERROR] [../../src/ee//voltdbjni.cpp:333:Java_org_voltdb_jni_Executi onEngine_nativeLoadCatalog()] 2010-12-21 21:15:07 - loadCatalog failed
Did you create this catalog with the same version of volt (1.2.1.02) that you are currently running? Older catalogs are not always compatible with newer versions of VoltDB. If that's the problem, you can run the (1.2.1.02) VoltCompiler to again to produce a compatible catalog.
Can you share the catalog with us (knowing that it contains your schema and procedures)? If you can email it as an attachment to support@voltdb.com, I'd like to debug this and resolve the underlying error.
Or if you resolve this yourself in the interim, please let us know the cause.
Thank you,
*--Ryan.
Ryan Thanks for the reply.
paul
Dec 22, 2010
Ryan
Thanks for the reply. Problem solved, though it took me quite a few hours to pinpoint the issue. The problem was that I put a BigDecimal column a default value 0 in a table like this
CREATE XXTABLE(
COL1 DECIMAL DEFAULT 0 NOT NULL,
...
);
Changed to
CREATE XXTABLE(
COL1 DECIMAL DEFAULT NULL,
...
);

and the problem solved. It would be nice if such errors can be identified by the compiler.
Re-produce the error
paul
Jan 4, 2011
Here are the detail instructions to re-produce the error:
1. use the generate tool to generate an ant build project called "FAIL2STARTEXAMPLE"
2. the db schema is

CREATE TABLE FAIL2STARTEXAMPLE (
FAIL2STARTEXAMPLE_ID INTEGER DEFAULT '0' NOT NULL,
FAIL2STARTEXAMPLE_ITEM INTEGER,
PRIMARY KEY (FAIL2STARTEXAMPLE_ID)
);

CREATE TABLE XXXTABLE (
ID BIGINT NOT NULL, /*PARTITION*/
COL1 DECIMAL DEFAULT 0 NOT NULL,
/* spent hours to find out
* "COL1 DECIMAL DEFAULT 0 NOT NULL",
* was wrong
*/
PRIMARY KEY(ID)
);
3. Add a procedure "FailedInsert.java" to the source code

package com.example.procedures;

import org.voltdb.*;

@ProcInfo(
partitionInfo = "XXXTABLE.ID:0",
singlePartition = true
)

public class FailedInsert extends VoltProcedure {
public final SQLStmt insertItem =
new SQLStmt("INSERT INTO XXXTABLE " +
"(ID) " +
"VALUES (?);");

public long run(long myId) throws VoltAbortException{
voltQueueSQL(insertItem, myId);
VoltTable[] retval = voltExecuteSQL(true);
assert(retval.length == 1);
long modifiedTuples = retval[0].asScalarLong();
assert(modifiedTuples == 1);
return modifiedTuples;
}
}
4. Modify the "project.xml" as

<?xml version="1.0"?>
<project>
<database name='database'>
<schemas>
<schema path='Fail2StartExample-ddl.sql' />
</schemas>
<procedures>
<procedure class='com.example.procedures.Insert' />
<procedure class='com.example.procedures.Delete' />
<procedure class='com.example.procedures.Select' />
<procedure class='com.example.procedures.FailedInsert' />
</procedures>
<partitions>
<partition table='FAIL2STARTEXAMPLE' column='FAIL2STARTEXAMPLE_ID' />
<partition table='XXXTABLE' column='ID' />
</partitions>
</database>
</project>

5. "ant server" will reproduce the error.
thanks for the clarification
tcallaghan
Jan 4, 2011
Here are the detail instructions to re-produce the error:
1. use the generate tool to generate an ant build project called "FAIL2STARTEXAMPLE"
2. the db schema is...


I can now reproduce this issue and have created a ticket for it at http://issues.voltdb.com/browse/ENG-952
Thanks for your help finding/documenting the bug.
-Tim