1 Replies - 83 Views - Last Post: 13 August 2019 - 01:01 PM Rate Topic: -----

#1 NeoTifa   User is offline

  • NeoTifa Codebreaker, the Scourge of Devtester
  • member icon





Reputation: 4529
  • View blog
  • Posts: 19,141
  • Joined: 24-September 08

oracle db connection from pcf using k8 secrets

Posted 12 August 2019 - 12:44 PM

So I got a Spring (not Spring Boot) app I'm trying to get to PCF. The secrets are in Kubernetes, such as uri and whatnot. I had the ez connect string like username:[email protected]/service.net syntax, and it let me deploy, but it was giving me a 504 nginx error. I changed the connection string to be the long boi with the parenthesis (host=hostname)(service=servicename)(port=portnum)(whateverimnotanexpert) syntax and stored that as well as username and password as a secret in K8. When I try to deploy it crashes saying "No suitable ServiceConnectorCreator found". This is what we had, because the ezconnect string worked for test, but not for prod apparently.

@Configuration
@Profile({"prod","cloud"})
public class ProdConfig{
	
	@Bean
	public Cloud cloud() {
		return new CloudFactory().getCloud();
	}
	
	@Bean(name = "dataSource")
	public DataSource aimsDataSource() {
		DataSource dataSource = cloud().getServiceConnector("db", DataSource.class, null);
		return dataSource;
	}

}




Apparently that syntax only wants the ezconnect string, yet I cannot find any way to do it for the other way. I only find this or for Spring Boot. I'm at my wits end.

Is This A Good Question/Topic? 0
  • +

Replies To: oracle db connection from pcf using k8 secrets

#2 NeoTifa   User is offline

  • NeoTifa Codebreaker, the Scourge of Devtester
  • member icon





Reputation: 4529
  • View blog
  • Posts: 19,141
  • Joined: 24-September 08

Re: oracle db connection from pcf using k8 secrets

Posted 13 August 2019 - 01:01 PM

Nevermind. So I redeployed the old code and used the ez connect strings, but deleted all the old connections and crap and rebuilt them, and I'm not even getting the 504 error anymore. WTF? Quite literally a turn it off then back on again thing. Hate my life. Whatever. Now it's just failing cuz it contains code that isn't in prod yet (a db that isn't live yet).

Solved.
Was This Post Helpful? 1
  • +
  • -

Page 1 of 1