cloudfoundry / cf-mysql-release

Cloud Foundry MySQL Release
Apache License 2.0
58 stars 106 forks source link

Unable to connect to mysql instance. #164

Closed StBurcher closed 7 years ago

StBurcher commented 7 years ago

Hi,

My environment is CF 257 with Diego 1,14.1 and CF-Mysql 34. I'm facing the problem to start an application with a bind mysql service. The application is Spring-Music. This application works without a bind service. I can create a service (cf create-service p-mysql 100mb mysql) and bind it.

C:\>cf services
Getting services in org cloudlab / space training as admin...
OK

name    service         plan           bound apps     last operation
mysql   p-mysql         100mb          spring-music   create succeeded

But, Restaging the application fails.


C:\Developement\Workspace\training\07_services\071_marketplace>cf logs spring-music --recent
Retrieving logs for app spring-music in org cloudlab / space training as admin...

2017-05-23T10:08:43.56+0200 [APP/PROC/WEB/0] OUT 2017-05-23 08:08:43.569  INFO 12 --- [           main] o.hibernate.annotations.common.Version   : HCANN000001:
Hibernate Commons Annotations {4.0.5.Final}
2017-05-23T10:08:44.64+0200 [APP/PROC/WEB/0] OUT 2017-05-23 08:08:44.649  WARN 12 --- [           main] o.h.e.jdbc.internal.JdbcServicesImpl     : HHH000342: Co
uld not obtain connection to query metadata : Communications link failure
2017-05-23T10:08:44.65+0200 [APP/PROC/WEB/0] OUT The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets
 from the server.
2017-05-23T10:08:44.65+0200 [APP/PROC/WEB/0] OUT 2017-05-23 08:08:44.652  WARN 12 --- [           main] ationConfigEmbeddedWebApplicationContext : Exception enc
ountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ent
ityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaAutoConfiguration.class]: Invocation of init metho
d failed; nested exception is org.hibernate.HibernateException: Access to DialectResolutionInfo cannot be null when 'hibernate.dialect' not set
2017-05-23T10:08:44.66+0200 [APP/PROC/WEB/0] OUT 2017-05-23 08:08:44.666  INFO 12 --- [           main] o.apache.catalina.core.StandardService   : Stopping serv
ice Tomcat
2017-05-23T10:08:44.68+0200 [APP/PROC/WEB/0] OUT 2017-05-23 08:08:44.687 ERROR 12 --- [           main] o.s.boot.SpringApplication               : Application s
tartup failed
2017-05-23T10:08:44.68+0200 [APP/PROC/WEB/0] OUT org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' d
efined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaAutoConfiguration.class]: Invocation of init method failed; nested exc
eption is org.hibernate.HibernateException: Access to DialectResolutionInfo cannot be null when 'hibernate.dialect' not set
2017-05-23T10:08:44.68+0200 [APP/PROC/WEB/0] OUT        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractA
utowireCapableBeanFactory.java:1578) ~[spring-beans-4.2.6.RELEASE.jar!/:4.2.6.RELEASE]
2017-05-23T10:08:44.68+0200 [APP/PROC/WEB/0] OUT        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAut
owireCapableBeanFactory.java:545) ~[spring-beans-4.2.6.RELEASE.jar!/:4.2.6.RELEASE]
2017-05-23T10:08:44.68+0200 [APP/PROC/WEB/0] OUT        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutow
ireCapableBeanFactory.java:482) ~[spring-beans-4.2.6.RELEASE.jar!/:4.2.6.RELEASE]
2017-05-23T10:08:44.68+0200 [APP/PROC/WEB/0] OUT        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:30
6) ~[spring-beans-4.2.6.RELEASE.jar!/:4.2.6.RELEASE]
2017-05-23T10:08:44.68+0200 [APP/PROC/WEB/0] OUT        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonB
eanRegistry.java:230) ~[spring-beans-4.2.6.RELEASE.jar!/:4.2.6.RELEASE]
2017-05-23T10:08:44.68+0200 [APP/PROC/WEB/0] OUT        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
 ~[spring-beans-4.2.6.RELEASE.jar!/:4.2.6.RELEASE]
2017-05-23T10:08:44.68+0200 [APP/PROC/WEB/0] OUT        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) ~
[spring-beans-4.2.6.RELEASE.jar!/:4.2.6.RELEASE]
2017-05-23T10:08:44.68+0200 [APP/PROC/WEB/0] OUT        at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.jav
a:1054) ~[spring-context-4.2.6.RELEASE.jar!/:4.2.6.RELEASE]
2017-05-23T10:08:44.68+0200 [APP/PROC/WEB/0] OUT        at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(Abstra
ctApplicationContext.java:829) ~[spring-context-4.2.6.RELEASE.jar!/:4.2.6.RELEASE]
2017-05-23T10:08:44.68+0200 [APP/PROC/WEB/0] OUT        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.jav
a:538) ~[spring-context-4.2.6.RELEASE.jar!/:4.2.6.RELEASE]
2017-05-23T10:08:44.68+0200 [APP/PROC/WEB/0] OUT        at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicatio
nContext.java:118) ~[spring-boot-1.3.5.RELEASE.jar!/:1.3.5.RELEASE]
2017-05-23T10:08:44.68+0200 [APP/PROC/WEB/0] OUT        at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:766) ~[spring-boot-1.3.5.RE
LEASE.jar!/:1.3.5.RELEASE]
2017-05-23T10:08:44.68+0200 [APP/PROC/WEB/0] OUT        at org.springframework.boot.SpringApplication.createAndRefreshContext(SpringApplication.java:361) ~[spri
ng-boot-1.3.5.RELEASE.jar!/:1.3.5.RELEASE]
2017-05-23T10:08:44.68+0200 [APP/PROC/WEB/0] OUT        at org.springframework.boot.SpringApplication.run(SpringApplication.java:307) ~[spring-boot-1.3.5.RELEAS
E.jar!/:1.3.5.RELEASE]
2017-05-23T10:08:44.68+0200 [APP/PROC/WEB/0] OUT        at org.cloudfoundry.samples.music.Application.main(Application.java:15) [app/:na]
2017-05-23T10:08:44.68+0200 [APP/PROC/WEB/0] OUT        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_101]
2017-05-23T10:08:44.68+0200 [APP/PROC/WEB/0] OUT        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_101]
2017-05-23T10:08:44.68+0200 [APP/PROC/WEB/0] OUT        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_101]

2017-05-23T10:08:44.68+0200 [APP/PROC/WEB/0] OUT        at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_101]
2017-05-23T10:08:44.68+0200 [APP/PROC/WEB/0] OUT        at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:54) [app/:na]
2017-05-23T10:08:44.68+0200 [APP/PROC/WEB/0] OUT        at java.lang.Thread.run(Thread.java:745) [na:1.8.0_101]
2017-05-23T10:08:44.68+0200 [APP/PROC/WEB/0] OUT Caused by: org.hibernate.HibernateException: Access to DialectResolutionInfo cannot be null when 'hibernate.dia
lect' not set
2017-05-23T10:08:44.68+0200 [APP/PROC/WEB/0] OUT        at org.hibernate.engine.jdbc.dialect.internal.DialectFactoryImpl.determineDialect(DialectFactoryImpl.jav
a:104) ~[hibernate-core-4.3.11.Final.jar!/:4.3.11.Final]
2017-05-23T10:08:44.68+0200 [APP/PROC/WEB/0] OUT        at org.hibernate.engine.jdbc.dialect.internal.DialectFactoryImpl.buildDialect(DialectFactoryImpl.java:71
) ~[hibernate-core-4.3.11.Final.jar!/:4.3.11.Final]
2017-05-23T10:08:44.68+0200 [APP/PROC/WEB/0] OUT        at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcServicesImpl.java:205) ~[hibernate-
core-4.3.11.Final.jar!/:4.3.11.Final]
2017-05-23T10:08:44.68+0200 [APP/PROC/WEB/0] OUT        at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegi
stryImpl.java:111) ~[hibernate-core-4.3.11.Final.jar!/:4.3.11.Final]
2017-05-23T10:08:44.68+0200 [APP/PROC/WEB/0] OUT        at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryI
mpl.java:234) ~[hibernate-core-4.3.11.Final.jar!/:4.3.11.Final]
2017-05-23T10:08:44.68+0200 [APP/PROC/WEB/0] OUT        at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.jav
a:206) ~[hibernate-core-4.3.11.Final.jar!/:4.3.11.Final]
2017-05-23T10:08:44.68+0200 [APP/PROC/WEB/0] OUT        at org.hibernate.cfg.Configuration.buildTypeRegistrations(Configuration.java:1887) ~[hibernate-core-4.3.
11.Final.jar!/:4.3.11.Final]
2017-05-23T10:08:44.69+0200 [APP/PROC/WEB/0] OUT        at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1845) ~[hibernate-core-4.3.11.
Final.jar!/:4.3.11.Final]
2017-05-23T10:08:44.69+0200 [APP/PROC/WEB/0] OUT        at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilder
Impl.java:857) ~[hibernate-entitymanager-4.3.11.Final.jar!/:4.3.11.Final]
2017-05-23T10:08:44.69+0200 [APP/PROC/WEB/0] OUT        at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilder
Impl.java:850) ~[hibernate-entitymanager-4.3.11.Final.jar!/:4.3.11.Final]
2017-05-23T10:08:44.69+0200 [APP/PROC/WEB/0] OUT        at org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl.withTccl(ClassLoaderServiceI
mpl.java:425) ~[hibernate-core-4.3.11.Final.jar!/:4.3.11.Final]
2017-05-23T10:08:44.69+0200 [APP/PROC/WEB/0] OUT        at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl
.java:849) ~[hibernate-entitymanager-4.3.11.Final.jar!/:4.3.11.Final]
2017-05-23T10:08:44.69+0200 [APP/PROC/WEB/0] OUT        at org.springframework.orm.jpa.vendor.SpringHibernateJpaPersistenceProvider.createContainerEntityManager
Factory(SpringHibernateJpaPersistenceProvider.java:60) ~[spring-orm-4.2.6.RELEASE.jar!/:4.2.6.RELEASE]
2017-05-23T10:08:44.69+0200 [APP/PROC/WEB/0] OUT        at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(L
ocalContainerEntityManagerFactoryBean.java:343) ~[spring-orm-4.2.6.RELEASE.jar!/:4.2.6.RELEASE]
2017-05-23T10:08:44.69+0200 [APP/PROC/WEB/0] OUT        at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManager
FactoryBean.java:319) ~[spring-orm-4.2.6.RELEASE.jar!/:4.2.6.RELEASE]
2017-05-23T10:08:44.69+0200 [APP/PROC/WEB/0] OUT        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(Abstra
ctAutowireCapableBeanFactory.java:1637) ~[spring-beans-4.2.6.RELEASE.jar!/:4.2.6.RELEASE]
2017-05-23T10:08:44.69+0200 [APP/PROC/WEB/0] OUT        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractA
utowireCapableBeanFactory.java:1574) ~[spring-beans-4.2.6.RELEASE.jar!/:4.2.6.RELEASE]
2017-05-23T10:08:44.69+0200 [APP/PROC/WEB/0] OUT        ... 20 common frames omitted
2017-05-23T10:08:44.69+0200 [APP/PROC/WEB/0] ERR Exception in thread "main" java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
2017-05-23T10:08:44.69+0200 [APP/PROC/WEB/0] ERR        at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:62)
2017-05-23T10:08:44.69+0200 [APP/PROC/WEB/0] ERR        at java.lang.Thread.run(Thread.java:745)
2017-05-23T10:08:44.69+0200 [APP/PROC/WEB/0] ERR Caused by: java.lang.reflect.InvocationTargetException
2017-05-23T10:08:44.69+0200 [APP/PROC/WEB/0] ERR        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2017-05-23T10:08:44.69+0200 [APP/PROC/WEB/0] ERR        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
2017-05-23T10:08:44.69+0200 [APP/PROC/WEB/0] ERR        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
2017-05-23T10:08:44.69+0200 [APP/PROC/WEB/0] ERR        at java.lang.reflect.Method.invoke(Method.java:498)
2017-05-23T10:08:44.69+0200 [APP/PROC/WEB/0] ERR        at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:54)
2017-05-23T10:08:44.69+0200 [APP/PROC/WEB/0] ERR        ... 1 more
2017-05-23T10:08:44.69+0200 [APP/PROC/WEB/0] ERR Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManage
rFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaAutoConfiguration.class]: Invocation of init method failed;
 nested exception is org.hibernate.HibernateException: Access to DialectResolutionInfo cannot be null when 'hibernate.dialect' not set
2017-05-23T10:08:44.69+0200 [APP/PROC/WEB/0] ERR        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractA
utowireCapableBeanFactory.java:1578)
2017-05-23T10:08:44.69+0200 [APP/PROC/WEB/0] ERR        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAut
owireCapableBeanFactory.java:545)
2017-05-23T10:08:44.69+0200 [APP/PROC/WEB/0] ERR        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutow
ireCapableBeanFactory.java:482)
2017-05-23T10:08:44.69+0200 [APP/PROC/WEB/0] ERR        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:30
6)
2017-05-23T10:08:44.69+0200 [APP/PROC/WEB/0] ERR        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonB
eanRegistry.java:230)
2017-05-23T10:08:44.69+0200 [APP/PROC/WEB/0] ERR        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)

2017-05-23T10:08:44.69+0200 [APP/PROC/WEB/0] ERR        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
2017-05-23T10:08:44.69+0200 [APP/PROC/WEB/0] ERR        at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.jav
a:1054)
2017-05-23T10:08:44.69+0200 [APP/PROC/WEB/0] ERR        at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(Abstra
ctApplicationContext.java:829)
2017-05-23T10:08:44.69+0200 [APP/PROC/WEB/0] ERR        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.jav
a:538)
2017-05-23T10:08:44.69+0200 [APP/PROC/WEB/0] ERR        at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicatio
nContext.java:118)
2017-05-23T10:08:44.69+0200 [APP/PROC/WEB/0] ERR        at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:766)
2017-05-23T10:08:44.69+0200 [APP/PROC/WEB/0] ERR        at org.springframework.boot.SpringApplication.createAndRefreshContext(SpringApplication.java:361)
2017-05-23T10:08:44.69+0200 [APP/PROC/WEB/0] ERR        at org.springframework.boot.SpringApplication.run(SpringApplication.java:307)
2017-05-23T10:08:44.69+0200 [APP/PROC/WEB/0] ERR        at org.cloudfoundry.samples.music.Application.main(Application.java:15)
2017-05-23T10:08:44.69+0200 [APP/PROC/WEB/0] ERR        ... 6 more
2017-05-23T10:08:44.70+0200 [APP/PROC/WEB/0] OUT 2017-05-23 08:08:44.696  INFO 12 --- [           main] .b.l.ClasspathLoggingApplicationListener : Application f
ailed to start with classpath: [file:/home/vcap/app/, jar:file:/home/vcap/app/lib/hibernate-jpa-2.1-api-1.0.0.Final.jar!/, jar:file:/home/vcap/app/lib/simplecli
ent_common-0.0.18.jar!/, jar:file:/home/vcap/app/lib/xml-apis-1.0.b2.jar!/, jar:file:/home/vcap/app/lib/tomcat-jdbc-8.0.33.jar!/, jar:file:/home/vcap/app/lib/hi
bernate-core-4.3.11.Final.jar!/, jar:file:/home/vcap/app/lib/spring-boot-starter-redis-1.3.5.RELEASE.jar!/, jar:file:/home/vcap/app/lib/spring-webmvc-4.2.6.RELE
ASE.jar!/, jar:file:/home/vcap/app/lib/spring-cloud-core-1.2.2.RELEASE.jar!/, jar:file:/home/vcap/app/lib/tomcat-juli-8.0.33.jar!/, jar:file:/home/vcap/app/lib/
aopalliance-1.0.jar!/, jar:file:/home/vcap/app/lib/jquery-2.1.0-2.jar!/, jar:file:/home/vcap/app/lib/tomcat-embed-logging-juli-8.0.33.jar!/, jar:file:/home/vcap
/app/lib/simpleclient-0.0.18.jar!/, jar:file:/home/vcap/app/lib/spring-beans-4.2.6.RELEASE.jar!/, jar:file:/home/vcap/app/lib/mongo-java-driver-2.13.3.jar!/, ja
r:file:/home/vcap/app/lib/spring-expression-4.2.6.RELEASE.jar!/, jar:file:/home/vcap/app/lib/aspectjweaver-1.8.9.jar!/, jar:file:/home/vcap/app/lib/mysql-connec
tor-java-5.1.38.jar!/, jar:file:/home/vcap/app/lib/spring-aspects-4.2.6.RELEASE.jar!/, jar:file:/home/vcap/app/lib/spring-boot-1.3.5.RELEASE.jar!/, jar:file:/ho
me/vcap/app/lib/jackson-annotations-2.6.6.jar!/, jar:file:/home/vcap/app/lib/snakeyaml-1.16.jar!/, jar:file:/home/vcap/app/lib/spring-boot-autoconfigure-1.3.5.R
ELEASE.jar!/, jar:file:/home/vcap/app/lib/slf4j-api-1.7.21.jar!/, jar:file:/home/vcap/app/lib/spring-context-support-4.2.6.RELEASE.jar!/, jar:file:/home/vcap/ap
p/lib/spring-boot-starter-jdbc-1.3.5.RELEASE.jar!/, jar:file:/home/vcap/app/lib/spring-data-commons-1.11.4.RELEASE.jar!/, jar:file:/home/vcap/app/lib/spring-cor
e-4.2.6.RELEASE.jar!/, jar:file:/home/vcap/app/lib/spring-boot-starter-actuator-1.3.5.RELEASE.jar!/, jar:file:/home/vcap/app/lib/spring_auto_reconfiguration-1.1
0.0_RELEASE.jar!/, jar:file:/home/vcap/app/lib/spring-boot-starter-tomcat-1.3.5.RELEASE.jar!/, jar:file:/home/vcap/app/lib/angularjs-1.2.16.jar!/, jar:file:/hom
e/vcap/app/lib/jackson-core-2.6.6.jar!/, jar:file:/home/vcap/app/lib/spring-cloud-spring-service-connector-1.2.2.RELEASE.jar!/, jar:file:/home/vcap/app/lib/simp
leclient_hotspot-0.0.18.jar!/, jar:file:/home/vcap/app/lib/spring-orm-4.2.6.RELEASE.jar!/, jar:file:/home/vcap/app/lib/simpleclient_servlet-0.0.18.jar!/, jar:fi
le:/home/vcap/app/lib/hibernate-entitymanager-4.3.11.Final.jar!/, jar:file:/home/vcap/app/lib/jackson-databind-2.6.6.jar!/, jar:file:/home/vcap/app/lib/spring-b
oot-starter-web-1.3.5.RELEASE.jar!/, jar:file:/home/vcap/app/lib/spring-web-4.2.6.RELEASE.jar!/, jar:file:/home/vcap/app/lib/commons-dbcp-1.4.jar!/, jar:file:/h
ome/vcap/app/lib/tomcat-embed-el-8.0.33.jar!/, jar:file:/home/vcap/app/lib/dom4j-1.6.1.jar!/, jar:file:/home/vcap/app/lib/jboss-logging-3.3.0.Final.jar!/, jar:f
ile:/home/vcap/app/lib/jcl-over-slf4j-1.7.21.jar!/, jar:file:/home/vcap/app/lib/validation-api-1.1.0.Final.jar!/, jar:file:/home/vcap/app/lib/hibernate-validato
r-5.2.4.Final.jar!/, jar:file:/home/vcap/app/lib/spring-tx-4.2.6.RELEASE.jar!/, jar:file:/home/vcap/app/lib/spring-boot-starter-data-jpa-1.3.5.RELEASE.jar!/, ja
r:file:/home/vcap/app/lib/angular-ui-bootstrap-0.10.0-1.jar!/, jar:file:/home/vcap/app/lib/commons-pool-1.6.jar!/, jar:file:/home/vcap/app/lib/spring-boot-start
er-data-mongodb-1.3.5.RELEASE.jar!/, jar:file:/home/vcap/app/lib/jandex-1.1.0.Final.jar!/, jar:file:/home/vcap/app/lib/logback-core-1.1.7.jar!/, jar:file:/home/
vcap/app/lib/spring-context-4.2.6.RELEASE.jar!/, jar:file:/home/vcap/app/lib/log4j-over-slf4j-1.7.21.jar!/, jar:file:/home/vcap/app/lib/h2-1.4.191.jar!/, jar:fi
le:/home/vcap/app/lib/spring-oxm-4.2.6.RELEASE.jar!/, jar:file:/home/vcap/app/lib/spring-boot-starter-logging-1.3.5.RELEASE.jar!/, jar:file:/home/vcap/app/lib/t
omcat-embed-websocket-8.0.33.jar!/, jar:file:/home/vcap/app/lib/spring-data-jpa-1.9.4.RELEASE.jar!/, jar:file:/home/vcap/app/lib/spring-data-mongodb-1.8.4.RELEA
SE.jar!/, jar:file:/home/vcap/app/lib/spring-data-redis-1.6.4.RELEASE.jar!/, jar:file:/home/vcap/app/lib/jboss-logging-annotations-1.2.0.Beta1.jar!/, jar:file:/
home/vcap/app/lib/commons-pool2-2.4.2.jar!/, jar:file:/home/vcap/app/lib/bootstrap-3.1.1.jar!/, jar:file:/home/vcap/app/lib/spring-boot-starter-validation-1.3.5
.RELEASE.jar!/, jar:file:/home/vcap/app/lib/postgresql-9.1-901-1.jdbc4.jar!/, jar:file:/home/vcap/app/lib/spring-boot-starter-1.3.5.RELEASE.jar!/, jar:file:/hom
e/vcap/app/lib/antlr-2.7.7.jar!/, jar:file:/home/vcap/app/lib/tomcat-embed-core-8.0.33.jar!/, jar:file:/home/vcap/app/lib/spring-boot-actuator-1.3.5.RELEASE.jar
!/, jar:file:/home/vcap/app/lib/spring-jdbc-4.2.6.RELEASE.jar!/, jar:file:/home/vcap/app/lib/javassist-3.18.1-GA.jar!/, jar:file:/home/vcap/app/lib/spring-boot-
starter-aop-1.3.5.RELEASE.jar!/, jar:file:/home/vcap/app/lib/jedis-2.7.3.jar!/, jar:file:/home/vcap/app/lib/logback-classic-1.1.7.jar!/, jar:file:/home/vcap/app
/lib/jul-to-slf4j-1.7.21.jar!/, jar:file:/home/vcap/app/lib/angular-ui-0.4.0-2.jar!/, jar:file:/home/vcap/app/lib/javax.transaction-api-1.2.jar!/, jar:file:/hom
e/vcap/app/lib/hibernate-commons-annotations-4.0.5.Final.jar!/, jar:file:/home/vcap/app/lib/spring-cloud-cloudfoundry-connector-1.2.2.RELEASE.jar!/, jar:file:/h
ome/vcap/app/lib/spring-aop-4.2.6.RELEASE.jar!/, jar:file:/home/vcap/app/lib/classmate-1.1.0.jar!/]
2017-05-23T10:08:44.70+0200 [APP/PROC/WEB/0] ERR Caused by: org.hibernate.HibernateException: Access to DialectResolutionInfo cannot be null when 'hibernate.dia
lect' not set
2017-05-23T10:08:44.70+0200 [APP/PROC/WEB/0] ERR        at org.hibernate.engine.jdbc.dialect.internal.DialectFactoryImpl.determineDialect(DialectFactoryImpl.jav
a:104)
2017-05-23T10:08:44.70+0200 [APP/PROC/WEB/0] ERR        at org.hibernate.engine.jdbc.dialect.internal.DialectFactoryImpl.buildDialect(DialectFactoryImpl.java:71
)
2017-05-23T10:08:44.70+0200 [APP/PROC/WEB/0] ERR        at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcServicesImpl.java:205)
2017-05-23T10:08:44.70+0200 [APP/PROC/WEB/0] ERR        at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegi
stryImpl.java:111)
2017-05-23T10:08:44.70+0200 [APP/PROC/WEB/0] ERR        at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryI
mpl.java:234)
2017-05-23T10:08:44.70+0200 [APP/PROC/WEB/0] ERR        at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.jav
a:206)
2017-05-23T10:08:44.70+0200 [APP/PROC/WEB/0] ERR        at org.hibernate.cfg.Configuration.buildTypeRegistrations(Configuration.java:1887)
2017-05-23T10:08:44.70+0200 [APP/PROC/WEB/0] ERR        at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1845)
2017-05-23T10:08:44.70+0200 [APP/PROC/WEB/0] ERR        at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilder
Impl.java:857)
2017-05-23T10:08:44.70+0200 [APP/PROC/WEB/0] ERR        at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilder
Impl.java:850)
2017-05-23T10:08:44.70+0200 [APP/PROC/WEB/0] ERR        at org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl.withTccl(ClassLoaderServiceI
mpl.java:425)
2017-05-23T10:08:44.70+0200 [APP/PROC/WEB/0] ERR        at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl
.java:849)
2017-05-23T10:08:44.70+0200 [APP/PROC/WEB/0] ERR        at org.springframework.orm.jpa.vendor.SpringHibernateJpaPersistenceProvider.createContainerEntityManager
Factory(SpringHibernateJpaPersistenceProvider.java:60)
2017-05-23T10:08:44.70+0200 [APP/PROC/WEB/0] ERR        at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(L
ocalContainerEntityManagerFactoryBean.java:343)
2017-05-23T10:08:44.70+0200 [APP/PROC/WEB/0] ERR        at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManager
FactoryBean.java:319)
2017-05-23T10:08:44.70+0200 [APP/PROC/WEB/0] ERR        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(Abstra
ctAutowireCapableBeanFactory.java:1637)
2017-05-23T10:08:44.70+0200 [APP/PROC/WEB/0] ERR        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractA
utowireCapableBeanFactory.java:1574)
2017-05-23T10:08:44.70+0200 [APP/PROC/WEB/0] ERR        ... 20 more
2017-05-23T10:08:44.74+0200 [APP/PROC/WEB/0] OUT Exit status 0
2017-05-23T10:08:44.74+0200 [CELL/0] OUT Exit status 0
2017-05-23T10:08:44.77+0200 [CELL/0] OUT Destroying container
2017-05-23T10:08:44.78+0200 [API/0] OUT Process has crashed with type: "web"
2017-05-23T10:08:44.80+0200 [API/0] OUT App instance exited with guid 01109887-8c4d-41c9-9584-568be244e898 payload: {"instance"=>"2a1caa16-61c5-4c63-5649-dec89a
bd8a19", "index"=>0, "reason"=>"CRASHED", "exit_description"=>"2 error(s) occurred:\n\n* 2 error(s) occurred:\n\n* Codependent step exited\n* cancelled\n* cance
lled", "crash_count"=>4, "crash_timestamp"=>1495526924755819352, "version"=>"d2a4e0a2-32e4-46b6-add5-71cbbb2923df"}
2017-05-23T10:08:45.15+0200 [CELL/0] OUT Successfully destroyed container
cf-gitbot commented 7 years ago

We have created an issue in Pivotal Tracker to manage this:

https://www.pivotaltracker.com/story/show/145911913

The labels on this github issue will be updated when the story is started.

zankich commented 7 years ago

@StBurcher looks like you have a hibernate error in your logs:

2017-05-23T10:08:44.68+0200 [APP/PROC/WEB/0] OUT Caused by: org.hibernate.HibernateException: Access to DialectResolutionInfo cannot be null when 'hibernate.dialect' not set

Have you configured the MySQL driver in your application.properties?

StBurcher commented 7 years ago

@zankich I'm using the normal Spring Music Demo. It works find on Pivotal.io without any change. Only on my installation.

utricularian commented 7 years ago

@StBurcher Do you have a load balancer configured in front of the MySQL Proxy instances? If not, the first proxy ip is provided to apps as the host. If the proxy ip is being used, you need to ensure that the CF Application Security Groups are configured to allow access to the Proxy vm.

StBurcher commented 7 years ago

@utricularian There is no Loadbalancer. Both CF and MySQL Proxy are installed in the same OpenStack Project. Using cf env shows the following.

System-Provided:
{
 "VCAP_SERVICES": {
  "p-mysql": [
   {
    "credentials": {
     "hostname": "10.0.0.41",
     "jdbcUrl": "jdbc:mysql://10.0.0.41:3306/cf_a5563db4_0cfe_41a4_a095_bf8531a72879?user=OYDfM19F2qPvpwEP\u0026password=VndIVlPYzTqPrfgi",
     "name": "cf_a5563db4_0cfe_41a4_a095_bf8531a72879",
     "password": "VndIVlPYzTqPrfgi",
     "port": 3306,
     "uri": "mysql://OYDfM19F2qPvpwEP:VndIVlPYzTqPrfgi@10.0.0.41:3306/cf_a5563db4_0cfe_41a4_a095_bf8531a72879?reconnect=true",
     "username": "OYDfM19F2qPvpwEP"
    },
    "label": "p-mysql",
    "name": "mysql",
    "plan": "100mb",
    "provider": null,
    "syslog_drain_url": null,
    "tags": [
     "mysql"
    ],
    "volume_mounts": []
   }
  ]
 }
}

10.0.0.41 is the correct address.

CF security-groups shows only the standard AGS. public_networks or DNS. How do I have to configure AGS?

jpalermo commented 7 years ago

@StBurcher You'll need to create an application security group that at least allows TCP access to the proxy ip address and then bind that application security group as a "running" application security group.

https://docs.cloudfoundry.org/concepts/asg.html#asg-individual

StBurcher commented 7 years ago

That helped. Thank you.

kalyansagi commented 5 years ago

Hello Team, We created a MySQL instance on PCF and bound it to our application hosted on PCF. The app runs fine if we use localhost in local machine but when we try accessing the PCF instance it fails in both local and in PCF. The host does not seem to be a valid one. When I try to ping the same, it says unknown host. Working in local :- jdbc:mysql://localhost:3306 Not working if pointed to pcf instance :- jdbc:mysql://q-n4s3y1.q-g84581.bosh:3306

Error logs:- com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server. at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:1.8.0_212] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[na:1.8.0_212] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:1.8.0_212] at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[na:1.8.0_212] at com.mysql.jdbc.Util.handleNewInstance(Util.java:425) ~[mysql-connector-java-5.1.46.jar:5.1.46] at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:990) ~[mysql-connector-java-5.1.46.jar:5.1.46] at com.mysql.jdbc.MysqlIO.(MysqlIO.java:342) ~[mysql-connector-java-5.1.46.jar:5.1.46] at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2188) ~[mysql-connector-java-5.1.46.jar:5.1.46] at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2221) ~[mysql-connector-java-5.1.46.jar:5.1.46] at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2016) ~[mysql-connector-java-5.1.46.jar:5.1.46] at com.mysql.jdbc.ConnectionImpl.(ConnectionImpl.java:776) ~[mysql-connector-java-5.1.46.jar:5.1.46] at com.mysql.jdbc.JDBC4Connection.(JDBC4Connection.java:47) ~[mysql-connector-java-5.1.46.jar:5.1.46] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:1.8.0_212] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[na:1.8.0_212] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:1.8.0_212] at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[na:1.8.0_212] at com.mysql.jdbc.Util.handleNewInstance(Util.java:425) ~[mysql-connector-java-5.1.46.jar:5.1.46] at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:386) ~[mysql-connector-java-5.1.46.jar:5.1.46] at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:330) ~[mysql-connector-java-5.1.46.jar:5.1.46] at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:117) ~[HikariCP-2.7.9.jar:na] at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:123) ~[HikariCP-2.7.9.jar:na] at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:365) ~[HikariCP-2.7.9.jar:na] at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:194) ~[HikariCP-2.7.9.jar:na] at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:460) [HikariCP-2.7.9.jar:na] at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:534) [HikariCP-2.7.9.jar:na] at com.zaxxer.hikari.pool.HikariPool.(HikariPool.java:115) [HikariCP-2.7.9.jar:na] at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:112) [HikariCP-2.7.9.jar:na] at com.zaxxer.hikari.HikariDataSource$$FastClassBySpringCGLIB$$eeb1ae86.invoke() [HikariCP-2.7.9.jar:na] at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) [spring-core-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:746) [spring-aop-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) [spring-aop-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:136) [spring-aop-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:124) [spring-aop-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185) [spring-aop-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:688) [spring-aop-5.0.7.RELEASE.jar:5.0.7.RELEASE] at com.zaxxer.hikari.HikariDataSource$$EnhancerBySpringCGLIB$$89b7594e.getConnection() [HikariCP-2.7.9.jar:na] at org.springframework.jdbc.datasource.DataSourceUtils.fetchConnection(DataSourceUtils.java:151) [spring-jdbc-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:115) [spring-jdbc-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:78) [spring-jdbc-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.jdbc.support.JdbcUtils.extractDatabaseMetaData(JdbcUtils.java:319) [spring-jdbc-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.jdbc.support.JdbcUtils.extractDatabaseMetaData(JdbcUtils.java:356) [spring-jdbc-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.boot.autoconfigure.orm.jpa.DatabaseLookup.getDatabase(DatabaseLookup.java:72) [spring-boot-autoconfigure-2.0.3.RELEASE.jar:2.0.3.RELEASE] at org.springframework.boot.autoconfigure.orm.jpa.JpaProperties.determineDatabase(JpaProperties.java:166) [spring-boot-autoconfigure-2.0.3.RELEASE.jar:2.0.3.RELEASE] at org.springframework.boot.autoconfigure.orm.jpa.JpaBaseConfiguration.jpaVendorAdapter(JpaBaseConfiguration.java:111) [spring-boot-autoconfigure-2.0.3.RELEASE.jar:2.0.3.RELEASE] at org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaConfiguration$$EnhancerBySpringCGLIB$$596cbec0.CGLIB$jpaVendorAdapter$7() [spring-boot-autoconfigure-2.0.3.RELEASE.jar:2.0.3.RELEASE] at org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaConfiguration$$EnhancerBySpringCGLIB$$596cbec0$$FastClassBySpringCGLIB$$29076d70.invoke() [spring-boot-autoconfigure-2.0.3.RELEASE.jar:2.0.3.RELEASE] at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228) [spring-core-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:361) [spring-context-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaConfiguration$$EnhancerBySpringCGLIB$$596cbec0.jpaVendorAdapter() [spring-boot-autoconfigure-2.0.3.RELEASE.jar:2.0.3.RELEASE] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_212] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_212] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_212] at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_212] at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154) [spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:582) [spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1256) [spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1105) [spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:543) [spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:503) [spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:317) [spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315) [spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) [spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:251) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1138) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1065) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:818) [spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:724) [spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:474) [spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1256) [spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1105) [spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:543) [spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:503) [spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:317) [spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315) [spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) [spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:251) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1138) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1065) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:818) [spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:724) [spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:474) [spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1256) [spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1105) [spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:543) [spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:503) [spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:317) [spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315) [spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) [spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1089) ~[spring-context-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:859) ~[spring-context-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550) ~[spring-context-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:140) ~[spring-boot-2.0.3.RELEASE.jar:2.0.3.RELEASE] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:759) ~[spring-boot-2.0.3.RELEASE.jar:2.0.3.RELEASE] at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:395) ~[spring-boot-2.0.3.RELEASE.jar:2.0.3.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:327) ~[spring-boot-2.0.3.RELEASE.jar:2.0.3.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1255) ~[spring-boot-2.0.3.RELEASE.jar:2.0.3.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1243) ~[spring-boot-2.0.3.RELEASE.jar:2.0.3.RELEASE] at com.ford.cbz.map.MapGeneratorApp.main(MapGeneratorApp.java:21) ~[main/:na] Caused by: java.net.UnknownHostException: q-n4s3y1.q-g82109.bosh: nodename nor servname provided, or not known at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method) ~[na:1.8.0_212] at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:929) ~[na:1.8.0_212] at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1324) ~[na:1.8.0_212] at java.net.InetAddress.getAllByName0(InetAddress.java:1277) ~[na:1.8.0_212] at java.net.InetAddress.getAllByName(InetAddress.java:1193) ~[na:1.8.0_212] at java.net.InetAddress.getAllByName(InetAddress.java:1127) ~[na:1.8.0_212] at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:188) ~[mysql-connector-java-5.1.46.jar:5.1.46] at com.mysql.jdbc.MysqlIO.(MysqlIO.java:301) ~[mysql-connector-java-5.1.46.jar:5.1.46] ... 94 common frames omitted

2019-11-15 15:03:55.937 WARN [-,,,] 57818 --- [ main] o.s.b.a.orm.jpa.DatabaseLookup : Unable to determine jdbc url from datasource

org.springframework.jdbc.support.MetaDataAccessException: Could not get Connection for extracting meta-data; nested exception is org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

menicosia commented 5 years ago

Hi @kalyansagi,

BOSH DNS hostnames are only resolvable from a BOSH-deployed VM - so either as a BOSH job that's part of a BOSH deployment, or when you've pushed an app using cf push to Diego cells that have been BOSH deployed.

If you wish to access a mysql instance from outside of BOSH VMs, you can manually resolve the BOSH DNS hostname in the binding using an app. Here's an example that you can use: dns-lookup

PS - this is a super-old issue. If you continue to have troubles, I suggest you open a new GitHub issue or visit us on Cloud Foundry slack for more help!