Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Cannot connect to any servers" (but I can telnet to the server) #14

Open
jbrea opened this issue Apr 26, 2022 · 4 comments
Open

"Cannot connect to any servers" (but I can telnet to the server) #14

jbrea opened this issue Apr 26, 2022 · 4 comments

Comments

@jbrea
Copy link

jbrea commented Apr 26, 2022

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?

@cheusov
Copy link
Owner

cheusov commented May 3, 2022

  1. Have a look at dict.conf configuration file
  2. Does "dict -h localhost -p 2628 -I -v" work as expected in both cases?
  3. What does "netstat -lntp | grep 2628" say?

@jbrea
Copy link
Author

jbrea commented May 4, 2022

Thanks for the support!

  1. 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
  1. "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
  1. I'm on archlinux and use ss instead of netstat.
$ ss -lntp | grep 2628
LISTEN 0      10           0.0.0.0:2628      0.0.0.0:*    

@cheusov
Copy link
Owner

cheusov commented May 14, 2022

  1. 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?
  2. Do you use latest github version "dict" or latest stable release version?

@jbrea
Copy link
Author

jbrea commented May 15, 2022

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
  1. This is the version I use: dictd 1.13.1/rf on Linux 5.17.5-arch1-1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants