#community-help

Resolving Connection Issues on Ubuntu 21.10

TLDR 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.

Powered by Struct AI

3

1

38
23mo
Solved
Join the chat
Dec 04, 2021 (23 months ago)
Philipe
Photo of md5-c8ecfcc43b1c3d4d27560b8354025800
Philipe
07:31 PM
Hi! I just installed everything on Ubuntu 21.10, but in the end I get “curl: (7) Failed to connect to localhost port 8108: Connection refused”
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
07:32 PM
Hi Philipe! Do you see this in the Typesense logs or from your application?
Philipe
Photo of md5-c8ecfcc43b1c3d4d27560b8354025800
Philipe
07:33 PM
i see this when doing the health check in the shell
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
07:34 PM
Could you post the contents of /var/log/typesense/typesense.log from your server?
Philipe
Photo of md5-c8ecfcc43b1c3d4d27560b8354025800
Philipe
07:34 PM
ok, one moment
07:34
Philipe
07:34 PM
it’s empty
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
07:35 PM
The server is not running then. Did you already run sudo systemctl start typesense-server.service?
Philipe
Photo of md5-c8ecfcc43b1c3d4d27560b8354025800
Philipe
07:35 PM
yea, it says active
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
07:36 PM
Hmm could you do ps aux | grep typesense and post the output?
Philipe
Photo of md5-c8ecfcc43b1c3d4d27560b8354025800
Philipe
07:37 PM
root     760 0.0 0.7 78428 7596 ?    Ss  18:51  0:00 /usr/bin/typesense-server --config=/etc/typesense/typesense-server.ini
root    1467 0.0 0.2  6680 2316 pts/2  S+  19:36  0:00 grep --color=auto typesense
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
07:37 PM
Also, I assumed you installed via the DEB package.. right?
Philipe
Photo of md5-c8ecfcc43b1c3d4d27560b8354025800
Philipe
07:37 PM
yes, via DEB package
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
07:37 PM
Could you share the contents of /etc/typesense/typesense-server.ini (minus credentials)
Philipe
Photo of md5-c8ecfcc43b1c3d4d27560b8354025800
Philipe
07:38 PM
; Typesense Configuration

[server]

api-address = 0.0.0.0
api-port = 8108
data-dir = /var/lib/typesense
api-key = ladilaxyz
log-dir = /var/log/typesense
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
07:39 PM
Could you post the output of this: sudo netstat -ltnp
Philipe
Photo of md5-c8ecfcc43b1c3d4d27560b8354025800
Philipe
07:40 PM
sudo: netstat: command not found
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
07:40 PM
You want to install sudo apt install net-tools
Philipe
Photo of md5-c8ecfcc43b1c3d4d27560b8354025800
Philipe
07:41 PM
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address      Foreign Address     State    PID/Program name   
tcp    0   0 127.0.0.53:53      0.0.0.0:*        LISTEN   707/systemd-resolve 
tcp    0   0 0.0.0.0:22       0.0.0.0:*        LISTEN   785/sshd: /usr/sbin 
tcp6    0   0 :::22          :::*          LISTEN   785/sshd: /usr/sbin
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
07:42 PM
Hmm somehow Typesense is not listening to any port
07:42
Jason
07:42 PM
Could you also share the the curl command you're using? Also, are you running the curl command from the server, or from your localhost?
07:42
Jason
07:42 PM
Let's try restarting: sudo systemctl restart typesense-server.service
Philipe
Photo of md5-c8ecfcc43b1c3d4d27560b8354025800
Philipe
07:43 PM
the one from the docs ”
curl 

07:43
Philipe
07:43 PM
restart is doing nothing
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
07:43 PM
It won't output anything in the console
Philipe
Photo of md5-c8ecfcc43b1c3d4d27560b8354025800
Philipe
07:43 PM
i could give you server access, becasue its just a test server
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
07:44 PM
That would be quicker. If you can just add my SSH key to ~/.ssh/authorized_keys I can take a look. Let me DM you
Philipe
Photo of md5-c8ecfcc43b1c3d4d27560b8354025800
Philipe
07:44 PM
ok
07:44
Philipe
07:44 PM
great
07:45
Philipe
07:45 PM
thanks for the fast reply and action

1

Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
08:00 PM
Summarizing progress so far: the process starts, but doesn't listen to any ports and the log file is empty. OS is Ubuntu 21.10 which was released in Oct 2021, so there could be some breaking changes here that we're not accounting for yet...

Reinstalling deb package showed this:

Unpacking typesense-server (0.21.0) ...
Setting up typesense-server (0.21.0) ...
Scanning processes...
Scanning linux images...

Running kernel seems to be up-to-date.

No services need to be restarted.

No containers need to be restarted.

No user sessions are running outdated binaries.
N: Download is performed unsandboxed as root as file '/root/typesense-server-0.21.0-amd64.deb' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)

Last line may not be a problem according to this: https://askubuntu.com/questions/908800/what-does-this-apt-error-message-download-is-performed-unsandboxed-as-root
Dec 05, 2021 (23 months ago)
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
01:42 AM
I believe there is a glibc compatibility issue on 21.1. Saw this same issue on latest Fedora as well.
08:40
Kishore Nallan
08:40 AM
Philipe
Photo of md5-c8ecfcc43b1c3d4d27560b8354025800
Philipe
09:38 AM
within the next 24hrs yes
08:02
Philipe
08:02 PM
i can confirm that the health check return true on Ubuntu 20.04.3 LTS

1

Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
08:22 PM
Philipe Could you also try running that linux binary on Ubuntu 21?
Dec 06, 2021 (23 months ago)
Philipe
Photo of md5-c8ecfcc43b1c3d4d27560b8354025800
Philipe
10:50 AM
Kishore Nallan is on it….
Dec 07, 2021 (23 months ago)
Philipe
Photo of md5-c8ecfcc43b1c3d4d27560b8354025800
Philipe
05:30 PM
0.23.0.rc5 is working. Many Thanks!

1

Dec 08, 2021 (23 months ago)
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
07:23 AM
Awesome, glad to hear. Thanks for bringing this issue to our attention.

1