# \[SOLVED\] Cannot run daemon - listen tcp4 127.0.0.1:5001: bind: cannot assign requested address

**URL:** <https://discuss.ipfs.tech/t/solved-cannot-run-daemon-listen-tcp4-127-0-0-1-5001-bind-cannot-assign-requested-address/4156>\
**Category:** Help\
**Created:** [October 27, 2018, 12:25am UTC](https://discuss.ipfs.tech/t/solved-cannot-run-daemon-listen-tcp4-127-0-0-1-5001-bind-cannot-assign-requested-address/4156 "2018-10-27T00:25:00Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![adam-hanna](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/adam-hanna/32/2389_2.png) [@adam-hanna](https://discuss.ipfs.tech/u/adam-hanna)\
**Post date:** [October 27, 2018, 12:25am UTC](https://discuss.ipfs.tech/t/solved-cannot-run-daemon-listen-tcp4-127-0-0-1-5001-bind-cannot-assign-requested-address/4156/1 "2018-10-27T00:25:00Z")

</div>

Just downloaded a fresh ipfs binary and cannot run the daemon. No matter what port I try, I get a bind error.

```
$ wget https://dist.ipfs.io/go-ipfs/v0.4.17/go-ipfs_v0.4.17_linux-amd64.tar.gz
$ tar xvfz go-ipfs_v0.4.17_linux-amd64.tar.gz
$ cd go-ipfs
$ sudo ./install.sh

$ ipfs init
$ ipfs daemon
Initializing daemon...
Successfully raised file descriptor limit to 2048.

Swarm listening on /ip4/123.123.123.123/tcp/4001
Swarm listening on /ip4/172.17.0.1/tcp/4001
Swarm listening on /ip4/192.168.0.13/tcp/4001
Swarm listening on /ip4/192.168.122.1/tcp/4001
Swarm listening on /ip6/2605:e000:6148:e000:576b:fe03:711b:4d0c/tcp/4001
Swarm listening on /ip6/2605:e000:6148:e000::5/tcp/4001
Swarm listening on /ip6/::1/tcp/4001
Swarm listening on /p2p-circuit/ipfs/QmU55qjfV8K9uZ9yD8MowcjnPMjU6U8ZFE659RCX3YM6TS
Swarm announcing /ip4/123.123.123.123/tcp/4001
Swarm announcing /ip4/172.17.0.1/tcp/4001
Swarm announcing /ip4/192.168.0.13/tcp/4001
Swarm announcing /ip4/192.168.122.1/tcp/4001
Swarm announcing /ip6/2605:e000:6148:e000:576b:fe03:711b:4d0c/tcp/4001
Swarm announcing /ip6/2605:e000:6148:e000::5/tcp/4001
Swarm announcing /ip6/::1/tcp/4001
Error: serveHTTPApi: manet.Listen(/ip4/127.0.0.1/tcp/5001) failed: listen tcp4 127.0.0.1:5001: bind: cannot assign requested address

$ lsof -i tcp:5001
$ sudo lsof -i tcp:5001
$ IPFS_REUSEPORT=false ipfs daemon             
Initializing daemon...                                                    
Successfully raised file descriptor limit to 2048.                            
Swarm listening on /ip4/123.123.123.123/tcp/4001                       
Swarm listening on /ip4/172.17.0.1/tcp/4001     
Swarm listening on /ip4/192.168.0.13/tcp/4001     
Swarm listening on /ip4/192.168.122.1/tcp/4001
Swarm listening on /ip6/2605:e000:6148:e000:576b:fe03:711b:4d0c/tcp/4001
Swarm listening on /ip6/2605:e000:6148:e000::5/tcp/4001
Swarm listening on /ip6/::1/tcp/4001
Swarm listening on /p2p-circuit/ipfs/QmU55qjfV8K9uZ9yD8MowcjnPMjU6U8ZFE659RCX3YM6TS
Swarm announcing /ip4/123.123.123.123/tcp/4001
Swarm announcing /ip4/172.17.0.1/tcp/4001
Swarm announcing /ip4/192.168.0.13/tcp/4001
Swarm announcing /ip4/192.168.122.1/tcp/4001
Swarm announcing /ip6/2605:e000:6148:e000:576b:fe03:711b:4d0c/tcp/4001
Swarm announcing /ip6/2605:e000:6148:e000::5/tcp/4001
Swarm announcing /ip6/::1/tcp/4001
Error: serveHTTPApi: manet.Listen(/ip4/127.0.0.1/tcp/5002) failed: listen tcp4 127.0.0.1:5002: bind: cannot assign requested address
Received interrupt signal, shutting down...
(Hit ctrl-c again to force-shutdown the daemon.)

$ lsof -i tcp:3001
$ sudo lsof -i tcp:3001
$ ipfs config Addresses.API /ip4/127.0.0.1/tcp/3001
$ IPFS_REUSEPORT=false ipfs daemon
Initializing daemon...
Successfully raised file descriptor limit to 2048.
Swarm listening on /ip4/123.123.123.123/tcp/4001
Swarm listening on /ip4/172.17.0.1/tcp/4001
Swarm listening on /ip4/192.168.0.13/tcp/4001
Swarm listening on /ip4/192.168.122.1/tcp/4001
Swarm listening on /ip6/2605:e000:6148:e000:576b:fe03:711b:4d0c/tcp/4001
Swarm listening on /ip6/2605:e000:6148:e000::5/tcp/4001
Swarm listening on /ip6/::1/tcp/4001
Swarm listening on /p2p-circuit/ipfs/QmU55qjfV8K9uZ9yD8MowcjnPMjU6U8ZFE659RCX3YM6TS
Swarm announcing /ip4/123.123.123.123/tcp/4001
Swarm announcing /ip4/172.17.0.1/tcp/4001
Swarm announcing /ip4/192.168.0.13/tcp/4001
Swarm announcing /ip4/192.168.122.1/tcp/4001
Swarm announcing /ip6/2605:e000:6148:e000:576b:fe03:711b:4d0c/tcp/4001
Swarm announcing /ip6/2605:e000:6148:e000::5/tcp/4001
Swarm announcing /ip6/::1/tcp/4001
Error: serveHTTPApi: manet.Listen(/ip4/127.0.0.1/tcp/3001) failed: listen tcp4 127.0.0.1:3001: bind: cannot assign requested address
Received interrupt signal, shutting down...

$ sudo firewall-cmd --zone=public --add-port=4001/tcp --permanent
success
$ sudo firewall-cmd --reload 
success
$ ipfs config Addresses.API /ip4/127.0.0.1/tcp/4001
$ IPFS_LOGGING=debug ipfs daemon                                                                                                                                                   
17:23:45.631 DEBUG cmd/ipfs: config path is /home/adamhanna/.ipfs main.go:100                                                                                                       
Initializing daemon...                                                                                                                                                                
Successfully raised file descriptor limit to 2048.
...
17:23:46.512 DEBUG addrutil: InterfaceAddresses: from manet:[/ip4/123.123.123.123 /ip4/192.168.0.13 /ip4/192.168.122.1 /ip4/172.17.0.1 /ip6/::1 /ip6/2605:e000:6148:e000::5 /ip6/2605:e000:6148:e000:576b:fe03:711b:4d0c /ip6/fe80::533a:e3eb:30d8:5a7f /ip6/fe80::42:dff:fe1b:3367] addr.go:121                                                                         
17:23:46.512 DEBUG addrutil: InterfaceAddresses: usable:[/ip4/123.123.123.123 /ip4/192.168.0.13 /ip4/192.168.122.1 /ip4/172.17.0.1 /ip6/::1 /ip6/2605:e000:6148:e000::5 /ip6/2605:e000:6148:e000:576b:fe03:711b:4d0c] addr.go:133
17:23:46.512 DEBUG addrutil: adding resolved addr:/ip4/0.0.0.0/tcp/4001 /ip4/123.123.123.123/tcp/4001 [/ip4/123.123.123.123/tcp/4001] addr.go:64                                   
17:23:46.512 DEBUG addrutil: adding resolved addr:/ip4/0.0.0.0/tcp/4001 /ip4/192.168.0.13/tcp/4001 [/ip4/123.123.123.123/tcp/4001 /ip4/192.168.0.13/tcp/4001] addr.go:64           
17:23:46.512 DEBUG addrutil: adding resolved addr:/ip4/0.0.0.0/tcp/4001 /ip4/192.168.122.1/tcp/4001 [/ip4/123.123.123.123/tcp/4001 /ip4/192.168.0.13/tcp/4001 /ip4/192.168.122.1/tcp/4001] addr.go:64
17:23:46.512 DEBUG addrutil: adding resolved addr:/ip4/0.0.0.0/tcp/4001 /ip4/172.17.0.1/tcp/4001 [/ip4/123.123.123.123/tcp/4001 /ip4/192.168.0.13/tcp/4001 /ip4/192.168.122.1/tcp/4001 /ip4/172.17.0.1/tcp/4001] addr.go:64
17:23:46.512 DEBUG addrutil: adding resolved addr:/ip6/::/tcp/4001 /ip6/::1/tcp/4001 [/ip6/::1/tcp/4001] addr.go:64                                                                
17:23:46.512 DEBUG addrutil: adding resolved addr:/ip6/::/tcp/4001 /ip6/2605:e000:6148:e000::5/tcp/4001 [/ip6/::1/tcp/4001 /ip6/2605:e000:6148:e000::5/tcp/4001] addr.go:64        
17:23:46.512 DEBUG addrutil: adding resolved addr:/ip6/::/tcp/4001 /ip6/2605:e000:6148:e000:576b:fe03:711b:4d0c/tcp/4001 [/ip6/::1/tcp/4001 /ip6/2605:e000:6148:e000::5/tcp/4001 /ip6/2605:e000:6148:e000:576b:fe03:711b:4d0c/tcp/4001] addr.go:64
17:23:46.512 DEBUG addrutil: ResolveUnspecifiedAddresses:[/p2p-circuit/ipfs/QmU55qjfV8K9uZ9yD8MowcjnPMjU6U8ZFE659RCX3YM6TS /ip4/0.0.0.0/tcp/4001 /ip6/::/tcp/4001] [/ip4/123.123.123.123 /ip4/192.168.0.13 /ip4/192.168.122.1 /ip4/172.17.0.1 /ip6/::1 /ip6/2605:e000:6148:e000::5 /ip6/2605:e000:6148:e000:576b:fe03:711b:4d0c] [/p2p-circuit/ipfs/QmU55qjfV8K9uZ9yD8MowcjnPMjU6U8ZFE659RCX3YM6TS /ip4/123.123.123.123/tcp/4001 /ip4/192.168.0.13/tcp/4001 /ip4/192.168.122.1/tcp/4001 /ip4/172.17.0.1/tcp/4001 /ip6/::1/tcp/4001 /ip6/2605:e000:6148:e000::5/tcp/4001 /ip6/2605:e000:6148:e000:576b:fe03:711b:4d0c/tcp/4001] addr.go:109
Swarm announcing /ip4/123.123.123.123/tcp/4001
Swarm announcing /ip6/2605:e000:6148:e000:576b:fe03:711b:4d0c/tcp/4001
Swarm announcing /ip6/2605:e000:6148:e000::5/tcp/4001
Swarm announcing /ip6/::1/tcp/4001
Error: serveHTTPApi: manet.Listen(/ip4/127.0.0.1/tcp/5001) failed: listen tcp4 127.0.0.1:5001: bind: cannot assign requested address                                                 
17:23:46.513 DEBUG core: core is shutting down... core.go:598
17:23:46.513 DEBUG bitswap: bitswap task worker shutting down... workers.go:82
17:23:46.513 DEBUG bitswap: bitswap task worker shutting down... workers.go:82
17:23:46.513 DEBUG bitswap: bitswap task worker shutting down... workers.go:85
17:23:46.513 DEBUG bitswap: bitswap task worker shutting down... workers.go:82
17:23:46.513 DEBUG bitswap: bitswap task worker shutting down... workers.go:82
17:23:46.513 DEBUG bitswap: bitswap task worker shutting down... workers.go:85
17:23:46.513 DEBUG bitswap: bitswap task worker shutting down... workers.go:85
17:23:46.513 DEBUG bitswap: bitswap task worker shutting down... workers.go:82
17:23:46.513 DEBUG blockservi: blockservice is shutting down... blockservice.go:316
17:23:46.513 WARNI swarm2: swarm listener accept error: process closing swarm_listen.go:77                                                                                       
17:23:46.513 WARNI swarm2: swarm listener accept error: accept tcp 0.0.0.0:4001: use of closed network connection swarm_listen.go:77                                             
17:23:46.514 WARNI swarm2: swarm listener accept error: accept tcp [::]:4001: use of closed network connection swarm_listen.go:77                                                
17:23:46.597 DEBUG relay: Error testing relay hop: connection reset notify.go:41
Received interrupt signal, shutting down...
(Hit ctrl-c again to force-shutdown the daemon.)

```

I’m at a loss??? Thanks for any help!!

```
$ lsb_release -a
LSB Version: :core-4.1-amd64:core-4.1-noarch
Distributor ID: Fedora
Description: Fedora release 28 (Twenty Eight)
Release: 28
Codename: TwentyEight

$ ipfs version
ipfs version 0.4.17
```

---

<div class="post-metadata">

**Author:** ![stebalien](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/stebalien/32/156_2.png) [@stebalien](https://discuss.ipfs.tech/u/stebalien)\
**Post date:** [October 27, 2018, 12:30pm UTC](https://discuss.ipfs.tech/t/solved-cannot-run-daemon-listen-tcp4-127-0-0-1-5001-bind-cannot-assign-requested-address/4156/2 "2018-10-27T12:30:43Z")

</div>

What’s the output of:

```auto
ss -n -l -A tcp -p | grep ':5001'

```

---

<div class="post-metadata">

**Author:** ![adam-hanna](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/adam-hanna/32/2389_2.png) [@adam-hanna](https://discuss.ipfs.tech/u/adam-hanna)\
**Post date:** [October 27, 2018, 7:06pm UTC](https://discuss.ipfs.tech/t/solved-cannot-run-daemon-listen-tcp4-127-0-0-1-5001-bind-cannot-assign-requested-address/4156/3 "2018-10-27T19:06:22Z")

</div>

@stebalien

```
$ netstat | grep 5001
$ ss -n -l -A tcp -p | grep ':5001'

```

I’m almost positive this is some weird fedora thing because I’ve had no problem with IPFS on Ubuntu both 16 & 18.

---

<div class="post-metadata">

**Author:** ![adam-hanna](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/adam-hanna/32/2389_2.png) [@adam-hanna](https://discuss.ipfs.tech/u/adam-hanna)\
**Post date:** [October 27, 2018, 9:37pm UTC](https://discuss.ipfs.tech/t/solved-cannot-run-daemon-listen-tcp4-127-0-0-1-5001-bind-cannot-assign-requested-address/4156/4 "2018-10-27T21:37:41Z")

</div>

Ok, I just tried on a fresh Fedora inside a virtual machine and the daemon started with no trouble. This is definitely some weird issue with my machine. I’ll try some fedora specific forums…

---

<div class="post-metadata">

**Author:** ![adam-hanna](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/adam-hanna/32/2389_2.png) [@adam-hanna](https://discuss.ipfs.tech/u/adam-hanna)\
**Post date:** [October 27, 2018, 10:28pm UTC](https://discuss.ipfs.tech/t/solved-cannot-run-daemon-listen-tcp4-127-0-0-1-5001-bind-cannot-assign-requested-address/4156/5 "2018-10-27T22:28:14Z")

</div>

Ok, scratch this. I updated my Fedora, restarted and now everything is hunky dory… ugghhh

---

<div class="post-metadata">

**Author:** ![stebalien](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/stebalien/32/156_2.png) [@stebalien](https://discuss.ipfs.tech/u/stebalien)\
**Post date:** [October 28, 2018, 1:02pm UTC](https://discuss.ipfs.tech/t/solved-cannot-run-daemon-listen-tcp4-127-0-0-1-5001-bind-cannot-assign-requested-address/4156/6 "2018-10-28T13:02:37Z")

</div>

Ah, I know what happened. You’re loopback interface didn’t have an IPv4 address. If you take a look at the “swarm listening on” messages, you’ll see `::1` (IPv6 loopback) but not `127.0.0.1`.

---

<div class="post-metadata">

**Author:** ![Bragaz](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/bragaz/32/3490_2.png) [@Bragaz](https://discuss.ipfs.tech/u/Bragaz)\
**Post date:** [January 14, 2019, 4:26pm UTC](https://discuss.ipfs.tech/t/solved-cannot-run-daemon-listen-tcp4-127-0-0-1-5001-bind-cannot-assign-requested-address/4156/7 "2019-01-14T16:26:47Z")

</div>

I actually have the same problem on macOS Mojave 10.14.2 and i didn’t understand how to fix it.  
Could you help me in any way?  
I’m desperate!

---

<div class="post-metadata">

**Author:** ![leerspace](https://avatars.discourse-cdn.com/v4/letter/l/94ad74/32.png) [@leerspace](https://discuss.ipfs.tech/u/leerspace)\
**Post date:** [January 15, 2019, 1:28am UTC](https://discuss.ipfs.tech/t/solved-cannot-run-daemon-listen-tcp4-127-0-0-1-5001-bind-cannot-assign-requested-address/4156/8 "2019-01-15T01:28:12Z")

</div>

Can you post your exact error output?

What’s the output from

```auto
lsof -nP -i4TCP:4001,5001 | grep LISTEN

```
