AWS BeanStalk不太倾向于连接到AWS RDS

编程入门 行业动态 更新时间:2024-10-24 08:29:49
本文介绍了AWS BeanStalk不太倾向于连接到AWS RDS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我想我快到了.

我创建了一个AWS BeanStalk实例,并向其中添加了一个Oracle数据库实例.

I created an instance of AWS BeanStalk and added an oracle DB instance to it.

当我找到日志时,我看到驱动程序已加载,但它一直在说URL是 无效的.

When I found the log, I saw the driver was loaded but it keeps saying that URL is invalid.

这是我的RDS信息和日志消息.

Here are my RDS info and log message.

[RDS信息] 端点= aa1c9autjaqoufk.c2k1ch01futy.ap-northeast-2.rds.amazonaws 端口= 1521 公共访问=是

[RDS Info] Endpoint = aa1c9autjaqoufk.c2k1ch01futy.ap-northeast-2.rds.amazonaws Port = 1521 Public Access = yes

[系统日志]

25-Jun-2018 02:42:56.759 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"] 25-Jun-2018 02:42:56.787 INFO [main] org.apache.tomcat.util.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read 25-Jun-2018 02:42:56.796 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-nio-8009"] 25-Jun-2018 02:42:56.799 INFO [main] org.apache.tomcat.util.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read 25-Jun-2018 02:42:56.800 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 1366 ms 25-Jun-2018 02:42:56.842 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service Catalina 25-Jun-2018 02:42:56.848 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.0.50 25-Jun-2018 02:42:56.872 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /var/lib/tomcat8/webapps/ROOT 25-Jun-2018 02:42:58.613 INFO [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time. 25-Jun-2018 02:42:58.689 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /var/lib/tomcat8/webapps/ROOT has finished in 1,817 ms 25-Jun-2018 02:42:58.693 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"] 25-Jun-2018 02:42:58.720 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-nio-8009"] 25-Jun-2018 02:42:58.736 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 1935 ms Loading driver... Driver loaded! jdbc:oracle:oci://aa1c9autjaqoufk.c2k1ch01futy.ap-northeast-2.rds.amazonaws:1521/ebdb?user=username&password=password SQLException: Invalid Oracle URL specified SQLState: 99999 VendorError: 17067 Closing the connection. SQLException: Invalid Oracle URL specified SQLState: 99999 VendorError: 17067 Closing the connection.

我将ojdbc8 drvier包含在我的Web项目库中并进行了构建. 这是关于驾驶员的吗?我在做什么错了?

I included ojdbc8 drvier in my web project library and made a build. Is this about driver? What am I doing wrong?

推荐答案

消息明确指出您的网址不正确,

Message clearly says your URL is incorrect,

应该是下面的样子.

//step1 load the driver class Class.forName("oracle.jdbc.driver.OracleDriver");

//step1 load the driver class Class.forName("oracle.jdbc.driver.OracleDriver");

//step2 create the connection object Connection con=DriverManager.getConnection( "jdbc:oracle:thin:@aa1c9autjaqoufk.c2k1ch01futy.ap-northeast-2.rds.amazonaws:1521:edb","username","password"); `

//step2 create the connection object Connection con=DriverManager.getConnection( "jdbc:oracle:thin:@aa1c9autjaqoufk.c2k1ch01futy.ap-northeast-2.rds.amazonaws:1521:edb","username","password"); `

更多推荐

AWS BeanStalk不太倾向于连接到AWS RDS

本文发布于:2023-11-16 04:37:43,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1601052.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:不太   连接到   倾向于   AWS   BeanStalk

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!