vagrant rsync protocol mismatch - vagrant

I am facing following Rsync issue when i say vagrant up --provider=joyent ... after node creation its giving following error... when i observer rsync versions on both machines .., its same.. i dont know how to troubleshoot this ..
==> default: Couldn't find Cheffile at ./Cheffile.
==> default: Rsyncing folder: /home/system/Documents/tobe/dsrv195/ => /vagrant
There was an error when attemping to rsync a share folder.
Please inspect the error message below for more info.
Host path: /home/system/Documents/tobe/dsrv195/
Guest path: /vagrant
Error: Warning: Identity file not accessible: No such file or directory.
protocol version mismatch -- is your shell clean?
(see the rsync man page for an explanation)
rsync error: protocol incompatibility (code 2) at compat.c(174) [sender=3.1.0]
root#system-desktop:/home/system/Documents/tobe/dsrv195#
Anyone please help

yes its fixed .. after copying /home/ubuntu/.ssh/authorized_keys to root

Related

rsync does not work in Visual Studio 2019

I have created a simple CMake project from the template provided in visual studio 2019. It connects to remote Linux server and errors out while copying a file using "rsync" with the following error.
Could not start the 'rsync' command on the remote host, please install it using your system package manager. Please see https://aka.ms/AA23jat for troubleshooting.
The log shows the error details as following.
23:03:25.2045083 [Error, Thread 88] liblinux.IO.Rsync: liblinux.IO.RsyncException: Could not create daemon configuration file on remote device ---> liblinux.IO.RsyncException: echo config error: and error output: Unmatched ".
Please note: rsync is installed on the remote Linux server and tested it with and without ssh its working.
When I tried to test rsync which is provided by Visual Studio under "C:\Apps\VS2019Pro\Common7\IDE\VC\Linux\bin\rsync\rsync.exe" to sync/copy a file to remote linux server it fails with following error.
dup() in/out/err failed
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(226) [sender=3.1.3]
Any help on this will be appreciated.
Rsync speaks the rsync protocol, which is a client server protocol.
The client you are using needs to talk to a server, which is the rsync binary on the remote server, which doesn't seem to be here.
The message is pretty clear:
Could not start the 'rsync' command on the remote host, please install it using your system package manager. Please see https://aka.ms/AA23jat for troubleshooting.
You really need to have rsync on your remote server.
I installed rsync from source on the target using the default settings which installed it at /usr/local/bin/rsync. Apparently the path Visual Studio expects is /usr/bin. I created a symbolic link with the command 'ln -s which rsync /usr/bin/rsync'

initdb for postgresql on os x fails

Having trouble installing postgres 10 on my Mac, version 10.12.5.
I've tried installing 2 ways:
(1) Downloading Postgres.app
(2) `brew install postgresql`
and tried to manually run a bunch of variations of these commands for initdb:
$ initdb /Applications/Postgres.app/Contents/Versions/latest/bin/ver-10
$ initdb /usr/local/var/postgres -E utf8
All yield the same error FATAL: could not create semaphores: Invalid argument.
Full trace:
The files belonging to this database system will be owned by user "foo".
This user must also own the server process.
The database cluster will be initialized with locale "en_US.UTF-8".
The default text search configuration will be set to "english".
Data page checksums are disabled.
fixing permissions on existing directory /usr/local/var/postgres ... ok
creating subdirectories ... ok
selecting default max_connections ... 10
selecting default shared_buffers ... 400kB
selecting dynamic shared memory implementation ... posix
creating configuration files ... ok
running bootstrap script ... 2018-03-12 20:49:58.654 PDT [98144] FATAL: could not create semaphores: Invalid argument
2018-03-12 20:49:58.654 PDT [98144] DETAIL: Failed system call was semget(1, 17, 03600).
child process exited with exit code 1
initdb: removing contents of data directory "/usr/local/var/postgres"
I'm not sure what FATAL: could not create semaphores: Invalid argument means. I've seen a lot of other answers related to insufficient space, but not this one.
Thanks in advance!
I had to remove Postgres which I install via Brew, and then I reinstalled Postgres.app, and then restarted my computer, and then opening the app and clicking 'initialize' fixed it.

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

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

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.

Deleting a Knife client without a private key?

I've joined a new company and to get caught up to speed, I've been playing with Vagrant for my VM. I had my system nearly set up and then a weird error forced me to shut off my laptop without disconnecting via vagrant destroy. Now when trying to get set, I run vagrant up and get the following error message.
[default] Running provisioner: Vagrant::Provisioners::ChefClient...
[default] Creating folder to hold client key...
[default] Uploading chef client validation key...
[default] Generating chef JSON and uploading...
[default] Running chef-client...
stdin: is not a tty
[Wed, 16 Jan 2013 05:20:20 -0500] INFO: *** Chef 0.10.2 ***
[Wed, 16 Jan 2013 05:20:20 -0500] INFO: Client key /etc/chef/client.pem is not present - registering
[Wed, 16 Jan 2013 05:20:21 -0500] INFO: HTTP Request Returned 409 Conflict: Client already exists.
[Wed, 16 Jan 2013 05:20:22 -0500] INFO: HTTP Request Returned 403 Forbidden: Merb::ControllerExceptions::Forbidden
[Wed, 16 Jan 2013 05:20:22 -0500] FATAL: Stacktrace dumped to /srv/chef/file_store/chef-stacktrace.out
[Wed, 16 Jan 2013 05:20:22 -0500] FATAL: Net::HTTPServerException: 403 "Forbidden"
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
chef-client -c /tmp/vagrant-chef-1/client.rb -j /tmp/vagrant-chef-1/dna.json
Now from my own research I see that this means a client already exists with the name specified, so I decided to manually shut it down. I tried to list all the knife clients with knife client list but then got the following message:
WARNING: No knife configuration file found
ERROR: Your private key could not be loaded from /etc/chef/client.pem
Check your configuration file and ensure that your private key is readable
Strange. I know knife.rb exists, I see it when I ls so I don't know how the knife configuration file couldn't exist. I can't see my knife clients without this private key apparently. I'm completely new to Vagrant, Knife AND Chef so I'm stumped.
Thoughts?
So the convention is that your knife.rb be located in ~/.chef/knife.rb or /etc/chef/knife.rb - I prefer the former, as it keeps it in my home folder, adn constrained to MY user account.
I will also typically keep my Chef Server client certificate there as well.
Once you are able to execute a knife client list successfully, then you will be able to identify and remove the offending client certificate. (You might also be able to use the Web UI in the interim).
Having Vagrant remove the client's cert on destroy was a suggested feature but was never implemented, leaving it to the operator to make that decision.
Additionally - it looks like you're using a VERY old version of Chef - 0.10.2 - and we've just had 10.18.2 released today. Something to consider.

Resources