Comments (9)
@infinitydon Can you try explicitly setting the resolution
type to DNS
in your Service Entries?
cat <<EOF | istioctl create -f -
apiVersion: networking.istio.io/v1alpha3
kind: ServiceEntry
metadata:
name: httpbin-ext
spec:
hosts:
- httpbin.org
ports:
- number: 80
name: http
protocol: HTTP
resolution: DNS
EOF
cat <<EOF | istioctl create -f -
apiVersion: networking.istio.io/v1alpha3
kind: ServiceEntry
metadata:
name: google-ext
spec:
hosts:
- www.google.com
ports:
- number: 443
name: https
protocol: HTTPS
resolution: DNS
EOF
from old_issues_repo.
@GregHanson -- Thanks, it works now..
How do I know when to use the resolution:DNS ?
Because I followed the example exactly in the docs
from old_issues_repo.
It works for me without resoulution: DNS
, with istio-demo.yaml
. Strange.
from old_issues_repo.
It's possible that there is a bug in the default resolution type NONE
or how we are generating the envoy config in this case. In this case resolution type DNS
just tells envoy to direct traffic to the host in hosts
from old_issues_repo.
Cool.. the other thing that comes to my mind is that am running this on AWS and I really doubt if this should affect the deployment..
Thanks for the effort!.. Will go ahead and close this.
from old_issues_repo.
Hi,
I am trying to connect to AWS RDS from istio environment.
Our application is JAVA Application.
My mysql ServiceEntry file is as follows:
apiVersion: networking.istio.io/v1alpha3
kind: ServiceEntry
metadata:
name: mysql-external
spec:
hosts:
- xxxxxxxxxxxxxxxxxxx.rds.amazonaws.com
addresses:
- XX.XX.XX.XX/32
ports:
- name: jdbc
number: 3306
protocol: tcp
location: MESH_EXTERNAL
We are using the config file in application as follows:
...
....
sql_db_conn_url : "jdbc:mysql://rds_endpoint/inventory_management?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=UTC&failOverReadOnly=false&maxReconnects=10&rewriteBatchedStatements=true"
-- | --
sql_db_user : "username"
sql_db_passwd : "password"
...
.....
I have created a service using a Service file as below:
apiVersion: v1
kind: Service
metadata:
name: abc
labels:
app: abc
spec:
ports:
- port: 8080
name: http
selector:
app: abc
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: abc
spec:
replicas: 1
template:
metadata:
labels:
app: abc
version: v1
spec:
containers:
- name: abc
image: 5550XXXXXXXXXXXXXXXXXXXXXXXXxx/test:mysql
imagePullPolicy: IfNotPresent
env:
- name: DB_TYPE
value: "mysql"
- name: MYSQL_DB_HOST
value: xxxxxxxxxxxxxxxxxxx.rds.amazonaws.com
- name: MYSQL_DB_PORT
value: 3306
- name: MYSQL_DB_USER
value: user
- name: MYSQL_DB_PASSWORD
value: password
ports:
- containerPort: 8080
When I try to connect to database getting the below error:
{"@timestamp":"2018-10-15T11:04:25.381+0000","@message":"com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask@3f24bdc4 -- Acquisition Attempt Failed!!! Clearing pending acquires. While trying to acquire a needed new resource, we failed to succeed more than the maximum number of allowed acquisition attempts (30). Last acquisition attempt exception: ","@source":"com.mchange.v2.resourcepool.BasicResourcePool","@source_host":"pqinventory-v1-795965f574-h9lnc","@fields":{"timestamp":1539601465381,"level":"WARNING","line_number":315,"class":"com.mchange.v2.resourcepool.BasicResourcePool","method":"","exception_class":"java.sql.SQLException","exception_message":"No suitable driver","stacktrace":"java.sql.SQLException: No suitable driver\n\tat java.sql.DriverManager.getDriver(DriverManager.java:315)\n\tat com.mchange.v2.c3p0.DriverManagerDataSource.driver(DriverManagerDataSource.java:285)\n\tat com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:175)\n\tat com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:220)\n\tat com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:206)\n\tat com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:203)\n\tat com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1138)\n\tat com.mchange.v2.resourcepool.BasicResourcePool.doAcquireAndDecrementPendingAcquiresWithinLockOnSuccess(BasicResourcePool.java:1125)\n\tat com.mchange.v2.resourcepool.BasicResourcePool.access$700(BasicResourcePool.java:44)\n\tat com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask.run(BasicResourcePool.java:1870)\n\tat com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:696)\n"}
Please let me know how to resolve the RDS and how to connect to RDS
from old_issues_repo.
Can you try to call the port something like tcp-jdbc
?
from old_issues_repo.
Thanks for the quick response Sir.
I have changed like this:
ports:
- name: tcp-jdbc
number: 3306
protocol: tcp
even then I am ending up with the error. Sir.
from old_issues_repo.
Here is an example of connecting to external MySQL instance https://preliminary.istio.io/blog/2018/egress-tcp/ .
Can you try to connect by using mysql command line or telnet?
from old_issues_repo.
Related Issues (20)
- [BUG] Bookinfo tracing broken HOT 2
- BUG: Mirroring not working in Istio 0.8.0? HOT 2
- Istio 0.8.0 exposes Jaeger tracing page to the external world
- When multiple gateways are defined, only the first one is being used. HOT 5
- kubernetesenv adapter clusterDomain check HOT 1
- Istio sidecar-injector not ready after deploying istio release-0.8
- External services connectivity problem HOT 5
- How get client external ip to extrapolate geolocation HOT 2
- Deploying with rbac disabled causes pilot to never deploy HOT 1
- .0.8 latest can't pull the docker image HOT 21
- make tracing endpoint configuration straightforward HOT 2
- Traffic Management: ALL https requests work (even without a ServiceEntry) HOT 7
- High latency at scale HOT 1
- istio-pilot pod restart 60 times in nine days HOT 1
- Requests hang in fresh helm install on k8s v1.10.2-gke.3 HOT 5
- EgressRule not working for AMQP (RabbitMQ) HOT 4
- Unable to access the grafana dashboard. HOT 2
- Error: customresourcedefinitions.apiextensions.k8s.io "gateways.networking.istio.io" already exists HOT 1
- istio circuit breaker doesn't work HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from old_issues_repo.