#community-help

Troubleshooting Typesense Server Error on Docker

TLDR vikram was facing an error with Typesense Server Docker container and loss of data on restart. Kishore Nallan guided to avoid mounting tmp directory from localhost and explained stopping the Docker container.

Powered by Struct AI

2

16
11mo
Solved
Join the chat
Nov 01, 2022 (11 months ago)
vikram
Photo of md5-f930fdb99fd46477205fa1201164ea50
vikram
09:39 AM
I20221101 09:36:09.179997 110 store.h:307] DB open success!
I20221101 09:36:09.182243 110 raft_server.cpp:479] Loading collections from disk...
I20221101 09:36:09.182246 110 collection_manager.cpp:132] CollectionManager::load()
E20221101 09:36:09.262549 85 typesense_server.cpp:95] Typesense 0.23.1 is terminating abruptly.
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
09:54 AM
There should be a stack trace in the logs.
vikram
Photo of md5-f930fdb99fd46477205fa1201164ea50
vikram
09:56 AM
where will i find logs
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
09:59 AM
Either stderr or the log directory it you've configured one specifically
vikram
Photo of md5-f930fdb99fd46477205fa1201164ea50
vikram
10:43 AM
E20221101 10:36:50.559422 84 backward.hpp:4199] Stack trace (most recent call last) in thread 84:
E20221101 10:36:50.559542 84 backward.hpp:4199] #5 Object "", at 0xffffffffffffffff, in
E20221101 10:36:50.559551 84 backward.hpp:4199] #4 Object "/lib/x86_64-linux-gnu/libc-2.23.so", at 0x7efdfabcd51c, in __clone
E20221101 10:36:50.559557 84 backward.hpp:4199] #3 Object "/lib/x86_64-linux-gnu/libpthread-2.23.so", at 0x7efdfb5ac6b9, in start_thread
E20221101 10:36:50.559805 84 backward.hpp:4199] #2 Source "../../../../../libstdc++-v3/src/c++11/thread.cc", line 80, in execute_native_thread_routine [0x14ac6cf]
E20221101 10:36:50.559813 84 backward.hpp:4199] #1 Source "/typesense/src/batched_indexer.cpp", line 123, in run [0x50c1b6]
E20221101 10:36:50.559814 84 backward.hpp:4199] #0 Source "/typesense/include/store.h", line 169, in scan [0x512145]
Segmentation fault (Address not mapped to object [(nil)])
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
10:49 AM
Are you able to reproduce this issue consistently?
vikram
Photo of md5-f930fdb99fd46477205fa1201164ea50
vikram
10:49 AM
yes
10:50
vikram
10:50 AM
whenever i restart it shows this error and all data got deleted.
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
10:50 AM
Is this on Docker?
10:51
Kishore Nallan
10:51 AM
Post the full docker command used
vikram
Photo of md5-f930fdb99fd46477205fa1201164ea50
vikram
10:51 AM
yes
10:54
vikram
10:54 AM
i am using docker run -i -p 8108:8108 -v/tmp/typesense-server-data-1c/:/data typesense/typesense:0.23.1 --data-dir /data --api-key=xyz --listen-port 8108 --enable-cors
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
10:58 AM
Don't mount tmp directory from localhost. That will get purged often.
vikram
Photo of md5-f930fdb99fd46477205fa1201164ea50
vikram
10:59 AM
so i have to use other location to avoid this?. Can you tell how to remove typesense server from local i am unable to remove it.
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
11:16 AM
What do you mean by remove? If you are running using Docker, you stop the container.
vikram
Photo of md5-f930fdb99fd46477205fa1201164ea50
vikram
11:33 AM
ok thanks

2