Well, I had the same situation but on Mac. After I updated to macOS Sierra. In my case was a block on the sites that use system proxy settings, where localhost, 127.0.0.1, are blocked.
Perhaps, your case es similar, but a proxy setting on you Linux (GENTO).
For mac this is the solution AppServer issues from Netbeans
Step 1: (Try to search for the same on Linux) Go to system preference >Network>Select your wifi connection>Advanced>select
proxies tab. There check 3 options 1) Auto proxy Discovery 2)Automatic
Proxy configuration 3) web proxy(http)
Step 2: Go to Netbeans>preferences>General> select use system proxy> reload> test connection You may get connection successful. If
connection gets successful, Now Clean & build your Applications in
netbeans and press run .
I hope this help you and give you an idea.