Encountered on ADS 14-beta-14.
Create Database operation (both via (1) command from Query Analyzer and (2) 'Create Database' option on 'Databases' node on ADS) fails saying (Pls refer to attached screenshot create_database.png)
>[Error] Script lines: 1-2 --------------------------
Failed to create the 'destdb' database: not talking to master and retries used up
Following are the tentative steps to reproduce the issue:
1) Have a 3 member authenticated replica set up and running throughout. (e.g. rs_status.png).
2) Make sure the authenticated user has enough privs to create database. (e.g. pls refer to user_privs.png)
3) Run following type of query on the Query Analyzer:
create database destdb collection tut
go
Expected outcome:
a) The database should have been created with a specified collection.
Actual outcome:
a) The error message as mentioned above is displayed even though the replica set(and hence the primary member) is running.
b) Upon repeated execution of the same command, the database is created at random and message of screenshot 'db_already_exists.png' is displayed.
c) However upon refreshing the Databases list on ADS, the database 'destdb' is not listed there.
|
138 KB
|
138 KB
|
65 KB
|
129 KB
|
68 KB
|
64 KB
Linking the issue that was bit similar to this one.
Ravi, what is the value of the readPreference and slaveOK JDBC parameters? Please attach a screenshot of the General and Driver tabs of the Server Registration.
Ravi, what is the value of the readPreference and slaveOK JDBC parameters? Please attach a screenshot of the General and Driver tabs of the Server Registration.
slaveOK=true is the culprit.
Emil, please change the default value of slaveOK to false.
slaveOK=true is the culprit.
Emil, please change the default value of slaveOK to false.
Jenny, readPreference = primaryPreferred and slaveOK = true. Please find attached the screenshots.
Jenny, readPreference = primaryPreferred and slaveOK = true. Please find attached the screenshots.
Facing same error with 'CREATE COLLECTION.. ' as well.
Facing same error with 'CREATE COLLECTION.. ' as well.
I noticed that CREATE COLLECTION failed when I was debugging this problem. It was also caused by slaveOK=true.
I noticed that CREATE COLLECTION failed when I was debugging this problem. It was also caused by slaveOK=true.
Any statement that require write operations will fail when slaveOK=true because enabling this parameter will send these commands to secondary nodes, which throw exceptions if a write operation is requested on them.
The slaveOK parameter should be used only as a last resort for read-only statements when the primary server is not available.
Any statement that require write operations will fail when slaveOK=true because enabling this parameter will send these commands to secondary nodes, which throw exceptions if a write operation is requested on them.
The slaveOK parameter should be used only as a last resort for read-only statements when the primary server is not available.
Verified on ADS 14-beta-23 that the 'create database' works fine (both via commands on Query Analyzer and 'CREATE DATABASE' on Databases node) on a 3 member replicated setup.
Verified on ADS 14-beta-23 that the 'create database' works fine (both via commands on Query Analyzer and 'CREATE DATABASE' on Databases node) on a 3 member replicated setup.
Issue #9290 |
Closed |
Fixed |
Resolved |
Completion |
No due date |
Fixed Build ADS 14.0.0-beta-22 (mongo-jdbc 1.2.0) |
No time estimate |
1 issue link |
relates to #9032
Issue #9032ADS not able to connect to secondary member when primary of repl set is down |
Linking the issue that was bit similar to this one.