Hey Surabhi,
Actually at some point of time, you would have denied your java access to the connector services.
Try switching off your System firewall, you would be able to connect to your app.
Hope it helps and works for you!