HI, Erika,
Thanks for the info.
This error was from mongo shell,
-310 Table table-name already exists in database.
This two errors were from jsonlistener log,
-212 Cannot add index.
-130 ISAM error: no such dbspace.
The above three errors do not make any sense to me.
The first error was telling table already exists, NOT true.
The second and third error said no such dbspace. What dbspace did it
want ?
I attached the configuration about SB spaces, also onstat -d ( you can
have a check what else needed).
The SQL who complained is in the log of jsonlistener ( see log)
Thanks
Frank
==========================
(1) mongo output
mongos> db.createCollection("my_collection_4");
{
"code" : null,
"ok" : 0,
"errmsg" : "Unable to create table 'my_collection_4' for namespace
'noaa.my_collection_4' | Table (informix.my_collection_4) already exists in
database. (SQL Code: -310, SQL State: S0001)"
}
mongos>
(2) SB spaces configurations
SBSPACENAME dwsbdata00
SYSSBSPACENAME dwsbdata00
CDR_QDATA_SBSPACE ifx_qdatasbspace2
(3) output of onstat -d
[informix@maggie json]$ onstat -d
IBM Informix Dynamic Server Version 12.10.FC4W1XU -- On-Line -- Up 00:11:17
-- 5946620 Kbytes
Dbspaces
address number flags fchunk nchunks pgsize flags
owner name
4d416028 1 0x70001 1 1 2048 N BA
informix rootdbs
4e9aa7c8 2 0x70001 2 1 2048 N BA
informix dwphylog
4e9aa9f8 3 0x60001 3 1 2048 N BA
informix dwlog1
4e9aac28 4 0x60001 4 1 2048 N BA
informix dwlog2
4e9ab028 5 0x60001 5 1 2048 N BA
informix dwdata00
4e9ab258 6 0x68001 6 1 2048 N SBA
informix dwsbdata00
4e9ab488 7 0x68001 7 1 2048 N SBA
informix ifx_qdatasbspace1
4e9ab6b8 8 0x68001 8 1 2048 N SBA
informix ifx_qdatasbspace2
4e9ab8e8 9 0x60001 9 1 2048 N BA
informix ifx_cdrdbs1
4e9abb18 10 0x42001 10 1 2048 N TBA
informix dwtemp1
4e9abd48 11 0x42001 11 1 2048 N TBA
informix dwtemp2
4e9ad028 12 0x42001 12 1 2048 N TBA
informix dwtemp3
12 active, 2047 maximum
Chunks
address chunk/dbs offset size free bpages
flags pathname
4d416258 1 1 0 950000 928159
PO-B-- /usr/informix/dev-links/nsofopsdw/dwroot_ops
4e9ad258 2 2 0 2000000 999947
PO-B-- /usr/informix/dev-links/nsofopsdw/dwphylog_ops
4e9ae028 3 3 0 5000000 249947
PO-B-- /usr/informix/dev-links/nsofopsdw/dwlog1_ops
4e9af028 4 4 0 5000000 249947
PO-B-- /usr/informix/dev-links/nsofopsdw/dwlog2_ops
4e9b0028 5 5 0 5000000 4995965
PO-B-- /usr/informix/dev-links/nsofopsdw/dwdata00_ops
4e9b1028 6 6 0 5000000 4663292 4663405
POSB-- /usr/informix/dev-links/nsofopsdw/dwsbdata00_ops
Metadata 336542 250429 336542
4e9b2028 7 7 0 7124992 6645376 6645376
POSB-- /dbbackup/dbs-link/jsondb/jsondb1
Metadata 479563 356854 479563
4e9b3028 8 8 0 7124992 6645375 6645376
POSB-- /dbbackup/dbs-link/jsondb/nsofopsjson_tcp_ifx_qdatasbspace2_p_1
Metadata 479563 356854 479563
4e9b4028 9 9 0 102400 96597
PO-BE- /dbbackup/dbs-link/jsondb/nsofopsjson_tcp_ifx_cdrdbs1_p_1
4e9b5028 10 10 0 3000000 2999947
PO-B-- /usr/informix/dev-links/nsofopsdw/dwtemp1_ops
4e9b6028 11 11 0 3000000 2999947
PO-B-- /usr/informix/dev-links/nsofopsdw/dwtemp2_ops
4e9b7028 12 12 0 3000000 2999947
PO-B-- /usr/informix/dev-links/nsofopsdw/dwtemp3_ops
12 active, 32766 maximum
NOTE: The values in the "size" and "free" columns for DBspace chunks are
displayed in terms of "pgsize" of the DBspace to which they belong.
Expanded chunk capacity mode: always
(4) log of Jsonlistener
[informix@maggie json]$ tail -f jsonlisten.log
2015-03-23 16:53:42 [JsonListener-1] INFO
com.ibm.nosql.informix.server.mongo.MongoListener - JSON server listening
on port: 9170, 0.0.0.0/0.0.0.0
2015-03-23 16:54:10 [JsonListener-1] INFO
com.ibm.nosql.informix.server.mongo.MongoListener - connection accepted
from /127.0.0.1:48264
2015-03-23 16:54:10 [JsonListener-1-thread-1] INFO
com.ibm.nosql.informix.server.mongo.MongoListenerMessageHandler -
connection accepted from: 127.0.0.1:48264 , sessionNumer: 1 ,
listenerNumber: 8
2015-03-23 16:55:45 [JsonListener-1-thread-1] ERROR Session-1 - SQLCODE:
-212 Cannot add index.
2015-03-23 16:55:45 [JsonListener-1-thread-1] ERROR Session-1 - Unable to
create index _id_ for namespace noaa.my_collection_4 on table
my_collection_4 with specification { "v" : 1 , "key" : { "_id" : [ 1 ,
"$string" ] } , "ns" : "noaa.my_collection_4" , "name" : "_id_" , "unique"
: true , "index" : "my_collection_4__id_" } | Cannot add index. (SQL Code:
-212, SQL State: IX000) | ISAM error: no such DBspace (SQL Code: -130, SQL
State: IX000)
java.sql.SQLException: Cannot add index.
at com.informix.util.IfxErrMsg.getSQLException(IfxErrMsg.java:408)
at com.informix.jdbc.IfxSqli.addException(IfxSqli.java:3132)
at com.informix.jdbc.IfxSqli.receiveError(IfxSqli.java:3412)
at com.informix.jdbc.IfxSqli.dispatchMsg(IfxSqli.java:2325)
at com.informix.jdbc.IfxSqli.receiveMessage(IfxSqli.java:2250)
at com.informix.jdbc.IfxSqli.sendStatementExecute(IfxSqli.java:1321)
at com.informix.jdbc.IfxSqli.executeExecute(IfxSqli.java:2180)
at com.informix.jdbc.IfxSqli.executeExecute(IfxSqli.java:2133)
at
com.informix.jdbc.IfxResultSet.executeExecute(IfxResultSet.java:363)
at
com.informix.jdbc.IfxStatement.executeImpl(IfxStatement.java:1144)
at
com.informix.jdbc.IfxStatement.executeImpl(IfxStatement.java:1120)
at com.informix.jdbc.IfxStatement.executeBody(IfxStatement.java:866)
at com.informix.jdbc.IfxStatement.execute(IfxStatement.java:784)
at
com.ibm.nosql.informix.internal.InformixCollectionUtils.createIndex(InformixCollectionUtils.java:1306)
at
com.ibm.nosql.informix.internal.InformixCollectionUtils.createIndexOnIdField(InformixCollectionUtils.java:1173)
at
com.ibm.nosql.informix.internal.InformixCollectionUtils.createCollection(InformixCollectionUtils.java:153)
at
com.ibm.nosql.informix.internal.InformixCollectionUtils.createCollection(InformixCollectionUtils.java:107)
at
com.ibm.nosql.informix.internal.command.administration.CreateCommand.process(CreateCommand.java:39)
at
com.ibm.nosql.informix.internal.command.CommandRegistry.process(CommandRegistry.java:214)
at
com.ibm.nosql.informix.internal.request.InformixRequestHandler.processCommand(InformixRequestHandler.java:498)
at
com.ibm.nosql.informix.internal.request.InformixRequestHandler.processQuery(InformixRequestHandler.java:478)
at
com.ibm.nosql.informix.internal.request.QueryRequest.process(QueryRequest.java:250)
at
com.ibm.nosql.informix.server.mongo.MongoListenerMessageHandler.handleMessage(MongoListenerMessageHandler.java:305)
at
com.ibm.nosql.informix.server.mongo.MongoListenerMessageHandler.run(MongoListenerMessageHandler.java:128)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
Caused by: java.sql.SQLException: ISAM error: no such DBspace
at com.informix.util.IfxErrMsg.getSQLException(IfxErrMsg.java:408)
at com.informix.jdbc.IfxSqli.receiveError(IfxSqli.java:3417)
... 24 more
2015-03-23 16:55:45 [JsonListener-1-thread-1] ERROR Session-1 - SQLCODE:
-212 Cannot add index.
2015-03-23 16:55:45 [JsonListener-1-thread-1] ERROR Session-1 - Unable to
create table 'my_collection_4' for namespace 'noaa.my_collection_4'
java.sql.SQLException: Table (informix.my_collection_4) already exists in
database.
at com.informix.jdbc.IfxSqli.addException(IfxSqli.java:3130)
at com.informix.jdbc.IfxSqli.receiveError(IfxSqli.java:3412)
at com.informix.jdbc.IfxSqli.dispatchMsg(IfxSqli.java:2325)
at com.informix.jdbc.IfxSqli.receiveMessage(IfxSqli.java:2250)
at com.informix.jdbc.IfxSqli.sendStatementExecute(IfxSqli.java:1321)
at com.informix.jdbc.IfxSqli.executeExecute(IfxSqli.java:2180)
at com.informix.jdbc.IfxSqli.executeExecute(IfxSqli.java:2133)
at
com.informix.jdbc.IfxResultSet.executeExecute(IfxResultSet.java:363)
at
com.informix.jdbc.IfxStatement.executeImpl(IfxStatement.java:1144)
at
com.informix.jdbc.IfxStatement.executeImpl(IfxStatement.java:1120)
at com.informix.jdbc.IfxStatement.executeBody(IfxStatement.java:866)
at com.informix.jdbc.IfxStatement.execute(IfxStatement.java:784)
at
com.ibm.nosql.informix.internal.InformixCollectionUtils.createTableForCollection(InformixCollectionUtils.java:531)
at
com.ibm.nosql.informix.internal.InformixCollectionUtils.createTableForCollection(InformixCollectionUtils.java:308)
at
com.ibm.nosql.informix.internal.InformixCollectionUtils.createCollection(InformixCollectionUtils.java:134)
at
com.ibm.nosql.informix.internal.InformixCollectionUtils.createCollection(InformixCollectionUtils.java:113)
at
com.ibm.nosql.informix.internal.command.administration.CreateCommand.process(CreateCommand.java:39)
at
com.ibm.nosql.informix.internal.command.CommandRegistry.process(CommandRegistry.java:214)
at
com.ibm.nosql.informix.internal.request.InformixRequestHandler.processCommand(InformixRequestHandler.java:498)
at
com.ibm.nosql.informix.internal.request.InformixRequestHandler.processQuery(InformixRequestHandler.java:478)
at
com.ibm.nosql.informix.internal.request.QueryRequest.process(QueryRequest.java:250)
at
com.ibm.nosql.informix.server.mongo.MongoListenerMessageHandler.handleMessage(MongoListenerMessageHandler.java:305)
at
com.ibm.nosql.informix.server.mongo.MongoListenerMessageHandler.run(MongoListenerMessageHandler.java:128)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
Caused by: java.sql.SQLException
at com.informix.util.IfxErrMsg.getSQLException(IfxErrMsg.java:408)
at com.informix.jdbc.IfxSqli.receiveError(IfxSqli.java:3417)
... 24 more
2015-03-23 16:55:45 [JsonListener-1-thread-1] ERROR Session-1 - Error
creating collection
com.ibm.nosql.informix.json.api.MongoException: Unable to create table
'my_collection_4' for namespace 'noaa.my_collection_4'
at
com.ibm.nosql.informix.internal.InformixCollectionUtils.createTableForCollection(InformixCollectionUtils.java:547)
at
com.ibm.nosql.informix.internal.InformixCollectionUtils.createTableForCollection(InformixCollectionUtils.java:308)
at
com.ibm.nosql.informix.internal.InformixCollectionUtils.createCollection(InformixCollectionUtils.java:134)
at
com.ibm.nosql.informix.internal.InformixCollectionUtils.createCollection(InformixCollectionUtils.java:113)
at
com.ibm.nosql.informix.internal.command.administration.CreateCommand.process(CreateCommand.java:39)
at
com.ibm.nosql.informix.internal.command.CommandRegistry.process(CommandRegistry.java:214)
at
com.ibm.nosql.informix.internal.request.InformixRequestHandler.processCommand(InformixRequestHandler.java:498)
at
com.ibm.nosql.informix.internal.request.InformixRequestHandler.processQuery(InformixRequestHandler.java:478)
at
com.ibm.nosql.informix.internal.request.QueryRequest.process(QueryRequest.java:250)
at
com.ibm.nosql.informix.server.mongo.MongoListenerMessageHandler.handleMessage(MongoListenerMessageHandler.java:305)
at
com.ibm.nosql.informix.server.mongo.MongoListenerMessageHandler.run(MongoListenerMessageHandler.java:128)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
Caused by: java.sql.SQLException: Table (informix.my_collection_4) already
exists in database.
at com.informix.jdbc.IfxSqli.addException(IfxSqli.java:3130)
at com.informix.jdbc.IfxSqli.receiveError(IfxSqli.java:3412)
at com.informix.jdbc.IfxSqli.dispatchMsg(IfxSqli.java:2325)
at com.informix.jdbc.IfxSqli.receiveMessage(IfxSqli.java:2250)
at com.informix.jdbc.IfxSqli.sendStatementExecute(IfxSqli.java:1321)
at com.informix.jdbc.IfxSqli.executeExecute(IfxSqli.java:2180)
at com.informix.jdbc.IfxSqli.executeExecute(IfxSqli.java:2133)
at
com.informix.jdbc.IfxResultSet.executeExecute(IfxResultSet.java:363)
at
com.informix.jdbc.IfxStatement.executeImpl(IfxStatement.java:1144)
at
com.informix.jdbc.IfxStatement.executeImpl(IfxStatement.java:1120)
at com.informix.jdbc.IfxStatement.executeBody(IfxStatement.java:866)
at com.informix.jdbc.IfxStatement.execute(IfxStatement.java:784)
at
com.ibm.nosql.informix.internal.InformixCollectionUtils.createTableForCollection(InformixCollectionUtils.java:531)
... 13 more
Caused by: java.sql.SQLException
at com.informix.util.IfxErrMsg.getSQLException(IfxErrMsg.java:408)
at com.informix.jdbc.IfxSqli.receiveError(IfxSqli.java:3417)
... 24 more
On Fri, Mar 20, 2015 at 6:12 PM, ERIKA VON BARGEN <vonbarg@us.ibm.com>
wrote:
> When you create a collection, a unique index on the _id field is also
> automatically created. It seems that your collection table was created
> successfully but the index creation failed. You might want to check what
> your
> default sbspace is set to. Otherwise, if you restart the listener with
> -loglevel debug, it will also print out the actual SQL statement to the
> listener log. That should tell you where it is trying create the index.
>
> Now technically, having a unique index on the _id field is not required in
> Informix. The listener does it to be Mongo compatible. So if you don't
> really
> care about that index, you don't have to recreate it. However, you should
> still resolve the underlying error because otherwise you'll run into it
> again.
>
> Thanks,
> Erika
>
>
>
> *******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--001a1146fe62ef6eaa0511f7d1d0