Microsoft cognitive container Failed to reach endpoint - microsoft-cognitive

I am trying to deploy the MS cognitive container into a server that has no network enabled but whitelists the required endpoints by Microsoft below:
However, the container is still not working with error message below:
I think it means the container still can't reach the endpoint it wants.
Can anybody tell me how to debug it? or tell me the full URL that Microsoft wants to reach so I can test by curl by myself?
Please note that it seems all outbound traffic actually goes to a proxy first before reaching public internet.
What I tried so far:
I tried to curl https://australiaeast.api.cognitive.microsoft.com to see if this URL is whitelisted by the server. And it is whitelisted as something returned:

Solved by using HTTP_PROXY and HTTS_PROXY docker run parameter on the MS container to direct the traffic to the proxy directly.

Related

Deno Server doesn't go through the Internet

I built a simple Webserver with just the serve function from the std http module. It just redirects a request to a new URL:
import { serve } from "https://deno.land/std#0.120.0/http/server.ts";
serve(req => Response.redirect("https://google.com"))
It works, when I access the server through a browser on my laptop, where the server is running, but when I try to access it on another machine in the same network using the ip-address of my laptop, there simply is no response at all. Is this one of the security features Deno has and if so, how can you deactivate it?
Update:
So I tried looking up the requests I make on my local machine in Wireshark, but when I run the server and send a request, it doesn't show up there. I disabled my Wifi Connection to see if that changes anything and to my surprise, I still got an answer from the server when I sent a request through the browser. I came to the conclusion that the Deno server somehow doesn't serve over the local network which really confuses me. Is there a way to change that behaviour?
This is not related to Deno, but rather the firewall features of your device/router/network or an error in the method that you are using to connect from the other device (typo, network configuration, etc.).
Without additional configuration (by default), serve binds to 0.0.0.0:8000, so — as an example — if your laptop is assigned the local address 192.168.0.100 by your router, you could reach the server at the address http://192.168.0.100:8000.
You might want to do research on SE/NetworkEngineering and elsewhere to determine the cause of the blocked connection.

Unable to connect to webservice using Chrome Advanced REST Client but able to connect through chrome browser

I need to connect to a third party webservice. When I hit the link directly in the chrome browser, I am able to connect to it and I get a response. But when I tried the same using Advanced REST Client app of chrome, I get a message as 'The service's server DNS address could not be found.'
Also, when I tried to connect it via my JAVA code, using spring's rest template, am getting an Unknown host exception. What could be the reason that am able to connect via browser but not otherwise?
Thanks in advance.
Maybe it's a problem with your system's DNS settings? I'm not sure how Chrome handles queries to DNS when primary DNS did not found the record. If it uses Google DNS' then Chrome may connect to the service but other applications can't.
To test it set your DNS to 8.8.8.8 and check if apps start working.
From browser it's working properly but not from rest client or application, then i guess the problem with the proxy.
if you are using your office network, then this issue will come.
Try hitting the webservice by connecting to personal network.
i have faced similar issue last week, from browser and postman i'm able to hit the web service but not from the application.
Ones i connected with my personal then it started working.
Hope it helps.

Docker Google cloud

I have a CentOS VM instance in google cloud and I have installed docker on CentOS. I have created a container with web interface. I am not able to access it When i try to access it from outside (In browser Other tab). What do I need to do to access it from outside of cloud?
There are several leaps between your browser your containerised web interface.
The first will be from the IP through the GCP firewall into the Instance, you might be getting stuck here, when you created the instance, in the Firewall section, did you select "Allow HTTP traffic and Allow HTTPS traffic"?
If you click through to your instance details in the GCP dashboard you can see under Firewalls if this is selected, also if you look under Network you can see which network profile your instance it using, you can click the network listed to check if it is set up to allow the traffic you are trying to send though.
If this all looks right and traffic is getting to the instance but not the web interface, it could be that the port from docker is not mapped to the port of the host, when you started the container did you use the -p option to map the ports?
If this is also right, then it could be that the Docker image is not exposing it's port internally, in the Dockerfile used to create the Image for the container is there a line starting with EXPOSE, or does if build FROM an Image that does?
There are more possible points of failure in this chain but I have tried to list some likely answers. If none of this helps then let me know in the comments and we can try and debug the issue.

Google JavaScript API v3 unauthorized on 192.168 connection

I'm working on a project that uses the Google Maps JavaScript API v3 to render directions on an integrated map.
The website it built with Jekyll and I run the server using the following command:
jekyll serve --host 192.168.2.7
The given IP address is the IP Address of the system running the server.
The reason I made it listen to that IP Address is because I want to test the application on my mobile devices, following this answer
In the API Console I whitelisted 192.168.*, so that any local connection can use the API.
However, when I go to that IP Address on my phone or computer, the API says the application is not authorized despite me having whitelisted it.
What am I doing wrong here and how can I solve it?
Jekyll serve
The --hostname flag doesn't exist. Use --host 192.168.2.7 or host: 192.168.2.7 in _config.yml. Target address will then be 192.168.2.7:4000 as 4000 is the default listening port for Jekyll webrick server.
Google API withelist
It's not necessary to white list domain, as with no domain white listed you have Any referer allowed
Google authorization
Verify that you've set your API key to something else than https://maps.googleapis.com/maps/api/js?key=API_KEY you are supposed to have something like this : https://maps.googleapis.com/maps/api/js?key=AIzaSytitittototoX7RhHn-drLRRYututu7eX2hVo
If you still have problems, you can give a repository url to have it fixed quicker.
Happy Jekyll !
192.168.2.7 is a private IP address and is not publicly accessible. To use that you will probably need to get a license.

C# code to delete a file from FTP through Proxy

How do I get around this error
**The Requested FTP command is not supported when using HTTP Proxy**
occur on the following code
ftpWebRequest.Method = WebRequestMethods.Ftp.DeleteFile.
It is urgent. Can anyone give suggestions for this problem
Your proxy might be blocking FTP delete keywords when filtering requests.
Can you check if you are able to do this activity when not in the proxy (try from a different network where you connect directly).
if yes, i dont think it is straighforward for you to do this activity from behind proxy.
Another solution is to try open source ftps libraries http://ftps.codeplex.com/
or
1. Create a WCF service on the FTP server which allows you to do all that you want.
2. From client side make call to the WCF service passing the command.

Resources