4 글 보임 - 1 에서 4 까지 (총 4 중에서)
-
글쓴이글
-
2025년 5월 13일 18:45 #139278
갱참가자안녕하세요 ecs로 배포 하는중입니다 스프링부트랑 nginx를 이미지로 만들어서 dockerhub에 올려서 ecs로 배포하려고 하는데 db는 외부에 있습니다.. Db Json작성도 했습니다 근데 뭘해도 배포가 안되더라구요.. db에 접근을 위해서 고정아이피로 해야되는건지 뭐가 문제인지 알 수 있을까요.. 웹페이지가 접속이라도 되면 좋은데 503만 뜨네요
2025년 5월 13일 19:13 #139279
codingapple키 마스터ecs에서 컨테이너들이 초록불 잘 떠있는지 확인해보고 초록이 아니면 로그 출력해서 문제가 뭔지 알아내야합니다
2025년 5월 14일 10:17 #139293
갱참가자2025-05-14 01:01:09.262 ERROR 1 --- [ main] o.s.boot.SpringApplication : Application run failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: Invocation of init method failed; nested exception is javax.persistence.PersistenceException: [PersistenceUnit: default] Unable to build Hibernate SessionFactory; nested exception is org.hibernate.exception.JDBCConnectionException: Unable to open JDBC Connection for DDL execution at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1804) ~[spring-beans-5.3.25.jar!/:5.3.25] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:620) ~[spring-beans-5.3.25.jar!/:5.3.25] 로그에서 이런 오류가 나오는데
status는 활성
Last deployment는 실패라고 나오네요 DB를 연결못해서 인 거 같다고 생각이 들어서 여쭤봅니다.. DB에서 로드밸런싱 주소?를 접속가능하게 열어줘야 하나여? 디비를 0.0.0.0? 하면 외부에서 전부 접근이 가능하다고 하는거 같은데 그렇게 오픈할 수는 없는 상황이라.. 고정아이피가 필요할거 같다고 생각했거든요 제가 생각하는게 맞는지 틀린건지도 모르겠어서 바쁘실텐데 다시 여쭤봅니다..
지금 로컬db로 0.0.0.0 연결해서 했는데
2025년 5월 14일 11:42 (UTC+9:00) 2025-05-14 02:42:02.585 INFO 1 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting... 883a2da6cc03474982b68f586483241d webserver 2025년 5월 14일 11:42 (UTC+9:00) 2025-05-14 02:42:02.406 INFO 1 --- [ main] o.hibernate.annotations.common.Version : HCANN000001: Hibernate Commons Annotations {5.1.2.Final} 883a2da6cc03474982b68f586483241d webserver 2025년 5월 14일 11:42 (UTC+9:00) 2025-05-14 02:42:02.148 INFO 1 --- [ main] org.hibernate.Version : HHH000412: Hibernate ORM core version 5.6.15.Final 883a2da6cc03474982b68f586483241d webserver 2025년 5월 14일 11:42 (UTC+9:00) 2025-05-14 02:42:02.085 INFO 1 --- [ main] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [name: default] 883a2da6cc03474982b68f586483241d webserver 2025년 5월 14일 11:42 (UTC+9:00) 2025-05-14 02:42:01.783 INFO 1 --- [ main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 2117 ms 883a2da6cc03474982b68f586483241d webserver 2025년 5월 14일 11:42 (UTC+9:00) 2025-05-14 02:42:01.783 INFO 1 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext 883a2da6cc03474982b68f586483241d webserver 2025년 5월 14일 11:42 (UTC+9:00) 2025-05-14 02:42:01.663 INFO 1 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat] 883a2da6cc03474982b68f586483241d webserver 2025년 5월 14일 11:42 (UTC+9:00) 2025-05-14 02:42:01.664 INFO 1 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.71] 883a2da6cc03474982b68f586483241d webserver 2025년 5월 14일 11:42 (UTC+9:00) 2025-05-14 02:42:01.648 INFO 1 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8080 (http) 883a2da6cc03474982b68f586483241d webserver 2025년 5월 14일 11:42 (UTC+9:00) 2025-05-14 02:42:00.744 INFO 1 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 52 ms. Found 2 JPA repository interfaces. 883a2da6cc03474982b68f586483241d webserver 2025년 5월 14일 11:42 (UTC+9:00) 2025-05-14 02:42:00.679 INFO 1 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode. 883a2da6cc03474982b68f586483241d webserver 2025년 5월 14일 11:41 (UTC+9:00) 2025-05-14 02:41:59.127 INFO 1 --- [ main] c.example.jpaboard.JpaBoardApplication : No active profile set, falling back to 1 default profile: "default" 883a2da6cc03474982b68f586483241d webserver 2025년 5월 14일 11:41 (UTC+9:00) 2025-05-14 02:41:59.123 INFO 1 --- [ main] c.example.jpaboard.JpaBoardApplication : Starting JpaBoardApplication using Java 21.0.4 on ip-172-31-39-152.ap-northeast-2.compute.internal with PID 1 (/app/server.jar started by root in /app) 883a2da6cc03474982b68f586483241d webserver 2025년 5월 14일 11:41 (UTC+9:00) :: Spring Boot :: (v2.7.9) 883a2da6cc03474982b68f586483241d webserver 2025년 5월 14일 11:41 (UTC+9:00) ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \ 883a2da6cc03474982b68f586483241d webserver 2025년 5월 14일 11:41 (UTC+9:00) \\/ ___)| |_)| | | | | || (_| | ) ) ) ) 883a2da6cc03474982b68f586483241d webserver 2025년 5월 14일 11:41 (UTC+9:00) ' |____| .__|_| |_|_| |_\__, | / / / / 883a2da6cc03474982b68f586483241d webserver 2025년 5월 14일 11:41 (UTC+9:00) =========|_|==============|___/=/_/_/_/ 883a2da6cc03474982b68f586483241d webserver 2025년 5월 14일 11:41 (UTC+9:00) . ____ _ __ _ _ 883a2da6cc03474982b68f586483241d webserver 2025년 5월 14일 11:41 (UTC+9:00) /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \ 883a2da6cc03474982b68f586483241d webserver 2025년 5월 14일 11:40 (UTC+9:00) 2025-05-14 02:40:05.793 INFO 1 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...
로그가 바뀌긴했습니다 ..
2025년 5월 14일 13:59 #139298
codingapple키 마스터HikariPool-1 - Starting... 까지만 나오면 db접속 안되고 있다는 뜻 같은데 db 호스팅받은 곳에서 db접속가능 ip를 0.0.0.0으로 해둡시다 로컬 컴퓨터에서 db 띄워놓는건 aws에서 접속잘안될수도요
-
글쓴이글
4 글 보임 - 1 에서 4 까지 (총 4 중에서)
- 답변은 로그인 후 가능합니다.