Failed to listen on localhost:8000 (reason: Cannot assign requested address)

kn3l

When I run php artisan serve on Ubuntu, the Laravel development server tries to start on http://localhost:8000/ but fails with this error:

[Mon Apr 25 10:28:08 2016] Failed to listen on localhost:8000 (reason: Cannot assign requested address)

My hosts file (/etc/hosts/):

1 27.0.0.1   localhost 

How can this be fixed?

ganesh kalje

That's usually because the port is in already in use, or not available on the current host.

You can use this command to run php artisan serve --port=8080

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

listen tcp 127.0.4.1:2040: bind: can't assign requested address

gin-gonic cannot assign requested address

bind: cannot assign requested address on UDPclient in local network

RedisInsight on Docker and Redis on Docker: Could not connect: Error 99 connecting to localhost:6379. Cannot assign requested address

ERROR SparkContext: Error initializing SparkContext. java.net.BindException: Cannot assign requested address: Service 'sparkDriver' failed

Netty SocketIO - Cannot assign requested address in AWS

Flask, cannot assign requested address

Artisan Error: Failed to listen on localhost:8000

requests, cannot assign requested address, out of ports?

Docker for Windows: cannot assign requested address

Cannot connect to redis://localhost:6379/0: Error 99 connecting to localhost:6379. Cannot assign requested address

OSError: [Errno 99] Cannot assign requested address

HTTPServer: "Cannot assign requested address" on localhost vs 127.0.0.1

Server binding results in error "Cannot assign requested address"?

Spark Cannot assign requested address: Service Driver failed after 16 retries

Unable to bind to http://localhost:5000 on the IPv6 loopback interface: 'Cannot assign requested address'

CentOS8 nginx: [emerg] bind() failed (99: Cannot assign requested address)

Cannot assign requested address (when using Docker)

Bind error (99): Cannot assign requested address

Set MAC address fails - RTNETLINK answers: Cannot assign requested address

iperf returning “bind failed: cannot assign requested address” in Windows XP and 7

php Failed to listen on 172.0.0.1:8080 (reason: Can't assign requested address)

kdump: kexec_file_load failed: Cannot assign requested address

How to fix 'Cannot assign requested address?'

Nginx on Kubernetes (99: Cannot assign requested address)

redis.exceptions.ConnectionError: Error 99 connecting to localhost:6379. Cannot assign requested address

Docker Cannot assign requested address

Errno 99 - Cannot assign requested address

Socket server failed to bind to kafka:29092: Cannot assign requested address