Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tunneled webhook is closed after first call #9655

Open
GGG1998 opened this issue Jun 6, 2024 · 11 comments
Open

Tunneled webhook is closed after first call #9655

GGG1998 opened this issue Jun 6, 2024 · 11 comments

Comments

@GGG1998
Copy link

GGG1998 commented Jun 6, 2024

Bug Description

I can't run webhook more than once because I receive 408 code and later(after 10 minutes) 504 code. Another result after spam F5 {"code":404,"message":"The requested webhook \"4d78453d-0205-4548-9eec-76de7e699e23\" is not registered.","hint":"Click the 'Test workflow' button on the canvas, then try again. (In test mode, the webhook only works for one call after you click this button)"}

To Reproduce

You can use my docker image and you cannot be on the company network if you work at n8n

version: '3.7'

services:
  mongo:
    image: mongodb/mongodb-community-server:latest
    restart: always
    ports:
      - 27017:27017
    hostname: mongodb
    environment:
      MONGO_INITDB_ROOT_USERNAME: root
      MONGO_INITDB_ROOT_PASSWORD: secret123
    volumes:
      - dbdata:/data/db/
    networks:
      - n8n
  pg:
    image: postgres:16-alpine
    restart: always
    environment:
      POSTGRES_USER: root
      POSTGRES_DB: n8n_workflows
      POSTGRES_PASSWORD: secret123
    volumes:
      - dbpgdata:/var/lib/postgresql/data
    networks:
      - n8n
  n8n:
    image: n8nio/n8n
    depends_on:
      - pg
    volumes:
      - n8ndata:/home/node/.n8n
    networks:
      - n8n
    ports:
      - 5678:5678
    environment:
      DB_TYPE: postgresdb
      DB_POSTGRESDB_HOST: pg
      DB_POSTGRESDB_PORT: 5432
      DB_POSTGRESDB_DATABASE: n8n_workflows
      DB_POSTGRESDB_USER: root
      DB_POSTGRESDB_PASSWORD: secret123
      N8N_LOG_LEVEL: debug
      N8N_LOG_OUTPUT: console,file
      # NODE_ENV: development
      # N8N_HOST: '${SUBDOMAIN}.${DOMAIN_NAME}'
      # N8N_PORT: 5678
      # N8N_PROTOCOL: https
      # WEBHOOK_URL: 'https://${SUBDOMAIN}.${DOMAIN_NAME}/'
      # GENERIC_TIMEZONE: ${GENERIC_TIMEZONE}
    command: "start --tunnel"

networks:
  n8n:
    driver: bridge

volumes:
  dbdata:    
  dbpgdata:
  n8ndata:

Expected behavior

If I run a workflow with dozens of events I would expect to receive all of them

Operating System

macos

n8n Version

1.41.1

Node.js Version

18.20.2

Database

PostgreSQL

Execution mode

main (default)

@netroy
Copy link
Member

netroy commented Jun 6, 2024

are you seeing this for the webhooks that you start using "Test Workflow" or "Listen for test event" via the UI, or also for production webhooks that get created when you activate the workflow?

@GGG1998
Copy link
Author

GGG1998 commented Jun 7, 2024

@netroy I click "Listen for test event" via UI. Env is set on development. Also I set DEBUG mode
image

@Joffcom
Copy link
Member

Joffcom commented Jun 7, 2024

@GGG1998 is this for a production environment or is it just a test?

I noticed you mentioned a company network as well, Is it possible that there is a company firewall / proxy that is closing the tunnel connection as I have seen issues in the past where they can sometimes close tunnels if not set to be allowed.

@GGG1998
Copy link
Author

GGG1998 commented Jun 7, 2024

I refer to n8n you cannot be on the company network _if you work at n8n_ because I wanted from you 1:1 chance to reproduce my problem. All I tested on my local computer in my home network.

@netroy
Copy link
Member

netroy commented Jun 11, 2024

I click "Listen for test event" via UI
to me this sounds like you are using a webhook test URL, which is valid only for one use.

You need to use the production url for non-testing purposes. More info here.

@GGG1998
Copy link
Author

GGG1998 commented Jun 13, 2024

Still nothing, additionally I'd like to mention that in AWS SNS is status Pending confirmation
Could you tell me in what environment you run n8n?

@netroy
Copy link
Member

netroy commented Jun 13, 2024

in AWS SNS is status Pending confirmation

not clear how that's related to this issue. are you using the SNS node?
It'd be helpful if you could share a sample workflow when reporting issues, otherwise we don't have enough context to provide support.

Could you tell me in what environment you run n8n?

We (and our customers) run n8n in lot's of different environments, including AWS.

@GGG1998
Copy link
Author

GGG1998 commented Jun 13, 2024

It's related. SNS
Screenshot 2024-06-13 at 14 45 32
Screenshot 2024-06-13 at 14 45 54
store link to tunneled webhook.

@GGG1998
Copy link
Author

GGG1998 commented Jun 17, 2024

@netroy any idea?

@netroy
Copy link
Member

netroy commented Jun 17, 2024

unfortunately I still don't understand the issue. I'll let someone else handle this 🙏🏽

@Joffcom
Copy link
Member

Joffcom commented Jun 17, 2024

Hey @GGG1998,

I just want to go back to an earlier post...

You can use my docker image and you cannot be on the company network if you work at n8n

Just to clarify, Does this only fail from a company network or do you have the issue when running from your own machine on your own network?

I would also recommend not using the tunnel as we will be removing it soon as there are better options available like Cloudflare and NGROK.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants