Error while executing the statement in cmd - cf api https://api.ng.bluemix.net - ibm-cloud

Getting the below error while trying to execute the statement in command prompt.
C:\users\Blue mix> cf API https://api.ng.bluemix.net
Setting API endpoint to https://api.ng.bluemix.net...
Request error: Get https://api.ng.bluemix.net/v2/info: http: error connecting to
proxy http://my.proxyserver.com:8080: dial tcp : lookup my.proxy server.com: GET Address inflow : No such host is known.
TIP: If you are behind a firewall and require an HTTP proxy, verify the HTTPS_proxy environment variable is correctly set. Else, check your network connection.
FAILED
Can you please suggest how can I fix this problem ?

It looks like you have configured the https_proxy variable? https://docs.cloudfoundry.org/cf-cli/http-proxy.html.
The error message suggests that the hostname you have set for your proxy server can not be resolved to an IP address.
Update:
You can verify if your machine is able to resolve the hostname of the proxy server by pinging your proxyserver, e.g.
C:\> ping my.proxyserver.com
Ping will report if it is unable to resolve the proxy hostname to an ip address. E.g.
C:\> ping my.proxyserver.com
Ping request could not find host my.proxyserver.com. Please check the name and try again.
If it is unable to resolve to an ip address, you need to fix that problem first. See here for some tips: https://support.rackspace.com/how-to/modify-your-hosts-file/

Related

Kubernetes pod cannot ping url or wget HTTPS site

I'm trying to install SonarQube onto a bare-metal kubernetes cluster.
All is working except for when the software inside the pod tries to make a HTTPS request.
I've checked using wget (pod doesn't have curl & cannot use ping) & using the kubernetes DNS debugging guide, however whenever I make a call such as wget https://google.com I get the following error:
Connecting to google.com (192.168.1.179:443)
ssl_client: google.com: TLS connect failed
wget: error getting response: Connection reset by peer
command terminated with exit code 1
The IP address 192.168.1.179 is the address of another server on the host network.
The resolv.conf I have (ubuntu host) is:
nameserver 1.1.1.1
nameserver 1.0.0.1
I can't figure out why this is happening or how to fix it. DNS is working but not resolving HTTPS.
I'm using Calico, kubernetes dashboard, MetalLB, ingress-nginx & sonarqube
Edit:
After restarting the host the DNS servers successfully changed to 1.1.1.1.
However, now I'm presented with the following
Connecting to google.com (142.250.204.14:443)
ssl_client: google.com: TLS connect failed
wget: error getting response: Connection reset by peer
command terminated with exit code 1
This error went away when I:
Disabled my firewall (ufw) and;
Restarted the machine for the DNS changes to take affect.

Unable to connect to remote server using Enter-PSSession cmdlet

I am getting below error message when I try to access one of the AWS Cloud Servers through"Enter-PSSession" cmdlet. I have Admin rights on the server and provide the necessary credential as well but still no gain. Please help to resolve or suggest alternate way to remotely access the Server.
------------------Connecting to remote server XYZ.XXXXXX.com failed with the following error message : WinRM cannot complete the
operation. Verify that the specified computer name is valid, that the
computer is accessible over the network, and that a firewall
exception for the WinRM service is enabled and allows access from this
computer. By default, the WinRM firewall exception for public
profiles limits access to remote computers within the same local
subnet. For more information, see the about_Remote_Troubleshooting
Help topic.
Make sure that the server behind that name has the proper IP address.
You can do that if you ping the host name, and then ping the turned IP with attribute -a
Ping server.com
Ping -a <IP returned by that hostname>
If the second ping return different hostname, thats were you have problem.
If it does not return any hostname, then it might be behind switch or firewall rule that does not allow reverse lookup.
If everything is good, try to see if the WinRM is working with the following command
Test-WSMan <hostname or an IP>
If that is return the ProductVersion then that machine has WindowsRemote Manager enabled.
If that is not working then you dont have windows remote management enabled on that machine, and of course check the firewall.
But if you dont have an issue here then you better check if you have CredSSP enabled/disabled, but for that you would need to read a bit more, here is a nice article about it :
https://4sysops.com/archives/using-credssp-for-second-hop-powershell-remoting/
And if after all that you still have the issue, make sure you know if you are using Certificates to authenticate, if thats the case it really depend on how your PKI is all set.
Make sure the remote host is reachable over you network .
if reachable over network, make make sure remoting is enabled on the derstination server.
if windows firewall service is not running, start it on the destination server .

Trying to set Fiddler as a Reverse Proxy

I have been trying to set Fiddler as a Reverse Proxy, I've been following these instructions, but I just don't understand the point 3.
Option #1: Configure Fiddler as a Reverse-Proxy
Fiddler can be configured so that any traffic sent to http://127.0.0.1:8888 is automatically sent to a different port on the same machine. To set this configuration:
Start REGEDIT
Create a new DWORD named ReverseProxyForPort inside HKCU\SOFTWARE\Microsoft\Fiddler2.
Set the DWORD to the local port you'd like to re-route inbound traffic to (generally port 80 for a standard HTTP server)
Restart Fiddler
Navigate your browser to http://127.0.0.1:8888
How can I set the DWORD to the local port??? Sorry Im novice in network connections, please hope some good fellaw could explain step by step how can I do that. Do I have to do it inside Fiddler? Do I have to do it in windows? Im using windows8.1
PD: I know Im missing that step, cuz after doing steps 4 and 5 I get this message in the browser: "[Fiddler] The connection to '127.0.0.1' failed.
Error: ConnectionRefused (0x274d).
System.Net.Sockets.SocketException No connection could be made because the target machine actively refused it 127.0.0.1:8888"
EDIT>
When I set on fiddler>Fiddler Options>Connections>Fiddler listens on port: 8888
I get the same message, but instead of 127.0.0.1:8888 now I get 127.0.0.1:80
[Fiddler] The connection to 'localhost' failed.
Error: ConnectionRefused (0x274d).
System.Net.Sockets.SocketException No connection could be made because the target machine actively refused it 127.0.0.1:80
I have notice that in fiddler set reverse proxy page, it says...
Configure Fiddler as Reverse Proxy:
To use this method, the hostname for the request to reroute must be 127.0.0.1:8888, localhost:8888, [::1]:8888, or the machine's NETBIOS hostname on port 8888.
Is perhaps that why I can't get it to work? how can I set my machine NETBIOS hostname on port 8888?
I had the same issue... this fixed it...
In the menu click 'Tools' >> 'Fiddler options' >> 'Connections'
Find out the port number
Use the port number noted here instead! e.g. http://127.0.0.1:[port number]
Let's step back a bit. Why specifically are you trying to run Fiddler as a Reverse Proxy? What service are you trying to pass traffic into (e.g. IIS?) What port did you move that service to? What is the exact (original) URL of the traffic you're trying to collect?
You don't need to mess with the registry if you're going to write FiddlerScript.

Resolve hostname to IP address for Postfix

I'm trying to setup postfix in a VPC on AWS where an external server communicates with a postfix mail server in the same subnet.
I'm getting an error from postfix every time I try to connect to postfix from an external client. The error says:
warning: hostname example.com does not resolve to address 54.x.xxx.xxx
connect from unknown[54.x.xxx.xxx]
lost connection after CONNECT from unknown[54.x.xxx.xxx]
I'm suspecting this is related to the IP address that is being pointed to the hostname. When I run:
dig example.com
The 'answer' section outputs this:
;; ANSWER SECTION:
example.com. 60 IN A 10.0.1.132
I've looked at this link: http://www.postfix.org/LINUX_README.html
and I've tried editing /etc/host.conf and the /etc/postfix/main.cf file from that link and a bunch of other things from googling but nothing is working and I still get the same error mentioned above.
Is there a way to configure the VPC or the EC2 instance to point to my public IP address, or can I fix this problem trying to add some more configuration settings for postfix?

What is "Attempt to lookup host entry for bad IP address" error?

Check this error and please help me.
2009-07-24 15:58:34.209 LBS[2636] Host 'staging.common.virtualearth.net' not found using 'gethostbyname()' - perhaps the hostname is wrong or networking is not set up on your machine
2009-07-24 15:58:34.209 LBS[2636] Attempt to lookup host entry for bad IP address (staging.common.virtualearth.net)
NOTE: you should run 'diskperf -y' to enable the disk statistics
I am running the objC codes for hitting a webservice on GNU for Windows.
Why is this error?
The first line says it can't find the IP address off the DNS servers.
The second is some kind of fallback with an incredibly cryptic error. Looks like it's trying reverse DNS using hostname as the IP address (hence bad IP address) or ARP resolution using hostname as IP address.
Basically fix the DNS to that host and both will be solved.