OK. I tried to create a collection,
mongos> db.createCollection("my_collection_1");
{
"code" : null,
"ok" : 0,
"errmsg" : "Unable to create table 'my_collection_1' for namespace
'noaa.my_collection_1' | Table (informix.my_collection_1) already exists in
database. (SQL Code: -310, SQL State: S0001)"
}
mongos>
-310 Table table-name already exists in database.
310 error is confusing...., it was a brand new name!!
Log of Json listener is attached. Seems it actually complained: no such
DB space (-212 Cannot add index.) , for index creation .
I also attached the onstat -d output .
No sure what need to fix, what db space I need add ?
Thanks
Frank
========================== log of Json listener
2015-03-20 20:45:27 [JsonListener-1-thread-6] ERROR Session-6 - SQLCODE:
-212 Cannot add index.
2015-03-20 20:45:27 [JsonListener-1-thread-6] ERROR Session-6 - Unable to
create index _id_ for namespace noaa.my_collection_1 on table
my_collection_1 with specification { "v" : 1 , "key" : { "_id" : [ 1 ,
"$string" ] } , "ns" : "noaa.my_collection_1" , "name" : "_id_" , "unique"
: true , "index" : "my_collection_1__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-20 20:45:27 [JsonListener-1-thread-6] ERROR Session-6 - SQLCODE:
-212 Cannot add index.
2015-03-20 20:45:27 [JsonListener-1-thread-6] ERROR Session-6 - Unable to
create table 'my_collection_1' for namespace 'noaa.my_collection_1'
java.sql.SQLException: Table (informix.my_collection_1) 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-20 20:45:27 [JsonListener-1-thread-6] ERROR Session-6 - Error
creating collection
com.ibm.nosql.informix.json.api.MongoException: Unable to create table
'my_collection_1' for namespace 'noaa.my_collection_1'
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_1) 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
================================= output of onstat -d
[informix@maggie json]$ onstat -d
IBM Informix Dynamic Server Version 12.10.FC4W1XU -- On-Line -- Up 1 days
00:59:22 -- 5946620 Kbytes
Dbspaces
address number flags fchunk nchunks pgsize flags
owner name
4d416028 1 0x70001 1 1 2048 N BA
informix rootdbs
4e9cd7c8 2 0x70001 2 1 2048 N BA
informix dwphylog
4e9cd9f8 3 0x60001 3 1 2048 N BA
informix dwlog1
4e9cdc28 4 0x60001 4 1 2048 N BA
informix dwlog2
4e9ce028 5 0x60001 5 1 2048 N BA
informix dwdata00
4e9ce258 6 0x68001 6 1 2048 N SBA
informix dwsbdata00
4e9ce488 7 0x68001 7 1 2048 N SBA
informix ifx_qdatasbspace1
4e9ce6b8 8 0x68001 8 1 2048 N SBA
informix ifx_qdatasbspace2
4e9ce8e8 9 0x60001 9 1 2048 N BA
informix ifx_cdrdbs1
9 active, 2047 maximum
Chunks
address chunk/dbs offset size free bpages
flags pathname
4d416258 1 1 0 950000 930137
PO-B-- /usr/informix/dev-links/nsofopsdw/dwroot_ops
4e9cf028 2 2 0 2000000 999947
PO-B-- /usr/informix/dev-links/nsofopsdw/dwphylog_ops
4e9d0028 3 3 0 5000000 249947
PO-B-- /usr/informix/dev-links/nsofopsdw/dwlog1_ops
4e9d1028 4 4 0 5000000 249947
PO-B-- /usr/informix/dev-links/nsofopsdw/dwlog2_ops
4e9d2028 5 5 0 5000000 4996349
PO-B-- /usr/informix/dev-links/nsofopsdw/dwdata00_ops
4e9d3028 6 6 0 5000000 4663292 4663405
POSB-- /usr/informix/dev-links/nsofopsdw/dwsbdata00_ops
Metadata 336542 250429 336542
4e9d4028 7 7 0 7124992 6645376 6645376
POSB-- /dbbackup/dbs-link/jsondb/jsondb1
Metadata 479563 356854 479563
4e9d5028 8 8 0 7124992 6645375 6645376
POSB-- /dbbackup/dbs-link/jsondb/nsofopsjson_tcp_ifx_qdatasbspace2_p_1
Metadata 479563 356854 479563
4e9d6028 9 9 0 102400 97093
PO-BE- /dbbackup/dbs-link/jsondb/nsofopsjson_tcp_ifx_cdrdbs1_p_1
9 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
On Fri, Mar 20, 2015 at 1:27 PM, ERIKA VON BARGEN <vonbarg@us.ibm.com>
wrote:
> Hi Frank,
>
> mongos> sh.addShard("leslie-dat:9171")
> { "ok" : 1, "name" : "g_ncdcopsjson_tcp" }
>
> This does indicate success. {ok: 1} means success. {ok: 0} would indicate a
> failure and would be accompanied by a errmsg field in the response
> document.
>
> The sh.addShard command adds the server specified to the sharded env. The
> next
> step would be to run sh.shardCollection to actually shard your various
> collections/tables. If you need more info on sh.shardCollection, here's a
> link
> to that topic in the Informix Knowledge Center.
>
> http://www-01.ibm.com/support/knowledgecenter/SSGU8G_12.1.0/com.ibm.json.doc/ids_json_036.htm?lang=en
>
> Thanks,
> Erika
>
>
>
> *******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--001a1139bcd8ce89250511be9e2e