Quantcast
Channel: Active questions tagged amazon-ec2 - Stack Overflow
Viewing all articles
Browse latest Browse all 29543

Configure WebServer in AWS EC2 instance

$
0
0

I'm doing a project that's the resolution of a sudoku puzzle. The sudoku code will run in an EC2 instance as the workload to drive the project for the cloud.Until now the instance is created and the sudoku code is done and it runs locally:

final HttpServer server = HttpServer.create(new InetSocketAddress(8000), 0);

However when I change the line above for the IPv4 Public IP of the instance:

final HttpServer server = HttpServer.create(new InetSocketAddress("xx.xxx.xx.xx", 8000), 0);

I get the error:

Exception in thread "main" java.net.BindException: Cannot assign requested address

I would be very grateful if you helped me!


Viewing all articles
Browse latest Browse all 29543

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>