Skip to main content
Topic solved
This topic has been marked as solved and requires no further attention.
Topic: Cannot assign requested address (Read 942 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Cannot assign requested address

I updated my system few days ago and since then several programs report that they can't assign address.
jupyter says:
Code: [Select]
OSError: [Errno 99] Cannot assign requested address
mpd says:
Code: [Select]
exception: Failed to bind to '127.0.0.1:6600'; Failed to bind socket: Cannot assign requested address
I tried other ports.
I'm on "5.19.12.artix1-1" and runit.

Re: Cannot assign requested address

Reply #1
Just a hunch but is localhost up ?

What is the output of
Code: [Select]
ip addr show

Re: Cannot assign requested address

Reply #2
Code: [Select]
1: lo: <LOOPBACK> mtu 65536 qdisc noop state DOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether <AA:.....> brd ff:ff:ff:ff:ff:ff
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether <BB:.....> brd ff:ff:ff:ff:ff:ff
    inet <local ip>/24 brd 192.168.1.255 scope global noprefixroute wlan0
       valid_lft forever preferred_lft forever

Re: Cannot assign requested address

Reply #3
Hmmm not good, your info about your loopback interface is missing a very important line:
Code: [Select]
inet 127.0.0.1/8 brd 127.255.255.255 scope host lo

Do a google search and see how you can assign 127.0.0.1 to your loopback interface and then see if the problem still persists.

Re: Cannot assign requested address

Reply #4
It shows the loopback interface is down:
Code: [Select]
1: lo: <LOOPBACK> mtu 65536 qdisc noop state DOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
eth0 is down but only an issue if you use a wired connection at all.

Which init do you use?

It could be just the service that brings it up is not enabled or something more underlying ?

Borrowed from openrc's loopback service file,
Code: [Select]
sudo ip addr add 127.0.0.1/8 dev lo brd +
sudo ip link set lo up

As a short term fix that might bring up the loopback interface.
If it doesn't post any error messages.

Edit: I just remembered there was a library mismatch recently causing issues with the iproute2 suite of programs. I think this is related to that.
Try updating again.

Search the forum for libbpf
One thread:
https://forum.artixlinux.org/index.php/topic,4630.msg29679.html

 

Re: Cannot assign requested address

Reply #5
I'm on runit but what you wrote seems to have solved the issues. Thank you.