Trouble Running Typesense Docker Image on AMD Phenom II X4 955 Processor
TLDR Ian struggles to run Typesense on an AMD Phenom II X4 955 Processor, experiencing the docker image to shut down immediately upon startup. Jason and Kishore Nallan suggest multiple troubleshooting steps, identifying the potential issue as the processor's lack of support for MSSE4 flags.
1
Oct 17, 2022 (14 months ago)
Ian
09:47 PMJason
09:48 PMJason
09:48 PMIan
09:53 PM$ sudo rm -Rf /tmp/typesense_data
$ mkdir /tmp/typesense_data; docker run -p8108:8108 -v/tmp/typesense_data:/data typesense/typesense:0.23.1 --data-dir /data --api-key=anything --enable-cors
$ docker ps -l
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
91cfa8a0e989 typesense/typesense:0.23.1 "/opt/typesense-serv…" 8 seconds ago Exited (132) 6 seconds ago pensive_mendeleev
$ docker logs 91cfa8a0e989
$
Ian
09:54 PMIan
09:54 PMJason
09:55 PMIan
09:55 PMIan
09:56 PMIan
09:56 PMJason
09:57 PM--platform=linux/amd64
to the docker run command?Jason
09:57 PMIan
10:05 PMIan
10:08 PMJason
10:10 PMAMD Phenom(tm) II X4 955 Processor
was first released in 2009. Code 132 essentially means there was a CPU instruction that was sent that the CPU didn’t understand. So I suspect your processor’s instruction set doesn’t support the docker image.We only started publishing Docker images in 2018, so I don’t think older versions of the Typesense docker image would work either…
Your best bet would be to rebuild the docker image on your host machine
Ian
10:10 PMIan
10:11 PMIan
10:11 PM1
Jason
10:12 PMIan
11:16 PMJason
11:17 PMtypesense/typesense:nightly
as the image name in your docker run commandJason
11:19 PMJason
11:20 PMAnd then use that development image in
docker-build.sh
insteadIan
11:20 PMIan
11:21 PMIan
11:23 PMcp $PROJECT_DIR/docker/deployment.Dockerfile $PROJECT_DIR/$BUILD_DIR
Oct 18, 2022 (14 months ago)
Ian
12:51 AM$ docker image ls | grep typesense
typesense/typesense nightly b6ffb22b8f1c 6 minutes ago 822MB
typesense/typesense-development nightly e960b42ed3e4 17 minutes ago 5.17GB
Ian
12:51 AM$ git diff --cached
diff --git a/docker-build.sh b/docker-build.sh
index 059afaa..e69e84b 100755
--- a/docker-build.sh
+++ b/docker-build.sh
@@ -29,7 +29,7 @@ if [[ "$@" == *"--depclean"* ]]; then
fi
-TYPESENSE_DEV_IMAGE="typesense-development:27-JUN-2022-1"
+TYPESENSE_DEV_IMAGE="typesense-development:nightly"
ARCH_NAME="amd64"
if [[ "$@" == *"--graviton2"* ]]; then
Jason
12:52 AMIan
12:53 AMJason
12:53 AMIan
12:53 AMJason
12:53 AMIan
12:53 AMJason
12:54 AMIan
12:54 AMTYPESENSE_VERSION=nightly ./docker-build.sh --build-deploy-image --create-binary --clean
Jason
12:54 AMIan
12:55 AMCreating deployment image for Typesense nightly server ...
+ cp /home/ian/workspace/laspilitas-project/typesense/docker/deployment.Dockerfile /home/ian/workspace/laspilitas-project/typesense/build-Linux
+ docker build --file /home/ian/workspace/laspilitas-project/typesense/build-Linux/deployment.Dockerfile --tag typesense/typesense:nightly /home/ian/workspace/laspilitas-project/typesense/build-Linux
Sending build context to Docker daemon 435.4MB
Step 1/7 : FROM ubuntu:16.04
---> b6f507652425
Step 2/7 : RUN apt-get -y update && apt-get -y install ca-certificates
---> Using cache
---> fcdd8e825033
Step 3/7 : RUN mkdir -p /opt
---> Using cache
---> 4f5e1feca84b
Step 4/7 : COPY typesense-server /opt
---> e35dad4a35cd
Step 5/7 : RUN chmod +x /opt/typesense-server
---> Running in b6e9a1f0d73e
Removing intermediate container b6e9a1f0d73e
---> 2d20f833c3f6
Step 6/7 : EXPOSE 8108
---> Running in 4819a975c579
Removing intermediate container 4819a975c579
---> 07f38aafca69
Step 7/7 : ENTRYPOINT ["/opt/typesense-server"]
---> Running in fd683bf4b494
Removing intermediate container fd683bf4b494
---> b6ffb22b8f1c
Successfully built b6ffb22b8f1c
Successfully tagged typesense/typesense:nightly
+ [[ --build-deploy-image --create-binary --clean == *\-\-\p\a\c\k\a\g\e\-\b\i\n\a\r\y* ]]
+ echo 'Done... quitting.'
Done... quitting.
Ian
12:57 AMIan
12:58 AMdocker build --file docker/development.Dockerfile --tag typesense-development:nightly docker
Ian
12:58 AMIan
12:59 AM$ docker image ls | grep typesense
typesense/typesense nightly b6ffb22b8f1c 14 minutes ago 822MB
typesense-development nightly e960b42ed3e4 26 minutes ago 5.17GB
typesense/typesense-development nightly e960b42ed3e4 26 minutes ago 5.17GB
Ian
01:00 AMIan
01:03 AMKishore Nallan
01:39 AMIan
02:19 AMdocker run -p8108:8108 -v/tmp/typesense_data:/data typesense/typesense:nightly gdb /opt/typesense-server --data-dir /data --api-key=anything
Ian
02:20 AMKishore Nallan
04:28 AMIan
07:40 PMroot@124a97b7c5a0:/build-Linux# TYPESENSE_DATA_DIR=/data TYPESENSE_API_KEY=anything gdb --args typesense-server
GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.5) 7.11.1
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from typesense-server...done.
(gdb) run
Starting program: /build-Linux/typesense-server
warning: Error disabling address space randomization: Operation not permitted
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7f228a47f700 (LWP 552)]
Thread 2 "typesense-serve" received signal SIGILL, Illegal instruction.
[Switching to Thread 0x7f228a47f700 (LWP 552)]
0x0000000000780305 in bvar::detail::PercentileSamples<1022ul>::get_number (this=0x7f2289426140, ratio=<optimized out>) at /usr/local/include/bvar/detail/percentile.h:293
293 /usr/local/include/bvar/detail/percentile.h: No such file or directory.
(gdb)
Ian
08:03 PM0x780305 <bvar::detail::PercentileSamples<1022ul>::get_number(double)+37> roundsd $0xa,%xmm0,%xmm0
Ian
08:33 PMOct 20, 2022 (14 months ago)
Kishore Nallan
04:40 AMTypesense
Indexed 3015 threads (79% resolved)
Similar Threads
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.
Troubleshooting Typesense Docsearch Scraper Setup Issue
Vinicius experienced issues setting up typesense-docsearch-scraper locally. Jason identified a misconfiguration with the Typesense server after checking the .env file, and recommended using ngrok or port forwarding for development purposes. Vinicius successfully resolved the issue with port forwarding.
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.
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.
Troubleshooting Typesense Server Error on Docker
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.