vagrant error: Could not resolve host: (nil); Host not found - vagrant

When running "vagrant up" command, I got following error:
The box 'ubuntu/trusty32' could not be found or
could not be accessed in the remote catalog. If this is a private
box on HashiCorp's Atlas, please verify you're logged in via
vagrant login. Also, please double-check the name. The expanded
URL and error message are shown below:
URL: ["https://atlas.hashicorp.com/ubuntu/trusty32"]
Error: Could not resolve host: (nil); Host not found
Host OS: Windows 7 (64bit)
Vagrant version: 1.7.4
Git client:
I have tried following and none of them fixed the problem:
1) add "config.vm.box_check_update=false" to Vagrantfile
2) add "HTTP_PROXY" and "HTTPS_PROXY" environmental variables in host OS
(Note: I am able to download the box file using browser from atlas.hashicopr.com using actual URL.)

Based on the error it looks like that you are running vagrant under some firewall. To avoid this error simply set HTTP_PROXY and HTTPS_PROXY environment variable. To get your proxy setting you may use command or easy and visual way open IE and get it from internet connection settings.
Here is how you set-
http_proxy=http://yourproxyserver:port
https_proxy=https://yourproxyserver:port
And command to get it-
netsh.exe winhttp show proxy
In output look for the of "Proxy Servers(s)".
Hope it helps.

Related

SQLPlus is throwing client hostname issue ORA-24454, whereas I can telnet to hostname successfully

I'm trying to connect to the oracle database via sqlplus hosted on a remote instance using command like this sqlplus user#hostname.com:port/SchemaName. And on typing password it throws weird client host issue. See the screenshot below.
The question is which host name its expecting me to put inside /etc/hosts?
Whereas I can telnet successfully to same instance without any issues. By the way I'm on MacOS 10.15.7.
Oracle clients were installed using this link. Can be seen from the screenshot below.
The installation was moved to the appropriate folder.
The $PATH was also exported to ~/.bash_profile file
I was able to resolve this issue by the solution mentioned on this link.
Using hostname command I was able to find host name of my machine, which was required to make a successful connection to the Oracle.
The screenshot below explains the process
The hostname entry looks like below

"Bad configuration option: KexAlgorithms"

I am trying to ssh into a remote server for my university on a Windows 10 computer.
I installed OpenSSH. When I first tried to ssh in, I would get the error
no kex alg
Doing some googling, I put the following in my /.ssh/config file
KexAlgorithms kexalgorithms curve25519-sha256,curve25519-sha256#libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1
However, now when I try to ssh, I get these errors:
/cygdrive/c/Users/name/.ssh/config: line 3: Bad configuration option: KexAlgorithms
/cygdrive/c/Users/name/.ssh/config: terminating, 1 bad configuration options
I'm new to trying this and have been frustrated for hours. Anyone know how I can fix this? Thank you :)
UPDATE: Changed my config file to this based off comment, still getting error:
Host name#remote_server
HostName name#remote_server
KexAlgorithms curve25519-sha256,curve25519-sha256#libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1
Error message still the same, still getting error with line 3, KeyAlgorithmns
The binaries of ssh in windows 10 are outdated. You should download the new ssh binaries and add them to the windows environment variables and it's fixed. Stack overflow post

gcloud login network connection failed issue

I tried to connect gcloud with gcloud init. I got Network connection error.
I tried to fix with Network connection problems in Google Cloud SDK while I have access to google or website like google app engine in my browser
gcloud config set proxy/type socks5
gcloud config set proxy/address 127.0.0.1
gcloud config set proxy/port 1086
But it still does not work for me.
My log is:
Welcome! This command will take you through the configuration of gcloud.
Settings from your current configuration [default] are:
core:
disable_usage_reporting: 'False'
proxy:
address: 127.0.0.1
port: '1080'
type: socks5
Pick configuration to use:
[1] Re-initialize this configuration [default] with new settings
[2] Create a new configuration
[3] Switch to and re-initialize existing configuration: [cindy]
Please enter your numeric choice: 1
Your current configuration has been set to: [default]
You can skip diagnostics next time by using the following flag:
gcloud init --skip-diagnostics
Network diagnostic detects and fixes local network connection issues.
Checking network connection...done.
ERROR: Reachability Check failed.
Cannot reach https://www.google.com (error)
Cannot reach https://accounts.google.com (error)
Cannot reach https://cloudresourcemanager.googleapis.com/v1beta1/projects (error)
Cannot reach https://www.googleapis.com/auth/cloud-platform (error)
Cannot reach https://dl.google.com/dl/cloudsdk/channels/rapid/components-2.json (error)
Network connection problems may be due to proxy or firewall settings.
Current effective Cloud SDK network proxy settings:
type = socks5
host = 127.0.0.1
port = 1080
username = None
password = None
What would you like to do?
[1] Change Cloud SDK network proxy properties
[2] Clear all gcloud proxy properties
[3] Exit
It is due to redirection from goolge account to localhost for acquiring token Try to login using firefox
Considering the error and mainly the following part of the error, it seems that you are facing issues with your proxy and firewall settings and configuration.
Network connection problems may be due to proxy or firewall settings.
Due to this error, you need to configure your SDK to be used with proxy and firewall. I would recommend you to take a look at the documentation Configuring Cloud SDK for use behind a proxy/firewall, to get more information and steps on how to achieve it and avoid the error that you are facing.
Besides that, I could find the below two posts from the Community, of users that are facing similar cases that you are facing.
ERROR: Reachability Check failed. #51
gcloud utility not working #25
Let me know if the information helped you!
For the people who still have this problem.
Try to use IPV4 first as IPV6 is still buggy for many systems.
For Linux, you can just uncomment or add the following line in /etc/gai.conf file:
precedence ::ffff:0:0/96 100
For other systems, you can google the set-up

How to configure the knife plugin for Chef on an Ubuntu 14.04 VM Instance using GCP

I'm getting this error when trying to configure the knife plugin for Chef in an Ubuntu 14.04 instance on Google Cloud Platform. Any ideas on how to fix this?
FATAL: Cannot find subcommand for: 'osc_user configure -i'
There are 2 VMs - one is the chef-server and the other the chef-workstation, both are the same OS.
Source :- https://cloud.google.com/solutions/google-compute-engine-management-puppet-chef-salt-ansible-appendix#getting-started-with-chef-on-compute-engine
Chef-server VM IP - https://35.227.106.170/
Chef-workstation VM IP - https://35.231.42.82/
Here is the console log:
anjalithomas_mec#chef-workstation:~/.chef$ knife configure -i # server: https://[server's external IP address]:443, cookbook_path = ~/chef-repo
Please enter the chef server URL: [https://chef-workstation.c.chef-gcp-195115.internal/organizations/myorg] https://35.227.80.216
Please enter a name for the new user: [anjalithomas_mec] any
Please enter the existing admin name: [admin]
Please enter the location of the existing admin's private key: [/etc/chef-server/admin.pem]
Overwrite /home/anjalithomas_mec/.chef/credentials?? (Y/N) Y
Creating initial API user...
Please enter a password for the new user:
WARNING: IF YOU ARE USING CHEF SERVER 12+, PLEASE FOLLOW THE INSTRUCTIONS
UNDER knife user create --help.
You only passed a single argument to knife user create.
For backwards compatibility, when only a single argument is passed,
knife user create assumes you want Open Source 11 Server user creation.
knife user create for Open Source 11 Server is being deprecated.
Open Source 11 Server user commands now live under the knife osc_user namespace.
For backwards compatibility, we will forward this request to knife osc_user create.
If you are using an Open Source 11 Server, please use that command to avoid this warning.
NOTE: Backwards compatibility for Open Source 11 Server in these commands will be removed
in Chef 15 which will be released April 2019.
FATAL: Cannot find subcommand for: 'osc_user configure -i'
Looks like it's an open issue with no fix yet:
chef client - error during Knife configure -i #4814
https://github.com/chef/chef/issues/4814

Git and http_proxy (SparkleShare on windows and http_proxy)

I've just successfully built SparkleShare for windows according to guide:
https://github.com/wimh/SparkleShare/wiki
and exported my ssh public key to a server.
The problem is that I can't connect from a client behind a http_proxy to a public server with ssh running on a custom port. I had also problem with cloning any git server. I need to switch git:// protocol to http:// one. Any suggestion? Does anyone have similar experience?
This is a log file:
15:25:13 [SSH] ssh-agent started, PID=4380 Identity added:
C:\Users\MYUSER\AppData\Roaming\sparkleshare\sparkleshare.MYEMAIL.key
(C:\Users\sg0922706\AppData\Roaming\sparkleshare\sparkleshare.MYEMAIL.key)
15:25:34 [Fetcher][C:\Users\MYUSER\Documents\SparkleShare.tmp\share]
Fetchin g folder: ssh://MYGITUSER#MYHOST/MYPATH 15:25:34 [Fetcher]
Disabled host key checking MYHOST 15:25:34 [Cmd] git clone --progress
"ssh://MYGITUSER#MYHOST/MYPATH" "C:\Us
ers\MYUSER\Documents\SparkleShare.tmp\share" 15:25:37 [Git] Exit code
128 15:25:37 [Fetcher] Failed 15:25:37 [Fetcher] Enabled host key
checking for MYHOST
To get SparkleShare to use your proxy you will need to modify the config of the msysgit that is installed as part of SparkleShare. Navigate to C:\Program Files (x86)\SparkleShare\msysgit\etc and edit the gitconfig file in notepad and add the following line under the [http] tag
proxy = http://user:pass#proxyurl:port
modifying the url as required to match your settings. You can then use the "On my own server" option to add the http url of your repository.
I have a work around on this particular problem. I guess that you already successfully connected to your server via a simple SSH client (i.e. PuTTY)? With PuTTY you can easily configure an ssh connection via any kind of proxy (such as HTTP, SOCKS, Telnet, ..)
What you can do now is to specify a local "tunnel" (an SSH port forwarding rule) like this: L22 127.0.01:22 (see attachment). If you are using a ssh command line add the following option: -L 22:127.0.01:22.
So now as soon as your terminal is open and running you'll be able to reach your git server via the server url: ssh://git#127.0.0.1.
If your local port 22 is busy you can define the tunnet on a other port. i.e. if the 44 is not occupied: L44 127.0.0.1:22. The url to use in SparkleShare become ssh://git#127.0.0.1:44.
But it's a work around. I'm looking for a better solution.

Resources