[JBoss JIRA] (TEIIDSB-127) "No registered data sources found" if used "management.server.port=8081"
by Steven Hawkins (Jira)
[ https://issues.jboss.org/browse/TEIIDSB-127?page=com.atlassian.jira.plugi... ]
Steven Hawkins commented on TEIIDSB-127:
----------------------------------------
Closed the pr to move the discussion over here. Here's what I've tried:
Order on the configuration and datasource beans - this does not work as it's for ordering in a collection. Lazy, PriorityOrder, AutoConfigurationOrder also did not work.
The ApplicationContext (shown in the pr) or an approach using AutoWire of source lists with a qualifier (to exclude the Teiid DataSource) works for as long as there's no spring data initialization. But the creation of the Teiid DataSource can happen in between the creation of the other source and when spring runs the schema creation - thus the test failure with the pr.
The only thing that seems to consistently work is an explicit depends on. In the DataSources class if we require something like:
{code}
@DependsOn("mydb", "myotherdb",...)
public Object sources() {
return new Object();
}
{code}
Then add an
{code}
@DependsOn("teiid-sources")
{code}
To our DataSource then spring can figure it all out. I'm not sure if there is a great way to turn that into a configuration property as DependsOn expects an array, not a comma separated list. An issue would probably be the handling of multiple DataSources classes.
I'll try playing around with some of the Conditional annotations, but beyond that I'm out of ideas. As long as the vdb is not importing from a source to define the metadata it is possible to work around this particular issue by adding more logic to the transaction management initialization such that it can allow more datasources to be added later - but of course that's not a general solution to this problem.
> "No registered data sources found" if used "management.server.port=8081"
> ------------------------------------------------------------------------
>
> Key: TEIIDSB-127
> URL: https://issues.jboss.org/browse/TEIIDSB-127
> Project: Teiid Spring Boot
> Issue Type: Bug
> Components: datasource
> Affects Versions: 1.2.0
> Environment: teiid-spring-boot
> Reporter: Renat Eskenin
> Assignee: Steven Hawkins
> Priority: Major
>
> When we used management.server.port=8081 and server.port=8080 in spring boot properties we get exception
> [2019-10-10 12:12:53,806 MSK] ERROR [test] org.teiid.PROCESSOR [restartedMain]: TEIID30019 Unexpected exception for request 8fPp+5AbzHhy.0
> java.lang.IllegalArgumentException: No registered data sources found
> How can we change management port for spring actuator and do not broken Teiid?
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
5 years, 4 months
[JBoss JIRA] (TEIIDSB-129) allow connection to mongodb cluster on atlas (cloud.mongodb.com)
by Steven Hawkins (Jira)
[ https://issues.jboss.org/browse/TEIIDSB-129?page=com.atlassian.jira.plugi... ]
Work on TEIIDSB-129 started by Steven Hawkins.
----------------------------------------------
> allow connection to mongodb cluster on atlas (cloud.mongodb.com)
> ----------------------------------------------------------------
>
> Key: TEIIDSB-129
> URL: https://issues.jboss.org/browse/TEIIDSB-129
> Project: Teiid Spring Boot
> Issue Type: Bug
> Components: datasource
> Reporter: Marco Ardito
> Assignee: Steven Hawkins
> Priority: Major
> Fix For: 1.3.0
>
>
> The issue is that teiid mongodb connector expects connection parameters based on the " Standard Connection String Format" instead of the "DNS Seedlist Connection Format", as defined in [https://docs.mongodb.com/manual/reference/connection-string|https://docs....]
> _
> "In addition to the standard connection format, MongoDB supports a DNS-constructed seed list. Using DNS to construct the available servers list allows more flexibility of deployment and the ability to change the servers in rotation without reconfiguring clients."_
> The following is a typical connection string for a DNS seedlist connection string:
> mongodb+srv://server.example.com/
> and:
> * a port number is not needed
> * a different prefix is used, instead of mongodb:// => mongodb+srv://
> I have a "free tier" cluster instance on cloud.mongodb,com (aka Atlas), which is limited in size and resources but should be functionally identical to a full sized paid cluster on the same platform, and it does not expire. A free tier can be activated here
> [https://www.mongodb.com/cloud/atlas#atlas-form-container|https://www.mong...]
> I tried with both the mongodb command line client and with the GUI tool Compass (https://www.mongodb.com/products/compass) which has a community edition
> and this different syntax works perfectly, while it is not supported by the current teiid connector, it seems
> there is a way to use the "old" syntax, prefixed by "mongodb:// " with server and port, to those Atlas clusters, but it is cumbersome, as it needs the user to specify more parameters, as "replicaSet" and "readPreference", at least. See https://docs.mongodb.com/manual/reference/connection-string
> With those additional settings I was able to connect with the Compass GUI tool, but not with the latest command line client (4.2), and anyway the teiid connector seems to not support those additional parameters,, I tried to add them as DS properties but always failed
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
5 years, 4 months
[JBoss JIRA] (TEIIDSB-127) "No registered data sources found" if used "management.server.port=8081"
by Steven Hawkins (Jira)
[ https://issues.jboss.org/browse/TEIIDSB-127?page=com.atlassian.jira.plugi... ]
Steven Hawkins commented on TEIIDSB-127:
----------------------------------------
> Ok, you can just add error message with explanation and ask user to order his datasource
I don't see that the order construct will work for this scenario. The two mechanisms that I've seen work are DependsOn and passing the ApplicationContext to the creation of the Teiid DataSource and get all the beans of possible source types. I'm not sold yet on either approach.
> "No registered data sources found" if used "management.server.port=8081"
> ------------------------------------------------------------------------
>
> Key: TEIIDSB-127
> URL: https://issues.jboss.org/browse/TEIIDSB-127
> Project: Teiid Spring Boot
> Issue Type: Bug
> Components: datasource
> Affects Versions: 1.2.0
> Environment: teiid-spring-boot
> Reporter: Renat Eskenin
> Assignee: Steven Hawkins
> Priority: Major
>
> When we used management.server.port=8081 and server.port=8080 in spring boot properties we get exception
> [2019-10-10 12:12:53,806 MSK] ERROR [test] org.teiid.PROCESSOR [restartedMain]: TEIID30019 Unexpected exception for request 8fPp+5AbzHhy.0
> java.lang.IllegalArgumentException: No registered data sources found
> How can we change management port for spring actuator and do not broken Teiid?
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
5 years, 4 months
[JBoss JIRA] (TEIIDSB-129) allow connection to mongodb cluster on atlas (cloud.mongodb.com)
by Steven Hawkins (Jira)
[ https://issues.jboss.org/browse/TEIIDSB-129?page=com.atlassian.jira.plugi... ]
Steven Hawkins moved TEIID-5832 to TEIIDSB-129:
-----------------------------------------------
Project: Teiid Spring Boot (was: Teiid)
Key: TEIIDSB-129 (was: TEIID-5832)
Component/s: datasource
(was: Connector API)
Affects Version/s: (was: 12.2)
Fix Version/s: 1.3.0
(was: 13.0)
(was: 12.3.1)
> allow connection to mongodb cluster on atlas (cloud.mongodb.com)
> ----------------------------------------------------------------
>
> Key: TEIIDSB-129
> URL: https://issues.jboss.org/browse/TEIIDSB-129
> Project: Teiid Spring Boot
> Issue Type: Bug
> Components: datasource
> Reporter: Marco Ardito
> Assignee: Steven Hawkins
> Priority: Major
> Fix For: 1.3.0
>
>
> The issue is that teiid mongodb connector expects connection parameters based on the " Standard Connection String Format" instead of the "DNS Seedlist Connection Format", as defined in [https://docs.mongodb.com/manual/reference/connection-string|https://docs....]
> _
> "In addition to the standard connection format, MongoDB supports a DNS-constructed seed list. Using DNS to construct the available servers list allows more flexibility of deployment and the ability to change the servers in rotation without reconfiguring clients."_
> The following is a typical connection string for a DNS seedlist connection string:
> mongodb+srv://server.example.com/
> and:
> * a port number is not needed
> * a different prefix is used, instead of mongodb:// => mongodb+srv://
> I have a "free tier" cluster instance on cloud.mongodb,com (aka Atlas), which is limited in size and resources but should be functionally identical to a full sized paid cluster on the same platform, and it does not expire. A free tier can be activated here
> [https://www.mongodb.com/cloud/atlas#atlas-form-container|https://www.mong...]
> I tried with both the mongodb command line client and with the GUI tool Compass (https://www.mongodb.com/products/compass) which has a community edition
> and this different syntax works perfectly, while it is not supported by the current teiid connector, it seems
> there is a way to use the "old" syntax, prefixed by "mongodb:// " with server and port, to those Atlas clusters, but it is cumbersome, as it needs the user to specify more parameters, as "replicaSet" and "readPreference", at least. See https://docs.mongodb.com/manual/reference/connection-string
> With those additional settings I was able to connect with the Compass GUI tool, but not with the latest command line client (4.2), and anyway the teiid connector seems to not support those additional parameters,, I tried to add them as DS properties but always failed
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
5 years, 4 months
[JBoss JIRA] (TEIID-5832) allow connection to mongodb cluster on atlas (cloud.mongodb.com)
by Steven Hawkins (Jira)
Steven Hawkins created TEIID-5832:
-------------------------------------
Summary: allow connection to mongodb cluster on atlas (cloud.mongodb.com)
Key: TEIID-5832
URL: https://issues.jboss.org/browse/TEIID-5832
Project: Teiid
Issue Type: Bug
Components: Connector API
Affects Versions: 12.2
Reporter: Marco Ardito
Assignee: Steven Hawkins
Fix For: 13.0, 12.3.1
The issue is that teiid mongodb connector expects connection parameters based on the " Standard Connection String Format" instead of the "DNS Seedlist Connection Format", as defined in [https://docs.mongodb.com/manual/reference/connection-string|https://docs....]
_
"In addition to the standard connection format, MongoDB supports a DNS-constructed seed list. Using DNS to construct the available servers list allows more flexibility of deployment and the ability to change the servers in rotation without reconfiguring clients."_
The following is a typical connection string for a DNS seedlist connection string:
mongodb+srv://server.example.com/
and:
* a port number is not needed
* a different prefix is used, instead of mongodb:// => mongodb+srv://
I have a "free tier" cluster instance on cloud.mongodb,com (aka Atlas), which is limited in size and resources but should be functionally identical to a full sized paid cluster on the same platform, and it does not expire. A free tier can be activated here
[https://www.mongodb.com/cloud/atlas#atlas-form-container|https://www.mong...]
I tried with both the mongodb command line client and with the GUI tool Compass (https://www.mongodb.com/products/compass) which has a community edition
and this different syntax works perfectly, while it is not supported by the current teiid connector, it seems
there is a way to use the "old" syntax, prefixed by "mongodb:// " with server and port, to those Atlas clusters, but it is cumbersome, as it needs the user to specify more parameters, as "replicaSet" and "readPreference", at least. See https://docs.mongodb.com/manual/reference/connection-string
With those additional settings I was able to connect with the Compass GUI tool, but not with the latest command line client (4.2), and anyway the teiid connector seems to not support those additional parameters,, I tried to add them as DS properties but always failed
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
5 years, 4 months