[JBoss JIRA] (TEIID-4731) Unable to connect to MongoDB pod from JBoss Data Virtualization (on OpenShift)
by Ramesh Reddy (JIRA)
[ https://issues.jboss.org/browse/TEIID-4731?page=com.atlassian.jira.plugin... ]
Ramesh Reddy resolved TEIID-4731.
---------------------------------
Resolution: Done
Labels: CR1 (was: )
Changed the default authentication scheme to use "SCRAM_SHA_1" as this is default security type in mongodb versions >= 3.0. Also updated documentation on the missing the properties related to authentication. Also added a compatibility note in the release notes.
> Unable to connect to MongoDB pod from JBoss Data Virtualization (on OpenShift)
> ------------------------------------------------------------------------------
>
> Key: TEIID-4731
> URL: https://issues.jboss.org/browse/TEIID-4731
> Project: Teiid
> Issue Type: Enhancement
> Environment: I was running using JDV 6.3 running on OpenShift 3.4 and couldn't connect my VDB to mongodb.
> Reporter: Cojan van Ballegooijen
> Assignee: Ramesh Reddy
> Priority: Minor
> Labels: CR1
> Fix For: 9.2
>
> Attachments: products.js
>
>
> It looks like the setup of the mongodb resource adapter is not documented correctly. Tested it also locally with the same issue when using an username/password to connect to a mongodb database.
> 15:26:01,386 WARN [org.teiid.CONNECTOR] (http-127.0.0.1:8080-1) TEIID30003 Without required support property SelfJoins, pushdown will not be enabled for TableAlias on translator [mongodb, java:jboss/datasources/MongoDS].
> 15:26:01,626 INFO [org.teiid.CONNECTOR] (Worker0_QueryProcessorQueue0) SELECT product.itemId AS c_0, product.name AS c_1, product.description AS c_2, product.price AS c_3 FROM product ORDER BY c_0
> 15:26:01,662 WARN [org.teiid.CONNECTOR] (Worker0_QueryProcessorQueue0) Connector worker process failed for atomic-request=G8hRIMByScTW.0.0.0: org.teiid.translator.TranslatorException: { "serverUsed" : "localhost:27017" , "ok" : 0.0 , "errmsg" : "auth failed" , "code" : 18 , "codeName" : "AuthenticationFailed"}
> at org.teiid.translator.mongodb.MongoDBQueryExecution.execute(MongoDBQueryExecution.java:104) [translator-mongodb-8.12.8.6_3-redhat-2.jar:8.12.8.6_3-redhat-2]
> at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:366)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_121]
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_121]
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_121]
> at java.lang.reflect.Method.invoke(Method.java:498) [rt.jar:1.8.0_121]
> at org.teiid.dqp.internal.datamgr.ConnectorManager$1.invoke(ConnectorManager.java:211)
> at com.sun.proxy.$Proxy96.execute(Unknown Source)
> at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:306)
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:112)
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:108)
> at java.util.concurrent.FutureTask.run(FutureTask.java:266) [rt.jar:1.8.0_121]
> at org.teiid.dqp.internal.process.FutureWork.run(FutureWork.java:65)
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:280)
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119)
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_121]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_121]
> at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_121]
> Caused by: com.mongodb.CommandFailureException: { "serverUsed" : "localhost:27017" , "ok" : 0.0 , "errmsg" : "auth failed" , "code" : 18 , "codeName" : "AuthenticationFailed"}
> at com.mongodb.CommandResult.getException(CommandResult.java:76) [mongo-java-driver-2.13.1.jar:]
> at com.mongodb.CommandResult.throwOnError(CommandResult.java:140) [mongo-java-driver-2.13.1.jar:]
> at com.mongodb.DBPort$NativeAuthenticator.authenticate(DBPort.java:986) [mongo-java-driver-2.13.1.jar:]
> at com.mongodb.DBPort.authenticate(DBPort.java:432) [mongo-java-driver-2.13.1.jar:]
> at com.mongodb.DBPort.checkAuth(DBPort.java:443) [mongo-java-driver-2.13.1.jar:]
> at com.mongodb.DBTCPConnector.innerCall(DBTCPConnector.java:289) [mongo-java-driver-2.13.1.jar:]
> at com.mongodb.DBTCPConnector.call(DBTCPConnector.java:269) [mongo-java-driver-2.13.1.jar:]
> at com.mongodb.DBCollectionImpl.find(DBCollectionImpl.java:84) [mongo-java-driver-2.13.1.jar:]
> at com.mongodb.DB.command(DB.java:320) [mongo-java-driver-2.13.1.jar:]
> at com.mongodb.DB.command(DB.java:299) [mongo-java-driver-2.13.1.jar:]
> at com.mongodb.DBCollectionImpl.aggregate(DBCollectionImpl.java:99) [mongo-java-driver-2.13.1.jar:]
> at com.mongodb.DBCollection.aggregate(DBCollection.java:1649) [mongo-java-driver-2.13.1.jar:]
> at org.teiid.translator.mongodb.MongoDBQueryExecution.execute(MongoDBQueryExecution.java:102) [translator-mongodb-8.12.8.6_3-redhat-2.jar:8.12.8.6_3-redhat-2]
> ... 18 more
> Solution is to add the SecurityType configuration parameter in the mongodb resource adapter configuration and set the value to SCRAM_SHA_1.
> - Create a VDB
> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
> <vdb name="CatalogVDB" version="1">
> <description/>
> <property name="validationDateTime" value="Thu Sep 01 10:33:00 CEST 2016"/>
> <property name="validationVersion" value="8.12.6"/>
> <model name="CatalogDB" type="VIRTUAL">
> <metadata type="DDL"><![CDATA[
> CREATE VIEW products (
> itemId integer,
> name string(50),
> description varchar(1024),
> price bigdecimal,
> CONSTRAINT ITEMID_UK UNIQUE (itemId)
> ) AS select * from Products_MONGODB.product
> ]]></metadata>
> </model>
> <model name="Products_MONGODB">
> <source connection-jndi-name="java:jboss/datasources/MongoDS" name="local" translator-name="mongodb"/>
> <metadata type="DDL"><![CDATA[
> CREATE FOREIGN TABLE product (
> itemId integer,
> name varchar(50),
> description varchar(1024),
> price bigdecimal
> ) OPTIONS(UPDATABLE 'TRUE');
> ]]></metadata>
> </model>
> </vdb>
> - Add following resource adapter configuration without SecurityType parameter
> <resource-adapter id="mongodb">
> <module slot="main" id="org.jboss.teiid.resource-adapter.mongodb"/>
> <connection-definitions>
> <connection-definition class-name="org.teiid.resource.adapter.mongodb.MongoDBManagedConnectionFactory" jndi-name="java:jboss/datasources/MongoDS" use-java-context="true" pool-name="cfName">
> <config-property name="Database">
> catalogdb
> </config-property>
> <config-property name="Username">
> catalogAdmin
> </config-property>
> <config-property name="RemoteServerList">
> localhost:27017
> </config-property>
> <config-property name="Password">
> catalogPW
> </config-property>
> <config-property name="SecurityType">
> SCRAM_SHA_1
> </config-property>
> <validation>
> <background-validation>true</background-validation>
> <background-validation-millis>60</background-validation-millis>
> </validation>
> </connection-definition>
> </connection-definitions>
> </resource-adapter>
> - run mongo product.js // see attachment
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 11 months
[JBoss JIRA] (TEIID-4734) Under some circumstances after restart Teiid Server does not update Materialized views anymore
by Ramesh Reddy (JIRA)
[ https://issues.jboss.org/browse/TEIID-4734?page=com.atlassian.jira.plugin... ]
Ramesh Reddy commented on TEIID-4734:
-------------------------------------
>From your files it looks like if the server was stopped when the materialized view in "LOADING" status, then after it comes back up it does not resume reloading of the view. I will try to investigate.
> Under some circumstances after restart Teiid Server does not update Materialized views anymore
> ----------------------------------------------------------------------------------------------
>
> Key: TEIID-4734
> URL: https://issues.jboss.org/browse/TEIID-4734
> Project: Teiid
> Issue Type: Bug
> Components: Common
> Affects Versions: 9.1.2
> Environment: * Wildfly 10
> * MySQL 5.6.32
> * Teiid Server 9.1.2
> Reporter: Pedro Inácio
> Assignee: Steven Hawkins
> Attachments: StatusTableAfterStart.csv, StatusTableAfterStop.csv
>
>
> Under some circumstances, start and stop the server several times at different points, some Materialized Views are not being updated by the server.
> It is observable that in status table some views are no longer updated. In server log are being printed lots of INFO lines.
> Waited more than 15 minutes and the server was not capable of recovering.
> See the _StatusTableAfterStop.csv_ file to observe the status table content after stopping the server.
> See the _StatusTableAfterStart.csv_ file to observe the status table content after approximately 15 minutes after restart.
> Check _server.log_ for the Teiid Server log.
> See that hundreds of lines similar to the following occur
> {panel:title=Server.log}
> 2017-01-31 13:06:34,597 INFO [org.teiid.COMMAND_LOG] (Teiid Timer0) JfGY9cInAbrb START USER COMMAND: startTime=2017-01-31 13:06:34.597 requestID=JfGY9cInAbrb.0 txID=null sessionID=JfGY9cInAbrb applicationName=internal principal=embedded-async vdbName=CountryServiceListVDB vdbVersion=1 sql=execute SYSADMIN.matViewStatus('NumberingPlan', 'numbering_plan')
> {panel}
> The server cannot continue to load materialized views.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 11 months
[JBoss JIRA] (TEIID-4732) Teiid Server does not honor columns name in external materialization
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-4732?page=com.atlassian.jira.plugin... ]
Steven Hawkins resolved TEIID-4732.
-----------------------------------
Fix Version/s: 9.0.6
9.1.3
Resolution: Done
Addressed by removing the usage of select *. Made a minor simplification to master as well.
> Teiid Server does not honor columns name in external materialization
> --------------------------------------------------------------------
>
> Key: TEIID-4732
> URL: https://issues.jboss.org/browse/TEIID-4732
> Project: Teiid
> Issue Type: Bug
> Components: Common
> Affects Versions: 9.1.2
> Environment: * WildFly 10
> * Teiid Server 9.1.2
> * CentOs 7
> * MySQL 5.6.35
> Reporter: Pedro Inácio
> Assignee: Steven Hawkins
> Fix For: 9.0.6, 9.1.3
>
> Attachments: NumberingPlan.csv, externalMaterializationOrderProblem-vdb.xml, mySqlCreateTable.sql, numberingPlan-vdb.xml
>
>
> When defining a View with external materialization, if the view does not specify the columns in the same order as they are defined in the Materialized Table, Teiid Server inserts data in the wrong columns (in the order that is defined in the view). It appears that Teiid Server does not use the columns names but instead uses the column indexes.
> Example:
> If the view is defined like this:
> {code:sql}
> CREATE VIEW my_view (
> cns varchar(400),
> country_code varchar(400)
> )
> {code}
> And the tables in the database are defined like this:
> {code:sql}
> CREATE TABLE my_view_cache_staging (
> country_code VARCHAR(400),
> cns VARCHAR(400)
>
> );
> CREATE TABLE my_view_cache (
> country_code VARCHAR(400),
> cns VARCHAR(400)
> );
> {code}
> Then when loadMatView runs, it will insert in country_code column in database the values from cns (view) and in cns column in database the values from country_code (view).
> But if the view is defined like this:
> {code:sql}
> CREATE VIEW my_view (
> country_code varchar(400),
> cns varchar(400)
> )
> {code}
> Then Teiid will insert the data "correctly".
> It appears that loadMatView is using indexes instead of column names to insert the data.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 11 months
[JBoss JIRA] (TEIID-4730) Problem with Import VDB with Materialized View (external)
by Ramesh Reddy (JIRA)
[ https://issues.jboss.org/browse/TEIID-4730?page=com.atlassian.jira.plugin... ]
Ramesh Reddy commented on TEIID-4730:
-------------------------------------
[~shawkins] yes, there is now row matching the criteria in the status table as the VDBName differs from importing vdb to the importer vdb.
> Problem with Import VDB with Materialized View (external)
> ---------------------------------------------------------
>
> Key: TEIID-4730
> URL: https://issues.jboss.org/browse/TEIID-4730
> Project: Teiid
> Issue Type: Bug
> Components: Common
> Affects Versions: 9.1.2
> Environment: * Teiid 9.1.2
> * CentOs 7
> * WildFly 10
> Reporter: Pedro Inácio
> Assignee: Steven Hawkins
> Attachments: externalMaterializationOrderProblem-vdb.xml, numberingPlan-vdb.xml
>
>
> Having defined a VDB which contains a Model that has External Materialization, when importing this VDB into another that also uses External Materialization, Teiid Server is searching in the wrong place for the view status.
> Example:
> ..
> <import-vdb name="CountryServiceListVDB" version="1" import-data-policies="true"/>
> ...
> <model name="MyView" type="VIRTUAL">
> ...
> SELECT cns,
> country_code
> FROM NumberingPlan.numbering_plan;
> ....
> </metadata>
> </model>
> *NumberingPlan.numbering_plan is defined in the imported VDB, and is also Materialized.*
> *Warning in Logs: *
> 17:51:45,161 WARN [org.teiid.MATVIEWS] (Worker8_QueryProcessorQueue10653) n9M6de3y5xHM org.teiid.jdbc.TeiidSQLException: TEIID30328 Unable to evaluate (SELECT mvstatus('NumberingPlan', 'numbering_plan', Valid, LoadState, 'THROW_EXCEPTION') FROM (SELECT 1) AS x LEFT OUTER JOIN NumberingPlanMaterialized.status ON VDBName = 'ExternalMaterializationOrderProblem' AND VDBVersion = '1' AND SchemaName = 'NumberingPlan' AND Name = 'numbering_plan' LIMIT 2): TEIID30328 Unable to evaluate mvstatus('NumberingPlan', 'numbering_plan', Valid, LoadState, 'THROW_EXCEPTION'): TEIID30384 Error while evaluating function mvstatus
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 11 months
[JBoss JIRA] (TEIID-4730) Problem with Import VDB with Materialized View (external)
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-4730?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-4730:
---------------------------------------
I don't quite follow what you mean - are you asking about the case when no rows are returned from the status table?
> Problem with Import VDB with Materialized View (external)
> ---------------------------------------------------------
>
> Key: TEIID-4730
> URL: https://issues.jboss.org/browse/TEIID-4730
> Project: Teiid
> Issue Type: Bug
> Components: Common
> Affects Versions: 9.1.2
> Environment: * Teiid 9.1.2
> * CentOs 7
> * WildFly 10
> Reporter: Pedro Inácio
> Assignee: Steven Hawkins
> Attachments: externalMaterializationOrderProblem-vdb.xml, numberingPlan-vdb.xml
>
>
> Having defined a VDB which contains a Model that has External Materialization, when importing this VDB into another that also uses External Materialization, Teiid Server is searching in the wrong place for the view status.
> Example:
> ..
> <import-vdb name="CountryServiceListVDB" version="1" import-data-policies="true"/>
> ...
> <model name="MyView" type="VIRTUAL">
> ...
> SELECT cns,
> country_code
> FROM NumberingPlan.numbering_plan;
> ....
> </metadata>
> </model>
> *NumberingPlan.numbering_plan is defined in the imported VDB, and is also Materialized.*
> *Warning in Logs: *
> 17:51:45,161 WARN [org.teiid.MATVIEWS] (Worker8_QueryProcessorQueue10653) n9M6de3y5xHM org.teiid.jdbc.TeiidSQLException: TEIID30328 Unable to evaluate (SELECT mvstatus('NumberingPlan', 'numbering_plan', Valid, LoadState, 'THROW_EXCEPTION') FROM (SELECT 1) AS x LEFT OUTER JOIN NumberingPlanMaterialized.status ON VDBName = 'ExternalMaterializationOrderProblem' AND VDBVersion = '1' AND SchemaName = 'NumberingPlan' AND Name = 'numbering_plan' LIMIT 2): TEIID30328 Unable to evaluate mvstatus('NumberingPlan', 'numbering_plan', Valid, LoadState, 'THROW_EXCEPTION'): TEIID30384 Error while evaluating function mvstatus
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 11 months
[JBoss JIRA] (TEIID-4730) Problem with Import VDB with Materialized View (external)
by Ramesh Reddy (JIRA)
[ https://issues.jboss.org/browse/TEIID-4730?page=com.atlassian.jira.plugin... ]
Ramesh Reddy commented on TEIID-4730:
-------------------------------------
[~pringi] You got me digging deep, but I think the problem is you set the cache scope property {{teiid_rel:MATVIEW_SHARE_SCOPE" 'NONE'}} to NONE in numberingPlan-vdb.xml, where as when being used in the multiple VDBs, this MUST be set to {{teiid_rel:MATVIEW_SHARE_SCOPE" 'SCHEMA'}}. I update the documentation with this tip.
Can you try and verify?
[~shawkins] I am not sure if there is any pre-validation that can be done, or any other error message we can show when left outer join is not contributing to rows here?
{code}
SELECT mvstatus('NumberingPlan', 'numbering_plan', Valid, LoadState, 'THROW_EXCEPTION') FROM (SELECT 1) AS x
LEFT OUTER JOIN NumberingPlanMaterialized.status ON VDBName = 'ExternalMaterializationOrderProblem'
AND VDBVersion = '1' AND SchemaName = 'NumberingPlan' AND Name = 'numbering_plan' LIMIT 2)
{code}
What do you suggest?
> Problem with Import VDB with Materialized View (external)
> ---------------------------------------------------------
>
> Key: TEIID-4730
> URL: https://issues.jboss.org/browse/TEIID-4730
> Project: Teiid
> Issue Type: Bug
> Components: Common
> Affects Versions: 9.1.2
> Environment: * Teiid 9.1.2
> * CentOs 7
> * WildFly 10
> Reporter: Pedro Inácio
> Assignee: Steven Hawkins
> Attachments: externalMaterializationOrderProblem-vdb.xml, numberingPlan-vdb.xml
>
>
> Having defined a VDB which contains a Model that has External Materialization, when importing this VDB into another that also uses External Materialization, Teiid Server is searching in the wrong place for the view status.
> Example:
> ..
> <import-vdb name="CountryServiceListVDB" version="1" import-data-policies="true"/>
> ...
> <model name="MyView" type="VIRTUAL">
> ...
> SELECT cns,
> country_code
> FROM NumberingPlan.numbering_plan;
> ....
> </metadata>
> </model>
> *NumberingPlan.numbering_plan is defined in the imported VDB, and is also Materialized.*
> *Warning in Logs: *
> 17:51:45,161 WARN [org.teiid.MATVIEWS] (Worker8_QueryProcessorQueue10653) n9M6de3y5xHM org.teiid.jdbc.TeiidSQLException: TEIID30328 Unable to evaluate (SELECT mvstatus('NumberingPlan', 'numbering_plan', Valid, LoadState, 'THROW_EXCEPTION') FROM (SELECT 1) AS x LEFT OUTER JOIN NumberingPlanMaterialized.status ON VDBName = 'ExternalMaterializationOrderProblem' AND VDBVersion = '1' AND SchemaName = 'NumberingPlan' AND Name = 'numbering_plan' LIMIT 2): TEIID30328 Unable to evaluate mvstatus('NumberingPlan', 'numbering_plan', Valid, LoadState, 'THROW_EXCEPTION'): TEIID30384 Error while evaluating function mvstatus
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 11 months
[JBoss JIRA] (TEIID-4731) Unable to connect to MongoDB pod from JBoss Data Virtualization (on OpenShift)
by Ramesh Reddy (JIRA)
[ https://issues.jboss.org/browse/TEIID-4731?page=com.atlassian.jira.plugin... ]
Ramesh Reddy updated TEIID-4731:
--------------------------------
Fix Version/s: 9.2
> Unable to connect to MongoDB pod from JBoss Data Virtualization (on OpenShift)
> ------------------------------------------------------------------------------
>
> Key: TEIID-4731
> URL: https://issues.jboss.org/browse/TEIID-4731
> Project: Teiid
> Issue Type: Enhancement
> Environment: I was running using JDV 6.3 running on OpenShift 3.4 and couldn't connect my VDB to mongodb.
> Reporter: Cojan van Ballegooijen
> Assignee: Ramesh Reddy
> Priority: Minor
> Fix For: 9.2
>
> Attachments: products.js
>
>
> It looks like the setup of the mongodb resource adapter is not documented correctly. Tested it also locally with the same issue when using an username/password to connect to a mongodb database.
> 15:26:01,386 WARN [org.teiid.CONNECTOR] (http-127.0.0.1:8080-1) TEIID30003 Without required support property SelfJoins, pushdown will not be enabled for TableAlias on translator [mongodb, java:jboss/datasources/MongoDS].
> 15:26:01,626 INFO [org.teiid.CONNECTOR] (Worker0_QueryProcessorQueue0) SELECT product.itemId AS c_0, product.name AS c_1, product.description AS c_2, product.price AS c_3 FROM product ORDER BY c_0
> 15:26:01,662 WARN [org.teiid.CONNECTOR] (Worker0_QueryProcessorQueue0) Connector worker process failed for atomic-request=G8hRIMByScTW.0.0.0: org.teiid.translator.TranslatorException: { "serverUsed" : "localhost:27017" , "ok" : 0.0 , "errmsg" : "auth failed" , "code" : 18 , "codeName" : "AuthenticationFailed"}
> at org.teiid.translator.mongodb.MongoDBQueryExecution.execute(MongoDBQueryExecution.java:104) [translator-mongodb-8.12.8.6_3-redhat-2.jar:8.12.8.6_3-redhat-2]
> at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:366)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_121]
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_121]
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_121]
> at java.lang.reflect.Method.invoke(Method.java:498) [rt.jar:1.8.0_121]
> at org.teiid.dqp.internal.datamgr.ConnectorManager$1.invoke(ConnectorManager.java:211)
> at com.sun.proxy.$Proxy96.execute(Unknown Source)
> at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:306)
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:112)
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:108)
> at java.util.concurrent.FutureTask.run(FutureTask.java:266) [rt.jar:1.8.0_121]
> at org.teiid.dqp.internal.process.FutureWork.run(FutureWork.java:65)
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:280)
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119)
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_121]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_121]
> at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_121]
> Caused by: com.mongodb.CommandFailureException: { "serverUsed" : "localhost:27017" , "ok" : 0.0 , "errmsg" : "auth failed" , "code" : 18 , "codeName" : "AuthenticationFailed"}
> at com.mongodb.CommandResult.getException(CommandResult.java:76) [mongo-java-driver-2.13.1.jar:]
> at com.mongodb.CommandResult.throwOnError(CommandResult.java:140) [mongo-java-driver-2.13.1.jar:]
> at com.mongodb.DBPort$NativeAuthenticator.authenticate(DBPort.java:986) [mongo-java-driver-2.13.1.jar:]
> at com.mongodb.DBPort.authenticate(DBPort.java:432) [mongo-java-driver-2.13.1.jar:]
> at com.mongodb.DBPort.checkAuth(DBPort.java:443) [mongo-java-driver-2.13.1.jar:]
> at com.mongodb.DBTCPConnector.innerCall(DBTCPConnector.java:289) [mongo-java-driver-2.13.1.jar:]
> at com.mongodb.DBTCPConnector.call(DBTCPConnector.java:269) [mongo-java-driver-2.13.1.jar:]
> at com.mongodb.DBCollectionImpl.find(DBCollectionImpl.java:84) [mongo-java-driver-2.13.1.jar:]
> at com.mongodb.DB.command(DB.java:320) [mongo-java-driver-2.13.1.jar:]
> at com.mongodb.DB.command(DB.java:299) [mongo-java-driver-2.13.1.jar:]
> at com.mongodb.DBCollectionImpl.aggregate(DBCollectionImpl.java:99) [mongo-java-driver-2.13.1.jar:]
> at com.mongodb.DBCollection.aggregate(DBCollection.java:1649) [mongo-java-driver-2.13.1.jar:]
> at org.teiid.translator.mongodb.MongoDBQueryExecution.execute(MongoDBQueryExecution.java:102) [translator-mongodb-8.12.8.6_3-redhat-2.jar:8.12.8.6_3-redhat-2]
> ... 18 more
> Solution is to add the SecurityType configuration parameter in the mongodb resource adapter configuration and set the value to SCRAM_SHA_1.
> - Create a VDB
> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
> <vdb name="CatalogVDB" version="1">
> <description/>
> <property name="validationDateTime" value="Thu Sep 01 10:33:00 CEST 2016"/>
> <property name="validationVersion" value="8.12.6"/>
> <model name="CatalogDB" type="VIRTUAL">
> <metadata type="DDL"><![CDATA[
> CREATE VIEW products (
> itemId integer,
> name string(50),
> description varchar(1024),
> price bigdecimal,
> CONSTRAINT ITEMID_UK UNIQUE (itemId)
> ) AS select * from Products_MONGODB.product
> ]]></metadata>
> </model>
> <model name="Products_MONGODB">
> <source connection-jndi-name="java:jboss/datasources/MongoDS" name="local" translator-name="mongodb"/>
> <metadata type="DDL"><![CDATA[
> CREATE FOREIGN TABLE product (
> itemId integer,
> name varchar(50),
> description varchar(1024),
> price bigdecimal
> ) OPTIONS(UPDATABLE 'TRUE');
> ]]></metadata>
> </model>
> </vdb>
> - Add following resource adapter configuration without SecurityType parameter
> <resource-adapter id="mongodb">
> <module slot="main" id="org.jboss.teiid.resource-adapter.mongodb"/>
> <connection-definitions>
> <connection-definition class-name="org.teiid.resource.adapter.mongodb.MongoDBManagedConnectionFactory" jndi-name="java:jboss/datasources/MongoDS" use-java-context="true" pool-name="cfName">
> <config-property name="Database">
> catalogdb
> </config-property>
> <config-property name="Username">
> catalogAdmin
> </config-property>
> <config-property name="RemoteServerList">
> localhost:27017
> </config-property>
> <config-property name="Password">
> catalogPW
> </config-property>
> <config-property name="SecurityType">
> SCRAM_SHA_1
> </config-property>
> <validation>
> <background-validation>true</background-validation>
> <background-validation-millis>60</background-validation-millis>
> </validation>
> </connection-definition>
> </connection-definitions>
> </resource-adapter>
> - run mongo product.js // see attachment
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 11 months
[JBoss JIRA] (TEIID-4398) Write a utility to convert a .VDB with Index file into -vdb.xml or DDL format
by Ramesh Reddy (JIRA)
[ https://issues.jboss.org/browse/TEIID-4398?page=com.atlassian.jira.plugin... ]
Ramesh Reddy commented on TEIID-4398:
-------------------------------------
to convert a .vdb into .vdb.xml do
edit the teiid-convert-vdb.sh add a system property -Dformat=XML
{code}
teiid-convert-vdb.sh myvdb.vdb
{code}
this only applies to convert .vdb to vdb.xml
> Write a utility to convert a .VDB with Index file into -vdb.xml or DDL format
> -----------------------------------------------------------------------------
>
> Key: TEIID-4398
> URL: https://issues.jboss.org/browse/TEIID-4398
> Project: Teiid
> Issue Type: Task
> Components: Build/Kits
> Reporter: Ramesh Reddy
> Assignee: Ramesh Reddy
> Labels: CR1
> Fix For: 9.2
>
>
> Write a command line utility and provide in "bin" directory to convert the Designer based .vdb file with index metadata into -vdb.xml file and/or newer DDL format.
> This can be used to migrate the older VDBs mach easier to newer formats without use of Designer tooling.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 11 months
[JBoss JIRA] (TEIID-4558) Query Plan Analyzer
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-4558?page=com.atlassian.jira.plugin... ]
Steven Hawkins updated TEIID-4558:
----------------------------------
Fix Version/s: 9.3
(was: 9.2)
> Query Plan Analyzer
> -------------------
>
> Key: TEIID-4558
> URL: https://issues.jboss.org/browse/TEIID-4558
> Project: Teiid
> Issue Type: Feature Request
> Components: Tools
> Affects Versions: 9.2
> Reporter: Van Halbert
> Fix For: 9.3
>
>
> Provide a tool that would take a query plan and provide feed back.
> Example:
> - indicate where there maybe a problem in the structure of the query that may impact performance
> - indicate in the plan where there maybe issues (like table scan, no rows, etc.)
> - provide recommendations for improving performance
> etc..
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 11 months