From Objects to Functions: IOException 'failed to bind to 0.0.0.0/0.0.0.0:8080

@uberto

I’m evaluating a sample of this book to see if I want to buy.

Trying sample code in idea. Tried running ‘Spike.kt’ and get the following error:

Exception in thread "main" java.io.IOException: Failed to bind to 0.0.0.0/0.0.0.0:8080

Did some Googling and got nothing useful.

What’s the solution?

This error means that you cannot open a webserver on port 8080. The likeliest explanation is that you already have a service running on that port, or that could be permission issues, depending on the OS you are running.
Please try using a different port number.