Winnie
Winnie16mo ago

Is there a limit when running `fetch` to send request to cloud server ip + port(not 80 or 443)?

I set up a OpenAI API proxy at http://XXX.XXX.XXX.XXX:3001. And I run a code in convex to request this url. But I get the error Gateway Timeout. I don't know how to solve it. Is there a limit when running fetch to send request to my cloud server's ip + port(not 80 or 443)?
Request { bodyUsed: false, headers: Headers { 'content-type': 'text/plain', 'x-smokescreen-error': 'Timed out connecting to remote host: dial tcp XXX.XXX.XXX.XXX:3001: connect: connection timed out', date: 'Tue, 19 Sep 2023 12:22:37 GMT', 'content-length': '97' }, ok: false, status: 504, statusText: 'Gateway Timeout', url: 'http://XXX.XXX.XXX.XXX:3001/v1/chat/completions' }
Request { bodyUsed: false, headers: Headers { 'content-type': 'text/plain', 'x-smokescreen-error': 'Timed out connecting to remote host: dial tcp XXX.XXX.XXX.XXX:3001: connect: connection timed out', date: 'Tue, 19 Sep 2023 12:22:37 GMT', 'content-length': '97' }, ok: false, status: 504, statusText: 'Gateway Timeout', url: 'http://XXX.XXX.XXX.XXX:3001/v1/chat/completions' }
2 Replies
gautamg
gautamg16mo ago
Hi @Winnie, I'm looking into this now. Just to confirm, the IP you're providing for the fetch is publicly accessible, right? I'll check on our end if there's a limitation on the ports. I've confirmed we accidentally were limiting outbound fetch traffic to ports 80 and 443. We'll have this fixed shortly! This should work for you now, let me know if you still see any issues
Winnie
WinnieOP16mo ago
@gautamg Thanks. It works.

Did you find this page helpful?