#community-help

Troubleshooting Typesense Hosting Issues on Google Cloud

TLDR Sachyya sought assistance on a Google Cloud Typesense hosting issue. Kishore Nallan helped identify a firewall rule problem and clarified how to configure settings, resolving the issue. They also advised Ahmet on synonym handling in the OSS version.

Powered by Struct AI
+11
32
14mo
Solved
Join the chat
Jul 19, 2022 (14 months ago)
Sachyya
Photo of md5-3b78e17280dd19e5eca44e22ee940b76
Sachyya
07:54 AM
We have a query regarding hosting Typsense in Google Cloud. Website itself is hosted on the cloud. Indexing works with localhost as url. But searching from website does not work. For more details, please see here: https://wordpress.org/support/topic/on-google-cloud/

It would be better if anyone can chime on that thread. Thanks in advance.
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
07:57 AM
Does the Google Cloud instance have a publicly reachable IP?
Sachyya
Photo of md5-3b78e17280dd19e5eca44e22ee940b76
Sachyya
08:02 AM
I will have to ask the thread starter. Can your respond in the thread there? Or let me know what other details do you need and I will ask them.
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
08:03 AM
Please ask the thread starter to post here on this thread so it will be easier to answer.
Sachyya
Photo of md5-3b78e17280dd19e5eca44e22ee940b76
Sachyya
08:06 AM
Okay will ask him to do that.
Ahmet
Photo of md5-cee561cb4eae764862a538abbd45f171
Ahmet
12:31 PM
Hello. I am the thread starter. Yes, instance has a static ip.
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
12:32 PM
Can you post your config file (just remove the API key)? What error are you getting?
Ahmet
Photo of md5-cee561cb4eae764862a538abbd45f171
Ahmet
12:36 PM
; Typesense Configuration

[server]

api-address = 0.0.0.0
api-port = 8108
data-dir = /var/lib/typesense
api-key = xxx
log-dir = /var/log/typesense
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
12:37 PM
And what happens when you access http://x.y.z:8108/health ? (Replace x.y.z with your static IP)
Ahmet
Photo of md5-cee561cb4eae764862a538abbd45f171
Ahmet
12:37 PM
If I set the node URI as localhost, indexing is successful. But searching not working. If I set ip address in node URI, indexing is failing.
12:38
Ahmet
12:38 PM
The web page is not opening. It says: This site can’t be reached
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
12:39 PM
Have you checked your firewall rules to ensure that the port 8108 is accessible outside?
Ahmet
Photo of md5-cee561cb4eae764862a538abbd45f171
Ahmet
12:40 PM
No. Let me find out how to do.
12:46
Ahmet
12:46 PM
I made the rule. Now the page is working and it says: {"ok":true}
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
12:46 PM
Cool you should now be able to both index and search
Ahmet
Photo of md5-cee561cb4eae764862a538abbd45f171
Ahmet
12:48 PM
Enter Node URI: the static ip
protocol: http
port: 8081
key: the key in the .ini file

But I got an error: Something Has gone wrong while bulk importing
12:49
Ahmet
12:49 PM
Should I change the Node URI to localhost?
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
12:49 PM
8108 right not 8081
12:49
Kishore Nallan
12:49 PM
Node uri should be static IP
12:49
Kishore Nallan
12:49 PM
Post the client configuration also?
12:50
Kishore Nallan
12:50 PM
Also increase client timeout because imports can take a long time. Default time-out might be too small.
Ahmet
Photo of md5-cee561cb4eae764862a538abbd45f171
Ahmet
12:51 PM
Oh. I set 8108 and now it is working.
12:51
Ahmet
12:51 PM
Thank you for your help.
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
12:51 PM
Welcome!
Ahmet
Photo of md5-cee561cb4eae764862a538abbd45f171
Ahmet
01:39 PM
Is there any way to add synonyms on self-host? I can do that on a cluster for my woocommerce products. I can even add documents and delete them. http://x.y.z:8108/ says: { "message": "Not Found"}
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
01:43 PM
Yeah you can add. There is no difference between Typesense Cloud and OSS version.
Ahmet
Photo of md5-cee561cb4eae764862a538abbd45f171
Ahmet
01:44 PM
Where I can reach the typesense-server?
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
01:44 PM
Same way as the other end-points.
Ahmet
Photo of md5-cee561cb4eae764862a538abbd45f171
Ahmet
01:45 PM
I have no idea 🙂
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
01:47 PM
You should be able to follow the docs here: https://typesense.org/docs/0.23.1/api/synonyms.html

They have examples.
Ahmet
Photo of md5-cee561cb4eae764862a538abbd45f171
Ahmet
01:48 PM
Thank you. So I can add and delete them only on SSH. No http access from the browser like Typesense Cloud, right?
Jul 20, 2022 (14 months ago)
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
06:28 AM
Yes, maybe I misread your question yesterday. The UI is available only on Typesense Cloud. You have to use the client / curl for updating synonyms on the self hosted environment.
+11