Open sabbyanandan opened 5 years ago
@rachitbahlpenske: This is specific to SCDF's CF-server, so I will move it and respond from the other repo.
Hi, @rachitbahlpenske. According to the caused-by, you're maybe supplying wrong credentials.
java.sql.SQLInvalidAuthorizationSpecException: Access denied for user 'pskestgscdf'@'10.50.33.10' (using password: YES)
Were you able to successfully use the same creds on a different App from within this PCF environment?
If yes, please share the manifest.yml
, so we can review the configurations for correctness. Of course, also, mask any sensitive credentials before posting it here.
Sabby : thanks for moving the issue to the correct bucket. The same configuration was working with SCDF v1.4.0 and problem started with v 1.5.0 onward. I found a related issue on Stackoverflow.
I have double checked the mysql credentials and they seem to be correct. The same credentials work with SCDF V.1.4.0. Please find the manifest file below
applications:
- name: dataflow-server-stg
memory: 1g
disk_quota: 2g
path: spring-cloud-dataflow-server-cloudfoundry-1.6.2.RELEASE.jar
buildpack: java_buildpack
services:
- mysql
- rabbit
env:
SPRING_CLOUD_DEPLOYER_CLOUDFOUNDRY_URL: https://api.system.pre.ptlapps.com
SPRING_CLOUD_DEPLOYER_CLOUDFOUNDRY_ORG: SCDF-staging
SPRING_CLOUD_DEPLOYER_CLOUDFOUNDRY_SPACE: scdf-stg-space
SPRING_CLOUD_DEPLOYER_CLOUDFOUNDRY_DOMAIN: local.pre.ptlapps.com
SPRING_CLOUD_DEPLOYER_CLOUDFOUNDRY_STREAM_SERVICES: rabbit
STREAM_SPRING_CLOUD_STREAM_OVERRIDECLOUDCONNECTORS: true
SPRING_CLOUD_DEPLOYER_CLOUDFOUNDRY_USERNAME: *****
SPRING_CLOUD_DEPLOYER_CLOUDFOUNDRY_PASSWORD: ******
SPRING_CLOUD_DEPLOYER_CLOUDFOUNDRY_SKIP_SSL_VALIDATION: true
MAVEN_REMOTE_REPOSITORIES_REPO1_URL: https://repo.spring.io/libs-snapshot
Thanks! Could you also describe how you're creating the external service? Also, if you still have the 1.4 server and running; it'd be good to review the cf env dataflow-server-stg
output for both 1.4 and 1.6 servers.
I guess there could be something different with Spring Cloud Connectors and the way how it parses the VCAP_SERVICES
, so it'd be good to compare the output from your environment.
The below output is from 1.6
Getting env variables for app dataflow-server-stg in org SCDF-staging / space scdf-stg-space as diteam...
OK
System-Provided:
{
"VCAP_SERVICES": {
"user-provided": [
{
"credentials": {
"driverClassName": "org.mariadb.jdbc.MySQLDataSource",
"uri": "mysql://username:password@host3306/scdf"
},
"label": "user-provided",
"name": "mysql",
"syslog_drain_url": "",
"tags": [],
"volume_mounts": []
},
{
"credentials": {
"hostname": "host",
"password": "password",
"ssl": "true",
"username": "username",
"vhost": "/"
},
"label": "user-provided",
"name": "rabbit",
"syslog_drain_url": "",
"tags": [],
"volume_mounts": []
}
]
}
}
{
"VCAP_APPLICATION": {
"application_id": "31db61cb-879f-430e-b00c-8258776fb552",
"application_name": "dataflow-server-stg",
"application_uris": [
"dataflow-server-stg.pre.ptlapps.com"
],
"application_version": "bac03d47-ea83-4bc2-85cf-dbb8f92c3c5b",
"cf_api": "https://api.system.pre.ptlapps.com",
"limits": {
"disk": 2048,
"fds": 16384,
"mem": 2048
},
"name": "dataflow-server-stg",
"space_id": "310bc642-a962-4260-960a-5adb7e768e73",
"space_name": "scdf-stg-space",
"uris": [
"dataflow-server-stg.pre.ptlapps.com"
],
"users": null,
"version": "bac03d47-ea83-4bc2-85cf-dbb8f92c3c5b"
}
}
User-Provided:
MAVEN_REMOTE_REPOSITORIES_REPO1_URL: https://repo.spring.io/libs-snapshot
SPRING_CLOUD_DEPLOYER_CLOUDFOUNDRY_DOMAIN: local.pre.ptlapps.com
SPRING_CLOUD_DEPLOYER_CLOUDFOUNDRY_ORG: SCDF-staging
SPRING_CLOUD_DEPLOYER_CLOUDFOUNDRY_PASSWORD: password
SPRING_CLOUD_DEPLOYER_CLOUDFOUNDRY_SKIP_SSL_VALIDATION: true
SPRING_CLOUD_DEPLOYER_CLOUDFOUNDRY_SPACE: scdf-stg-space
SPRING_CLOUD_DEPLOYER_CLOUDFOUNDRY_STREAM_SERVICES: rabbit
SPRING_CLOUD_DEPLOYER_CLOUDFOUNDRY_URL: https://api.system.pre.ptlapps.com
SPRING_CLOUD_DEPLOYER_CLOUDFOUNDRY_USERNAME: username
STREAM_SPRING_CLOUD_STREAM_OVERRIDECLOUDCONNECTORS: true
No running env variables have been set
No staging env variables have been set
The below output is from 1.4
Getting env variables for app dataflow-server-stg in org SCDF-staging / space scdf-stg-space as diteam...
OK
System-Provided:
{
"VCAP_SERVICES": {
"user-provided": [
{
"credentials": {
"hostname": "host",
"password": "password",
"ssl": "true",
"username": "username",
"vhost": "/"
},
"label": "user-provided",
"name": "rabbit",
"syslog_drain_url": "",
"tags": [],
"volume_mounts": []
},
{
"credentials": {
"driverClassName": "org.mariadb.jdbc.MySQLDataSource",
"uri": "mysql://username:password@host3306/scdf"
},
"label": "user-provided",
"name": "mysql",
"syslog_drain_url": "",
"tags": [],
"volume_mounts": []
}
]
}
}
{
"VCAP_APPLICATION": {
"application_id": "0baf835b-1c84-4ea1-b30f-8361e17fc0fa",
"application_name": "dataflow-server-stg",
"application_uris": [
"dataflow-server-stg.pre.ptlapps.com"
],
"application_version": "6c9d8c5f-3a40-414f-b8bd-d74daaa0d981",
"cf_api": "https://api.system.pre.ptlapps.com",
"limits": {
"disk": 2048,
"fds": 16384,
"mem": 1024
},
"name": "dataflow-server-stg",
"space_id": "310bc642-a962-4260-960a-5adb7e768e73",
"space_name": "scdf-stg-space",
"uris": [
"dataflow-server-stg.pre.ptlapps.com"
],
"users": null,
"version": "6c9d8c5f-3a40-414f-b8bd-d74daaa0d981"
}
}
There isn't any difference, so that's good.
Can you confirm the version of MySQL? As discussed in StackOverflow, from 1.5 and onwards, we switched to Hikari for the connection pool management. There could be a conflict with the version of MySQL and the driver that we use. Knowing the version could help narrow it down.
We are using mysql version 5.6.10 with Amazon RDS
https://aws.amazon.com/rds/aurora/details/ https://dev.mysql.com/doc/refman/5.6/en/
@sabbyanandan : Do you have all the information on this issue ? Please help us out to resolve . I have tried many different configuration setting and nothing seems to work.
Hi, @rachitbahlpenske. Thanks for the details. Yes, we do have all the info we need. At the moment, we are trying to find/build an environment to repeat this using the Amazon RDS service. We will update with findings once we learn more about it.
thanks.
@sabbyanandan I read a lot of source code/Blogs and was able to resolve this issue using the jdbcUrl. Looks like When using setUsername with a jdbcUrl, it will be translated into a "user" property, rather than "username" . Also noticed that password is not getting passed while using the uri format. The below config worked for me- jdbcUrl:jdbc:mysql://host:3306/scdf?user=username&password=password
Is this the configuration for the user defined service?
yes this configuration is for the mysql service.
From @rachitbahlpenske on October 5, 2018 18:52
I am trying to deploy SCDF V1.6.2 to PCF with mysql as an external user defined service. I have the below configuration and keep on getting the below error.
Mysql service config-
mysql://usernane:password@host:3306/scdf
Copied from original issue: spring-cloud/spring-cloud-dataflow#2475