Jelastic - ImageIO.read() connection refused - javax.imageio

when reading an image via ImageIO.read(url) I am getting a connection refused error. The URL consists of the public IP address + relative path to image. Is the error because of firewall settings? Over the browser, the URL works.

Seems that something wrong with your code. Try this to debugging:
URL url = new URL("yoururlhere");
BufferedImage bi = ImageIO.read(url);
System.out.println(bi);

Related

How to access website using hostname instead of ip address?

I am working on a wordpress website and I'm unable to access my website using the host-name. [However, I'm able to access my website through the ip address. For example, when I enter 10.20.0.18, I'm directed to 10.20.0.18/wp-admin/plugins.php]
I am new to hosting and I was just able to update my hosts file and properly link the ip address to hostname by reading through some articles.
I also checked these links are correct using ping command.
For example, my hosts file looks something like this,
#Host file starts here
127.0.0.1 localhost
10.20.0.18 www.webserver.abc.com
66.155.40.202 api.wordpress.org
#End of host file
Now, when I try to access the website using hostname through my web browser, I get this error.
This site can’t be reached www.webserver.abc’s server IP address could not be found.
I am not sure where I am going wrong, or do I need to make some more changes in other files?

Unable to resolve CRM web application url with hostname from outside browsers

I have a deployment created with crm 2016 on-premise.
After installation. I am unable to use the webapplication URL from browsers outside the server.
If I use FQDN NAME-IT IS GETTING RESOLVING and able to access org. Eg:
http://testserver.testserverdom.com/Englishorg
If I use hostname url-it is not resolving and getting blank page. Eg:
http://testserver/EnglishOrg
Again if I add host entry in drivers/etc/hosts file in the outside machine like 10.10.10.10 testserver. Able to resolve and access URL.
I have added hostname(A) entry in DNS. I am still unable to resolve it with hostname.
Server have DHCP Assigned IP Address.
I believe you might be having the DNS issue on client - side (outside of you server) which cannot correctly resolve your testserver.
If you run cmd and there try nslookup testserver- you should see if this is resolved with the correct ip address (according you your hosts file change this should be 10.10.10.10). If this does not -- I believe the problem is in DNS query / response, please make sure your local DNS server is configured correctly and make sure your local DNS server is sending back the response to your client.

Error due to difference between localhost and local IP address

I have visited to this link and got to know about the differences between localhost and localIP address.
I have got problem saying Access is denied while accessing my own asp.net api hosted
in my local IIS server with the following url
http://172.18.12.166/FinalApi/api/movie.
It works finely if I use following url to access the api
http://localhost/FinalApi/api/movie
In the console of browser the request can be visualized as
This means the request is completed with no error. But this returns no data if I use localIP address in case of localhost.
But this works finely while requesting from other computers on the same network.
Look for host file at the following location on your system:
C:\WINDOWS\system32\drivers\etc
in that change the mapping of localhost (by default it would be 127.0.0.1). Change it to map to your IP. Then set up the you website in IIS server as per IP address.
Hope this helps.

IIS Subdomain Host Headers Not Working

Using IIS 7, I have an existing website, example.com, and I have added another website to which I'd like the URL, sub.example.com to point. I've set up the host headers for this, but it does not work. Trying to ping the subdomain URL give the message "Ping request could not find host sub.example.com. Please check the name and try again."
Should a DNS setting perhaps be set?
The subdomain must be set in the DNS or it will not resolve to an IP address. Just having it defined in IIS is not enough. The client computer must be able to translate the name into a meaningful server address.

Invalid URI for Localhost

We have a website/webservice running on one of our servers. We hit that webservice once a day with a scheduled .bat scipt.
Just recently the scheduled task started to fail. The log shows "Invalid URI: The hostname could not be parsed."
When we're logged into the server we can reach the website through http://localhost/website, but get an Invalid URI error when we hit the webservice http://localhost/website/ws.asmx.
Any ideas?
Edit:
We'be tried using the servername, the ipaddress, and port numbers (and combinations therein). Any other ideas?
For the private IP Address your using Wikipedia Reference http://en.wikipedia.org/wiki/IP_address for what are the limits and proper uses.
If you have access to the source code for the web service look for fixed IP Address being used along with having correct Server Bindings for using the service.
Try using the IP Address of the machine instead of localhost.
Basically, I'm taking a wild stab that someone ran a lockdown or a service patch was installed that somehow is filtering request resposes to localhost (127.0.0.1).
Try using the machine name instead of localhost

Resources