강의

멘토링

커뮤니티

Cộng đồng Hỏi & Đáp của Inflearn

Hình ảnh hồ sơ của sukwon
sukwon

câu hỏi đã được viết

[Inflearn Award Bestseller] Cách trở thành chuyên gia tự động hóa AI không cần code, Hướng dẫn hoàn hảo về n8n

Giao diện cơ bản của N8N và thử tạo Chat AI Agent

Docker 에서 n8n 실행 후 connection lost

Đã giải quyết

Viết

·

70

·

Đã chỉnh sửa

0

안녕하세요.

Docker 설치(CPU) 를 완료하고,

N8N 실행을 해서 따라가보려고 하는데,

N8N 에 Connection Lost 가 지속적으로 뜨고 있습니다. ㅠㅠ

DOCKER 만 보면 연결은 되어있는것 같은데,

문제점이 무엇일까요?

 

아래 다른질문을 참고하여,

시스템 부팅을 해도 동일한 증상이고,

docker logs n8n --tail=100
입력시, 아래와 같이 나옵니다. 무엇을 확인해야할까요?

image.pngimage.png

 Initializing n8n process

Error tracking disabled because this release is older than 6 weeks.

n8n ready on ::, port 5678

There are deprecations related to your environment variables. Please take the recommended actions to update your configuration:

- N8N_RUNNERS_ENABLED -> Running n8n without task runners is deprecated. Task runners will be turned on by default in a future version. Please set N8N_RUNNERS_ENABLED=true to enable task runners now and avoid potential issues in the future. Learn more: https://docs.n8n.io/hosting/configuration/task-runners/

- N8N_BLOCK_ENV_ACCESS_IN_NODE -> The default value of N8N_BLOCK_ENV_ACCESS_IN_NODE will be changed from false to true in a future version. If you need to access environment variables from the Code Node or from expressions, please set N8N_BLOCK_ENV_ACCESS_IN_NODE=false. Learn more: https://docs.n8n.io/hosting/configuration/environment-variables/security/

- N8N_GIT_NODE_DISABLE_BARE_REPOS -> Support for bare repositories in the Git Node will be removed in a future version due to security concerns. If you are not using bare repositories in the Git Node, please set N8N_GIT_NODE_DISABLE_BARE_REPOS=true. Learn more: https://docs.n8n.io/hosting/configuration/environment-variables/security/

[license SDK] Skipping renewal on init: license cert is not initialized

Collaboration features are disabled because push is configured unidirectional. Use N8N_PUSH_BACKEND=websocket environment variable to enable them.

Version: 1.123.7

Editor is now accessible via:

http://localhost:5678

Owner was set up successfully

Origin header does NOT match the expected origin. (Origin: "undefined" -> "N/A", Expected: "undefined" -> "undefined", Protocol: "undefined")

ResponseError: Invalid origin!

at Push.handleRequest (/usr/local/lib/node_modules/n8n/src/push/index.ts:143:10)

at /usr/local/lib/node_modules/n8n/src/push/index.ts:99:10

at Layer.handleRequest (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/router@2.2.0/node_modules/router/lib/layer.js:152:17)

at trimPrefix (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/router@2.2.0/node_modules/router/index.js:342:13)

at /usr/local/lib/node_modules/n8n/node_modules/.pnpm/router@2.2.0/node_modules/router/index.js:297:9

at processParams (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/router@2.2.0/node_modules/router/index.js:582:12)

at next (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/router@2.2.0/node_modules/router/index.js:291:5)

at /usr/local/lib/node_modules/n8n/src/auth/auth.service.ts:144:18

at processTicksAndRejections (node:internal/process/task_queues:105:5)

Origin header does NOT match the expected origin. (Origin: "undefined" -> "N/A", Expected: "undefined" -> "undefined", Protocol: "undefined")

ResponseError: Invalid origin!

at Push.handleRequest (/usr/local/lib/node_modules/n8n/src/push/index.ts:143:10)

at /usr/local/lib/node_modules/n8n/src/push/index.ts:99:10

at Layer.handleRequest (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/router@2.2.0/node_modules/router/lib/layer.js:152:17)

at trimPrefix (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/router@2.2.0/node_modules/router/index.js:342:13)

at /usr/local/lib/node_modules/n8n/node_modules/.pnpm/router@2.2.0/node_modules/router/index.js:297:9

at processParams (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/router@2.2.0/node_modules/router/index.js:582:12)

at next (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/router@2.2.0/node_modules/router/index.js:291:5)

at /usr/local/lib/node_modules/n8n/src/auth/auth.service.ts:144:18

at processTicksAndRejections (node:internal/process/task_queues:105:5)

Origin header does NOT match the expected origin. (Origin: "undefined" -> "N/A", Expected: "undefined" -> "undefined", Protocol: "undefined")

ResponseError: Invalid origin!

at Push.handleRequest (/usr/local/lib/node_modules/n8n/src/push/index.ts:143:10)

at /usr/local/lib/node_modules/n8n/src/push/index.ts:99:10

at Layer.handleRequest (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/router@2.2.0/node_modules/router/lib/layer.js:152:17)

at trimPrefix (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/router@2.2.0/node_modules/router/index.js:342:13)

at /usr/local/lib/node_modules/n8n/node_modules/.pnpm/router@2.2.0/node_modules/router/index.js:297:9

at processParams (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/router@2.2.0/node_modules/router/index.js:582:12)

at next (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/router@2.2.0/node_modules/router/index.js:291:5)

at /usr/local/lib/node_modules/n8n/src/auth/auth.service.ts:144:18

at processTicksAndRejections (node:internal/process/task_queues:105:5)

Last session crashed

Initializing n8n process

Error tracking disabled because this release is older than 6 weeks.

n8n ready on ::, port 5678

There are deprecations related to your environment variables. Please take the recommended actions to update your configuration:

- N8N_RUNNERS_ENABLED -> Running n8n without task runners is deprecated. Task runners will be turned on by default in a future version. Please set N8N_RUNNERS_ENABLED=true to enable task runners now and avoid potential issues in the future. Learn more: https://docs.n8n.io/hosting/configuration/task-runners/

- N8N_BLOCK_ENV_ACCESS_IN_NODE -> The default value of N8N_BLOCK_ENV_ACCESS_IN_NODE will be changed from false to true in a future version. If you need to access environment variables from the Code Node or from expressions, please set N8N_BLOCK_ENV_ACCESS_IN_NODE=false. Learn more: https://docs.n8n.io/hosting/configuration/environment-variables/security/

- N8N_GIT_NODE_DISABLE_BARE_REPOS -> Support for bare repositories in the Git Node will be removed in a future version due to security concerns. If you are not using bare repositories in the Git Node, please set N8N_GIT_NODE_DISABLE_BARE_REPOS=true. Learn more: https://docs.n8n.io/hosting/configuration/environment-variables/security/

[license SDK] Skipping renewal on init: license cert is not initialized

Collaboration features are disabled because push is configured unidirectional. Use N8N_PUSH_BACKEND=websocket environment variable to enable them.

Version: 1.123.7

Editor is now accessible via:

http://localhost:5678

Origin header does NOT match the expected origin. (Origin: "undefined" -> "N/A", Expected: "undefined" -> "undefined", Protocol: "undefined")

ResponseError: Invalid origin!

at Push.handleRequest (/usr/local/lib/node_modules/n8n/src/push/index.ts:143:10)

at /usr/local/lib/node_modules/n8n/src/push/index.ts:99:10

at Layer.handleRequest (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/router@2.2.0/node_modules/router/lib/layer.js:152:17)

at trimPrefix (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/router@2.2.0/node_modules/router/index.js:342:13)

at /usr/local/lib/node_modules/n8n/node_modules/.pnpm/router@2.2.0/node_modules/router/index.js:297:9

at processParams (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/router@2.2.0/node_modules/router/index.js:582:12)

at next (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/router@2.2.0/node_modules/router/index.js:291:5)

at /usr/local/lib/node_modules/n8n/src/auth/auth.service.ts:144:18

at processTicksAndRejections (node:internal/process/task_queues:105:5)

n8n인공지능(ai)ragai-agent

Câu trả lời 2

0

nambaksa님의 프로필 이미지
nambaksa
Người chia sẻ kiến thức

안녕하세요, 석원님.

도커 컨테이너 설치시 docker-compose.yml 에 혹시 N8N_PUSH_BACKEND=websocket 항목이 있는지 확인한번 해보시기 바랍니다. 없다면 해당 값을 설정 하신 후 다시 docker compose up -d --force-recreate 를 수행하여 컨테이너를 재가동 해보시기 바랍니다.

sukwon님의 프로필 이미지
sukwon
Người đặt câu hỏi

강사님, docker-compose.yml 에 N8N_PUSH_BACKEND=websocket 도 추가하고,추가 파일 올려주신 내용 참고하여 내용을 수정하였는데도 아래와 같이 n8n 에서 problem running workflow 가 계속뜨네요. 제가 윈도우 11홈이여서 Hiper V 가 아닌 WLP 다운 및 docker 상에서 셋업>wsl integration 내 설정 on 한다음에 실행하였는데 이부분이 문제가 있을까요?

image.pngimage.png

 

nambaksa님의 프로필 이미지
nambaksa
Người chia sẻ kiến thức

일단 올려주신 스샷이 너무 부분적이라 제가 알 수 있는 정보가 별로 없긴 합니다. WLP 가 뭘 말씀하시는건지 WSL과 혼동하신건지 모르겠습니다만 도커가 일단 구동되었으면 사실 시스템의 문제는 아니라 보여집니다. 단순히 워크플로우에 문제가 있다는 메세지만 봐서는 딱히 제가 뭔가 답을 드릴 수 없겠습니다만 Lost Connection 문제가 아니라면 일단 n8n 구동에는 문제가 없는 상태일수 있습니다. 워크플로우를 정상적으로 기본적으로 구동하고 설정하신 후 다시 테스트를 해보시는게 어떨까 합니다. 그리고 좀 더 자세한 정보와 스샷 등을 주시는게 제가 답을 해드리는데 도움이 됩니다. 그리고 Lost Connection 은 websocket 이냐 sse 냐에 따라 달라질수 있으니 연결 실패 오류가 뜨고 계신거라면 이 부분도 다시한번 점검해보시기 바랍니다. 그리고 docker-compose.yml 설정후 반드시 도커를 재생성 하셔야 합니다. 그리고 혹시 몰라 마지막 노파심에 말씀드리는 부분은 n8n 버전은 반드시 1.x 버전으로 설치하셨어야 합니다. 현재 강의는 1.x 버전으로 진행됩니다. 이 부분은 이전 n8n설치 강의의 수업노트를 참고하시기 바랍니다.

0

안녕하세요, 인프런 AI 인턴입니다. 석원님.

n8n을 Docker를 통해 실행하신 후 “Connection Lost” 오류가 지속적으로 발생하시는군요. 이는 Docker 설정이나 네트워크 설정 관련 문제일 가능성이 높습니다. 아래에 몇 가지 해결 방안을 제시해드립니다:

  1. Docker 컨테이너 상태 확인:

    • 터미널에서 docker ps 명령어를 사용하여 n8n 컨테이너가 정상적으로 실행 중인지 확인하세요. 컨테이너가 실행 중이라고 표시되지 않으면 재시작을 고려해보세요.
  2. 네트워크 설정 확인:

    • docker-compose.yml 파일의 설정을 확인해 보세요. 특히, N8N의 네트워크와 관련된 설정이 올바른지 점검하시고 포트 포워딩 설정(N8N의 기본 포트는 5678)이 맞는지 확인해 보세요.
  3. Docker 로그 확인:

    • docker logs <n8n-container-id> 명령어를 사용하여 n8n 컨테이너의 로그 파일을 확인하세요. 오류 메시지나 경고가 있는지 살펴보세요.
  4. 환경 변수 검토:

    • docker-compose의 환경 변수가 올바른지 검토하세요. 특히, N8N_PUSH_BACKEND 등의 변수 설정이 맞는지 확인해 보세요.
  5. 방화벽 및 보안 소프트웨어:

    • 방화벽이나 보안 소프트웨어가 포트를 차단하고 있지 않은지 확인하세요. 공용 네트워크에서는 이러한 설정이 접속 문제를 일으킬 수 있습니다.
  6. 유사한 해결 사례 확인:

이 방법들이 도움이 되길 바라며, 문제를 해결하지 못하신다면 추가적인 정보를 제공해주시면 더욱 구체적인 도움을 드릴 수 있습니다.

저는 질문자님의 이해를 돕고자 지식공유자님의 기존 답변을 참고하여 유사한 답변 링크를 추천해드리고 있습니다. 현재 베타 기능으로 답변이 만족스럽지 않을 수 있는 점 양해 부탁드립니다. 🙏 추가적으로 궁금한 점이 있으시면, 이어서 질문해 주세요. 곧 지식공유자께서 답변해 주실 것입니다.

Hình ảnh hồ sơ của sukwon
sukwon

câu hỏi đã được viết

Đặt câu hỏi