简体   繁体   English

在AWS Elastic Beanstalk上部署Spring

[英]Deploying Spring on AWS Elastic Beanstalk

I am trying to deploy my Spring Application in Java to AWS Elastic Bean stalk. 我正在尝试将Java中的Spring Application部署到AWS Elastic Bean stalk。 But I have a few problems caused by not understand AWS enough and tutorials which are to old (Interface changed etc.) 但是我有一些问题是由于对AWS不够了解以及教程太旧了(接口已更改等)。

Few questions: 几个问题:

I created a Application and it is configured as Tomcat 8 with Java 8 running. 我创建了一个应用程序,并将其配置为运行Java 8的Tomcat 8。 在此处输入图片说明

so far so good. 到现在为止还挺好。 When I click on the Configuration menu entry, I wanted to enable a mysql instance / db, but I am not able to modify it (select an instance class etc.) or get access to the database with eg SequelPro. 当我单击“配置”菜单项时,我想启用一个mysql实例/数据库,但是我无法对其进行修改(选择实例类等)或使用例如SequelPro访问数据库。 在此处输入图片说明

In "Software" where I can set the environment variables I tried to get a connection to the database, if it worked I don't know because I can not find the log for the spring application deployed and cannot access the database from outside. 在可以设置环境变量的“软件”中,我尝试建立与数据库的连接,如果它有效,我不知道,因为我找不到部署的Spring应用程序的日志,也无法从外部访问数据库。 Connection String looks like this. 连接字符串如下所示。 ("someurl" is the real url ^^): (“ someurl”是实际网址^^):

jdbc:mysql://someurl.com/ebdb

在此处输入图片说明

Btw. 顺便说一句。 when I click on the URL of the environment I get an 404. 当我单击环境的URL时,我得到404。

I hope someone can help me deploying. 我希望有人可以帮助我进行部署。

When I click on the Configuration menu entry, I wanted to enable a mysql instance / db, but I am not able to modify it (select an instance class etc.) or get access to the database with eg SequelPro. 当我单击“配置”菜单项时,我想启用一个mysql实例/数据库,但是我无法对其进行修改(选择实例类等)或使用例如SequelPro访问数据库。

Beanstalk is container-based service, you can't run MySQL on same instance, you should start corresponding one from RDS or use a separate EC2 instance. Beanstalk是基于容器的服务,您不能在同一实例上运行MySQL,您应该从RDS启动相应的实例或使用单独的EC2实例。 Beanstalk instances should be stateless as any moment new instance can be added or removed. Beanstalk实例应该是无状态的,因为任何时候都可以添加或删除新实例。

I can not find the log for the spring application deployed 我找不到已部署的Spring应用程序的日志

You can access logs and access the instance via EB CLI https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/eb3-ssh.html Tou should be able to test DB connectivity same way 您可以通过EB CLI https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/eb3-ssh.html访问日志并访问实例Tou应该能够以相同的方式测试数据库连接

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Spring AWS:在Elastic Beanstalk上部署War时访问被拒绝错误 - Spring AWS: Access denied error when deploying war on Elastic Beanstalk 在AWS Elastic Beanstalk上部署Spring Boot应用程序 - 获得502错误 - Deploying Spring Boot app on AWS Elastic Beanstalk — getting 502 error 部署到AWS Elastic Beanstalk后如何访问servlet? - How do I access servlets after deploying to AWS Elastic Beanstalk? 将Spring Boot应用程序部署到Elastic Beanstalk时出现502 Bad Gateway - 502 Bad Gateway when deploying Spring Boot application to Elastic Beanstalk AWS Elastic Beanstalk缓存? - AWS Elastic Beanstalk caching? aws 弹性 beantalk 上的 HTTP 到 HTTPS 不适用于 Spring Boot - HTTP to HTTPS on aws elastic beanstalk not working for Spring Boot Spring Boot Application无法在AWS Elastic Beanstalk中进行一次身份验证 - Spring Boot Application not authenticating once in AWS Elastic Beanstalk Spring MVC在AWS Elastic Beanstalk中不起作用 - Spring mvc doesn't work in AWS elastic beanstalk 结合使用AWS Elastic Beanstalk和Java / BlazeDS / Spring应用程序 - Using AWS Elastic Beanstalk with a Java/BlazeDS/Spring application AWS Elastic Beanstalk上的Spring Boot / Tomcat仅显示404页面 - Spring Boot / Tomcat on AWS Elastic Beanstalk only showing 404 page
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM