Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 1 year ago.
Improve this question
I recently did an implementation of our local environment on the basis of Minikube. In my automation scripts for env provision I relied on the fact that minikube tunnel exposes services with LB type at 127.0.0.1 local IP - this is what happens on my macOS.
However, a developer with Ubuntu (running under VirtualBox) complained that for him External IP is never a loopback one, it's always something from the 10.0.0.0/8 subnet.
At this point I am trying to figure out what is the best course of action:
Try to force somehow External IPs on all platforms to be 127.0.0.1. IDK if possible, couldn't find anything on that.
Or fall back to some other way to reliably find the external IP for any given service. I assume I can use kubectl output to grep the External IP, but that will add overhead and latency in scripts I was hoping to avoid.
What is the cheap and reliable host-agnostic way to find External IP for any given service within the cluster?
Well I don't think 1. is possible. Similar to you, I could not find any information.
I think option 2 is good, but you don't have to use grep. You can use kubectl built in JSONPath Support and set IP address as variable (example in bash):
IP_ADDRESS=$(kubectl get service {your-service} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
You may also use NodePort and do not use minikube tunnel at all:
IP_ADDRESS=$(minikube ip && kubectl get service {your-service} -o jsonpath="{.spec.ports[0].nodePort}")
IP_ADDRESS=$(echo $IP_ADDRESS | sed 's/ /:/g')
Or get it using minikube service --url <service-name> command, but the output starts with http://:
user#shell:~$ minikube service --url my-service
http://{ip-of-the-node}:{node-port}
Another option is to run in the background kubectl port-forward command at the beginning of the script and use localhost address everywhere, but I think previous solutions are better and more reliable.
Related
Closed. This question is not about programming or software development. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 months ago.
Improve this question
I'm using macOS Ventura (13.0.1).
Using 4km3/dnsmasq to spin up a DNS server on my local machine. Using subnet 10.6.0.0/16 and assigned static IP 10.6.0.2. I've added the DNS server IP address in my network settings.
Here's what happening
$ dig +short my.domain.test
10.6.0.6
$ host my.domain.test
my.domain.test has address 10.6.0.6
$ nslookup my.domain.test
Server: 10.6.0.2
Address: 10.6.0.2#53
Name: my.domain.test
Address: 10.6.0.6
$ curl -i -v -4 my.domain.test
* Could not resolve host: my.domain.test
* Closing connection 0
curl: (6) Could not resolve host: my.domain.test
When it doesn't work, the DNS server doesn't seem to be queried.
I've found many other post on the same problem but none of them seems to resolve my issue.
To get the API calls to work, I need this to work with curl.
[It works on Chrome Browser, doesn't work on Safari]
As it turns out, curl doesn't care about local DNS. The domain name needs to exist ON THE INTERNET. curl looks for records in root servers. So, even if your DNS record resolves, you can't really access them in all the ways you want. Some will work, some won't.
One solution for this would be, register an actual domain name. Then point the domain name to your private IP addresses or whatever you want to point it to. You can have additional DNS server on your local machine.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 11 months ago.
Improve this question
I'm having a hard time viewing Wildfly welcome page on port 8080 + tried apache on port 80 too, and they timeout. I can ssh to the server and using (curl localhost:8080) and (curl localhost:80) show Wildfly and apache welcome pages respectively. I have checked the Security List and Security groups and even opened ALL traffic just to see if they are causing this problem, but unfortunately the problem still there.
I'm using ubuntu 20.04 image and the UFW (firewall) is inactive so the problem isn't from there.
By default every oracle instances come with 2 firewall.
Hardware Firewall (Known as VCN)
Software Firewall (They use a very hard iptables rules and regular ufw doesn't work with that.)
The 2nd option is very annoying and also took me about 3 days to solve my problem. You can follow my following instructions and hopefully it will also fix your problem.
1st you have to open the port on the Hardware Firewall (VCN) and when you believe you have opened the port then by login to the server using ssh use this command to clear the default oracle iptables rule.
sudo iptables -F
But remember whenever you will reboot the server you will need to again run the flash command. So if you don't want to run this command every time after server reboot. Then after running the flash command run this command to save your flashed iptables rules.
sudo netfilter-persistent save
So, you will not need to run the iptables falsh command every time on the startup of the server.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
Improve this question
Please forgive the embarrassingly dumb newb question.
Here's the scenario:
As part of a task I have to SSH into a server and create some files. I was given the servers name (some.server.com) and an SSH key (id_rsa.username) to use. I am told to use the username and the provided key to login. Since I am relatively new to the workings of SSH this is what I have done:
I have downloaded id_rsa.username to my Downloads directory.
I have tried loggin in with
ssh -i downloads/id_rsa.username username#some.server.com
But I get ssh: connect to host some.server.com port 22: Operation timed out
I have tried using port 2222 and also 11234 ( I used that port once on a different server).
Is there anything I am doing wrong on my end? I don't have access the server admin to ask any questions so I have to try to figure this out myself.
in my case, I change the rule of ufw, and that rule ban the ssh connect
so run sudo ufw allow sshsolve the problem
"Operation timed out" means that you're not making a TCP connection to the remote server. The remote computer may be down, or there may be a firewall blocking access to the the remote server, or your local computer may not have suitable network access. It's not really possible to say what the exact problem is, based on the information here.
If you're in a corporate network, you should contact your local computer support staff for assistance. It's not unheard of for companies to block outgoing SSH from their corporate network.
Otherwise, if you need help troubleshooting network connectivity, you'd probably get better results on Superuser.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I have a web side hosted on IIS, windows 8 os. I can access from my browser to this page via these urls:
localhost/mysamplesite
192.168.21.10/mysamplesite
I can ping my ip address like this: ping 192.168.21.10
But I can not ping to 192.168.21.10/mysamplesite this command gives error: ping request could not find host 192.168.21.10/mysamplesite
Actually have another machine (192.168.21.45) that installed apache banchmark on. I want to test request from apache banchmark to my site. So I can not send request.
ab -n 1 -c -1 192.168.21.10/mysamplesite
This does not work.
As arco444 mentioned, you can't ping a website, just a computer itself.
ping is the first thing to try when troubleshooting network connectivity problems
ping 192.168.21.10
from the remove machine.
You can also try PsPing to test for connectivity to a certain port:
psping 192.168.21.10:80
however you can not use this to check for a particular resource on your web site.
Instead you have to use a tool to test for http traffic, Apache Benchmark is one of them, depending on the OS on the remote machine, there are many other tools.
If ping works, check the firewall settings on your Windows 8 machine.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 1 year ago.
Improve this question
I am on a Windows 7 machine and I was instructed to use the Unix command "host" as per this article:
https://devcenter.heroku.com/articles/custom-domains
however, host is not a valid command with Windows and even with bash on Windows I could find host installed.
Is there a Windows equivalent to "host"?
This question is more suited to Super User, but the command you're looking for is nslookup. Both are (at their most basic) used to look up IP addresses for hostnames. You can run cmd and do nslookup hostname the same way you'd do host hostname. If you need something other than the IP address, the command-line arguments will differ. Run nslookup with no arguments and type help at the prompt for details.
Although you will be able to find the DNS resolution using nslooukup, there is no direct equivalent to the host command in Windows. There is a similar question on Super User.
Old thread, but I hit it doing Google searches. There is no built in but if you add this to your profile.ps1 it'll do what you want.
function host {
param ($ip)
$ErrorActionPreference='stop'
$answer=Resolve-DnsName $ip
if ($answer[0].IPAddress -eq $null)
{
echo "$($answer.Name[0]) has address $($answer.namehost[0])"
}
else
{
echo "$($answer.Name[0]) has address $($answer.Ipaddress[0])"
}
}
Use the command "Nslookup" followed by your business domain to look up its server's IP address. If the server has multiple IP addresses associated with the name, the command will list all of them. As an example, you might enter "nslookup google.com" to find a list of Google's IP addresses.
Use ping -a to replicate the host command.