#community-help

Installing and Running Typesense Server on Fedora 35

TLDR User Edson struggled to initiate Typesense server. Jason suggested using the RC build for Fedora 35. After troubleshooting and following instructions, Edson was finally able to start their server. They discussed the need for clearer installation documentation since it was an incompatibility issue with Fedora 35.

Powered by Struct AI

1

1

1

Jan 14, 2022 (24 months ago)
Edson
Photo of md5-73ed38073601fcb89b49414b8b2d65e9
Edson
11:11 PM
Hi guys, i am beginning my journey with typesense and i am having a very hard time right at the start. I installed the RPM package and checked that the service is running with sudo systemctl status typesense-server.service which returns:

● typesense-server.service - Typesense Server
Loaded: loaded (/etc/systemd/system/typesense-server.service; enabled; vendor preset: disabled)
Active: active (running) since Fri 2022-01-14 20:05:34 -03; 46s ago
Docs: <https://typesense.org>
Main PID: 32021 (typesense-serve)
Tasks: 1 (limit: 9354)
Memory: 7.5M
CPU: 36ms
CGroup: /system.slice/typesense-server.service
└─32021 /usr/bin/typesense-server --config=/etc/typesense/typesense-server.ini
Jan 14 20:05:34 localhost.localdomain systemd[1]: Started Typesense Server.

The problem is that i can't check even it's health with
curl 

because it returns:
curl: (7) Failed to connect to localhost port 7700 after 0 ms: Connection refused

here is what i have at my .ini:
api-address = 0.0.0.0
api-port = 7700
data-dir = /var/lib/typesense
api-key = H9cEaPyq1PxEz0BwvITWPV51oObTmOoVYyDpu5x3JcfOsgVU
log-dir = /var/log/typesense

one last observation is that when i try sudo lsof -i -P -n | grep LISTEN ,i can't see typesense running at any port:
systemd-r 815 systemd-resolve 11u IPv4 29709 0t0 TCP *:5355 (LISTEN)
systemd-r 815 systemd-resolve 13u IPv6 29712 0t0 TCP *:5355 (LISTEN)
systemd-r 815 systemd-resolve 17u IPv4 29715 0t0 TCP 127.0.0.53:53 (LISTEN)
mongod 962 mongod 11u IPv4 23132 0t0 TCP 127.0.0.1:27017 (LISTEN)
cupsd 1019 root 7u IPv6 23292 0t0 TCP [::1]:631 (LISTEN)
cupsd 1019 root 8u IPv4 23293 0t0 TCP 127.0.0.1:631 (LISTEN)
mariadbd 1085 mysql 20u IPv6 20119 0t0 TCP *:3306 (LISTEN)
teamviewe 1286 root 12u IPv4 30254 0t0 TCP 127.0.0.1:5939 (LISTEN)
dnsmasq 1423 dnsmasq 6u IPv4 30506 0t0 TCP 192.168.122.1:53 (LISTEN)
node 4430 feimberg 21u IPv4 50799 0t0 TCP 127.0.0.1:3000 (LISTEN)
code 28384 feimberg 50u IPv4 292232 0t0 TCP 127.0.0.1:34691 (LISTEN)
code 28384 feimberg 187u IPv4 316081 0t0 TCP 127.0.0.1:8828 (LISTEN)
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
11:19 PM
Edson May I know what OS and version you're running?
Edson
Photo of md5-73ed38073601fcb89b49414b8b2d65e9
Edson
11:20 PM
i am running fedora 35
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
11:22 PM
Looks like Fedora 35 was also released in the Nov / Dec timeframe. Could you try with the RC build on that thread?
Edson
Photo of md5-73ed38073601fcb89b49414b8b2d65e9
Edson
11:23 PM
i am trying to have a look. i am stucket at Launching Typesense Community in the moment
Edson
Photo of md5-73ed38073601fcb89b49414b8b2d65e9
Edson
11:27 PM
i will try now
11:29
Edson
11:29 PM
export TYPESENSE_API_KEY=xyz
mkdir /tmp/typesense-data
./typesense-server --data-dir=/tmp/typesense-data --api-key=$TYPESENSE_API_KEY

i whould this command after downloading it, right?
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
11:30 PM
Yup
11:30
Jason
11:30 PM
This will start it on port 8108
Edson
Photo of md5-73ed38073601fcb89b49414b8b2d65e9
Edson
11:31 PM
» export TYPESENSE_API_KEY=xyz feimberg@localhost
mkdir /tmp/typesense-data
./typesense-server --data-dir=/tmp/typesense-data --api-key=$TYPESENSE_API_KEY
zsh: no such file or directory: ./typesense-server
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
11:32 PM
Oh you also have to extract the downloaded file first: tar -xf &lt;downloaded file&gt;
Edson
Photo of md5-73ed38073601fcb89b49414b8b2d65e9
Edson
11:36 PM
11:36
Edson
11:36 PM
is this it?
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
11:37 PM
My bad, I gave you the wrong link. Could you try with RC5: <https://dl.typesense.org/releases/0.23.0.rc3/typesense-server-0.23.0.rc3-linux-amd64.tar.gz>
11:37
Jason
11:37 PM
Hang on
11:37
Jason
11:37 PM
Wrong link again :man-facepalming:
Edson
Photo of md5-73ed38073601fcb89b49414b8b2d65e9
Edson
11:38 PM
haha, no problem. i am happy that you're trying to help. very kind from you

1

Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
11:39 PM
Same process as above, download, extract and then that snippet to start Typesense server should work now 🤞
Edson
Photo of md5-73ed38073601fcb89b49414b8b2d65e9
Edson
11:44 PM
I guess it worked

/typesense-server-0.23.0.rc5-linux-amd64 » export TYPESENSE_API_KEY=xyz feimberg@localhost
mkdir /tmp/typesense-data
./typesense-server --data-dir=/tmp/typesense-data --api-key=$TYPESENSE_API_KEY

I20220114 20:43:29.778288 35000 typesense_server_utils.cpp:309] Starting Typesense 0.23.0.rc5
I20220114 20:43:29.778337 35000 typesense_server_utils.cpp:312] Typesense is using jemalloc.
I20220114 20:43:29.778604 35000 typesense_server_utils.cpp:361] Thread pool size: 64
I20220114 20:43:29.783207 35000 store.h:61] Initializing DB by opening state dir: /tmp/typesense-data/db
I20220114 20:43:29.787039 35000 store.h:61] Initializing DB by opening state dir: /tmp/typesense-data/meta
I20220114 20:43:29.791628 35000 typesense_server_utils.cpp:440] Starting API service...
I20220114 20:43:29.791741 35186 typesense_server_utils.cpp:212] Since no --nodes argument is provided, starting a single node Typesense cluster.
I20220114 20:43:29.791766 35000 http_server.cpp:172] Typesense has started listening on port 8108
I20220114 20:43:29.791785 35187 batched_indexer.cpp:120] Starting batch indexer with 64 threads.
I20220114 20:43:29.793962 35187 batched_indexer.cpp:126] BatchedIndexer skip_index: -9999
I20220114 20:43:29.795977 35186 server.cpp:1045] Server[braft::RaftStatImpl+braft::FileServiceImpl+braft::RaftServiceImpl+braft::CliServiceImpl] is serving on port=8107.
I20220114 20:43:29.795994 35186 server.cpp:1048] Check out <http://localhost.localdomain:8107> in web browser.
I20220114 20:43:29.796392 35186 raft_server.cpp:65] Nodes configuration: 192.168.0.19:8107:8108
I20220114 20:43:29.796422 35186 raft_server.cpp:104] Snapshot does not exist. We will remove db dir and init db fresh.
I20220114 20:43:29.797003 35186 store.h:283] rm /tmp/typesense-data/db success
I20220114 20:43:29.797029 35186 store.h:61] Initializing DB by opening state dir: /tmp/typesense-data/db
I20220114 20:43:29.800000 35186 store.h:307] DB open success!
I20220114 20:43:29.800010 35186 raft_server.cpp:469] Loading collections from disk...
I20220114 20:43:29.800024 35186 collection_manager.cpp:117] CollectionManager::load()
I20220114 20:43:29.800041 35186 auth_manager.cpp:32] Indexing 0 API key(s) found on disk.
I20220114 20:43:29.800046 35186 collection_manager.cpp:137] Loading 32 collections in parallel, 1000 documents at a time.
I20220114 20:43:29.800052 35186 collection_manager.cpp:144] Found 0 collection(s) on disk.
I20220114 20:43:29.800730 35186 collection_manager.cpp:206] Loaded 0 collection(s).
I20220114 20:43:29.801347 35186 collection_manager.cpp:210] Initializing batched indexer from snapshot state...
I20220114 20:43:29.801362 35186 raft_server.cpp:476] Finished loading collections from disk.
I20220114 20:43:29.801625 35186 log.cpp:674] Use crc32c as the checksum type of appending entries
W20220114 20:43:29.801651 35186 protobuf_file.cpp:91] open file failed, path: /tmp/typesense-data/state/log/log_meta: FILE_ERROR_NOT_FOUND
W20220114 20:43:29.801656 35186 log.cpp:685] /tmp/typesense-data/state/log is empty
I20220114 20:43:29.801712 35186 log.cpp:1136] log save_meta /tmp/typesense-data/state/log/log_meta first_log_index: 1 time: 40
W20220114 20:43:29.801738 35186 protobuf_file.cpp:91] open file failed, path: /tmp/typesense-data/state/meta/raft_meta: FILE_ERROR_NOT_FOUND
I20220114 20:43:29.801749 35186 raft_meta.cpp:521] Loaded single stable meta, path /tmp/typesense-data/state/meta term 1 votedfor 0.0.0.0:0:0 time: 10
W20220114 20:43:29.801792 35186 protobuf_file.cpp:91] open file failed, path: /tmp/typesense-data/state/meta/raft_meta: FILE_ERROR_NOT_FOUND
I20220114 20:43:29.801800 35186 raft_meta.cpp:521] Loaded single stable meta, path /tmp/typesense-data/state/meta term 1 votedfor 0.0.0.0:0:0 time: 8
I20220114 20:43:29.801807 35186 node.cpp:576] node default_group:192.168.0.19:8107:8108 init, term: 1 last_log_id: (index=0,term=0) conf: 192.168.0.19:8107:8108 old_conf:
I20220114 20:43:29.801826 35186 node.cpp:1549] node default_group:192.168.0.19:8107:8108 term 1 start vote and grant vote self
I20220114 20:43:29.801856 35186 raft_meta.cpp:546] Saved single stable meta, path /tmp/typesense-data/state/meta term 2 votedfor 192.168.0.19:8107:8108 time: 19
I20220114 20:43:29.801863 35186 node.cpp:1783] node default_group:192.168.0.19:8107:8108 term 2 become leader of group 192.168.0.19:8107:8108
I20220114 20:43:29.802163 35186 raft_server.cpp:127] Node last_index: 0
I20220114 20:43:29.802172 35186 typesense_server_utils.cpp:263] Typesense peering service is running on 192.168.0.19:8107
I20220114 20:43:29.802178 35186 typesense_server_utils.cpp:264] Snapshot interval configured as: 3600s
W20220114 20:43:29.802186 35186 controller.cpp:1454] SIGINT was installed with 1
I20220114 20:43:29.802199 35186 raft_server.cpp:524] Term: 2, last_index index: 0, committed_index: 0, known_applied_index: 0, applying_index: 0, queued_writes: 0, pending_queue_size: 1, local_sequence: 0
W20220114 20:43:29.802206 35186 node.cpp:811] [default_group:192.168.0.19:8107:8108 ] Refusing concurrent configuration changing
I20220114 20:43:29.802217 35219 log.cpp:108] Created new segment /tmp/typesense-data/state/log/log_inprogress_00000000000000000001' with fd=23 E20220114 20:43:29.802227 35186 raft_server.cpp:578] Node not ready yet (known_applied_index is 0). I20220114 20:43:29.802286 35219 raft_server.h:251] Configuration of this group is 192.168.0.19:8107:8108 I20220114 20:43:29.802299 35219 node.cpp:3142] node default_group:192.168.0.19:8107:8108 reset ConfigurationCtx, new_peers: 192.168.0.19:8107:8108, old_peers: 192.168.0.19:8107:8108 I20220114 20:43:29.802310 35219 raft_server.h:234] Node becomes leader, term: 2 E20220114 20:43:29.802330 35215 raft_server.h:61] Peer refresh failed, error: Doing another configuration change I20220114 20:43:39.803575 35186 raft_server.cpp:524] Term: 2, last_index index: 1, committed_index: 1, known_applied_index: 1, applying_index: 0, queued_writes: 0, pending_queue_size: 0, local_sequence: 0 I20220114 20:43:39.803764 35219 raft_server.h:59] Peer refresh succeeded!`
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
11:44 PM
&gt; Peer refresh succeeded!
You're all set!
Edson
Photo of md5-73ed38073601fcb89b49414b8b2d65e9
Edson
11:46 PM
thank you SO MUCH. Health check worked. Can i have a hint at what was happening? some kind of incompatibility between the rpm package and this version of fedora?
Edson
Photo of md5-73ed38073601fcb89b49414b8b2d65e9
Edson
11:49 PM
I lost to much time trying to figure it mysef 😭😭. Maybe we should try to update the docs? i can help with the docs. Only problem is that my english is not perfect
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
11:50 PM
So sorry about that 😞

I'm in the process of updating the docs for something else, so I'll just update it along with the other changes
Edson
Photo of md5-73ed38073601fcb89b49414b8b2d65e9
Edson
11:55 PM
I discovered your work at the hyperstack interview and i was amazed but what you guys showed. I am trying to drop our algolia dependency because of their CRAZY price model that charges both by requests and for indexations. I also experimented with Meilisearch and to be honest i had an easier time quickly installing and testing their product at my local machine, but they have some limitations regarding functionalities that was important for us like multi-index searching. Anyway, very hyped to work with typesense now, specially after this very kind and precise help!
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
11:57 PM
Thank you for the context and the feedback! 🙏

If I had a dollar for every time I've heard about Algolia's pricing...

Besides the installation issue and the lack of documentation around it, any other things we can improve with Typesense?
Jan 15, 2022 (24 months ago)
Edson
Photo of md5-73ed38073601fcb89b49414b8b2d65e9
Edson
12:01 AM
tomorrow i will try to migrate our indexes to typesense https://github.com/typesense/laravel-scout-typesense-driver. I will try to keep generating some usefull feedback for you guys!
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
12:08 AM
Thanks Edson!

1

Jan 18, 2022 (24 months ago)
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
04:01 AM
Added a note to the docs about using the latest RC build on latest versions of Linux distros: https://typesense.org/docs/guide/install-typesense.html#rpm-package-on-centos-rhel

1

Typesense

Lightning-fast, open source search engine for everyone | Knowledge Base powered by Struct.AI

Indexed 3015 threads (79% resolved)

Join Our Community

Similar Threads

Resolving Multilingual Search Function in Typesense Software

Bill is having difficulty with multilingual search functionality in Typesense software. Developer Kishore Nallan suggested setting a language locale and provided a demo build. The build solution had some issues, and after multiple rounds of software updates and troubleshooting, the problem still persists.

2

89
25mo

Resolving Issues with Infix and Prefix in Query Searches

Daren struggled with searches missing values in production. Jason and Kishore Nallan offered insights and created new features to help solve the problem, which was then tested and deployed by Daren.

2

38
5mo

Trouble with DocSearch Scraper and Pipenv Across Multiple OSs

James ran into errors when trying to build Typesense DocSearch Scraper from scratch, and believes it’s because of a bad Pipfile.lock. Jason attempted to replicate the error, and spent hours trying to isolate the issue but ultimately fixed the problem and copied his bash history for future reference. The conversation touches briefly on the subject of using a virtual machine for testing.

7

161
10mo

Typesense Connection Issue Resolution

James faced a 'connection refused' error trying to run typesense locally. Kishore Nallan identified an issue due to a glibc upgrade, provided a recent build for James to try and advised a restart after installation. The problem was subsequently resolved.

35
24mo

Resolving Connection Issues on Ubuntu 21.10

Philipe faced a problem with TypeSense running on Ubuntu 21.10. After troubleshooting, Jason and Kishore Nallan suggested a binary to solve the compatibility issue, which resolved the issue.

4

38
25mo