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.
1
1
1
Jan 14, 2022 (24 months ago)
Edson
11:11 PM● 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
11:19 PMJason
11:20 PMEdson
11:20 PMJason
11:22 PMEdson
11:23 PMJason
11:24 PMEdson
11:27 PMEdson
11:29 PMexport 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
11:30 PMJason
11:30 PMEdson
11:31 PMmkdir /tmp/typesense-data
./typesense-server --data-dir=/tmp/typesense-data --api-key=$TYPESENSE_API_KEY
zsh: no such file or directory: ./typesense-server
Jason
11:32 PMtar -xf <downloaded file>
Edson
11:36 PMEdson
11:36 PMJason
11:37 PMJason
11:37 PMJason
11:37 PMJason
11:38 PMEdson
11:38 PM1
Jason
11:39 PMEdson
11:44 PM/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
11:44 PMYou're all set!
Edson
11:46 PMJason
11:48 PMEdson
11:49 PMJason
11:50 PMI'm in the process of updating the docs for something else, so I'll just update it along with the other changes
Edson
11:55 PMJason
11:57 PMIf 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
12:01 AMJason
12:08 AM1
Jan 18, 2022 (24 months ago)
Jason
04:01 AM1
Typesense
Indexed 3015 threads (79% resolved)
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.
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.
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.
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.
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.