:thread: Cannot run search on local typesense ser...
# community-help
b
๐Ÿงต Cannot run search on local typesense server
Hi ๐Ÿ‘‹๐Ÿป, I'm trying to setup a local typesense server following the docs. I'm on a Mac (silicon) running Somoa. I installed typesnese via Homebrew and the health check returns
{ok: true}
. I've got s simple node script that uses the typesense js client. I was able to create a new collection with about ~10 fields. All of the client methods work e.g. create collection, create doc etc. However, when I try to run a search I get a
connect ECONNREFUSED 127.0.0.1:8108
error. Every time I try to run the search a new line is added to the typesense logs as well:
E20250219 19:49:01.684290 6376365 raft_server.h:62] Peer refresh failed, error: Doing another configuration change
. The collection had a single document and it errored. I truncated the collection and now has zero documents and the error still occurs. Any advice on what I can try to fix this or get more info? All help is greatly appreciated ๐Ÿ™๐Ÿป
j
Could you give me a set of curl commands like this that replicates the issue: https://gist.github.com/jasonbosco/7c3432713216c378472f13e72246f46b
b
@Jason Bosco Something like this?
Copy code
### Install and run typesense via Homebrew (Mac) 

brew install typesense/tap/typesense-server 

brew services start typesense-server  ### running typesense v28 


### Create a test collection 
curl --request POST \
  --url <http://127.0.0.1:8108/collections> \
  --header 'content-type: application/json' \
  --header 'x-typesense-api-key: xyz' \
  --data '{
  "name": "demo",
  "fields": [
    {
      "name": "title",
      "type": "string"
    }
  ]
}'


### Try to do a search (expecting to return empty data) 
curl --request GET \
  --url '<http://127.0.0.1:8108/collections/test2/documents/search?q=london&query_by=title>' \
  --header 'x-typesense-api-key: xyz'
The search call outputs:
Copy code
curl: (52) Empty reply from server
f
This example would return a 404, since
test2
isn't the name of the collection, it's
demo
b
Right, sorry. I copied the wrong curl command. The url in the second should be:
<http://127.0.0.1:8108/collections/demo/documents/search?q=london&query_by=title>
f
Is this behavior the same if you use a docker image of Typesense as well?
j
I'm able to replicate the issue as well. Looks like it's mac binary specific. Created an issue here to track it: https://github.com/typesense/typesense/issues/2213
๐Ÿ‘ 1
We'll look into it and keep you posted
b
@Fanis Tharropoulos I didn't try using docker. Thank you both ๐Ÿ™