Connect ECONNREFUSED

I am facing the following error when I run an OpenAI block in a new self hosted typebot installation:
{
"status": 500,
"body": {
"message": "connect ECONNREFUSED 179.182.110.148:443",
"code": "INTERNAL_SERVER_ERROR",
"data": {
"code": "INTERNAL_SERVER_ERROR",
"httpStatus": 500,
"path": "continueChat"
}
}
}
{
"status": 500,
"body": {
"message": "connect ECONNREFUSED 179.182.110.148:443",
"code": "INTERNAL_SERVER_ERROR",
"data": {
"code": "INTERNAL_SERVER_ERROR",
"httpStatus": 500,
"path": "continueChat"
}
}
}
179.182.110.148 is the public IP Address of my server. Although I use subdomain.domain.com.br to connect to Typebot app. All stacks are running under Traefik built in Portainer The log shows something not clear to me:
Something went wrong Error: connect ECONNREFUSED 179.182.110.148:443
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1555:16) {
code: 'INTERNAL_SERVER_ERROR',
name: 'TRPCError',
[cause]: Error: connect ECONNREFUSED 179.182.110.148:443
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1555:16) {
errno: -111,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '179.182.110.148',
port: 443
}
}
Something went wrong TRPCError: Stripe environment variables are missing
at /app/apps/builder/.next/server/chunks/9108.js:1:10994
at resolveMiddleware (file:///app/node_modules/.pnpm/@trpc+server@10.40.0/node_modules/@trpc/server/dist/index.mjs:420:36)
at callRecursive (file:///app/node_modules/.pnpm/@trpc+server@10.40.0/node_modules/@trpc/server/dist/index.mjs:456:38)
at next (file:///app/node_modules/.pnpm/@trpc+server@10.40.0/node_modules/@trpc/server/dist/index.mjs:465:32)
at inputMiddleware (file:///app/node_modules/.pnpm/@trpc+server@10.40.0/node_modules/@trpc/server/dist/index.mjs:456:32)
at async callRecursive (file:///app/node_modules/.pnpm/@trpc+server@10.40.0/node_modules/@trpc/server/dist/index.mjs:456:32) {
code: 'INTERNAL_SERVER_ERROR',
[cause]: undefined
}
Something went wrong Error: connect ECONNREFUSED 179.182.110.148:443
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1555:16) {
code: 'INTERNAL_SERVER_ERROR',
name: 'TRPCError',
[cause]: Error: connect ECONNREFUSED 179.182.110.148:443
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1555:16) {
errno: -111,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '179.182.110.148',
port: 443
}
}
Something went wrong TRPCError: Stripe environment variables are missing
at /app/apps/builder/.next/server/chunks/9108.js:1:10994
at resolveMiddleware (file:///app/node_modules/.pnpm/@trpc+server@10.40.0/node_modules/@trpc/server/dist/index.mjs:420:36)
at callRecursive (file:///app/node_modules/.pnpm/@trpc+server@10.40.0/node_modules/@trpc/server/dist/index.mjs:456:38)
at next (file:///app/node_modules/.pnpm/@trpc+server@10.40.0/node_modules/@trpc/server/dist/index.mjs:465:32)
at inputMiddleware (file:///app/node_modules/.pnpm/@trpc+server@10.40.0/node_modules/@trpc/server/dist/index.mjs:456:32)
at async callRecursive (file:///app/node_modules/.pnpm/@trpc+server@10.40.0/node_modules/@trpc/server/dist/index.mjs:456:32) {
code: 'INTERNAL_SERVER_ERROR',
[cause]: undefined
}
I don't use stripe payment resource. Maybe there is no correlation with the problem. If I use typebot.io website, the OpenAI block works fine. Thank you all!.
13 Replies
Baptiste
Baptiste6mo ago
What's the value of NEXT_PUBLIC_VIEWER_URL?
Diego Sayron
Diego Sayron6mo ago
Thank you for your attention, Baptiste. - NEXT_PUBLIC_VIEWER_URL=https://typechat.briidge.com.br I am running under traefik. Thank you in advance!
CptPlastic
CptPlastic6mo ago
@Diego Sayron is your install new 2.24.0 ?
Diego Sayron
Diego Sayron6mo ago
Thank you for your reply @CptPlastic. Builder: baptistearno/typebot-builder:latest Viewer: baptistearno/typebot-viewer:latest Postgres:13 Minio: quay.io/minio/minio (I have run the command that creates and sets the typebot bucket as public) Traefik: traefik:latest
Diego Sayron
Diego Sayron6mo ago
I could bet that the problem is behind the traefik, because I can't upload files as well (An error occured while uploading the file). By the way, I can create buckets remotely via mc command. When I try to upload a file, after this error, I can see a similar message (typebot's viewer container-logs) like:
Something went wrong Error: connect ECONNREFUSED 179.182.110.148:443
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1555:16) {
code: 'INTERNAL_SERVER_ERROR',
name: 'TRPCError',
[cause]: Error: connect ECONNREFUSED 179.182.110.148:443
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1555:16) {
errno: -111,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '179.182.110.148',
port: 443
}
}
Something went wrong Error: connect ECONNREFUSED 179.182.110.148:443
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1555:16) {
code: 'INTERNAL_SERVER_ERROR',
name: 'TRPCError',
[cause]: Error: connect ECONNREFUSED 179.182.110.148:443
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1555:16) {
errno: -111,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '179.182.110.148',
port: 443
}
}
Baptiste
Baptiste6mo ago
Indeed, must be something going on with your reverse procy Is it only happening on OpenAI block and File uploads?
Diego Sayron
Diego Sayron6mo ago
Yes! Everything working fine with all other functions
Baptiste
Baptiste6mo ago
Can you share in DM a bot of yours that triggers an OpenAI block?
Diego Sayron
Diego Sayron6mo ago
Of course! Thank you very much!
Baptiste
Baptiste6mo ago
So that's an issue when trying to upload a file to the s3 bucket Can you try with a AWS S3 bucket and tell us what is the error in the server logs? There should be a clear error here
Diego Sayron
Diego Sayron6mo ago
1) So that's an issue when trying to upload a file to the s3 bucket Actually, there are two errors: 1) When I try to upload files and 2) Request to OpenAI a text to speech resource. At typebot.io everything works fine! 2) Can you try with a AWS S3 bucket Yes. I have already tried as follows: - S3_BUCKET=typebot - S3_PORT=443 - S3_ENDPOINT=s3.us-east-1.amazonaws.com - S3_ACCESS_KEY=FAKE4K42GIIC35LZFAKE - S3_SECRET_KEY=FakeH+cd5SflEieuwGW2n2aj/U+Lc3vtGOwYQMFP - S3_SSL=true - S3_REGION=us-east-1 The CORS and Access Policy were applied. I can upload files via "aws cli" 3) and tell us what is the error in the server logs?
Here is the log error:
Something went wrong Error: connect ECONNREFUSED 179.182.110.148:443
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1555:16) {
code: 'INTERNAL_SERVER_ERROR',
name: 'TRPCError',
[cause]: Error: connect ECONNREFUSED 179.182.110.148:443
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1555:16) {
errno: -111,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '179.182.110.148',
port: 443
}
}
Here is the log error:
Something went wrong Error: connect ECONNREFUSED 179.182.110.148:443
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1555:16) {
code: 'INTERNAL_SERVER_ERROR',
name: 'TRPCError',
[cause]: Error: connect ECONNREFUSED 179.182.110.148:443
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1555:16) {
errno: -111,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '179.182.110.148',
port: 443
}
}
4) I'll try something related with traefik. If I get any progress, I'll post it here. Thank you!
Baptiste
Baptiste6mo ago
The OpenAI block on your flow is doing a create speech action which ultimately downloads the generated file temporarily to your S3 bucket. So the only issue is the upload of files to your bucket. Yes I would guess that your container just can't reach 179.182.110.148:443 when it should be able to do that.
Diego Sayron
Diego Sayron5mo ago
Thank you! To me, It seems that a reverse operation in traefik is not working properly... 179... Is the IP Address of my server, but I think that the egressing calling must be the same as the ingressing, such as "typeflow.briidge.com.br" instead of the IP Address. This behaviour can be the cause to S3 does not be reached. It''s just my guess. By the way, thank you for your effort with this issue. I'll try a setting bypassing the traefik.
Want results from more Discord servers?
Add your server