dictd
dictd copied to clipboard
"Cannot connect to any servers" (but I can telnet to the server)
I ran into a weird behavior: Everything runs normally when I am connected to the internet (wlan or ethernet), e.g.
$ dict -I -v
Configuration file:
server localhost
dictd 1.13.1/rf on Linux 5.17.4-arch1-1
On machina: up 11:07, 8 forks (43.2/hour)
Database Headwords Index Data Uncompressed
moby-thesaurus 30263 528 kB 10 MB 28 MB
When I am offline I get
$ dict -I -v
Configuration file:
server localhost
Cannot connect to any servers
but I can still access and query the local dict server with
$ telnet localhost 2628
Any ideas why dict fails to connect to the server when I am offline?
- Have a look at dict.conf configuration file
- Does "dict -h localhost -p 2628 -I -v" work as expected in both cases?
- What does "netstat -lntp | grep 2628" say?
Thanks for the support!
- This is my dict.conf
# Usually all you will ever need here is the server keywords.
# Refer to the dict manpage for other options.
# It will only check the second server if the first fails
server localhost
# server dict.org
- "dict -h localhost -p 2628 -I -v" works as expected when I am connected to the internet. Otherwise it returns
$ dict -h localhost -p 2628 -I -v
Configuration file:
server localhost
Cannot connect to any servers
- I'm on archlinux and use
ss
instead ofnetstat
.
$ ss -lntp | grep 2628
LISTEN 0 10 0.0.0.0:2628 0.0.0.0:*
- Is your hostname "localhost" assigned to 127.0.0.1 or something like this and lo0 network interface is up? What does "ifconfig" command or equivalent "ip" says about running network interfaces?
- Do you use latest github version "dict" or latest stable release version?
Thanks.
$ getent hosts
127.0.0.1 localhost
$ ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
- This is the version I use: dictd 1.13.1/rf on Linux 5.17.5-arch1-1.