Details
-
Type:
Improvement
-
Status:
Resolved
-
Priority:
Severe
-
Resolution: Fixed
-
Affects Version/s: 4.3.0 GA (4.5.0 GA Suite Release)
-
Fix Version/s: 5.0.0 GA (5.0.0 GA Suite Release)
-
Component/s: Step
-
Labels:
-
PDI Sub-component:
-
Operating System/s:RedHat Enterprise Linux 5
-
QA Validation Status:Not Yet Validated
Description
If I attempt to connect to a secondary (slave) Mongo instance and issue a query using the MongoDB Input step, I get the following error:
INFO 17-07 13:17:28,459 - etl_test - Dispatching started for transformation [etl_test]
ERROR 17-07 13:17:29,341 - MongoDb Input - Unexpected error
ERROR 17-07 13:17:29,341 - MongoDb Input - com.mongodb.MongoException: not talking to master and retries used up
at com.mongodb.DBTCPConnector.call(DBTCPConnector.java:246)
at com.mongodb.DBTCPConnector.call(DBTCPConnector.java:248)
at com.mongodb.DBTCPConnector.call(DBTCPConnector.java:248)
at com.mongodb.DBApiLayer$MyCollection.__find(DBApiLayer.java:305)
at com.mongodb.DBCursor._check(DBCursor.java:369)
at com.mongodb.DBCursor._hasNext(DBCursor.java:498)
at com.mongodb.DBCursor.hasNext(DBCursor.java:523)
at org.pentaho.di.trans.steps.mongodbinput.MongoDbInput.processRow(MongoDbInput.java:72)
at org.pentaho.di.trans.step.RunThread.run(RunThread.java:50)
at java.lang.Thread.run(Thread.java:662)
I get similar errors if I use the mongo client to connect to the secondary and issue queries. The problem goes away in the client if I issue the command:
rs.slaveOk()
and then run my queries. Unfortunately, I see no way to execute this command when using the MongoDB Input step, so I am unable to query any data from the secondary MongoDB instance. In production environments, I would expect most queries to be run against secondaries rather than the master, especially for ETL, so I imagine this would be a blocker for many people. Hopefully it can be addressed soon.
INFO 17-07 13:17:28,459 - etl_test - Dispatching started for transformation [etl_test]
ERROR 17-07 13:17:29,341 - MongoDb Input - Unexpected error
ERROR 17-07 13:17:29,341 - MongoDb Input - com.mongodb.MongoException: not talking to master and retries used up
at com.mongodb.DBTCPConnector.call(DBTCPConnector.java:246)
at com.mongodb.DBTCPConnector.call(DBTCPConnector.java:248)
at com.mongodb.DBTCPConnector.call(DBTCPConnector.java:248)
at com.mongodb.DBApiLayer$MyCollection.__find(DBApiLayer.java:305)
at com.mongodb.DBCursor._check(DBCursor.java:369)
at com.mongodb.DBCursor._hasNext(DBCursor.java:498)
at com.mongodb.DBCursor.hasNext(DBCursor.java:523)
at org.pentaho.di.trans.steps.mongodbinput.MongoDbInput.processRow(MongoDbInput.java:72)
at org.pentaho.di.trans.step.RunThread.run(RunThread.java:50)
at java.lang.Thread.run(Thread.java:662)
I get similar errors if I use the mongo client to connect to the secondary and issue queries. The problem goes away in the client if I issue the command:
rs.slaveOk()
and then run my queries. Unfortunately, I see no way to execute this command when using the MongoDB Input step, so I am unable to query any data from the secondary MongoDB instance. In production environments, I would expect most queries to be run against secondaries rather than the master, especially for ETL, so I imagine this would be a blocker for many people. Hopefully it can be addressed soon.
Issue Links
- relates to
-
PDI-8253
Add support for MongoDB replica sets and reading/writing on slave servers
-