• 로그인
  • 장바구니에 상품이 없습니다.

home2 게시판 Next.js 게시판 aws 배포 오류

aws 배포 오류

4 글 보임 - 1 에서 4 까지 (총 4 중에서)
  • 글쓴이
  • #96848

    한결
    참가자
    안녕하세요 aws 배포하면서 도메인 접속이 안되어 질문드립니다.
    현재 도메인 접속할경우 응답하는시간이 오래걸려 웹페이지를 찾을 수 없다고 나옵니다.
    로그를 살펴보았는데 왜이럴까요 ㅠㅜ node 모듈도 빼고 .next도 포함해서 zip파일 업로드 진행완료 하였고 
    aws이전 로컬node서버?에서는 잘되었습니다. 콘솔에서 별다른 에러도 없었구요.
    aws로그에서는 아래처럼 나오는데 해결 방법이있을까요?ㅜㅜ
    
    
    
    ----------------------------------------
    /var/log/eb-hooks.log
    ----------------------------------------
    ----------------------------------------
    /var/log/nginx/access.log
    ----------------------------------------
    198.235.24.16 - - [04/Sep/2023:05:56:44 +0000] "\x16\x03\x01\x00\xCA\x01\x00\x00\xC6\x03\x03\xB23\xB7l\xE8\x92#~3\x0E2\x00\x96\xE7Fs\xDE\x04k\xD6fJ(\x89\xBC\xC0\x1A\x09\xB4\x03QX\x00\x00h\xCC\x14\xCC\x13\xC0/\xC0+\xC00\xC0,\xC0\x11\xC0\x07\xC0'\xC0#\xC0\x13\xC0\x09\xC0(\xC0$\xC0\x14\xC0" 400 150 "-" "-" "-"
    45.8.22.14 - - [04/Sep/2023:06:18:33 +0000] "GET /.env HTTP/1.1" 502 150 "-" "python-requests/2.31.0" "-"
    45.8.22.14 - - [04/Sep/2023:06:18:41 +0000] "POST / HTTP/1.1" 502 150 "-" "python-requests/2.31.0" "-"
    18.130.60.164 - - [04/Sep/2023:06:25:03 +0000] "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" 400 150 "-" "-" "-"
    ----------------------------------------
    /var/log/nginx/error.log
    ----------------------------------------
    2023/09/04 05:31:46 [warn] 1968#1968: could not build optimal types_hash, you should increase either types_hash_max_size: 1024 or types_hash_bucket_size: 64; ignoring types_hash_bucket_size
    2023/09/04 05:31:47 [warn] 2005#2005: could not build optimal types_hash, you should increase either types_hash_max_size: 1024 or types_hash_bucket_size: 64; ignoring types_hash_bucket_size
    2023/09/04 05:31:47 [warn] 2006#2006: could not build optimal types_hash, you should increase either types_hash_max_size: 1024 or types_hash_bucket_size: 64; ignoring types_hash_bucket_size
    2023/09/04 05:56:44 [warn] 2009#2009: *2 using uninitialized "year" variable while logging request, client: 198.235.24.16, server: , request: "�Ê��Ʋ3·lè’#~32�–çFsÞkÖfJ(‰¼À	´QX��hÌÌÀ/À+À0À,ÀÀÀ'À#ÀÀ	À(À$ÀÀ"
    2023/09/04 05:56:44 [warn] 2009#2009: *2 using uninitialized "month" variable while logging request, client: 198.235.24.16, server: , request: "�Ê��Ʋ3·lè’#~32�–çFsÞkÖfJ(‰¼À	´QX��hÌÌÀ/À+À0À,ÀÀÀ'À#ÀÀ	À(À$ÀÀ"
    2023/09/04 05:56:44 [warn] 2009#2009: *2 using uninitialized "day" variable while logging request, client: 198.235.24.16, server: , request: "�Ê��Ʋ3·lè’#~32�–çFsÞkÖfJ(‰¼À	´QX��hÌÌÀ/À+À0À,ÀÀÀ'À#ÀÀ	À(À$ÀÀ"
    2023/09/04 05:56:44 [warn] 2009#2009: *2 using uninitialized "hour" variable while logging request, client: 198.235.24.16, server: , request: "�Ê��Ʋ3·lè’#~32�–çFsÞkÖfJ(‰¼À	´QX��hÌÌÀ/À+À0À,ÀÀÀ'À#ÀÀ	À(À$ÀÀ"
    2023/09/04 06:18:33 [error] 2010#2010: *3 connect() failed (111: Connection refused) while connecting to upstream, client: 45.8.22.14, server: , request: "GET /.env HTTP/1.1", upstream: "http://127.0.0.1:8080/.env", host: "52.78.36.152"
    2023/09/04 06:18:41 [error] 2010#2010: *5 connect() failed (111: Connection refused) while connecting to upstream, client: 45.8.22.14, server: , request: "POST / HTTP/1.1", upstream: "http://127.0.0.1:8080/", host: "52.78.36.152"
    2023/09/04 06:25:03 [warn] 2010#2010: *7 using uninitialized "year" variable while logging request, client: 18.130.60.164, server: , request: "��������������������"
    2023/09/04 06:25:03 [warn] 2010#2010: *7 using uninitialized "month" variable while logging request, client: 18.130.60.164, server: , request: "��������������������"
    2023/09/04 06:25:03 [warn] 2010#2010: *7 using uninitialized "day" variable while logging request, client: 18.130.60.164, server: , request: "��������������������"
    2023/09/04 06:25:03 [warn] 2010#2010: *7 using uninitialized "hour" variable while logging request, client: 18.130.60.164, server: , request: "��������������������"
    ----------------------------------------
    /var/log/web.stdout.log
    ----------------------------------------
    Sep  4 05:31:47 ip-172-31-10-255 web[1964]: > lotto@0.1.0 start
    Sep  4 05:31:47 ip-172-31-10-255 web[1964]: > next start
    Sep  4 05:31:48 ip-172-31-10-255 web[2029]: - ready started server on [::]:8080, url: http://localhost:8080
    Sep  4 05:31:48 ip-172-31-10-255 web[2029]: [Error: ENOENT: no such file or directory, open '/var/app/current/.next/BUILD_ID'] {
    Sep  4 05:31:48 ip-172-31-10-255 web[2029]:  errno: -2,
    Sep  4 05:31:48 ip-172-31-10-255 web[2029]:  code: 'ENOENT',
    Sep  4 05:31:48 ip-172-31-10-255 web[2029]:  syscall: 'open',
    Sep  4 05:31:48 ip-172-31-10-255 web[2029]:  path: '/var/app/current/.next/BUILD_ID'
    Sep  4 05:31:48 ip-172-31-10-255 web[2029]: }
    Sep  4 05:31:49 ip-172-31-10-255 web[2070]: > lotto@0.1.0 start
    Sep  4 05:31:49 ip-172-31-10-255 web[2070]: > next start
    Sep  4 05:31:50 ip-172-31-10-255 web[2084]: - ready started server on [::]:8080, url: http://localhost:8080
    Sep  4 05:31:50 ip-172-31-10-255 web[2084]: [Error: ENOENT: no such file or directory, open '/var/app/current/.next/BUILD_ID'] {
    Sep  4 05:31:50 ip-172-31-10-255 web[2084]:  errno: -2,
    Sep  4 05:31:50 ip-172-31-10-255 web[2084]:  code: 'ENOENT',
    Sep  4 05:31:50 ip-172-31-10-255 web[2084]:  syscall: 'open',
    Sep  4 05:31:50 ip-172-31-10-255 web[2084]:  path: '/var/app/current/.next/BUILD_ID'
    Sep  4 05:31:50 ip-172-31-10-255 web[2084]: }
    Sep  4 05:31:51 ip-172-31-10-255 web[2098]: > lotto@0.1.0 start
    Sep  4 05:31:51 ip-172-31-10-255 web[2098]: > next start
    Sep  4 05:31:52 ip-172-31-10-255 web[2112]: - ready started server on [::]:8080, url: http://localhost:8080
    Sep  4 05:31:52 ip-172-31-10-255 web[2112]: [Error: ENOENT: no such file or directory, open '/var/app/current/.next/BUILD_ID'] {
    Sep  4 05:31:52 ip-172-31-10-255 web[2112]:  errno: -2,
    Sep  4 05:31:52 ip-172-31-10-255 web[2112]:  code: 'ENOENT',
    Sep  4 05:31:52 ip-172-31-10-255 web[2112]:  syscall: 'open',
    Sep  4 05:31:52 ip-172-31-10-255 web[2112]:  path: '/var/app/current/.next/BUILD_ID'
    Sep  4 05:31:52 ip-172-31-10-255 web[2112]: }
    Sep  4 05:31:53 ip-172-31-10-255 web[2125]: > lotto@0.1.0 start
    Sep  4 05:31:53 ip-172-31-10-255 web[2125]: > next start
    Sep  4 05:31:54 ip-172-31-10-255 web[2139]: - ready started server on [::]:8080, url: http://localhost:8080
    Sep  4 05:31:54 ip-172-31-10-255 web[2139]: [Error: ENOENT: no such file or directory, open '/var/app/current/.next/BUILD_ID'] {
    Sep  4 05:31:54 ip-172-31-10-255 web[2139]:  errno: -2,
    Sep  4 05:31:54 ip-172-31-10-255 web[2139]:  code: 'ENOENT',
    Sep  4 05:31:54 ip-172-31-10-255 web[2139]:  syscall: 'open',
    Sep  4 05:31:54 ip-172-31-10-255 web[2139]:  path: '/var/app/current/.next/BUILD_ID'
    Sep  4 05:31:54 ip-172-31-10-255 web[2139]: }
    Sep  4 05:31:55 ip-172-31-10-255 web[2152]: > lotto@0.1.0 start
    Sep  4 05:31:55 ip-172-31-10-255 web[2152]: > next start
    Sep  4 05:31:56 ip-172-31-10-255 web[2166]: - ready started server on [::]:8080, url: http://localhost:8080
    Sep  4 05:31:56 ip-172-31-10-255 web[2166]: [Error: ENOENT: no such file or directory, open '/var/app/current/.next/BUILD_ID'] {
    Sep  4 05:31:56 ip-172-31-10-255 web[2166]:  errno: -2,
    Sep  4 05:31:56 ip-172-31-10-255 web[2166]:  code: 'ENOENT',
    Sep  4 05:31:56 ip-172-31-10-255 web[2166]:  syscall: 'open',
    Sep  4 05:31:56 ip-172-31-10-255 web[2166]:  path: '/var/app/current/.next/BUILD_ID'
    Sep  4 05:31:56 ip-172-31-10-255 web[2166]: }
    Sep  4 05:31:57 ip-172-31-10-255 web[2178]: > lotto@0.1.0 start
    Sep  4 05:31:57 ip-172-31-10-255 web[2178]: > next start
    Sep  4 05:31:58 ip-172-31-10-255 web[2192]: - ready started server on [::]:8080, url: http://localhost:8080
    Sep  4 05:31:58 ip-172-31-10-255 web[2192]: [Error: ENOENT: no such file or directory, open '/var/app/current/.next/BUILD_ID'] {
    Sep  4 05:31:58 ip-172-31-10-255 web[2192]:  errno: -2,
    Sep  4 05:31:58 ip-172-31-10-255 web[2192]:  code: 'ENOENT',
    Sep  4 05:31:58 ip-172-31-10-255 web[2192]:  syscall: 'open',
    Sep  4 05:31:58 ip-172-31-10-255 web[2192]:  path: '/var/app/current/.next/BUILD_ID'
    Sep  4 05:31:58 ip-172-31-10-255 web[2192]: }
    ----------------------------------------
    /var/log/eb-engine.log
    ----------------------------------------
    2023/09/04 05:31:46.368961 [INFO] Running command /bin/sh -c systemctl is-active web.service
    2023/09/04 05:31:46.379081 [INFO] Running command /bin/sh -c systemctl start web.service
    2023/09/04 05:31:46.441709 [INFO] Executing instruction: start X-Ray
    2023/09/04 05:31:46.441740 [INFO] X-Ray is not enabled.
    2023/09/04 05:31:46.441745 [INFO] Executing instruction: start proxy with new configuration
    2023/09/04 05:31:46.441774 [INFO] Running command /bin/sh -c /usr/sbin/nginx -t -c /var/proxy/staging/nginx/nginx.conf
    2023/09/04 05:31:46.481762 [INFO] nginx: [warn] could not build optimal types_hash, you should increase either types_hash_max_size: 1024 or types_hash_bucket_size: 64; ignoring types_hash_bucket_size
    nginx: the configuration file /var/proxy/staging/nginx/nginx.conf syntax is ok
    nginx: configuration file /var/proxy/staging/nginx/nginx.conf test is successful
    2023/09/04 05:31:46.481847 [INFO] Running command /bin/sh -c cp -rp /var/proxy/staging/nginx/* /etc/nginx
    2023/09/04 05:31:46.490587 [INFO] Running command /bin/sh -c systemctl show -p PartOf nginx.service
    2023/09/04 05:31:46.520696 [INFO] Running command /bin/sh -c systemctl daemon-reload
    2023/09/04 05:31:46.930531 [INFO] Running command /bin/sh -c systemctl reset-failed
    2023/09/04 05:31:46.945066 [INFO] Running command /bin/sh -c systemctl show -p PartOf nginx.service
    2023/09/04 05:31:46.965379 [INFO] Running command /bin/sh -c systemctl is-active nginx.service
    2023/09/04 05:31:46.977826 [INFO] Running command /bin/sh -c systemctl start nginx.service
    2023/09/04 05:31:47.156955 [INFO] Executing instruction: configureSqsd
    2023/09/04 05:31:47.156976 [INFO] This is a web server environment instance, skip configure sqsd daemon ...
    2023/09/04 05:31:47.156981 [INFO] Executing instruction: startSqsd
    2023/09/04 05:31:47.156984 [INFO] This is a web server environment instance, skip start sqsd daemon ...
    2023/09/04 05:31:47.156988 [INFO] Executing instruction: Track pids in healthd
    2023/09/04 05:31:47.156992 [INFO] This is an enhanced health env...
    2023/09/04 05:31:47.157011 [INFO] Running command /bin/sh -c systemctl show -p ConsistsOf aws-eb.target | cut -d= -f2
    2023/09/04 05:31:47.175710 [INFO] cfn-hup.service healthd.service nginx.service
    2023/09/04 05:31:47.175768 [INFO] Running command /bin/sh -c systemctl show -p ConsistsOf eb-app.target | cut -d= -f2
    2023/09/04 05:31:47.208006 [INFO] web.service
    2023/09/04 05:31:47.209208 [INFO] Executing instruction: RunAppDeployPostDeployHooks
    2023/09/04 05:31:47.209233 [INFO] Executing platform hooks in .platform/hooks/postdeploy/
    2023/09/04 05:31:47.209253 [INFO] The dir .platform/hooks/postdeploy/ does not exist
    2023/09/04 05:31:47.209256 [INFO] Finished running scripts in /var/app/current/.platform/hooks/postdeploy
    2023/09/04 05:31:47.209297 [INFO] Executing cleanup logic
    2023/09/04 05:31:47.210054 [INFO] Platform Engine finished execution on command: self-startup
    2023/09/04 05:36:00.108226 [INFO] Starting...
    2023/09/04 05:36:00.108275 [INFO] Starting EBPlatform-PlatformEngine
    2023/09/04 05:36:00.108294 [INFO] reading event message file
    2023/09/04 05:36:00.110656 [INFO] Engine received EB command cfn-hup-exec
    2023/09/04 05:36:00.212890 [INFO] Running command /bin/sh -c /opt/aws/bin/cfn-get-metadata -s arn:aws:cloudformation:ap-northeast-2:866467597908:stack/awseb-e-nush4sahsm-stack/65cefe40-4ae3-11ee-b937-06db84692444 -r AWSEBAutoScalingGroup --region ap-northeast-2
    2023/09/04 05:36:00.611618 [INFO] Running command /bin/sh -c /opt/aws/bin/cfn-get-metadata -s arn:aws:cloudformation:ap-northeast-2:866467597908:stack/awseb-e-nush4sahsm-stack/65cefe40-4ae3-11ee-b937-06db84692444 -r AWSEBBeanstalkMetadata --region ap-northeast-2
    2023/09/04 05:36:00.998682 [INFO] checking whether command tail-log is applicable to this instance...
    2023/09/04 05:36:00.998696 [INFO] this command is applicable to the instance, thus instance should execute command
    2023/09/04 05:36:00.998699 [INFO] Engine command: (tail-log)
    2023/09/04 05:36:00.999379 [INFO] Executing instruction: GetTailLogs
    2023/09/04 05:36:00.999387 [INFO] Tail Logs...
    2023/09/04 05:36:01.000792 [INFO] Running command /bin/sh -c tail -n 100 /var/log/web.stdout.log
    2023/09/04 05:36:01.004156 [INFO] Running command /bin/sh -c tail -n 100 /var/log/eb-engine.log
    2023/09/04 05:36:01.006486 [INFO] Running command /bin/sh -c tail -n 100 /var/log/eb-hooks.log
    2023/09/04 05:36:01.008804 [INFO] Running command /bin/sh -c tail -n 100 /var/log/nginx/access.log
    2023/09/04 05:36:01.010687 [INFO] Running command /bin/sh -c tail -n 100 /var/log/nginx/error.log
    2023/09/04 05:36:01.093838 [INFO] Executing cleanup logic
    2023/09/04 05:36:01.093919 [INFO] CommandService Response: {"status":"SUCCESS","api_version":"1.0","results":[{"status":"SUCCESS","msg":"Engine execution has succeeded.","returncode":0,"events":[{"msg":"Instance deployment completed successfully.","timestamp":1693805761093,"severity":"INFO"}]}]}
    2023/09/04 05:36:01.093936 [INFO] Platform Engine finished execution on command: tail-log
    2023/09/04 06:05:23.986246 [INFO] Starting...
    2023/09/04 06:05:23.986300 [INFO] Starting EBPlatform-PlatformEngine
    2023/09/04 06:05:23.986318 [INFO] reading event message file
    2023/09/04 06:05:23.986464 [INFO] Engine received EB command cfn-hup-exec
    2023/09/04 06:05:24.059253 [INFO] Running command /bin/sh -c /opt/aws/bin/cfn-get-metadata -s arn:aws:cloudformation:ap-northeast-2:866467597908:stack/awseb-e-nush4sahsm-stack/65cefe40-4ae3-11ee-b937-06db84692444 -r AWSEBAutoScalingGroup --region ap-northeast-2
    2023/09/04 06:05:24.491231 [INFO] Running command /bin/sh -c /opt/aws/bin/cfn-get-metadata -s arn:aws:cloudformation:ap-northeast-2:866467597908:stack/awseb-e-nush4sahsm-stack/65cefe40-4ae3-11ee-b937-06db84692444 -r AWSEBBeanstalkMetadata --region ap-northeast-2
    2023/09/04 06:05:24.878160 [INFO] checking whether command tail-log is applicable to this instance...
    2023/09/04 06:05:24.878176 [INFO] this command is applicable to the instance, thus instance should execute command
    2023/09/04 06:05:24.878185 [INFO] Engine command: (tail-log)
    2023/09/04 06:05:24.878263 [INFO] Executing instruction: GetTailLogs
    2023/09/04 06:05:24.878272 [INFO] Tail Logs...
    2023/09/04 06:05:24.879042 [INFO] Running command /bin/sh -c tail -n 100 /var/log/eb-hooks.log
    2023/09/04 06:05:24.881453 [INFO] Running command /bin/sh -c tail -n 100 /var/log/nginx/access.log
    2023/09/04 06:05:24.883378 [INFO] Running command /bin/sh -c tail -n 100 /var/log/nginx/error.log
    2023/09/04 06:05:24.886178 [INFO] Running command /bin/sh -c tail -n 100 /var/log/web.stdout.log
    2023/09/04 06:05:24.888028 [INFO] Running command /bin/sh -c tail -n 100 /var/log/eb-engine.log
    2023/09/04 06:05:24.946085 [INFO] Executing cleanup logic
    2023/09/04 06:05:24.946164 [INFO] CommandService Response: {"status":"SUCCESS","api_version":"1.0","results":[{"status":"SUCCESS","msg":"Engine execution has succeeded.","returncode":0,"events":[{"msg":"Instance deployment completed successfully.","timestamp":1693807524946,"severity":"INFO"}]}]}
    2023/09/04 06:05:24.946180 [INFO] Platform Engine finished execution on command: tail-log
    2023/09/04 06:26:45.730298 [INFO] Starting...
    2023/09/04 06:26:45.730349 [INFO] Starting EBPlatform-PlatformEngine
    2023/09/04 06:26:45.730376 [INFO] reading event message file
    2023/09/04 06:26:45.730660 [INFO] Engine received EB command cfn-hup-exec
    2023/09/04 06:26:45.800802 [INFO] Running command /bin/sh -c /opt/aws/bin/cfn-get-metadata -s arn:aws:cloudformation:ap-northeast-2:866467597908:stack/awseb-e-nush4sahsm-stack/65cefe40-4ae3-11ee-b937-06db84692444 -r AWSEBAutoScalingGroup --region ap-northeast-2
    2023/09/04 06:26:46.179123 [INFO] Running command /bin/sh -c /opt/aws/bin/cfn-get-metadata -s arn:aws:cloudformation:ap-northeast-2:866467597908:stack/awseb-e-nush4sahsm-stack/65cefe40-4ae3-11ee-b937-06db84692444 -r AWSEBBeanstalkMetadata --region ap-northeast-2
    2023/09/04 06:26:46.571420 [INFO] checking whether command tail-log is applicable to this instance...
    2023/09/04 06:26:46.571432 [INFO] this command is applicable to the instance, thus instance should execute command
    2023/09/04 06:26:46.571435 [INFO] Engine command: (tail-log)
    2023/09/04 06:26:46.571489 [INFO] Executing instruction: GetTailLogs
    2023/09/04 06:26:46.571493 [INFO] Tail Logs...
    2023/09/04 06:26:46.571729 [INFO] Running command /bin/sh -c tail -n 100 /var/log/eb-hooks.log
    2023/09/04 06:26:46.574590 [INFO] Running command /bin/sh -c tail -n 100 /var/log/nginx/access.log
    2023/09/04 06:26:46.576678 [INFO] Running command /bin/sh -c tail -n 100 /var/log/nginx/error.log
    2023/09/04 06:26:46.578650 [INFO] Running command /bin/sh -c tail -n 100 /var/log/web.stdout.log
    2023/09/04 06:26:46.582559 [INFO] Running command /bin/sh -c tail -n 100 /var/log/eb-engine.log
     
    #96904

    codingapple
    키 마스터
    npm run build도 입력하고나서 올렸나요
    #96941

    한결
    참가자
    넵! 그거 하고 zip으로 압축하였습니다.  ㅠㅠ
    #96964

    codingapple
    키 마스터
    nextjs라이브러리 신버전 버그인가봅니다 버전약간 낮춰서 올려봐야할듯요
4 글 보임 - 1 에서 4 까지 (총 4 중에서)
  • 답변은 로그인 후 가능합니다.

About

현재 월 700명 신규수강중입니다.

  (09:00~20:00) 빠른 상담은 카톡 플러스친구 코딩애플 (링크)
  admin@codingapple.com
  이용약관
ⓒ Codingapple, 강의 예제, 영상 복제 금지
top

© Codingapple, All rights reserved. 슈퍼로켓 에듀케이션 / 서울특별시 강동구 고덕로 19길 30 / 사업자등록번호 : 212-26-14752 온라인 교육학원업 / 통신판매업신고번호 : 제 2017-서울강동-0002 호 / 개인정보관리자 : 박종흠