inflearn logo
강의

강의

N
챌린지

챌린지

멘토링

멘토링

N
클립

클립

로드맵

로드맵

지식공유

묻고 답해요

172만명의 커뮤니티!! 함께 토론해봐요.

PM2 EADDRINUSE 에러

미해결

비전공자를 위한 풀스택 맛집지도 만들기 프로젝트!: Front, Back-end 그리고 배포까지

강의 보면서 PM2 배포를 따라해보았습니다. 5999번 포트를 사용했고, 몇 번 API 요청을 하면 EADDRINUSE 에러가 뜹니다. 0|index | Error: listen EADDRINUSE: address already in use :::5999 0|index | at Server.setupListenHandle [as listen2] (node:net:1872:16) 0|index | at listenInCluster (node:net:1920:12) 0|index | at Server.listen (node:net:2008:7) 0|index | at Function.listen (/home/ubuntu/hyerim-resume/server/nodemodules/express/lib/application.js:635:24) 0|index | at Object.<anonymous> (/home/ubuntu/hyerim-resume/server/index.js:6:11) 0|index | at Module._compile (node:internal/modules/cjs/loader:1376:14) 0|index | at Module._extensions..js (node:internal/modules/cjs/loader:1435:10) 0|index | at Module.load (node:internal/modules/cjs/loader:1207:32) 0|index | at Module._load (node:internal/modules/cjs/loader:1023:12) 0|index | at Object.<anonymous> (/home/ubuntu/.nvm/versions/node/v21.2.0/lib/node_modules/pm2/lib/ProcessContainerFork.js:33:23) { 0|index | code: 'EADDRINUSE', 0|index | errno: -98, 0|index | syscall: 'listen', 0|index | address: '::', 0|index | port: 5999 0|index | } 이 에러가 이미 사용중인 포트로 실행하려고 하는 문제라고 해서 매번 sudo lsof -i :5999 , sudo kill -9 ~~ 로 서버를 껐다 키면 또 금방 해당 에러가 발생합니다. sudo lsof -i :5999 로 실행중인 프로세스를 확인하면 다음과 같습니다. COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME node\x20/ 1396 root 25u IPv6 451174 0t0 TCP ip-172-31-39-74.ap-northeast-2.compute.internal:5999->121.143.65.200:56521 (ESTABLISHED) node\x20/ 1396 root 26u IPv6 20785 0t0 TCP *:5999 (LISTEN) node\x20/ 1396 root 30u IPv6 451237 0t0 TCP ip-172-31-39-74.ap-northeast-2.compute.internal:5999->121.143.65.200:56645 (ESTABLISHED) Mac M2 로 서버에 접근해서 PM2를 실행하는데, Mac에서 AirPlay 모드를 꺼야 한다는 Stack Overflow 내용도 보고 꺼봤지만 역시나 에러가 뜹니다. pm2 start index.js —watch 로 pm2 인스턴스를 실행했더니 몇번 재시작을 자동으로 해주는 것 같지만 결국 재시작이 너무 잦다며 더이상 재시작이 되지 않는 것 같아요. 해결 방법이 궁금합니다 ㅠㅠ 아래는 제 서버의 package.json, index.js입니다. Package.json { "name": "server", "version": "1.0.0", "description": "", "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1", "start": "node index.js" }, "author": "", "license": "ISC", "dependencies": { "compression": "^1.7.4", "cors": "^2.8.5", "express": "^4.18.2", "jsonwebtoken": "^9.0.2", "method-override": "^3.0.0", "mysql2": "^3.6.3", "nodemon": "^3.0.1", "socket.io": "^4.7.2", "winston": "^3.11.0", "winston-daily-rotate-file": "^4.7.1" } } index.js const express = require("./config/express"); const { logger } = require("./config/winston"); //log const port = 5999; express().listen(port); logger.info(`API Server Start At Port ${port}`);

  • HTML/CSS
  • javascript
  • aws
  • git
  • mysql
  • rest-api
  • github
  • pm2
김혜림 댓글 2 좋아요 0 조회수 437

2-2 h2 console connect 관련 질문 드립니다.

해결됨

쥬쥬와 함께 하루만에 시작하는 백엔드 - 스프링, 도커, AWS

처음에 잘 되다가 다시 접속할려고 보니 다음과 같이 오류가 뜨면서 connect가 안됩니다.. 그리고 h2 embedded가 아닌 server로 계속 잡힙니다

  • spring
  • git
  • docker
  • spring-boot
  • jpa
  • github
haha 댓글 1 좋아요 0 조회수 317

Product게시판 이미지에 대해서

미해결

코드로 배우는 React 19 with 스프링부트 API서버

토큰적용 후 발생하는 현상에 대해서 질문드립니다. Product게시판에 이미지에 경우, 아래와 같이 표시가되는데요 이때 토큰을 헤더에 설정 되어있지않기떄문에 {"error":"ERROR_ACCESS_TOKEN"}가 발생합니다. jwtAxios를 사용하여 처리는 가능할듯한데 문제는 결과값이 문자열로 되돌아와서 이미지표시가 좀 힘들어보이고 어떻게 처리해야할지 모르겠습니다. 이런경우 어떠한방식으로 처리하는게 좋을까요? src={`${host}/api/products/view/s_${product.uploadedFileNames[0]}`}

  • react
  • spring-boot
  • jpa
  • jwt
  • redux-toolkit
ultimates 댓글 2 좋아요 0 조회수 382

강의자료 부탁 드립니다~

미해결

프로그래밍 시작하기 : 파이썬 입문 (Inflearn Original)

안녕하세요, 강의자료 부탁 드려도 될까요? fbyksong@gmail.com 입니다.

  • python
댓글 1 좋아요 0 조회수 265

오류 메세지

미해결

실전 프로젝트로 배우는 데이터 앱 만들기 with Python & Streamlit

안녕하세요~~ 루비네 코딩 입니다 ^^ 최근 앱을 런칭할 때 다음과 같은 오류가 발생하고 있습니다. ModuleNotFoundError: No module named 'altair.vegalite.v4' 이런경우, 다음과 같이 altair 패키지의 버전을 바꾸어 설치해 주세요 ^^ 감사합니다~ pip uninstall altair pip install altair==4.2.2

  • python
  • streamlit
루비네 코딩 댓글 2 좋아요 1 조회수 919

react 모바일 삼성인터넷으로 사이트 접속시 크롬 연결 팝업

미해결

안녕하세요 react로 웹 페이지를 만들었는데 만든 사이트를 모바일로 삼성인터넷 앱을 통해 접속하니깐 크롬 연결 팝업이 자동으로 계속 나오게 되더라구요 혹시 코드상으로 크롬 연결 팝업이 뜨는걸 막을수있는 방법이 있을까요 ?

  • react
김경태 댓글 1 좋아요 0 조회수 423

강의 초반부 질문

미해결

따라하며 배우는 도커와 CI환경 [2023.11 업데이트]

초반부에 도커 초록불 들어온 거 확인하고 docker run hello-world를 입력하고 엔터를 눌렀는데 아무 반응이 일어나질 않는데 뭐가 잘못됐는지 어림짐작가능하실까요?

  • aws
  • docker
  • github
  • ci/cd
  • travis-ci
  • 데이터-엔지니어링
tmdals1357 댓글 2 좋아요 0 조회수 264

x.com에 모달창에 url을 적용시킨 이유가 있을까요?

해결됨

Next + React Query로 SNS 서비스 만들기

x.com 을 보면 로그인도 그렇고 게시글 올릴때도 그렇고 모달창이 뜰때마다 그냥 화면에 띄우는 방식이 아니라 저렇게 모달창을 띄울수 있는 url 따로 만든 이유가 뭘까요? 관리가 더 편해서일까요?

  • react
  • next.js
  • react-query
  • next-auth
  • msw
쵸잉 댓글 1 좋아요 0 조회수 598

인스턴스 중단 후 재시작

미해결

비전공자를 위한 풀스택 맛집지도 만들기 프로젝트!: Front, Back-end 그리고 배포까지

프로젝트를 완성하고 aws 인스턴스 프리티어 사용량이 제한량에 거의 도달해서 항상 켜놓으면 안되겠다고 생각해서 잠깐 중단시켰다가 며칠후에 재시작 시켰는데 재시작 한 이후로 지도상에 핀이 안 보이는데 어떻게 해야할까요? pm2도 해놔서 인스턴스를 중단했다가 재시작한것 때문인거 같은데... mysql을 접속하려 했을때 이런 창이 뜹니다.

  • HTML/CSS
  • javascript
  • aws
  • git
  • mysql
  • rest-api
  • github
댓글 1 좋아요 0 조회수 306

연관관계 맵핑에 대해서 질문드립니다.

미해결

코드로 배우는 React 19 with 스프링부트 API서버

@ElementCollection와 @EntityGraph사용법에 대해서 잘 숙지 하였습니다. 한가지 질문이 있습니다. JPA사용시 일반적으로 쓰이는 @OneToMany, @ManyToOne, @ManyToMany를 대신해서 @ElementCollection으로대체하여 사용이 가능할까요? 왠지 될거같은생각이 들긴하는데....

  • react
  • spring-boot
  • jpa
  • jwt
  • redux-toolkit
ultimates 댓글 1 좋아요 0 조회수 384

npm run start:dev 명령어 실행시 Error: connect ECONNREFUSED ::1:6379 에러 발생

미해결

Next + React Query로 SNS 서비스 만들기

해당 강의에서 postgresql 설치와 노드버전 18.17.0 환경에서 nest-prisma의 폴더를 다운 받은 후 npm i -> npx prisma migrate dev 까지는 순조롭게 진행되었으나 npm run start:dev에서 Error: connect ECONNREFUSED ::1:6379 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16) { errno: -61, code: 'ECONNREFUSED', syscall: 'connect', address: '::1', port: 6379 } 에러가 발생했습니다 구글링을 해보니 레디스 서버가 구동이 안된 것 같다고 나오기도하고 서버쪽을 잘 몰라 질문 드립니다 .env 파일 입니다 DATABASE_URL="postgresql://postgres:비번@localhost:5432/zcom?schema=public" REDIS_URL=redis://localhost:6379 COOKIE_SECRET=cookienyamnyam

  • react
  • next.js
  • react-query
  • next-auth
  • msw
mun9927 댓글 4 좋아요 2 조회수 1425

API 요청 시, cookie 보내는 것에 대한 질문

미해결

Next + React Query로 SNS 서비스 만들기

안녕하세요! 제로초님! 보너스 강의까지 잘 챙겨보고 있습니다. 매번 감사합니다! 제 질문은..! server action 함수쪽에서 fetch config 객체에 credentials 을 include로 해줘야 쿠키(세션)를 API 요청 시 같이 태워서 보낼 수 있다고 설명해주셨는데, 혹시 이것이 next-auth 로부터 도움을 받는 것일까요? 강의 수강 후, next 14로 프로젝트를 구현하고 있는데, fetch 할 때, credentials 를 include 해주었음에도 불구하고, 브라우저 application 탭에서 확인 할 수 있는 쿠키가 태워지지 않아서요. 해당 쿠키는 서버에서 로그인 시에 set-cookie 해준 쿠키이고, 프론트엔드는 localhost , 서버는 ec2에 배포된 서버입니다. 그래서 현재는 server action 함수내에서 next.js에서 지원해주는 cookie() 를 이용해서 fetch config 객체 내 headers 에 직접 쿠키를 넣어주고 있는데, 강의에서는 credentials 만으로 API 요청시 쿠키(세션)을 잘 태워서 보내주고 있는 것 같아 질문을 남기게 되었습니다.

  • react
  • next.js
  • react-query
  • next-auth
  • msw
withkey 댓글 2 좋아요 0 조회수 1082

master 브랜치가 안보여요

해결됨

모두의 깃 & 깃허브

명령어로 깃 공부하는 마지막 단원 학습 중인데 제꺼에는 main만 보이고 master는 안보이네요? (그래도 문제없이 따라가고는 있습니당) main은 원격 저장소에서만 보이는 것 아닌가요…?

  • git
  • github
-- 댓글 1 좋아요 0 조회수 393

갑자기 bundle exec jekyll serve가 안됩니다.

해결됨

깃헙 블로그(Github blog)로 차별화 된 나만의 홈페이지 만들기!

PS C:\project\ hwanklim.github.blog \ hwanklim.github.io \ hwanklim.github.io > bundle exec jekyll serve jekyll 4.3.2 | Error: (C:/project/ hwanklim.github.blog/hwanklim.github.io/hwanklim.github.io/_config.yml ): did not find expected key while parsing a block mapping at line 15 column 1 C:/Ruby32-x64/lib/ruby/3.2.0/psych/parser.rb:62:in `_native_parse': (C:/project/ hwanklim.github.blog/hwanklim.github.io/hwanklim.github.io/_config.yml ): did not find expected key while parsing a block mapping at line 15 column 1 (Psych::SyntaxError) from C:/Ruby32-x64/lib/ruby/3.2.0/psych/parser.rb:62:in `parse' from C:/project/ hwanklim.github.blog/hwanklim.github.io/hwanklim.github.io/vendor/bundle/ruby/3.2.0/gems/safe_yaml-1.0.5/lib/safe_yaml/load.rb:143:in `load' from C:/project/ hwanklim.github.blog/hwanklim.github.io/hwanklim.github.io/vendor/bundle/ruby/3.2.0/gems/safe_yaml-1.0.5/lib/safe_yaml/load.rb:157:in `block in load_file' from C:/project/ hwanklim.github.blog/hwanklim.github.io/hwanklim.github.io/vendor/bundle/ruby/3.2.0/gems/safe_yaml-1.0.5/lib/safe_yaml/load.rb:157:in `open' from C:/project/ hwanklim.github.blog/hwanklim.github.io/hwanklim.github.io/vendor/bundle/ruby/3.2.0/gems/safe_yaml-1.0.5/lib/safe_yaml/load.rb:157:in `load_file' from C:/project/ hwanklim.github.blog/hwanklim.github.io/hwanklim.github.io/vendor/bundle/ruby/3.2.0/gems/jekyll-4.3.2/lib/jekyll/configuration.rb:129:in `safe_load_file' from C:/project/ hwanklim.github.blog/hwanklim.github.io/hwanklim.github.io/vendor/bundle/ruby/3.2.0/gems/jekyll-4.3.2/lib/jekyll/configuration.rb:167:in `read_config_file' from C:/project/ hwanklim.github.blog/hwanklim.github.io/hwanklim.github.io/vendor/bundle/ruby/3.2.0/gems/jekyll-4.3.2/lib/jekyll/configuration.rb:198:in `block in read_config_files' from C:/project/ hwanklim.github.blog/hwanklim.github.io/hwanklim.github.io/vendor/bundle/ruby/3.2.0/gems/jekyll-4.3.2/lib/jekyll/configuration.rb:195:in `each' from C:/project/ hwanklim.github.blog/hwanklim.github.io/hwanklim.github.io/vendor/bundle/ruby/3.2.0/gems/jekyll-4.3.2/lib/jekyll/configuration.rb:195:in `read_config_files' from C:/project/ hwanklim.github.blog/hwanklim.github.io/hwanklim.github.io/vendor/bundle/ruby/3.2.0/gems/jekyll-4.3.2/lib/jekyll.rb:118:in `configuration' from C:/project/ hwanklim.github.blog/hwanklim.github.io/hwanklim.github.io/vendor/bundle/ruby/3.2.0/gems/jekyll-4.3.2/lib/jekyll/command.rb:44:in `configuration_from_options' from C:/project/ hwanklim.github.blog/hwanklim.github.io/hwanklim.github.io/vendor/bundle/ruby/3.2.0/gems/jekyll-4.3.2/lib/jekyll/commands/serve.rb:83:in `block (2 levels) in init_with_program' from C:/project/ hwanklim.github.blog/hwanklim.github.io/hwanklim.github.io/vendor/bundle/ruby/3.2.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `block in execute' from C:/project/ hwanklim.github.blog/hwanklim.github.io/hwanklim.github.io/vendor/bundle/ruby/3.2.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `each' from C:/project/ hwanklim.github.blog/hwanklim.github.io/hwanklim.github.io/vendor/bundle/ruby/3.2.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `execute' from C:/project/ hwanklim.github.blog/hwanklim.github.io/hwanklim.github.io/vendor/bundle/ruby/3.2.0/gems/mercenary-0.4.0/lib/mercenary/program.rb:44:in `go' from C:/project/ hwanklim.github.blog/hwanklim.github.io/hwanklim.github.io/vendor/bundle/ruby/3.2.0/gems/mercenary-0.4.0/lib/mercenary.rb:21:in `program' from C:/project/ hwanklim.github.blog/hwanklim.github.io/hwanklim.github.io/vendor/bundle/ruby/3.2.0/gems/jekyll-4.3.2/exe/jekyll:15:in `<top (required)>' from C:/project/ hwanklim.github.blog/hwanklim.github.io/hwanklim.github.io/vendor/bundle/ruby/3.2.0/bin/jekyll:25:in `load' from C:/project/ hwanklim.github.blog/hwanklim.github.io/hwanklim.github.io/vendor/bundle/ruby/3.2.0/bin/jekyll:25:in `<main>' 이런게 계속 뜨는데 뭐가 문제 인지 모르겠습니다. config.yml 파일도 딱히 오타가 안보여서 고민입니다. comments: provider : "disqus" # false (default), "disqus", "discourse", "facebook", "staticman", "staticman_v2", "utterances", "giscus", "custom" disqus: shortname : "hwanklimnote" discourse: server : # https://meta.discourse.org/t/embedding-discourse-comments-via-javascript/31963 , e.g.: meta.discourse.org facebook: # https://developers.facebook.com/docs/plugins/comments appid : # num_posts : # 5 (default) colorscheme : # "light" (default), "dark" utterances: theme : # "github-light" (default), "github-dark" issue_term : # "pathname" (default) staticman: branch : # "master" endpoint : # "https://{your Staticman v3 API}/v3/entry/github/" 특히 15번 minimal_mistakes_skin부터 31번 comments까지 앞에 #만 붙여서 주석처리하면 bundle exec jekyll serve가 잘 돌아갑니다. 근데 comments의 어떤 부분이 문제인지는 모르겠습니다..

  • 블로그
  • github
zxd753 댓글 1 좋아요 0 조회수 690

이제 이 강의는 내 것입니다.

해결됨

팀 개발을 위한 Git, GitHub 입문

ㅎㅎㅎ

  • git
  • github
  • 버전관리시스템
baldojaemw 댓글 1 좋아요 0 조회수 353

RS232c Serial 통신 관련 질문이 있습니다.

미해결

안녕하세요 연구실에서 자체적으로 실험기기와 컴퓨터랑 통신을 진행하는 중인데, 하나가 해결이 안 되어서 너무 답답해서 고수님들께 자문을 구하려고 합니다. Rs232 rtu 모드를 지원한다고 한 OS-20 overhead stirrer과 통신을 진행 중 입니다. 이 친구의 통신 규격과 방식은 아래 그림 3개와 같습니다. 이중 stirrer control 부분을 제가 참조해서 저 command를 hex 방식으로 입력하였는데 도무지 안되는 겁니다. 그런데 웃긴게 이 회사에서 지원하는 공식 통신프로그램을 사용하면 작동이 잘 되더군요. Instruction overview에서 나온 규칙은 다음과 같습니다. Command 구조는 Prefix Instruction_code Data_frame Checksum로 되어 있고 입력의 prefix는 0xfe로 시작하며 responce는 0xfd로 시작합니다. 모든 바이트 사이에는 50ms delay가 존재해야하며 Dataframe은 큰 수 자리부터 전송합니다. ex) 1000rpm을 data frame에 입력하려고 할 시 Hex값이 03E8이니까 앞에 두 자리를 0x03에 해당하고 뒤에 두 자리를 0xE8로 해당시킵니다. Null은 0x00입니다. Checksum 방식은 0xfe,0xfd인 prefix를 제외하고 나머지를 전부 더한 값으로 0xnn 이런식으로 표현됩니다. 신기하게도 16진수의 2자리를 넘어가도 뒤에 2 자리만 붙이면 된다고 하더군요. ex) 0xfe 0xb1 0x03 0xe8 0x00 checksum인데 0xfe를 제외하고 다 더하면 019c이지만 0x9c만 입력하면 되는 형식입니다. 그래서 이 규칙대로 코드를 짜서 통신을 해 보았는데, 아무리 해도 안되어서 너무 답답합니다. 심지어 제가 잘못했는지 확인하려고 시리얼 통신 sniffer을 사용하여서 공식 프로그램에서는 어떻게 통신이 되나 뜯어보았습니다. 결과는 아래 사진과 같습니다. 제가 python으로 작성한 코드는 아래와 같습니다. import serial import time ser = serial.Serial( port='COM7', # Update with your actual port baudrate=9600, parity=serial.PARITY_NONE, # No parity stopbits=serial.STOPBITS_ONE, # 1 stop bit bytesize=serial.EIGHTBITS # 8 data bits ) def send_hex_string(hex_string): # Convert the hex string to bytes byte_data = bytes.fromhex(hex_string) # Send the bytes over the serial port ser.write(byte_data) def send_hex_string_with_delay(hex_string, delay_ms=50): for i in range(0, len(hex_string), 2): # Extract each pair of characters and convert to bytes hex_pair = hex_string[i:i + 2] byte_data = bytes.fromhex(hex_pair) # Send the bytes over the serial port ser.write(byte_data) # Wait for the specified delay time.sleep(delay_ms / 1000.0) command = 'feb103e8009c' send_hex_string_with_delay(command) ser.close() 또한 파이썬에서의 결과를 시리얼 전송으로 보면 다음과 같습니다. 입력은 제대로 되는데 기기에는 반응이 제대로 나오지 않네요... 제가 잘못하고 빠뜨린 점이 있을까요? 읽어주셔서 정말 감사드립니다.

  • rs232
  • serial
  • 커뮤니케이션
  • python
전성훈 댓글 1 좋아요 1 조회수 1023

섹션3. 날씨 재검증하기 NextRequest 질문입니다.

해결됨

손에 익는 Next.js - 공식 문서 훑어보기

콘솔로그 결과 안녕하세요 선생님, 강의를보고 간단하게 따라해보았는데요 NextRequest 타입의 req를 매개변수로 받아와서 req를 console.log 에 찍어보면 undefined가 뜹니다. 혹시 NextRequest 사용에 조건이 따로 있을까요? req.nextUrl.pathname 으로 url 도 가져와보고 싶고한데 생각처럼 잘 안되네요..

  • react
  • typescript
  • next.js
  • next.js13
가스라이팅의정석 댓글 1 좋아요 1 조회수 363

이미지 부분에 cctv 영상을 넣고 싶은데요.

미해결

비전공자를 위한 풀스택 맛집지도 만들기 프로젝트!: Front, Back-end 그리고 배포까지

이미지 부분에 cctv 영상을 구현하고 싶은데, 혹시 .... api를 연동해서 어떻게 연결하면 되는지 알 수 있을까요?

  • HTML/CSS
  • javascript
  • aws
  • git
  • mysql
  • rest-api
  • github
hihi 댓글 2 좋아요 0 조회수 610

강의 자료 관련 질문드립니다.

미해결

따라하며 배우는 도커와 CI환경 [2023.11 업데이트]

안녕하세요 강사님 좋은 강의 올려주셔서 감사합니다. 강의 수강을 위해 원본 도표강의 자료 항목에 있는 강의 자료 다운로드 후 열어보려고하니 파일이 확인되지않습니다. (확장자 등을 변경해서 확인하려고해도 불러오지 못하고있습니다.) 혹시 별도의 pdf 리더가 필요한건가요? 바쁘시겟지만 확인 한번 부탁드립니다.

  • aws
  • docker
  • github
  • ci/cd
  • travis-ci
  • 데이터-엔지니어링
potter119 댓글 1 좋아요 0 조회수 409

강의 자료 부탁드립니다!

미해결

프로그래밍 시작하기 : 파이썬 입문 (Inflearn Original)

안녕하세요. 강의 자료 요청합니다. elel3418@daum.net 감사합니다!

  • python
댓글 1 좋아요 0 조회수 216

인기 태그

인프런 TOP Writers

주간 인기글