묻고 답해요
141만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
-
미해결AWS 배포 완벽가이드 (feat. Lightsail, Docker, ECS)
Workflow 작성시 npm install 문제
name : SSH and deployrun : | ssh ...run 스크립트 안의 npm install 실행시 command not found 라고 뜹니다. 근데 LightSail SSH 접속해서 다 확인해봤을 때, npm, npx 모두다 정상적으로 설치가 되어있는데 혹시 다른 문제가 있는걸까요?
-
미해결Jenkins를 이용한 CI/CD Pipeline 구축
빌드 오류 발생
Handler: Type = com.njonecompany.web.controller.WelcomeController Method = com.njonecompany.web.controller.WelcomeController#index(Model) Async: Async started = false Async result = null Resolved Exception: Type = null ModelAndView: View name = index View = null Attribute = msg value = Hi, there Attribute = today value = Sun Nov 26 13:37:44 UTC 2023 FlashMap: Attributes = null MockHttpServletResponse: Status = 200 Error message = null Headers = [Content-Language:"en"] Content type = null Body = Forwarded URL = /WEB-INF/views/index.jsp Redirected URL = null Cookies = [] [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.51 s - in com.njonecompany.web.TestWelcome [INFO] [INFO] Results: [INFO] [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0 [INFO] [JENKINS] Recording test results [INFO] [INFO] --- maven-war-plugin:3.2.2:war (default-war) @ web --- [INFO] Packaging webapp [INFO] Assembling webapp [web] in [/var/jenkins_home/workspace/My-Third-Project/target/hello-world] [INFO] Processing war project [INFO] Copying webapp resources [/var/jenkins_home/workspace/My-Third-Project/src/main/webapp] [INFO] Webapp assembled in [29 msecs] [INFO] Building war: /var/jenkins_home/workspace/My-Third-Project/target/hello-world.war [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 3.822 s [INFO] Finished at: 2023-11-26T13:37:45Z [INFO] ------------------------------------------------------------------------ Waiting for Jenkins to finish collecting data [JENKINS] Archiving /var/jenkins_home/workspace/My-Third-Project/pom.xml to com.njonecompany.web/web/1.0/web-1.0.pom [JENKINS] Archiving /var/jenkins_home/workspace/My-Third-Project/target/hello-world.war to com.njonecompany.web/web/1.0/web-1.0.war channel stopped [DeployPublisher][INFO] Attempting to deploy 1 war file(s) [DeployPublisher][INFO] Deploying /var/jenkins_home/workspace/My-Third-Project/target/hello-world.war to container Tomcat 9.x Remote with context null ERROR: Build step failed with exception org.codehaus.cargo.container.ContainerException: Failed to redeploy [/var/jenkins_home/workspace/My-Third-Project/target/hello-world.war] at org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.redeploy(AbstractTomcatManagerDeployer.java:176) at hudson.plugins.deploy.CargoContainerAdapter.deploy(CargoContainerAdapter.java:81) at hudson.plugins.deploy.CargoContainerAdapter$DeployCallable.invoke(CargoContainerAdapter.java:167) at hudson.plugins.deploy.CargoContainerAdapter$DeployCallable.invoke(CargoContainerAdapter.java:136) at hudson.FilePath.act(FilePath.java:1198) at hudson.FilePath.act(FilePath.java:1181) at hudson.plugins.deploy.CargoContainerAdapter.redeployFile(CargoContainerAdapter.java:133) at hudson.plugins.deploy.PasswordProtectedAdapterCargo.redeployFile(PasswordProtectedAdapterCargo.java:95) at hudson.plugins.deploy.DeployPublisher.perform(DeployPublisher.java:113) at jenkins.tasks.SimpleBuildStep.perform(SimpleBuildStep.java:123) at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:80) at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:47) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:818) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:767) at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.post2(MavenModuleSetBuild.java:1072) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:711) at hudson.model.Run.execute(Run.java:1918) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:543) at hudson.model.ResourceController.execute(ResourceController.java:101) at hudson.model.Executor.run(Executor.java:442) Caused by: java.net.ConnectException: Connection refused (Connection refused) at java.base/java.net.PlainSocketImpl.socketConnect(Native Method) at java.base/java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:412) at java.base/java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:255) at java.base/java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:237) at java.base/java.net.Socket.connect(Socket.java:609) at java.base/java.net.Socket.connect(Socket.java:558) at java.base/sun.net.NetworkClient.doConnect(NetworkClient.java:182) at java.base/sun.net.www.http.HttpClient.openServer(HttpClient.java:509) at java.base/sun.net.www.http.HttpClient.openServer(HttpClient.java:604) at java.base/sun.net.www.http.HttpClient.<init>(HttpClient.java:277) at java.base/sun.net.www.http.HttpClient.New(HttpClient.java:376) at java.base/sun.net.www.http.HttpClient.New(HttpClient.java:397) at java.base/sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1253) at java.base/sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1187) at java.base/sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1081) at java.base/sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:1015) at org.codehaus.cargo.container.tomcat.internal.TomcatManager.invoke(TomcatManager.java:567) at org.codehaus.cargo.container.tomcat.internal.TomcatManager.list(TomcatManager.java:882) at org.codehaus.cargo.container.tomcat.internal.TomcatManager.getStatus(TomcatManager.java:895) at org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.redeploy(AbstractTomcatManagerDeployer.java:161) ... 19 more java.net.ConnectException: Connection refused (Connection refused) at java.base/java.net.PlainSocketImpl.socketConnect(Native Method) at java.base/java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:412) at java.base/java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:255) at java.base/java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:237) at java.base/java.net.Socket.connect(Socket.java:609) at java.base/java.net.Socket.connect(Socket.java:558) at java.base/sun.net.NetworkClient.doConnect(NetworkClient.java:182) at java.base/sun.net.www.http.HttpClient.openServer(HttpClient.java:509) at java.base/sun.net.www.http.HttpClient.openServer(HttpClient.java:604) at java.base/sun.net.www.http.HttpClient.<init>(HttpClient.java:277) at java.base/sun.net.www.http.HttpClient.New(HttpClient.java:376) at java.base/sun.net.www.http.HttpClient.New(HttpClient.java:397) at java.base/sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1253) at java.base/sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1187) at java.base/sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1081) at java.base/sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:1015) at org.codehaus.cargo.container.tomcat.internal.TomcatManager.invoke(TomcatManager.java:567) at org.codehaus.cargo.container.tomcat.internal.TomcatManager.list(TomcatManager.java:882) at org.codehaus.cargo.container.tomcat.internal.TomcatManager.getStatus(TomcatManager.java:895) at org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.redeploy(AbstractTomcatManagerDeployer.java:161) at hudson.plugins.deploy.CargoContainerAdapter.deploy(CargoContainerAdapter.java:81) at hudson.plugins.deploy.CargoContainerAdapter$DeployCallable.invoke(CargoContainerAdapter.java:167) at hudson.plugins.deploy.CargoContainerAdapter$DeployCallable.invoke(CargoContainerAdapter.java:136) at hudson.FilePath.act(FilePath.java:1198) at hudson.FilePath.act(FilePath.java:1181) at hudson.plugins.deploy.CargoContainerAdapter.redeployFile(CargoContainerAdapter.java:133) at hudson.plugins.deploy.PasswordProtectedAdapterCargo.redeployFile(PasswordProtectedAdapterCargo.java:95) at hudson.plugins.deploy.DeployPublisher.perform(DeployPublisher.java:113) at jenkins.tasks.SimpleBuildStep.perform(SimpleBuildStep.java:123) at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:80) at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:47) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:818) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:767) at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.post2(MavenModuleSetBuild.java:1072) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:711) at hudson.model.Run.execute(Run.java:1918) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:543) at hudson.model.ResourceController.execute(ResourceController.java:101) at hudson.model.Executor.run(Executor.java:442) Build step 'Deploy war/ear to a container' marked build as failure Finished: FAILURE강사님 톰캣 서버 연동 강의를 따라했는데, 오류가 발생합니다! 아무리 시도해봐도 해결이 안나서 올려봅니다. 혹시 해결책을 알 수 있을까요..?
-
해결됨Jenkins를 이용한 CI/CD Pipeline 구축
kex_exchange_identification 에러 발생
도원님 안녕하세요. 강의를 듣다가 막히는 부분이 있어서 질문 드립니다. 해당 강의 7분 41초 경에 docker 이미지를 받은 후, ssh root@localhost -p 10022 위 명령어를 실행시켰는데, kex_exchange_identification: Connection closed by remote host라는 메시지가 나오면서 접속이 되지 않습니다. 답변 부탁드립니다. 감사합니다!
-
미해결AWS 배포 완벽가이드 (feat. Lightsail, Docker, ECS)
nginx와 app 연결 (ECS 내에서)
안녕하세요 강사님강사님께서는 강의에서 어플리케이션을 80포트에 배포해 바로 ELB에 연결하셨는데요혹시 nginx를 중간에 끼게 된다면 어떤 방식으로 하면 좋은지 궁금합니다 저는 nginx를 중간에 껴서 리버스 프록시 서버를 만들고 싶은데요이러한 방법이 ecs에서는 권장되지 않아 80포트로 어플리케이션을 배포하신건지 궁금합니다 또한 만약 nginx를 중간에 낄 수 있다면이를 service discovery 방식으로 nginx와 어플리케이션을 각각 서비스로 분리해 연결하는 방식하나의 태스크 정의에 nginx + 어플리케이션을 같이 정의해 하나의 서비스로 배포하는 방식이 방법은 fargate 사용시 bridge 를 지원해 주지 않아 localhost로 통신했습니다둘 중에 어떤 방식이 더 괜찮을지...? 아님 더 추천해주는 방식이 있으신지 궁금합니다
-
미해결Jenkins를 이용한 CI/CD Pipeline 구축
mac 사용자분들 최신 톰캣입니다.
- name: Download Tomcat9 from tomcat.apache.org hosts: devopstasks: - name: Create a Directory /opt/tomcat9file:path: /opt/tomcat9state: directorymode: 0755 - name: Download Tomcat using get_urlget_url:url: https://dlcdn.apache.org/tomcat/tomcat-9/v9.0.83/bin/apache-tomcat-9.0.83.tar.gzdest: /opt/tomcat9/apache-tomcat-9.0.82.tar.gzmode: 0755checksum: sha512:https://downloads.apache.org/tomcat/tomcat-9/v9.0.83/bin/apache-tomcat-9.0.83.tar.gz.sha512
-
미해결Jenkins를 이용한 CI/CD Pipeline 구축
github repository url
올려주신 파일을 git clone하고 제 레포지토리에서 생성한다음 jenkins configure 에서 github repository url을 제 레포지토리로 변경하였더니 Console Output MockHttpServletRequest: HTTP Method = GET Request URI = / Parameters = {} Headers = [] Body = <no character encoding set> Session Attrs = {} Handler: Type = com.njonecompany.web.controller.WelcomeController Method = com.njonecompany.web.controller.WelcomeController#index(Model) Async: Async started = false Async result = null Resolved Exception: Type = null ModelAndView: View name = index View = null Attribute = msg value = Hi, there Attribute = today value = Thu Nov 23 03:03:16 UTC 2023 FlashMap: Attributes = null MockHttpServletResponse: Status = 200 Error message = null Headers = [Content-Language:"en"] Content type = null Body = Forwarded URL = /WEB-INF/views/index.jsp Redirected URL = null Cookies = [] [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.345 s - in com.njonecompany.web.TestWelcome [INFO] [INFO] Results: [INFO] [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0 [INFO] [JENKINS] Recording test results [INFO] [INFO] --- maven-war-plugin:3.2.2:war (default-war) @ web --- [INFO] Packaging webapp [INFO] Assembling webapp [web] in [/var/jenkins_home/workspace/My-Third-Project/target/hello-world] [INFO] Processing war project [INFO] Copying webapp resources [/var/jenkins_home/workspace/My-Third-Project/src/main/webapp] [INFO] Webapp assembled in [56 msecs] [INFO] Building war: /var/jenkins_home/workspace/My-Third-Project/target/hello-world.war [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 8.167 s [INFO] Finished at: 2023-11-23T03:03:18Z [INFO] ------------------------------------------------------------------------ Waiting for Jenkins to finish collecting data [JENKINS] Archiving /var/jenkins_home/workspace/My-Third-Project/pom.xml to com.njonecompany.web/web/1.0/web-1.0.pom [JENKINS] Archiving /var/jenkins_home/workspace/My-Third-Project/target/hello-world.war to com.njonecompany.web/web/1.0/web-1.0.war channel stopped [DeployPublisher][INFO] Attempting to deploy 1 war file(s) [DeployPublisher][INFO] Deploying /var/jenkins_home/workspace/My-Third-Project/target/hello-world.war to container Tomcat 9.x Remote with context null ERROR: Build step failed with exception org.codehaus.cargo.container.ContainerException: Failed to redeploy [/var/jenkins_home/workspace/My-Third-Project/target/hello-world.war] at org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.redeploy(AbstractTomcatManagerDeployer.java:176) at hudson.plugins.deploy.CargoContainerAdapter.deploy(CargoContainerAdapter.java:81) at hudson.plugins.deploy.CargoContainerAdapter$DeployCallable.invoke(CargoContainerAdapter.java:167) at hudson.plugins.deploy.CargoContainerAdapter$DeployCallable.invoke(CargoContainerAdapter.java:136) at hudson.FilePath.act(FilePath.java:1198) at hudson.FilePath.act(FilePath.java:1181) at hudson.plugins.deploy.CargoContainerAdapter.redeployFile(CargoContainerAdapter.java:133) at hudson.plugins.deploy.PasswordProtectedAdapterCargo.redeployFile(PasswordProtectedAdapterCargo.java:95) at hudson.plugins.deploy.DeployPublisher.perform(DeployPublisher.java:113) at jenkins.tasks.SimpleBuildStep.perform(SimpleBuildStep.java:123) at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:80) at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:47) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:818) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:767) at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.post2(MavenModuleSetBuild.java:1072) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:711) at hudson.model.Run.execute(Run.java:1925) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:543) at hudson.model.ResourceController.execute(ResourceController.java:101) at hudson.model.Executor.run(Executor.java:442) Caused by: java.net.ConnectException: Connection refused (Connection refused) at java.base/java.net.PlainSocketImpl.socketConnect(Native Method) at java.base/java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:412) at java.base/java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:255) at java.base/java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:237) at java.base/java.net.Socket.connect(Socket.java:609) at java.base/java.net.Socket.connect(Socket.java:558) at java.base/sun.net.NetworkClient.doConnect(NetworkClient.java:182) at java.base/sun.net.www.http.HttpClient.openServer(HttpClient.java:509) at java.base/sun.net.www.http.HttpClient.openServer(HttpClient.java:604) at java.base/sun.net.www.http.HttpClient.<init>(HttpClient.java:277) at java.base/sun.net.www.http.HttpClient.New(HttpClient.java:376) at java.base/sun.net.www.http.HttpClient.New(HttpClient.java:397) at java.base/sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1253) at java.base/sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1187) at java.base/sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1081) at java.base/sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:1015) at org.codehaus.cargo.container.tomcat.internal.TomcatManager.invoke(TomcatManager.java:567) at org.codehaus.cargo.container.tomcat.internal.TomcatManager.list(TomcatManager.java:882) at org.codehaus.cargo.container.tomcat.internal.TomcatManager.getStatus(TomcatManager.java:895) at org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.redeploy(AbstractTomcatManagerDeployer.java:161) ... 19 more java.net.ConnectException: Connection refused (Connection refused) at java.base/java.net.PlainSocketImpl.socketConnect(Native Method) at java.base/java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:412) at java.base/java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:255) at java.base/java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:237) at java.base/java.net.Socket.connect(Socket.java:609) at java.base/java.net.Socket.connect(Socket.java:558) at java.base/sun.net.NetworkClient.doConnect(NetworkClient.java:182) at java.base/sun.net.www.http.HttpClient.openServer(HttpClient.java:509) at java.base/sun.net.www.http.HttpClient.openServer(HttpClient.java:604) at java.base/sun.net.www.http.HttpClient.<init>(HttpClient.java:277) at java.base/sun.net.www.http.HttpClient.New(HttpClient.java:376) at java.base/sun.net.www.http.HttpClient.New(HttpClient.java:397) at java.base/sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1253) at java.base/sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1187) at java.base/sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1081) at java.base/sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:1015) at org.codehaus.cargo.container.tomcat.internal.TomcatManager.invoke(TomcatManager.java:567) at org.codehaus.cargo.container.tomcat.internal.TomcatManager.list(TomcatManager.java:882) at org.codehaus.cargo.container.tomcat.internal.TomcatManager.getStatus(TomcatManager.java:895) at org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.redeploy(AbstractTomcatManagerDeployer.java:161) at hudson.plugins.deploy.CargoContainerAdapter.deploy(CargoContainerAdapter.java:81) at hudson.plugins.deploy.CargoContainerAdapter$DeployCallable.invoke(CargoContainerAdapter.java:167) at hudson.plugins.deploy.CargoContainerAdapter$DeployCallable.invoke(CargoContainerAdapter.java:136) at hudson.FilePath.act(FilePath.java:1198) at hudson.FilePath.act(FilePath.java:1181) at hudson.plugins.deploy.CargoContainerAdapter.redeployFile(CargoContainerAdapter.java:133) at hudson.plugins.deploy.PasswordProtectedAdapterCargo.redeployFile(PasswordProtectedAdapterCargo.java:95) at hudson.plugins.deploy.DeployPublisher.perform(DeployPublisher.java:113) at jenkins.tasks.SimpleBuildStep.perform(SimpleBuildStep.java:123) at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:80) at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:47) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:818) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:767) at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.post2(MavenModuleSetBuild.java:1072) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:711) at hudson.model.Run.execute(Run.java:1925) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:543) at hudson.model.ResourceController.execute(ResourceController.java:101) at hudson.model.Executor.run(Executor.java:442) Build step 'Deploy war/ear to a container' marked build as failure Finished: FAILURE 이렇게 나옵니다. Caused byjava.net.ConnectException: Connection refused (Connection refused) 이렇게 나오는데 어떻게 해결해야 할까요?? 레포지토리 주소는 이렇게 옮겨놓았습니다!
-
미해결Jenkins를 이용한 CI/CD Pipeline 구축
ssh-copy-id 질문
[root@e83d1887d439 ~]# ssh-copy-id root@172.17.0.3/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/root/.ssh/id_rsa.pub"/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed/usr/bin/ssh-copy-id: WARNING: All keys were skipped because they already exist on the remote system. (if you think this is a mistake, you may want to use -f option)[root@e83d1887d439 ~]# ssh-copy-id root@172.17.0.4/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/root/.ssh/id_rsa.pub"/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed/usr/bin/ssh-copy-id: ERROR: ssh: connect to host 172.17.0.4 port 22: Connection refused[root@e83d1887d439 ~]# docker exec docker-server systemctl status sshdError: No such container: docker-server현재 발생한 에러인데 sang-gyu ~ docker network inspect bridge [ { "Name": "bridge", "Id": "b1e14a292142598e8bcd79d82082aaff3e38cea78e21bf96be13f653372729fc", "Created": "2023-11-22T09:53:35.039938917Z", "Scope": "local", "Driver": "bridge", "EnableIPv6": false, "IPAM": { "Driver": "default", "Options": null, "Config": [ { "Subnet": "172.17.0.0/16", "Gateway": "172.17.0.1" } ] }, "Internal": false, "Attachable": false, "Ingress": false, "ConfigFrom": { "Network": "" }, "ConfigOnly": false, "Containers": { "3fb54fe4c70280511b312f38bee776752f25bc3c63b419be2084e5b27225c643": { "Name": "jenkins-server", "EndpointID": "83739368b00a9e4d8cdfd8d09c96c8a313acf5fbd8bb52f6e715d58d0f79d373", "MacAddress": "02:42:ac:11:00:02", "IPv4Address": "172.17.0.2/16", "IPv6Address": "" }, "8a361c8c922999eba52422d0b6f7608fa2665b1a074a2a9df8ab5ee9d4ae45cd": { "Name": "docker-server", "EndpointID": "d0389122955b24d7db4b1eb7d5f60f001e1ab4de1a58305fa8d9b13711db16f5", "MacAddress": "02:42:ac:11:00:04", "IPv4Address": "172.17.0.4/16", "IPv6Address": "" }, "e83d1887d439e59bbe54630c8968cbcddbb461ca911116b304befa9d628833d4": { "Name": "ansible-server", "EndpointID": "cd7dc8ebd152940c9c2439ba26e9e21704b8426be6cef96cbd71ddb7e52da43b", "MacAddress": "02:42:ac:11:00:03", "IPv4Address": "172.17.0.3/16", "IPv6Address": "" } }, "Options": { "com.docker.network.bridge.default_bridge": "true", "com.docker.network.bridge.enable_icc": "true", "com.docker.network.bridge.enable_ip_masquerade": "true", "com.docker.network.bridge.host_binding_ipv4": "0.0.0.0", "com.docker.network.bridge.name": "docker0", "com.docker.network.driver.mtu": "65535" }, "Labels": {} } ][root@e83d1887d439 ~]# cat /etc/ansible/hosts[devops]172.17.0.3172.17.0.4 왜 에러가 발생하는지 모르겠습니다 엔서블 루트에 접속해서 카피하는게 맞는거같은데 ...
-
미해결AWS 배포 완벽가이드 (feat. Lightsail, Docker, ECS)
VPC와 Security Group 관련해서 질문 있습니다
안녕하세요 강사님강의 너무 잘 듣고 있습니다 🙂 위의 로드밸런서 내 vpc 통신 관련 강의를 듣다가 vpc 내 통신에 관련해서 질문이 있어 문의글을 남깁니다1. Vpc가 달라도 인바운드 규칙에 security group을 추가하면 통신 가능한지?2. 같은 vpc 내에서는 security group 없이도 통신 가능한지?로드밸런서 같은 경우, 로드밸런서를 연결하는 인스턴스에 로드밸런서의 sg를 매핑시켜놓는 것을 확인했습니다근데 제가 같은 vpc 내에서 sg 인바운드 규칙 추가 없이 private ipv4로 curl 요청을 보냈을 때, curl이 정상적으로 통신이 가능해서 여쭤봅니다위의 2가지 내용이 궁금합니다
-
미해결Jenkins를 이용한 CI/CD Pipeline 구축
강의자료가 없어요
커뮤니티에 올라온 것을 보니 강의자료가 있었다 없었다 하는 것 같은데, 지금은 또 없네요.. 빠른 확인 부탁드립니다.
-
해결됨AWS 배포 완벽가이드 (feat. Lightsail, Docker, ECS)
redis 서버 추가시 할당량 에러
이번엔 제가 스스로 해보고 싶었는데 안되서 질문드립니다 죄송합니다 ㅜㅜredis 서버를 추가하는 도중에이런창이떠서이렇게 추가를 했더니....redis 서버가 추가가안되서 다시 요청하려고했더니Only one open service quota increase request is allowed per quota라고 뜨네요 ㅜㅜ 혹시 redis 서버를 추가할 수 있는 방법이 있을까요?
-
해결됨AWS 배포 완벽가이드 (feat. Lightsail, Docker, ECS)
308 status code
안녕하세요. 백그라운드를 먼저 소개해드리자면,강사님께서 설명해주셨듯 http -> https로 리다이렉션을 시킬 때, 301 status code를 내뱉도록 만들었습니다. 테스트하다가 알게 됐는데,GET 메서드의 경우에는 잘 리다이렉션되지만, POST PUT 메서드의 경우 GET 메서드로 바뀐채 리다이렉션되더라고요. rfc 문서에서는 아래와 같이 설명하고 있습니다.| Note: For historical reasons, a user agent MAY change the request method from POST to GET for the subsequent request. If this behavior is undesired, the 308 (Permanent Redirect) status code can be used instead. 이에 따라 http -> https로 리다이렉션을 시킬 때 POST나 PUT 인 경우 308 status code를 주려고 했으나, aws 공식문서에는 이를 지원하고 있지 않더라고요.참고 : https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-listeners.html#redirect-actions보안 그룹에서 http에 대한 요청 자체를 막는것도 하나의 방법이 될거 같긴한데, 강사님께서는 어떻게 해결하실지 궁금해서 질문 남겨봅니다.
-
해결됨AWS 배포 완벽가이드 (feat. Lightsail, Docker, ECS)
client_loop: send disconnect: Broken pipe
안녕하세요 dev push 후 master 에 merge 중 에러가 나서 질문 드립니다! 섹션 4. Github Actions 를 이용한 배포자동화main branch 보호해주기 강좌를 보고 있는데요 client_loop: send disconnect: Broken pipe해당 에러가 나고 있지만domain 으로 접속해보니깐 수정한 텍스트 적용이 잘되더라구요 검색해보니https://may0301.tistory.com/10소켓이 닫혀서 nano ~/.ssh/config 파일에text editor에 Host * ServerAliveInterval 120 TCPKeepAlive no를 입력 해줘야한다고하는데 혹시 해당 에러가 나는 원인을 알수 있을까요?위에 검색한대로 소켓이 닫혀서 그럴까요?
-
해결됨AWS 배포 완벽가이드 (feat. Lightsail, Docker, ECS)
안녕하세요 ECS를 활용한 ETL 작업 관련해서 질문 드립니다
현재 강사님의 강의를 듣고 크롤러와 ETL 배치 파이프라인을 ECS로 배포해서 사용해보려고 합니다한가지 궁금한 점이 있어 문의드립니다해당 크롤러와 배치 잡은 모두 api가 아닌 스크립트로 이루어져 있습니다. 이 경우, 클러스터 내 서비스는 생성할 필요 없이, 태스크로만 필요할 때마다 생성하면 되나요? 아님 서비스도 사용하면 좋을까요?
-
미해결AWS(Amazon Web Service) 중/상급자를 위한 강의
첨부파일 관련
안녕하세요, 첨부 파일에 code_revisions 이라는 폴더가 들어있지 않습니다. 감사합니다.
-
해결됨Jenkins를 이용한 CI/CD Pipeline 구축
kex_exchange_identification: Connection closed by remote host 에러 질문 드려요 ㅠㅠ
다른 질문글에서 kex_exchange_identification: Connection closed by remote host 에러 해결 방법 확인하고 시도해봤는데 해결을 못해서 질문글 남겨요 ㅠㅠ맥북: apple silicon m1 chip이미지: edowon0623/ansible-server:m1컨테이너 실행: docker run --privileged -itd --name ansible-server -p 20022:22 -p 8082:8080 -e container=docker -v /sys/fs/cgroup:/sys/fs/cgroup edowon0623/ansible-server:m1 /usr/sbin/initssh 접속:ssh root@localhost -p 20022 컨테이너 포트 충돌나서 8082로 변경했어요나머진 스크립트랑 같아요docker ps 확인해보면 ansible-server status up 상태인데 ssh 접속하면 kex_exchange_identification: Connection closed by remote host 에러가 발생해요docker-server컨테이너는 ssh root@localhost -p 10022로 잘 되는데 ansible-server은 왜 에러가 발생할까요? ㅠㅠ
-
미해결Jenkins를 이용한 CI/CD Pipeline 구축
access. jenkins가 안됩니다
포트를 8083으로 설정하고 localhost:8083 으로 들어가도 페이지가 작동하지 않는다고 뜨네요..8080 포트를 lsof -i tcp:8080으로 조회해서 kill -9 으로 해도 자꾸 사용중이라고 뜹니다. docker run -d -p 8083:8083 -p 50000:50000 --name jenkins-server --restart=on-failure jenkins/jenkins:lts-jdk11 으로 실행하면 안되는건가요??
-
해결됨AWS 배포 완벽가이드 (feat. Lightsail, Docker, ECS)
redis Unhandled error. ([ErrorReply: ERR wrong number of arguments for 'auth' command]) 에러
안녕하세요 redis-serve 실행까지는 잘되는데vsCode 에서 yarn test 만 하면 꼭 아래와 같은 에러가 발생합니다.기본포트로 할때는 되다가6380 포트로 바꾼이후로 잘안되고 redis 에서도바뀐포트로 연결하고 비밀번호까지 쳤는데 아래와 같은 에러가 발생합니다.그리고 제소스가 에러가 나서제공해주신 express 소스를 압축을 풀어도 같은 에러가 발생을 합니다. 혹시몰라 build 파일을 삭제하고 재빌드후 다시 켜도 아래와 같은 에러가 나는데혹시 이유를 알 수 있을까요? ● POST /messages › responds with a success message Unhandled error. ([ErrorReply: ERR wrong number of arguments for 'auth' command]) at RedisSocket.<anonymous> (node_modules/@redis/client/dist/lib/client/index.js:396:14) at RedisSocket._RedisSocket_connect (node_modules/@redis/client/dist/lib/client/socket.js:166:18) at Commander.connect (node_modules/@redis/client/dist/lib/client/index.js:184:9) ● GET /messages › responds with all messages Unhandled error. ([ErrorReply: ERR wrong number of arguments for 'auth' command]) at RedisSocket.<anonymous> (node_modules/@redis/client/dist/lib/client/index.js:396:14) at RedisSocket._RedisSocket_connect (node_modules/@redis/client/dist/lib/client/socket.js:166:18) at Commander.connect (node_modules/@redis/client/dist/lib/client/index.js:184:9) ● Test suite failed to run thrown: "Exceeded timeout of 5000 ms for a hook. Add a timeout value to this test to increase the timeout, if this is a long-running test. See https://jestjs.io/docs/api#testname-fn-timeout." 18 | }); 19 | > 20 | afterAll(async () => { | ^ 21 | await client.flushDb(); 22 | await client.quit(); 23 | }); at Object.<anonymous> (app/index.test.ts:20:1)Test Suites: 1 failed, 1 total FAIL app/index.test.ts (101.064 s) ● POST /messages › responds with a success message Unhandled error. ([ErrorReply: ERR wrong number of arguments for 'auth' command]) at RedisSocket.<anonymous> (node_modules/@redis/client/dist/lib/client/index.js:396:14) at RedisSocket._RedisSocket_connect (node_modules/@redis/client/dist/lib/client/socket.js:166:18) at Commander.connect (node_modules/@redis/client/dist/lib/client/index.js:184:9) ● GET /messages › responds with all messages Unhandled error. ([ErrorReply: ERR wrong number of arguments for 'auth' command]) FAIL app/index.test.ts (100.278 s) ● POST /messages › responds with a success message Unhandled error. ([ErrorReply: ERR wrong number of arguments for 'auth' command]) at RedisSocket.<anonymous> (node_modules/@redis/client/dist/lib/client/index.js:396:14) at RedisSocket._RedisSocket_connect (node_modules/@redis/client/dist/lib/client/socket.js:166:18) at Commander.connect (node_modules/@redis/client/dist/lib/client/index.js:184:9) ● GET /messages › responds with all messages Unhandled error. ([ErrorReply: ERR wrong number of arguments for 'auth' command]) at RedisSocket.<anonymous> (node_modules/@redis/client/dist/lib/client/index.js:396:14) at RedisSocket._RedisSocket_connect (node_modules/@redis/client/dist/lib/client/socket.js:166:18) at Commander.connect (node_modules/@redis/client/dist/lib/client/index.js:184:9) ● Test suite failed to run thrown: "Exceeded timeout of 100000 ms for a hook. Add a timeout value to this test to increase the timeout, if this is a long-running test. See https://jestjs.io/docs/api#testname-fn-timeout." 18 | }); 19 | > 20 | afterAll(async () => { | ^ 21 | await client.flushDb(); 22 | await client.quit(); 23 | }, 100000); at Object.<anonymous> (app/index.test.ts:20:1)
-
미해결따라하며 배우는 도커와 CI환경 [2023.11 업데이트]
강의대로 트래비스ci 와 aws elastic beanstalk에 포트까지 다 맵핑했는데
강의와 다르게 도메인을 가면 저는 위 화면이 나옵니다.learn react 라는 화면이 안뜨고 이런 화면이 뜨는 이유는 뭘까요..
-
미해결Jenkins를 이용한 CI/CD Pipeline 구축
playbook 2번은 이걸 사용하세요.
- 학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! - 먼저 유사한 질문이 있었는지 검색해보세요. - 서로 예의를 지키며 존중하는 문화를 만들어가요. - 잠깐! 인프런 서비스 운영 관련 문의는 1:1 문의하기를 이용해주세요. ---- name: Download Tomcat9 from tomcat.apache.org hosts: devops tasks: - name: Create a Directory /opt/tomcat9 file: path: /opt/tomcat9 state: directory mode: 0755 - name: Download Tomcat using get_url get_url: url: https://dlcdn.apache.org/tomcat/tomcat-9/v9.0.82/bin/apache-tomcat-9.0.82.tar.gz dest: /opt/tomcat9 mode: 0755 checksum: sha512:https://downloads.apache.org/tomcat/tomcat-9/v9.0.82/bin/apache-tomcat-9.0.82.tar.gz.sha512 버전이 9.0.82 가 출시되어서 기존의 75버전은 링크가 삭제되었네요. 갑자기 에러 발생해서 놀랐는데 직접 url들어가니 페이지 자체가 없어서 발생한 에러였습니다. 여러분은 헷갈리지 마세용~
-
미해결따라하며 배우는 도커와 CI환경 [2023.11 업데이트]
.travis.yml 파일 작성하기 과정 중에 아무리해도 테스트가 성공이 안됩니다.
.travis.yml 파일 작성 후에 깃 커밋하고sudo: required language: generic services: - docker before-install: - echo "start creating an image with dockerfile" - docker build -t gonieyoo720/docker-react-app -f Dockerfile.dev . script: - docker run -e CI=true gonieyoo720/docker-react-app npm run test -- --coverage after_success: - echo "Test Success" 트래비스에까지 테스트를 돌렸는데, 몇번을 수정하고 해봐도트래비스에서 테스트를 통과하지 못하네요.오타 확인도 많이 해봤는데, 해결을 못하고있습니다.테스트에 중지되지않은 비동기작업이 있다고 오류를 해결하려면 devDependency를 추가하라는데, 어떻게 해야할까요--------------------|---------|----------|---------|---------|------------------- File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s --------------------|---------|----------|---------|---------|------------------- All files | 8.33 | 0 | 33.33 | 8.33 | App.js | 100 | 100 | 100 | 100 | index.js | 0 | 100 | 100 | 0 | 7-17 reportWebVitals.js | 0 | 0 | 0 | 0 | 1-8 --------------------|---------|----------|---------|---------|------------------- Test Suites: 1 failed, 1 total Tests: 1 failed, 1 total Snapshots: 0 total Time: 2.06 s Ran all test suites. Jest did not exit one second after the test run has completed. This usually means that there are asynchronous operations that weren't stopped in your tests. Consider running Jest with `--detectOpenHandles` to troubleshoot this issue. One of your dependencies, babel-preset-react-app, is importing the "@babel/plugin-proposal-private-property-in-object" package without declaring it in its dependencies. This is currently working because "@babel/plugin-proposal-private-property-in-object" is already in your node_modules folder for unrelated reasons, but it may break at any time. babel-preset-react-app is part of the create-react-app project, which is not maintianed anymore. It is thus unlikely that this bug will ever be fixed. Add "@babel/plugin-proposal-private-property-in-object" to your devDependencies to work around this error. This will make this message go away. The command "docker run -e CI=true gonieyoo720/docker-react-app npm run test -- --coverage" exited with 1. Done. Your build exited with 1.