I want to move to a virtualbox environment on my new laptop so wanted to test out vagrant. However I havent been able to get past Vagrant up without one error after another, I have got through a number of errors and now im stuck.
Rsync is always failing to exec ssh (full error below)
Platform Windows 7 pro SP1.
Cygwin installed with Rsync.
Vagrant installed
Virtualbox installed
Putty.exe on my desktop.
Git installed.
rsync and putty added to end of sytstem path like
..;C:\HashiCorp\Vagrant\bin;C:\Users\paul\Desktop\putty.exe;C:\cygwin64\bin;C:\Program
Files\Git\cmd
Vagrant file consists of (including a windows/rsync error fix)
Vagrant.configure(2) do |config|
config.vm.box = "centos/7"
ENV["VAGRANT_DETECTED_OS"] = ENV["VAGRANT_DETECTED_OS"].to_s + " cygwin"
end
I also tried changing line 43 in C:\HashiCorp\Vagrant\embedded\gems\gems\vagrant-1.6.X\plugins\synced_folders\rsync\helper.rb to hostpath = "/cygdrive" + Vagrant::Util::Platform.cygwin_path(hostpath)
instead of putting it in the vagrant file.
Still I cant get rsync to work. Im not even sure why it needs to do this on 'up' anyway.
im running vagrant up from cmd here is the full output.
C:\Users\paul\Projects\gettingStarted-centos7>vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'centos/7' is up to date...
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
==> default: Forwarding ports...
default: 22 => 2222 (adapter 1)
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:2222
default: SSH username: vagrant
default: SSH auth method: private key
default: Warning: Connection timeout. Retrying...
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
default: No guest additions were detected on the base box for this VM! Guest
default: additions are required for forwarded ports, shared folders, host on
ly
default: networking, and more. If SSH fails on this machine, please install
default: the guest additions and repackage the box to continue.
default:
default: This is not an error message; everything may continue to work prope
rly,
default: in which case you may ignore this message.
==> default: Rsyncing folder: /cygdrive/c/Users/paul/Projects/gettingStarted-cen
tos7/ => /home/vagrant/sync
There was an error when attempting to rsync a synced folder.
Please inspect the error message below for more info.
Host path: /cygdrive/c/Users/paul/Projects/gettingStarted-centos7/
Guest path: /home/vagrant/sync
Command: rsync --verbose --archive --delete -z --copy-links --chmod=ugo=rwX --no
-perms --no-owner --no-group --rsync-path sudo rsync -e ssh -p 2222 -o StrictHos
tKeyChecking=no -o IdentitiesOnly=true -o UserKnownHostsFile=/dev/null -i 'C:/Us
ers/paul/Projects/gettingStarted-centos7/.vagrant/machines/default/virtualbox/pr
ivate_key' --exclude .vagrant/ /cygdrive/c/Users/paul/Projects/gettingStarted-ce
ntos7/ vagrant#127.0.0.1:/home/vagrant/sync
Error: rsync: Failed to exec ssh: No such file or directory (2)
rsync error: error in IPC code (code 14) at pipe.c(85) [sender=3.1.1]
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.1]
On the blocking point, ssh is not installed or not configured to run (as confirmed by the ops) so it throws the error (also commented on github issue)
As a side note, it can be good to install the vagrant vbguest plugin so you'll get rid of the warnings. vagrant plugin install vagrant-vbguest will take care of installing the vbguest, shared folder will work better with the guest additions.
Related
I am trying to install kubeadm and for this i am trying to create vagrant environment i clone this link "https://github.com/kodekloudhub/certified-kubernetes-administrator-course" to my server and then run the command "vagrant up". I take this error.I am using Ubuntu 20.04.5 LTS
==> kubemaster: Clearing any previously set network interfaces...
There was an error while executing VBoxManage, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.
Command: ["hostonlyif", "create"]
Stderr: 0%...
Progress state: NS_ERROR_FAILURE
VBoxManage: error: Failed to create the host-only adapter
VBoxManage: error: VBoxNetAdpCtl: Error while adding new interface: failed to open /dev/vboxnetctl: No such file or directory
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component HostNetworkInterfaceWrap, interface IHostNetworkInterface
VBoxManage: error: Context: "RTEXITCODE handleCreate(HandlerArg*)" at line 95 of file VBoxManageHostonly.cpp
i want to create vagrant environment
This problem was solved by downgrading the "VirtualBox" version. Try to install version 6.38.
I'm trying to remotely connect to a server (running on Ubuntu 16.04.7 LTS) through VSCode (started on WSL).
I've set the path to my WSL Config file (with the SSH keys inside) in VSCode Remote-SSH.
I can reach and connect to the server through the terminal as well as the VSCode terminal.
Yet, when trying to connect through Remote-SSH I'm getting the message
Failed to connect to the remote extension host server (Error: spawn UNKNOWN)
with the following error log:
[13:50:42.906] Log Level: 2
[13:50:42.922] remote-ssh#0.56.0
[13:50:42.922] win32 x64
[13:50:42.925] SSH Resolver called for "ssh-remote+<net>.net", attempt 1
[13:50:42.925] SSH Resolver called for host: <net>.net
[13:50:42.926] Setting up SSH remote "<net>.net"
[13:50:42.970] Using commit id "<CommitID>" and quality "stable" for server
[13:50:42.974] Install and start server if needed
[13:50:44.876] Checking ssh with "ssh -V"
[13:50:44.888] Finding installed ssh failed: spawn UNKNOWN
[13:50:44.897] Resolver error: Error: spawn UNKNOWN
at ChildProcess.spawn (internal/child_process.js:394:11)
at Object.spawn (child_process.js:549:9)
at c:\Users\<user>\.vscode\extensions\ms-vscode-remote.remote-ssh-0.56.0\out\extension.js:1:242426
at new Promise (<anonymous>)
at q (c:\Users\<user>\.vscode\extensions\ms-vscode-remote.remote-ssh-0.56.0\out\extension.js:1:242347)
at k (c:\Users\<user>\.vscode\extensions\ms-vscode-remote.remote-ssh-0.56.0\out\extension.js:1:242298)
at _ (c:\Users\<user>\.vscode\extensions\ms-vscode-remote.remote-ssh-0.56.0\out\extension.js:1:245580)
at P (c:\Users\<user>\.vscode\extensions\ms-vscode-remote.remote-ssh-0.56.0\out\extension.js:1:245741)
at O (c:\Users\<user>\.vscode\extensions\ms-vscode-remote.remote-ssh-0.56.0\out\extension.js:1:242117)
at C (c:\Users\<user>\.vscode\extensions\ms-vscode-remote.remote-ssh-0.56.0\out\extension.js:1:242026)
at Object.t.generateMultiLineCommand (c:\Users\<user>\.vscode\extensions\ms-vscode-remote.remote-ssh-0.56.0\out\extension.js:1:243396)
at q (c:\Users\<user>\.vscode\extensions\ms-vscode-remote.remote-ssh-0.56.0\out\extension.js:127:107623)
at c:\Users\<user>\.vscode\extensions\ms-vscode-remote.remote-ssh-0.56.0\out\extension.js:127:105016
at processTicksAndRejections (internal/process/task_queues.js:94:5)
at async Object.t.withShowDetailsEvent (c:\Users\<user>\.vscode\extensions\ms-vscode-remote.remote-ssh-0.56.0\out\extension.js:127:110096)
at async Object.t.resolve (c:\Users\<user>\.vscode\extensions\ms-vscode-remote.remote-ssh-0.56.0\out\extension.js:127:108158)
at async c:\Users\<user>\.vscode\extensions\ms-vscode-remote.remote-ssh-0.56.0\out\extension.js:127:143767
[13:50:44.908] ------
Already tried setting up manually the vscode server remotely as suggested here
Thanks in advance for any help!
Seems things got messed up with the update.
I fixed it by reinstalling the Remote SSH extension: ms-vscode-remote.remote-ssh and reloading as you will be instructed to do.
I also just installed the entire Remote Development extension: ms-vscode-remote.vscode-remote-extensionpack and reloaded vscode as instructed by vscode.
Before this though, I deleted (rm -rf) the contents of /home/<your_username>/.vscode-server/ bin/ and data/
Had the same problem.
After trying everything, the only thing that worked 100% was just killing vs-code and opening it again.
I have successfully used the vscode's extension Remote-SSH on a few remote linux servers. However, I cannot get past the "Acquiring lock" message in my vscode terminal on one particular server and would like to know how to. The terminal displays the "Acquiring Lock" line in the terminal and nothing else follows. I have even let this connection try to resolve itself overnight and it just will not go any further.
The output I am receiving appears as follows (I have replaced some real values/hash with generic text wrapped in angle brackets):
[13:48:34.210] Log Level: 3
[13:48:34.218] remote-ssh#0.49.0
[13:48:34.218] win32 x64
[13:48:34.221] SSH Resolver called for "ssh-remote+<hash>", attempt 1
[13:48:34.221] SSH Resolver called for host: DEV
[13:48:34.221] Setting up SSH remote "DEV"
[13:48:34.291] Using commit id "<hash>" and quality "stable" for server
[13:48:34.292] Install and start server if needed
[13:48:34.296] Checking ssh with "ssh -V"
[13:48:34.347] > OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5
[13:48:34.348] Running script with connection command: ssh -T -D 55214 DEV bash
[13:48:34.354] Terminal shell path: C:\WINDOWS\System32\cmd.exe
[13:48:34.502] >
[13:48:34.503] Got some output, clearing connection timeout
[13:48:34.626] > <User>#<HostName>'s password:
[13:48:34.626] Showing password prompt
[13:48:42.869] Got password response
[13:48:42.869] "install" wrote data to terminal: "***********"
[13:48:42.908] >
>
[13:48:42.969] > <hash>: running
>
[13:48:43.009] > Acquiring lock on /<path to commit id hash>/vscode-remote-lock.<User>.<hash>
>
>
Vscode version
Version: 1.42.1 (user setup)
Commit: c47d83b293181d9be64f27ff093689e8e7aed054
Date: 2020-02-11T14:45:59.656Z
Electron: 6.1.6
Chrome: 76.0.3809.146
Node.js: 12.4.0
V8: 7.6.303.31-electron.0
OS: Windows_NT x64 10.0.17763
Remote - SSH version 0.49.0
Thank you for taking a look at my issue!
Update
The attempt appears to have finally timed out. The message that was left is:
[15:48:54.081] "install" terminal command done
[15:48:54.082] > Connection reset by <ip address> port 22
>
[15:48:54.084] Install terminal quit with output: Acquiring lock on <vscode-remote-lock file>
[15:48:54.085] Received install output: Acquiring lock on <vscode-remote-lock file>
[15:48:54.090] Stopped parsing output early. Remaining text: Acquiring lock on <vscode-remote-lock file>
[15:48:54.090] Failed to parse remote port from server output
[15:48:54.092] Resolver error:
[15:48:54.108] ------
I brought this issue up on the Remote-SSH Github project: https://github.com/microsoft/vscode-remote-release/issues/2472
After putting this issue in on Stackoverflow, the extension developers have developed a fix for this on their Nightly version of the extension. The fix will be in the Remote-SSH version 0.50.
Please help to understand output of unsucessfull Scalding run on Hadoop.
I got latest Scalding distribution from git:
git clone https://github.com/twitter/scalding.git
After sbt assembly from scalding directory I tried to run tutorial with command:
scripts/scald.rb --hdfs tutorial/Tutorial0.scala
As a result I got the following errors:
scripts/scald.rb:194: warning: already initialized constant SCALA_LIB_DIR
rsyncing 19.8M from scalding-core-assembly-0.10.0.jar to my.host.here in background...
downloading hadoop-core-1.1.2.jar from http://repo1.maven.org/maven2/org/apache/hadoop/hadoop-core/1.1.2/hadoop-core-1.1.2.jar...
ssh: Could not resolve hostname my.host.here: Name or service not known
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(600) [sender=3.0.6]
Successfully downloaded hadoop-core-1.1.2.jar!
downloading commons-codec-1.8.jar from http://repo1.maven.org/maven2/commons-codec/commons-codec/1.8/commons-codec-1.8.jar...
Successfully downloaded commons-codec-1.8.jar!
downloading commons-configuration-1.9.jar from http://repo1.maven.org/maven2/commons-configuration/commons-configuration/1.9/commons-configuration-1.9.jar...
Successfully downloaded commons-configuration-1.9.jar!
downloading jackson-asl-0.9.5.jar from http://repo1.maven.org/maven2/org/codehaus/jackson/jackson-asl/0.9.5/jackson-asl-0.9.5.jar...
Successfully downloaded jackson-asl-0.9.5.jar!
downloading jackson-mapper-asl-1.9.13.jar from http://repo1.maven.org/maven2/org/codehaus/jackson/jackson-mapper-asl/1.9.13/jackson-mapper-asl-1.9.13.jar...
Successfully downloaded jackson-mapper-asl-1.9.13.jar!
downloading commons-lang-2.6.jar from http://repo1.maven.org/maven2/commons-lang/commons-lang/2.6/commons-lang-2.6.jar...
Successfully downloaded commons-lang-2.6.jar!
downloading slf4j-log4j12-1.6.6.jar from http://repo1.maven.org/maven2/org/slf4j/slf4j-log4j12/1.6.6/slf4j-log4j12-1.6.6.jar...
Successfully downloaded slf4j-log4j12-1.6.6.jar!
downloading log4j-1.2.15.jar from http://repo1.maven.org/maven2/log4j/log4j/1.2.15/log4j-1.2.15.jar...
Successfully downloaded log4j-1.2.15.jar!
downloading commons-httpclient-3.1.jar from http://repo1.maven.org/maven2/commons-httpclient/commons-httpclient/3.1/commons-httpclient-3.1.jar...
Successfully downloaded commons-httpclient-3.1.jar!
downloading commons-cli-1.2.jar from http://repo1.maven.org/maven2/commons-cli/commons-cli/1.2/commons-cli-1.2.jar...
Successfully downloaded commons-cli-1.2.jar!
downloading commons-logging-1.1.1.jar from http://repo1.maven.org/maven2/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar...
Successfully downloaded commons-logging-1.1.1.jar!
downloading zookeeper-3.3.4.jar from http://repo1.maven.org/maven2/org/apache/zookeeper/zookeeper/3.3.4/zookeeper-3.3.4.jar...
Successfully downloaded zookeeper-3.3.4.jar!
compiling tutorial/Tutorial0.scala
scalac -classpath /tmp/temp_scala_home_2.9.3_654763/scala-library-2.9.3.jar:/tmp/temp_scala_home_2.9.3_654763/scala-compiler-2.9.3.jar:/home/test/Cascading/scalding/scalding-core/target/scala-2.9.3/scalding-core-assembly-0.10.0.jar:/tmp/maven/hadoop-core-1.1.2.jar:/tmp/maven/commons-codec-1.8.jar:/tmp/maven/commons-configuration-1.9.jar:/tmp/maven/jackson-asl-0.9.5.jar:/tmp/maven/jackson-mapper-asl-1.9.13.jar:/tmp/maven/commons-lang-2.6.jar:/tmp/maven/slf4j-log4j12-1.6.6.jar:/tmp/maven/log4j-1.2.15.jar:/tmp/maven/commons-httpclient-3.1.jar:/tmp/maven/commons-cli-1.2.jar:/tmp/maven/commons-logging-1.1.1.jar:/tmp/maven/zookeeper-3.3.4.jar -d /tmp/script-build tutorial/Tutorial0.scala
ssh: Could not resolve hostname my.host.here: Name or service not known
rsyncing 1.5K from job-jars/Tutorial0.jar to my.host.here in background...
Waiting for 2 background threads...
ssh: Could not resolve hostname my.host.here: Name or service not known
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: unexplained error (code 255) at io.c(600) [sender=3.0.6]
Could not rsync: /home/test/Cascading/scalding/scalding-core/target/scala-2.9.3/scalding-core-assembly-0.10.0.jar to my.host.here:scalding-core-assembly-0.10.0.jar
Could not rsync: /tmp/Tutorial0.jar to my.host.here:job-jars/Tutorial0.jar
* Update *
After changing host in scald.rb I get the followng authentication problem:
$ scripts/scald.rb --hdfs tutorial/Tutorial0.scala
scripts/scald.rb:194: warning: already initialized constant SCALA_LIB_DIR
rsyncing 19.8M from scalding-core-assembly-0.10.0.jar to node7.test.net in background...
The authenticity of host 'node7.test.net (10.1.21.32)' can't be established.
RSA key fingerprint is fa:41:31:ab:b0:46:08:8f:2b:75:0a:18:24:f9:d5:ec.
Are you sure you want to continue connecting (yes/no)? The authenticity of host 'node7.test.net (10.1.21.32)' can't be established.
RSA key fingerprint is fa:41:31:ab:b0:46:08:8f:2b:75:0a:18:24:f9:d5:ec.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'node7.test.net' (RSA) to the list of known hosts.
test#node7.test.net's password: Please type 'yes' or 'no':
Permission denied, please try again.
test#node7.test.net's password:
I enter correct pathword, but the authentication error persists. How should I configure rsync?
You did change this
https://github.com/twitter/scalding/blob/develop/scripts/scald.rb#l27
right?
The default host is: my.host.here.
I'm using python. I did a yum install memcached followed by a easy_install python-memcached
I used the simple test program from the Help(memcache). When I wasn't getting the proper answers I threw in some print statements:
[~/test]$ cat m2.py
import memcache
mc = memcache.Client(['127.0.0.1:11211'], debug=0)
x = mc.set("some_key", "Some value")
print 'Just set a key and value into the cache (suposedly)'
value = mc.get("some_key")
print 'Just retrieved that value from the cache using the key'
print 'X %s' % x
print 'Value %s' % value
[~/test]$ python m2.py
Just set a key and value into the cache (suposedly)
Just retrieved that value from the cache using the key
X 0
Value None
[~/test]$
The question now is, what have I failed to do in my installation? It appears to be working from an API perspective but it fails to put anything into the memcache share area.
I'm using a virtualbox vm running centos
[~]# cat /proc/version
Linux version 2.6.32-358.6.2.el6.i686 (mockbuild#c6b8.bsys.dev.centos.org) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-3) (GCC) ) #1 SMP Thu May 16 18:12:13 UTC 2013
Is there a daemon that is supposed to be running? I don't see an obvious named one when I do a ps.
I tried to get pylibmc installed on my vm but was unable to find a working installation so for now will see if I can get the above stuff working first.
I discovered if i ran straight from the python console GUI i get a bit more output if I set debug=1
>>> mc = memcache.Client(['127.0.0.1:11211'], debug=1)
>>> mc.stats
{}
>>> mc.set('test','value')
MemCached: MemCache: inet:127.0.0.1:11211: connect: Connection refused. Marking dead.
0
>>> mc.get('test')
MemCached: MemCache: inet:127.0.0.1:11211: connect: Connection refused. Marking dead.
When I try to use per the example telnet to connect to the port i get a connection refused:
[root#~]# telnet 127.0.0.1 11211
Trying 127.0.0.1...
telnet: connect to address 127.0.0.1: Connection refused
[root#~]#
I tried the instructions I found on the net for configuring telnet so localhost wouldn't be disabled:
vi /etc/xinetd.d/telnet
service telnet
{
flags = REUSE
socket_type = stream
wait = no
user = root
server = /usr/sbin/in.telnetd
log_on_failure += USERID
disable = no
}
And then ran the commands to restart the service(s):
service iptables stop
service xinetd stop
service iptables start
service xinetd start
service iptables stop
I ran with both cases (iptables started and stopped) but it has no effect. So I am out of ideas. What do I need to do to make it so the PORT will be allowed? if that is the problem?
Or is there a memcached service that needs to be running that needs to open up the port ?
well this is what it took to get it working: ( a series of manual steps )
1) su -
cd /var/run
mkdir memcached # this was missing
In the memcached file I added "-l 127.0.0.1" to the OPTIONS statement. It's apparently a listen option. Do this for steps 2 & 3. I'm not certain which file is actually used at runtime.
2) cd /etc/sysconfig
cp memcached memcached.old
vi memcached
3) cd /etc/init.d
cp memcached memcached.old
vi memcached
4) Try some commands to see if the server starts now
/etc/init.d/memcached start
/etc/init.d/memcached status
/etc/init.d/memcached stop
/etc/init.d/memcached restart
I tried opening a browser, but it never seemed to actually display anything so I don't really know how valid this approach is. I'm not running apache or anything like this so perhaps its not relevant to my cause. Perhaps I would have to supply a ?key=blah or something.
5) http://127.0.0.1:11211
6) Now it should be ready to go. If one runs the test shown with the following it should work. At least it did for me. doing the help(memcache) will display a simple program. just paste that in and it should work just fine.
[~]$ python
>>> import memcache
>>> help(memcache)