#Typesense service not reachable

18 messages · Page 1 of 1 (latest)

leaden bloom
#

I am using the typesense template (https://railway.app/template/DXBDVS), but I'm struggling to connect to the service. E.g. I only get timeouts for https://RAILWAY_PUBLIC_URL/health.

Looking at the logs, the app seems to start ok, and Railway itself seems to be able to call the /health endpoint when it does deployments?

Not really sure what the issue might be, whether it's my fault, Railway's, or typesense's.

Project id: 68d08275-c56e-4204-ab46-04737e0cf4dc

stoic elkBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> ✅ Mark Solution

sacred boneBOT
#

Project ID: 68d08275-c56e-4204-ab46-04737e0cf4dc

charred snow
#

looking into it

#

im not seeng any issues? tell me more about how youre calling the url?

leaden bloom
#

Thanks @charred snow , the company VPN was at fault it seems and blocked the curl requests. The manual request work fine now, though the client from their npm package still times out. But that's not a Railway question I guess.

charred snow
#

well curl or node isnt gonna matter, if its blocked it will be blocked in both

leaden bloom
#

For sure. But turning the VPN off solved the manual timeouts, but not the node ones. So something else is going on as well.

charred snow
#

are you using some npm package?

leaden bloom
#
#

I think I found the issue.

charred snow
#

show me your Typesense.Client() ?

#

youd need to set port to 443

leaden bloom
#

I was initializing the client with a node using "host" and "port". But I saw in the types for the client, that there is a "url" option.

#

Just using that and using the Railway public URL works.

charred snow
#

host and port work fine, you just need to specify the correct host, port, and protocol

#
let client = new Typesense.Client({
  'nodes': [{
    'host': '<RAILWAY_DOMAIN>',
    'port': '443',
    'protocol': 'https'
  }],
  'apiKey': '<API_KEY>',
  'connectionTimeoutSeconds': 2
})
leaden bloom
#

Ah, you are right. I was confusing the internal port for typesense with the https one. Fixing that and everything works. Thanks a bunch!