[JBoss JIRA] (TEIID-4183) MSSQL JDBC driver invalidates kerberos ticket on Connection.close()
by Juraj Duráni (JIRA)
[ https://issues.jboss.org/browse/TEIID-4183?page=com.atlassian.jira.plugin... ]
Juraj Duráni commented on TEIID-4183:
-------------------------------------
(1) - I can see in the (trace) log of EAP's pool, that there is no available connection in the pool before each query (Available (0), InUse (0)). I might be an issue with connection pooling in EAP rather than MSSQL JDBC driver issue. I use code similar to \[1\]. I am not talking about re-using MSSQL connection for different users.
As far as I know, there is some problem with connection pooling in case of kerberos authentication. Without cache, EAP creates new connection pool for each _connect()_ call. But according to ironjacamar's developer, this require change in the design, which will probably not happen before WildFly 14 (https://bugzilla.redhat.com/show_bug.cgi?id=1166719)
(2) - I did not set prefill parameter so it should be false by default. From the EAP documentation: _Whether to try to prefill the connection pool. The default is false._
(3) - > _You mean this using the connection second time?_ - No I mean for the first time. And the exception is not thrown from the driver \[2\].
(4) - >_BTW, this is specific to SQLServer again._ Seems to be. I tried Oracle and test passed.
(5) - > _I do suspect this should NOT affect any of the current test scripts IMO, but if you are seeing any variance please let me know, we will figure out the issue._ - I have updated tests, so they use different pass-through login modules (for each data source - What do you think? Shouldn't be pass-through module independent? I mean, that you should be able to use one login module for every DS no matter what kind of authentication it uses?). I believe, this is enough for now.
{code:java|title=\[1\] Test code}
for(int i = 0; i < COUNT; i++){
teiidConnection.createStatement().execute("SELECT * FROM us");
}
{code}
{code:plain|title=\[2\]}
08:36:20,142 INFO [MultiPlatformProcessRunner] at org.jboss.security.plugins.JBossSecuritySubjectFactory.createSubject(JBossSecuritySubjectFactory.java:84) [picketbox-4.1.2.Final-redhat-1.jar:4.1.2.Final-redhat-1]
{code}
> MSSQL JDBC driver invalidates kerberos ticket on Connection.close()
> -------------------------------------------------------------------
>
> Key: TEIID-4183
> URL: https://issues.jboss.org/browse/TEIID-4183
> Project: Teiid
> Issue Type: Bug
> Affects Versions: 8.12.x, 8.7.5.6_2
> Reporter: Juraj Duráni
> Assignee: Ramesh Reddy
> Fix For: 9.1, 8.12.5
>
>
> MSSQL JDBC driver invalidate kerberos ticket on Connection.close() (related bugzilla \[1\]).
> If user creates kerberos connection, driver invalidates ticket on closing connection (Connection.close()). Therefore ticket cannot be re-used. EAP team creates a workaround for this by adding module option *wrapGSSCredential=true* with additional setting *credentialLifetime=-1* \[2, 3, 4, 5\]. This works for static kerberos authentication.
> However, passthrough authentication (org.teiid.jboss.PassthroughIdentityLoginModule) does not work, because passed ticket is not managed by EAP but by client.
> \[1\] https://bugzilla.redhat.com/show_bug.cgi?id=1097276
> \[2\] https://bugzilla.redhat.com/show_bug.cgi?id=1097276#c58
> \[3\] https://issues.jboss.org/browse/SECURITY-905
> \[4\] https://issues.jboss.org/browse/JBEAP-843
> \[5\] https://github.com/wildfly-security/jboss-negotiation/commit/0c7e06f58a79...
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 6 months
[JBoss JIRA] (TEIID-4294) External Materialization MATVIEW_AFTER_LOAD_SCRIPT is not atomic operation
by Jan Stastny (JIRA)
[ https://issues.jboss.org/browse/TEIID-4294?page=com.atlassian.jira.plugin... ]
Jan Stastny updated TEIID-4294:
-------------------------------
Attachment: teiid-command.log
Hi [~shawkins],
I attached the teiid-command.log with the issue. Look for
{code:plain}
ERROR SRC COMMAND
{code}
which is a query on the mat view table being performed between the two sp_rename native queries from the MATVIEW_AFTER_LOAD_SCRIPT
> External Materialization MATVIEW_AFTER_LOAD_SCRIPT is not atomic operation
> --------------------------------------------------------------------------
>
> Key: TEIID-4294
> URL: https://issues.jboss.org/browse/TEIID-4294
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 8.12.5
> Reporter: Jan Stastny
> Assignee: Steven Hawkins
> Priority: Blocker
> Attachments: dv-2016-06-23-mat-view.log, teiid-command.log
>
>
> Firstly, this issue appears even after *TEIID-4283* fix, and is db independent.
> When during materialized view's loading there is a query on the view performed, timing issues appear. In MATVIEW_AFTER_LOAD_SCRIPT there might be more commands separated by semicolon, but these commands are not performed as a single operation. In specific timing a query on such view might fail when you have a MATVIEW_AFTER_LOAD_SCRIPT like this:
> {code:sql}
> "teiid_rel:MATVIEW_AFTER_LOAD_SCRIPT" 'exec Source.native(''RENAME TABLE dv_matviews_mat_view_stage TO dv_matviews_mat_view_temp'');exec Source.native(''RENAME TABLE dv_matviews_mat_view TO dv_matviews_mat_view_stage'');exec Source.native(''RENAME TABLE dv_matviews_mat_view_temp TO dv_matviews_mat_view'');
> {code}
> user might end up querying the view right in the moment, when 'primary' materialized table (dv_matviews_mat_view) was renamed (dv_matviews_mat_view_stage) and thus there's no such table like defined in the materialized view.
> {code:xml}
> CREATE VIEW external_long_ttl (
> customer_id integer NOT NULL,
> total_amount integer
> ) OPTIONS (MATERIALIZED 'TRUE', UPDATABLE 'FALSE',
> MATERIALIZED_TABLE 'Source.JSTASTNY.dv_matviews_mat_view',
> "teiid_rel:ALLOW_MATVIEW_MANAGEMENT" 'true',
> "teiid_rel:MATVIEW_STATUS_TABLE" 'Source.JSTASTNY.dv_matviews_statustable',
> "teiid_rel:ON_VDB_START_SCRIPT" 'MERGE INTO dv_matviews_check_table(id,vdb_create) SELECT id, vdb_create+1 FROM dv_matviews_check_table WHERE id=''external_long_ttl'';',
> "teiid_rel:ON_VDB_DROP_SCRIPT" 'MERGE INTO dv_matviews_check_table(id,vdb_drop) SELECT id, vdb_drop+1 FROM dv_matviews_check_table WHERE id=''external_long_ttl'';',
> "teiid_rel:MATVIEW_LOAD_SCRIPT" 'INSERT INTO dv_matviews_mat_view_stage(customer_id,total_amount) SELECT CONVERT(c.id,integer) AS customer_id, CONVERT(SUM(o.amount),integer) AS total_amount FROM dv_matviews_customers c INNER JOIN dv_matviews_orders o ON c.id = o.customer_id GROUP BY c.id;',
> "teiid_rel:MATVIEW_BEFORE_LOAD_SCRIPT" 'exec Source.native(''truncate table dv_matviews_mat_view_stage'');MERGE INTO dv_matviews_check_table(id,before_load) SELECT id, before_load+1 FROM dv_matviews_check_table WHERE id=''external_long_ttl'';',
> "teiid_rel:MATVIEW_AFTER_LOAD_SCRIPT" 'exec Source.native(''RENAME TABLE dv_matviews_mat_view_stage TO dv_matviews_mat_view_temp'');exec Source.native(''RENAME TABLE dv_matviews_mat_view TO dv_matviews_mat_view_stage'');exec Source.native(''RENAME TABLE dv_matviews_mat_view_temp TO dv_matviews_mat_view'');MERGE INTO dv_matviews_check_table(id,after_load) SELECT id, after_load+1 FROM dv_matviews_check_table WHERE id=''external_long_ttl'';',
> "teiid_rel:MATVIEW_ONERROR_ACTION" 'IGNORE',
> "teiid_rel:MATVIEW_TTL" 20000)
> AS SELECT CONVERT(c.id,integer) AS customer_id, CONVERT(SUM(o.amount),integer) AS total_amount FROM dv_matviews_customers c INNER JOIN dv_matviews_orders o ON c.id = o.customer_id GROUP BY c.id;
> {code}
> Then for some queries I get:
> {code:plain}
> 10:40:19,252 WARN [org.teiid.CONNECTOR] (Worker2_QueryProcessorQueue130) Connector worker process failed for atomic-request=+k/MyS3sUhQX.14.7.113: org.teiid.translator.jdbc.JDBCExecutionException: 259 TEIID11008:TEIID11004 Error executing statement(s): [Prepared Values: [] SQL: SELECT g_0."CUSTOMER_ID", g_0."TOTAL_AMOUNT" FROM "JSTASTNY".dvqe_X_XjdkY_YDV_MATVIEWS_MAT_VIEW AS g_0]
> at org.teiid.translator.jdbc.JDBCQueryExecution.execute(JDBCQueryExecution.java:131) [translator-jdbc-8.12.5.redhat-5.jar:8.12.5.redhat-5]
> at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:364)
> at sun.reflect.GeneratedMethodAccessor158.invoke(Unknown Source) [:1.7.0_79]
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_79]
> at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_79]
> at org.teiid.dqp.internal.datamgr.ConnectorManager$1.invoke(ConnectorManager.java:211)
> at com.sun.proxy.$Proxy80.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:262) [rt.jar:1.7.0_79]
> at org.teiid.dqp.internal.process.FutureWork.run(FutureWork.java:65)
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:276)
> 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:1145) [rt.jar:1.7.0_79]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_79]
> at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_79]
> Caused by: com.sap.db.jdbc.exceptions.JDBCDriverException: SAP DBTech JDBC: [259]: invalid table name: Could not find table/view DVQE_X_XJDKY_YDV_MATVIEWS_MAT_VIEW in schema JSTASTNY: line 1 col 62 (at pos 61)
> at com.sap.db.jdbc.exceptions.SQLExceptionSapDB.createException(SQLExceptionSapDB.java:345)
> at com.sap.db.jdbc.exceptions.SQLExceptionSapDB.generateDatabaseException(SQLExceptionSapDB.java:185)
> at com.sap.db.jdbc.packet.ReplyPacket.buildExceptionChain(ReplyPacket.java:100)
> at com.sap.db.jdbc.ConnectionSapDB.execute(ConnectionSapDB.java:1130)
> at com.sap.db.jdbc.ConnectionSapDB.execute(ConnectionSapDB.java:877)
> at com.sap.db.jdbc.CallableStatementSapDB.execute(CallableStatementSapDB.java:410)
> at com.sap.db.jdbc.CallableStatementSapDB.execute(CallableStatementSapDB.java:266)
> at com.sap.db.jdbc.CallableStatementSapDB.executeQuery(CallableStatementSapDB.java:756)
> at com.sap.db.jdbc.trace.PreparedStatement.executeQuery(PreparedStatement.java:161)
> at org.jboss.jca.adapters.jdbc.WrappedPreparedStatement.executeQuery(WrappedPreparedStatement.java:462)
> at org.teiid.translator.jdbc.JDBCQueryExecution.execute(JDBCQueryExecution.java:123) [translator-jdbc-8.12.5.redhat-5.jar:8.12.5.redhat-5]
> ... 17 more
> {code}
> From the logs it seems that the after load script has completed, but probably not in the source db. In logs just before the exception I see:
> {code:plain}
> 12:34:59,247 DEBUG [org.teiid.CONNECTOR] (Worker1_QueryProcessorQueue79) Source-specific command: RENAME TABLE dv_matviews_mat_view_temp TO dv_matviews_mat_view
> 12:34:59,663 DEBUG [org.teiid.CONNECTOR] (Worker1_QueryProcessorQueue79) ORTEkGreciAL.0.85.84 Executed command
> 12:34:59,663 DEBUG [org.teiid.CONNECTOR] (Worker1_QueryProcessorQueue79) ORTEkGreciAL.0.85.84 Processing MORE request
> 12:34:59,663 DEBUG [org.teiid.CONNECTOR] (Worker1_QueryProcessorQueue79) ORTEkGreciAL.0.85.84 Getting results from connector
> 12:34:59,663 DEBUG [org.teiid.CONNECTOR] (Worker1_QueryProcessorQueue79) ORTEkGreciAL.0.85.84 Obtained last batch, total row count: 1
> 12:34:59,663 DEBUG [org.teiid.CONNECTOR] (Worker1_QueryProcessorQueue79) ORTEkGreciAL.0.85.84 Remove State
> 12:34:59,664 DEBUG [org.teiid.CONNECTOR] (Worker1_QueryProcessorQueue79) ORTEkGreciAL.0.85.84 Processing Close : EXEC Source.native('RENAME TABLE dv_matviews_mat_view_temp TO dv_matviews_mat_view')
> {code}
> I attached the logs to this issue.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 6 months
[JBoss JIRA] (TEIID-4294) External Materialization MATVIEW_AFTER_LOAD_SCRIPT is not atomic operation
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-4294?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-4294:
---------------------------------------
> I reproduced the issue also when using sql server 2012 as xa-datasource with three source native commands separated by semicolon
I don't see a rationale for that unless the transaction isolation level is read uncommitted. Can you produce a debug command log to confirm that a transaction is associated with the renaming process?
> External Materialization MATVIEW_AFTER_LOAD_SCRIPT is not atomic operation
> --------------------------------------------------------------------------
>
> Key: TEIID-4294
> URL: https://issues.jboss.org/browse/TEIID-4294
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 8.12.5
> Reporter: Jan Stastny
> Assignee: Steven Hawkins
> Priority: Blocker
> Attachments: dv-2016-06-23-mat-view.log
>
>
> Firstly, this issue appears even after *TEIID-4283* fix, and is db independent.
> When during materialized view's loading there is a query on the view performed, timing issues appear. In MATVIEW_AFTER_LOAD_SCRIPT there might be more commands separated by semicolon, but these commands are not performed as a single operation. In specific timing a query on such view might fail when you have a MATVIEW_AFTER_LOAD_SCRIPT like this:
> {code:sql}
> "teiid_rel:MATVIEW_AFTER_LOAD_SCRIPT" 'exec Source.native(''RENAME TABLE dv_matviews_mat_view_stage TO dv_matviews_mat_view_temp'');exec Source.native(''RENAME TABLE dv_matviews_mat_view TO dv_matviews_mat_view_stage'');exec Source.native(''RENAME TABLE dv_matviews_mat_view_temp TO dv_matviews_mat_view'');
> {code}
> user might end up querying the view right in the moment, when 'primary' materialized table (dv_matviews_mat_view) was renamed (dv_matviews_mat_view_stage) and thus there's no such table like defined in the materialized view.
> {code:xml}
> CREATE VIEW external_long_ttl (
> customer_id integer NOT NULL,
> total_amount integer
> ) OPTIONS (MATERIALIZED 'TRUE', UPDATABLE 'FALSE',
> MATERIALIZED_TABLE 'Source.JSTASTNY.dv_matviews_mat_view',
> "teiid_rel:ALLOW_MATVIEW_MANAGEMENT" 'true',
> "teiid_rel:MATVIEW_STATUS_TABLE" 'Source.JSTASTNY.dv_matviews_statustable',
> "teiid_rel:ON_VDB_START_SCRIPT" 'MERGE INTO dv_matviews_check_table(id,vdb_create) SELECT id, vdb_create+1 FROM dv_matviews_check_table WHERE id=''external_long_ttl'';',
> "teiid_rel:ON_VDB_DROP_SCRIPT" 'MERGE INTO dv_matviews_check_table(id,vdb_drop) SELECT id, vdb_drop+1 FROM dv_matviews_check_table WHERE id=''external_long_ttl'';',
> "teiid_rel:MATVIEW_LOAD_SCRIPT" 'INSERT INTO dv_matviews_mat_view_stage(customer_id,total_amount) SELECT CONVERT(c.id,integer) AS customer_id, CONVERT(SUM(o.amount),integer) AS total_amount FROM dv_matviews_customers c INNER JOIN dv_matviews_orders o ON c.id = o.customer_id GROUP BY c.id;',
> "teiid_rel:MATVIEW_BEFORE_LOAD_SCRIPT" 'exec Source.native(''truncate table dv_matviews_mat_view_stage'');MERGE INTO dv_matviews_check_table(id,before_load) SELECT id, before_load+1 FROM dv_matviews_check_table WHERE id=''external_long_ttl'';',
> "teiid_rel:MATVIEW_AFTER_LOAD_SCRIPT" 'exec Source.native(''RENAME TABLE dv_matviews_mat_view_stage TO dv_matviews_mat_view_temp'');exec Source.native(''RENAME TABLE dv_matviews_mat_view TO dv_matviews_mat_view_stage'');exec Source.native(''RENAME TABLE dv_matviews_mat_view_temp TO dv_matviews_mat_view'');MERGE INTO dv_matviews_check_table(id,after_load) SELECT id, after_load+1 FROM dv_matviews_check_table WHERE id=''external_long_ttl'';',
> "teiid_rel:MATVIEW_ONERROR_ACTION" 'IGNORE',
> "teiid_rel:MATVIEW_TTL" 20000)
> AS SELECT CONVERT(c.id,integer) AS customer_id, CONVERT(SUM(o.amount),integer) AS total_amount FROM dv_matviews_customers c INNER JOIN dv_matviews_orders o ON c.id = o.customer_id GROUP BY c.id;
> {code}
> Then for some queries I get:
> {code:plain}
> 10:40:19,252 WARN [org.teiid.CONNECTOR] (Worker2_QueryProcessorQueue130) Connector worker process failed for atomic-request=+k/MyS3sUhQX.14.7.113: org.teiid.translator.jdbc.JDBCExecutionException: 259 TEIID11008:TEIID11004 Error executing statement(s): [Prepared Values: [] SQL: SELECT g_0."CUSTOMER_ID", g_0."TOTAL_AMOUNT" FROM "JSTASTNY".dvqe_X_XjdkY_YDV_MATVIEWS_MAT_VIEW AS g_0]
> at org.teiid.translator.jdbc.JDBCQueryExecution.execute(JDBCQueryExecution.java:131) [translator-jdbc-8.12.5.redhat-5.jar:8.12.5.redhat-5]
> at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:364)
> at sun.reflect.GeneratedMethodAccessor158.invoke(Unknown Source) [:1.7.0_79]
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_79]
> at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_79]
> at org.teiid.dqp.internal.datamgr.ConnectorManager$1.invoke(ConnectorManager.java:211)
> at com.sun.proxy.$Proxy80.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:262) [rt.jar:1.7.0_79]
> at org.teiid.dqp.internal.process.FutureWork.run(FutureWork.java:65)
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:276)
> 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:1145) [rt.jar:1.7.0_79]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_79]
> at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_79]
> Caused by: com.sap.db.jdbc.exceptions.JDBCDriverException: SAP DBTech JDBC: [259]: invalid table name: Could not find table/view DVQE_X_XJDKY_YDV_MATVIEWS_MAT_VIEW in schema JSTASTNY: line 1 col 62 (at pos 61)
> at com.sap.db.jdbc.exceptions.SQLExceptionSapDB.createException(SQLExceptionSapDB.java:345)
> at com.sap.db.jdbc.exceptions.SQLExceptionSapDB.generateDatabaseException(SQLExceptionSapDB.java:185)
> at com.sap.db.jdbc.packet.ReplyPacket.buildExceptionChain(ReplyPacket.java:100)
> at com.sap.db.jdbc.ConnectionSapDB.execute(ConnectionSapDB.java:1130)
> at com.sap.db.jdbc.ConnectionSapDB.execute(ConnectionSapDB.java:877)
> at com.sap.db.jdbc.CallableStatementSapDB.execute(CallableStatementSapDB.java:410)
> at com.sap.db.jdbc.CallableStatementSapDB.execute(CallableStatementSapDB.java:266)
> at com.sap.db.jdbc.CallableStatementSapDB.executeQuery(CallableStatementSapDB.java:756)
> at com.sap.db.jdbc.trace.PreparedStatement.executeQuery(PreparedStatement.java:161)
> at org.jboss.jca.adapters.jdbc.WrappedPreparedStatement.executeQuery(WrappedPreparedStatement.java:462)
> at org.teiid.translator.jdbc.JDBCQueryExecution.execute(JDBCQueryExecution.java:123) [translator-jdbc-8.12.5.redhat-5.jar:8.12.5.redhat-5]
> ... 17 more
> {code}
> From the logs it seems that the after load script has completed, but probably not in the source db. In logs just before the exception I see:
> {code:plain}
> 12:34:59,247 DEBUG [org.teiid.CONNECTOR] (Worker1_QueryProcessorQueue79) Source-specific command: RENAME TABLE dv_matviews_mat_view_temp TO dv_matviews_mat_view
> 12:34:59,663 DEBUG [org.teiid.CONNECTOR] (Worker1_QueryProcessorQueue79) ORTEkGreciAL.0.85.84 Executed command
> 12:34:59,663 DEBUG [org.teiid.CONNECTOR] (Worker1_QueryProcessorQueue79) ORTEkGreciAL.0.85.84 Processing MORE request
> 12:34:59,663 DEBUG [org.teiid.CONNECTOR] (Worker1_QueryProcessorQueue79) ORTEkGreciAL.0.85.84 Getting results from connector
> 12:34:59,663 DEBUG [org.teiid.CONNECTOR] (Worker1_QueryProcessorQueue79) ORTEkGreciAL.0.85.84 Obtained last batch, total row count: 1
> 12:34:59,663 DEBUG [org.teiid.CONNECTOR] (Worker1_QueryProcessorQueue79) ORTEkGreciAL.0.85.84 Remove State
> 12:34:59,664 DEBUG [org.teiid.CONNECTOR] (Worker1_QueryProcessorQueue79) ORTEkGreciAL.0.85.84 Processing Close : EXEC Source.native('RENAME TABLE dv_matviews_mat_view_temp TO dv_matviews_mat_view')
> {code}
> I attached the logs to this issue.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 7 months
[JBoss JIRA] (TEIID-4304) Correct handling with subquery in on clause
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-4304?page=com.atlassian.jira.plugin... ]
Steven Hawkins resolved TEIID-4304.
-----------------------------------
Resolution: Done
Added a check in determining if a join is acceptable to look at child select nodes - and to later mark them as evaluatable if needed. Also updated the oracle translator.
> Correct handling with subquery in on clause
> -------------------------------------------
>
> Key: TEIID-4304
> URL: https://issues.jboss.org/browse/TEIID-4304
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 7.7
> Reporter: Steven Hawkins
> Assignee: Steven Hawkins
> Fix For: 9.1, 9.0.1
>
>
> With the translator capability supportsSubqueryInOn false, we can still plan a query with a subquery in the on clause if non-join criteria on the inner side of a left outer join is used in the user query on clause (it is temporarily pushed out of the join and then added back in rule collapse source).
> Additionally the oracle translator should not support subquery in on for oracle 11 and earlier.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 7 months
[JBoss JIRA] (TEIID-4304) Correct handling with subquery in on clause
by Steven Hawkins (JIRA)
Steven Hawkins created TEIID-4304:
-------------------------------------
Summary: Correct handling with subquery in on clause
Key: TEIID-4304
URL: https://issues.jboss.org/browse/TEIID-4304
Project: Teiid
Issue Type: Bug
Components: Query Engine
Affects Versions: 7.7
Reporter: Steven Hawkins
Assignee: Steven Hawkins
Fix For: 9.1, 9.0.1
With the translator capability supportsSubqueryInOn false, we can still plan a query with a subquery in the on clause if non-join criteria on the inner side of a left outer join is used in the user query on clause (it is temporarily pushed out of the join and then added back in rule collapse source).
Additionally the oracle translator should not support subquery in on for oracle 11 and earlier.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 7 months
[JBoss JIRA] (TEIID-4183) MSSQL JDBC driver invalidates kerberos ticket on Connection.close()
by Ramesh Reddy (JIRA)
[ https://issues.jboss.org/browse/TEIID-4183?page=com.atlassian.jira.plugin... ]
Ramesh Reddy commented on TEIID-4183:
-------------------------------------
[1] As far as "passthough login module" is concerned, it does not force the JCA layer to make a new connection, however it does negotiates/creates a subject (which may involve conversation with the kerberos domain server) that be little slow. Now, if SQL server JDBC driver does not have a way to re-purpose the existing connection, and re-authenticate the new user, then it may be creating a new connection, there we have NO control over that behavior. But, looks like your suggestion of adding security-domain cache is preferred/recommended. I will add to the documentation.
[2] For this to go away you need add "<prefill>false</prefill>" to configuration of the data source. This flag MUST be false in every situation where pass-through is used, not specific to kerberos. if <prefill> is true, even with previous version you probably would have seen
{code}
09:37:47,325 WARN [org.jboss.jca.core.connectionmanager.pool.strategy.PoolBySubject] (JCA PoolFiller) IJ000610: Unable to fill pool: javax.resource.ResourceException: No matching credentials in Subject!
at org.jboss.jca.adapters.jdbc.BaseWrapperManagedConnectionFactory.getConnectionProperties(BaseWrapperManagedConnectionFactory.java:965)
at org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:233)
at org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreArrayListManagedConnectionPool.createConnectionEventListener(SemaphoreArrayListManagedConnectionPool.java:858) [ironjacamar-core-impl-1.0.37.Final-redhat-1.jar:1.0.37.Final-redhat-1]
at org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreArrayListManagedConnectionPool.fillToMin(SemaphoreArrayListManagedConnectionPool.java:801) [ironjacamar-core-impl-1.0.37.Final-redhat-1.jar:1.0.37.Final-redhat-1]
at org.jboss.jca.core.connectionmanager.pool.mcp.PoolFiller.run(PoolFiller.java:97) [ironjacamar-core-impl-1.0.37.Final-redhat-1.jar:1.0.37.Final-redhat-1]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_77]
{code}
The above is WARN, not an error.
But with <prefill> omitted, I did not see any exception, which leaves to believe prefill default and its effects are some where in between. But, I did find a error case during the startup, I fixed that in the code.
> if wrapping is set to false and no cache is used [3], then Teiid throws Access denied exception [4]
You mean this using the connection second time? if yes true that is behavior we expect. Even though we are pass through, it should behave as if original ticket has been invalidated, just like in static case. I expect this. BTW, this is specific to SQLServer again.
>adding cache to pass-through login module turns exception to This ticket is no longer valid exception - this means, that MSSQL driver invalidates the ticket which is expected as wrapping >is still disabled
yes, this is expected, as this is reason we were doing wrapping for sql server. We both are saying same thing :)
>now, the invalidation impact other test in my class. I did not encounter the impact before fix. I believe it is related to cache. What do you think Ramesh? Can you confirm this?
- when cache is used
* Yes, as long as you use the security domain's cache, you will see the same as previous behavior.
* When cache is used the logout method is overridden in cache (i believe) and cache keeps the subject intact to be used on future calls.
* When cache is flushed then you will see subjects gone, then calls go back through pass-through mechanism again, until then this code will not be hit, it will use the subject from the cache.
- When cache not used
* The ticket is *never* invalidated by the pass-though module, unlike top level kerberos login module, but subject's is stripped out of its ticket credential (in sql server case invalidation at driver)
* Removing of any other credentials from subject is equally will be true for any other credentials like OAuth, user/passwd scenarios too. This will occur when logout is called.
This is something, I missed before where I was not cleaning the subject on logout, I do suspect this should NOT affect any of the current test scripts IMO, but if you are seeing any variance please let me know, we will figure out the issue.
> MSSQL JDBC driver invalidates kerberos ticket on Connection.close()
> -------------------------------------------------------------------
>
> Key: TEIID-4183
> URL: https://issues.jboss.org/browse/TEIID-4183
> Project: Teiid
> Issue Type: Bug
> Affects Versions: 8.12.x, 8.7.5.6_2
> Reporter: Juraj Duráni
> Assignee: Ramesh Reddy
> Fix For: 9.1, 8.12.5
>
>
> MSSQL JDBC driver invalidate kerberos ticket on Connection.close() (related bugzilla \[1\]).
> If user creates kerberos connection, driver invalidates ticket on closing connection (Connection.close()). Therefore ticket cannot be re-used. EAP team creates a workaround for this by adding module option *wrapGSSCredential=true* with additional setting *credentialLifetime=-1* \[2, 3, 4, 5\]. This works for static kerberos authentication.
> However, passthrough authentication (org.teiid.jboss.PassthroughIdentityLoginModule) does not work, because passed ticket is not managed by EAP but by client.
> \[1\] https://bugzilla.redhat.com/show_bug.cgi?id=1097276
> \[2\] https://bugzilla.redhat.com/show_bug.cgi?id=1097276#c58
> \[3\] https://issues.jboss.org/browse/SECURITY-905
> \[4\] https://issues.jboss.org/browse/JBEAP-843
> \[5\] https://github.com/wildfly-security/jboss-negotiation/commit/0c7e06f58a79...
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 7 months
[JBoss JIRA] (TEIID-4303) Insert into temporary table fails
by Bram Gadeyne (JIRA)
[ https://issues.jboss.org/browse/TEIID-4303?page=com.atlassian.jira.plugin... ]
Bram Gadeyne commented on TEIID-4303:
-------------------------------------
Indeed the query that is executed takes a longer time to execute.
E.g. it was issued at 8:47:31,738 and the results came in at 8:53:58,811. This is indeed a gap of more then 5 minutes.
I can try and increase this value but then again other long running processes might also take longer to resolve.
> Insert into temporary table fails
> ---------------------------------
>
> Key: TEIID-4303
> URL: https://issues.jboss.org/browse/TEIID-4303
> Project: Teiid
> Issue Type: Bug
> Affects Versions: 9.0
> Reporter: Bram Gadeyne
> Assignee: Steven Hawkins
> Attachments: debugplan.txt
>
>
> When executing a insert query in a temporary table the execution fails with the following error:
> 2016-06-28 08:54:35,700 DEBUG [org.teiid.CONNECTOR] (Worker12_QueryProcessorQueue243) 3bZw8VxEr4t7 3bZw8VxEr4t7.26.4.30 Closed execution
> 2016-06-28 08:54:35,700 DEBUG [org.teiid.CONNECTOR] (Worker12_QueryProcessorQueue243) 3bZw8VxEr4t7 3bZw8VxEr4t7.26.4.30 Closed connection
> 2016-06-28 08:54:35,700 DEBUG [org.teiid.COMMAND_LOG] (Worker12_QueryProcessorQueue243) 3bZw8VxEr4t7 END SRC COMMAND: endTime=2016-06-28 08:54:35.7 requestID=3bZw8VxEr4t7.26 sourceCommandID=4 executionID=30 txID=TransactionImple < ac, BasicAction: 0:ffff7f000101:2f4a8c3a:576d4165:72fc status: ActionStatus.ABORTED > modelName=iziswh translatorName=sybase sessionID=3bZw8VxEr4t7 principal=veerle@teiid-security finalRowCount=21504 cpuTime(ns)=120503397
> 2016-06-28 08:54:35,701 INFO [org.teiid.COMMAND_LOG] (Worker12_QueryProcessorQueue243) 3bZw8VxEr4t7 ERROR USER COMMAND: endTime=2016-06-28 08:54:35.701 requestID=3bZw8VxEr4t7.26 txID=TransactionImple < ac, BasicAction: 0:ffff7f000101:2f4a8c3a:576d4165:72fc status: ActionStatus.ABORTED > sessionID=3bZw8VxEr4t7 principal=veerle@teiid-security vdbName=vdb3 vdbVersion=14 finalRowCount=null
> 2016-06-28 08:54:35,701 WARN [org.teiid.PROCESSOR] (Worker12_QueryProcessorQueue243) 3bZw8VxEr4t7 TEIID30020 Processing exception for request 3bZw8VxEr4t7.26 'TEIID30223 javax.transaction.RollbackException: ARJUNA016083: Can't register synchronization because the transaction is in aborted state'. Originally TeiidProcessingException TransactionImple.java:396. Enable more detailed logging to see the entire stacktrace.
> 2016-06-28 08:54:35,701 WARN [com.arjuna.ats.arjuna] (Worker12_QueryProcessorQueue243) 3bZw8VxEr4t7 ARJUNA012077: Abort called on already aborted atomic action 0:ffff7f000101:2f4a8c3a:576d4165:72fc
> 2016-06-28 08:54:35,702 INFO [org.teiid.COMMAND_LOG] (Worker12_QueryProcessorQueue243) 3bZw8VxEr4t7 END USER COMMAND: endTime=2016-06-28 08:54:35.702 requestID=3bZw8VxEr4t7.26 txID=null sessionID=3bZw8VxEr4t7 principal=veerle@teiid-security vdbName=vdb3 vdbVersion=14 finalRowCount=0
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 7 months