I am having a hard time setting up docker via boot2docker (v1.5.0, virtualbox v4.3.20) on windows.
The first installation failed because the daemon did not come up on the vm. So i uninstalled Virtualbox and Boot2Docker. After a reinstall the machine starts up correctly.
I want to use boot2docker for a google app engine managed vm, so i need to setup the environment variables for it (well the boot2docker shellinit does not work since it uses export which should be set on windows). So it set them manually.
DOCKER_HOST=tcp://192.168.59.103:2376
The IP Address is the one which i get by calling boot2docker ip. It is available on the machine itself as eth1.
If i try to connect (icmp) to the machine from my host it fails since there is no route to the virtual machine. The Virtual Network device (there is no other virtual network adapter) on my Windows 8.1 host looks like this (sry for the german version):
Beschreibung. . . . . . . . . . . : VirtualBox Host-Only Ethernet Adapter
Physische Adresse . . . . . . . . : 08-00-27-00-54-98
DHCP aktiviert. . . . . . . . . . : Nein
Autokonfiguration aktiviert . . . : Ja
Verbindungslokale IPv6-Adresse . : fe80::bcb5:aa66:d0ce:25c4%30(Bevorzugt)
IPv4-Adresse . . . . . . . . . . : 192.168.56.1(Bevorzugt)
Subnetzmaske . . . . . . . . . . : 255.255.255.0
Standardgateway . . . . . . . . . :
My guess would be that this device should get an ip address from the virtualbox's ip range like 192.168.59.x
I found a workaround by setting a port forward on the NAT device, but this results in some other problems.
Am i doing it wrong? Is this a bug?
Apparently there are some issues with the Google Managed VMs on boot2docker.
I found a solution which worked for my Ubuntu 14.04 machine as well as for my windows 8.1 machine. The step by step guide can be found here: https://gist.github.com/xuru/604da3c02ec96904d352
The most crucial part seems to be the dowload of a certain version of the image:
boot2docker download --iso-url=https://github.com/boot2docker/boot2docker/releases/download/v1.3.3/boot2docker.iso
Related
Ok, I've got a working connection to a server on our production machine. I need to replicate that on my development machine so that I can transfer my own files. Everything is the same, down to the OS.
When I attempt to connect, all I get is:
Server refused our key.
Here is my log file...
. 2013-01-28 15:26:25.738 Session name: hex166t#65.XXX.XX.XXX (Modified stored session)
. 2013-01-28 15:26:25.738 Host name: 65.XXX.XX.XXX (Port: 1XXXX)
. 2013-01-28 15:26:25.738 User name: hex166t (Password: Yes, Key file: Yes)
. 2013-01-28 15:26:25.738 Tunnel: No
. 2013-01-28 15:26:25.738 Transfer Protocol: SFTP
. 2013-01-28 15:26:25.738 Ping type: -, Ping interval: 30 sec; Timeout: 15 sec
. 2013-01-28 15:26:25.738 Proxy: none
. 2013-01-28 15:26:25.738 SSH protocol version: 2; Compression: No
. 2013-01-28 15:26:25.738 Bypass authentication: No
. 2013-01-28 15:26:25.738 Try agent: Yes; Agent forwarding: No; TIS/CryptoCard: No; KI: Yes; GSSAPI: No
. 2013-01-28 15:26:25.738 Ciphers: aes,blowfish,3des,WARN,arcfour,des; Ssh2DES: No
. 2013-01-28 15:26:25.738 SSH Bugs: A,A,A,A,A,A,A,A,A,A
. 2013-01-28 15:26:25.738 SFTP Bugs: A,A
. 2013-01-28 15:26:25.738 Return code variable: Autodetect; Lookup user groups: A
. 2013-01-28 15:26:25.738 Shell: default
. 2013-01-28 15:26:25.738 EOL: 0, UTF: 2
. 2013-01-28 15:26:25.738 Clear aliases: Yes, Unset nat.vars: Yes, Resolve symlinks: Yes
. 2013-01-28 15:26:25.738 LS: ls -la, Ign LS warn: Yes, Scp1 Comp: No
. 2013-01-28 15:26:25.738 Local directory: default, Remote directory: home, Update: Yes, Cache: Yes
. 2013-01-28 15:26:25.738 Cache directory changes: Yes, Permanent: Yes
. 2013-01-28 15:26:25.738 DST mode: 1
. 2013-01-28 15:26:25.738 --------------------------------------------------------------------------
. 2013-01-28 15:26:25.808 Looking up host "65.XXX.XX.XXX"
. 2013-01-28 15:26:25.808 Connecting to 65.XXX.XX.XXX port 1XXXX
. 2013-01-28 15:26:25.858 Waiting for the server to continue with the initialisation
. 2013-01-28 15:26:25.858 Detected network event
. 2013-01-28 15:26:25.938 Detected network event
. 2013-01-28 15:26:25.938 Server version: SSH-2.0-Connect:Enterprise_UNIX_2.4.02
. 2013-01-28 15:26:25.938 Using SSH protocol version 2
. 2013-01-28 15:26:25.938 We claim version: SSH-2.0-WinSCP_release_5.1.3
. 2013-01-28 15:26:25.938 Waiting for the server to continue with the initialisation
. 2013-01-28 15:26:25.998 Detected network event
. 2013-01-28 15:26:25.998 Doing Diffie-Hellman group exchange
. 2013-01-28 15:26:25.998 Waiting for the server to continue with the initialisation
. 2013-01-28 15:26:26.258 Detected network event
. 2013-01-28 15:26:26.258 Doing Diffie-Hellman key exchange with hash SHA-1
. 2013-01-28 15:26:26.438 Waiting for the server to continue with the initialisation
. 2013-01-28 15:26:26.678 Detected network event
. 2013-01-28 15:26:26.898 Verifying host key rsa2 0x23,0xdf2a07bac36 with fingerprint ssh-rsa 2048 fe:03:bc:ad:66
. 2013-01-28 15:26:26.908 Host key matches cached key
. 2013-01-28 15:26:26.908 Host key fingerprint is:
. 2013-01-28 15:26:26.908 ssh-rsa 2048 fe:03:bc:ad:66
. 2013-01-28 15:26:26.908 Initialised AES-256 CBC client- >server encryption
. 2013-01-28 15:26:26.908 Initialised HMAC-SHA1 client- >server MAC algorithm
. 2013-01-28 15:26:26.908 Initialised AES-256 CBC server- >client encryption
. 2013-01-28 15:26:26.908 Initialised HMAC-SHA1 server- >client MAC algorithm
. 2013-01-28 15:26:26.908 Waiting for the server to continue with the initialisation
. 2013-01-28 15:26:27.048 Detected network event
. 2013-01-28 15:26:27.048 Reading private key file "Z:\prd\PS_DATA\HSBCfingateway\hsbccerts\hsbc-ensco.ppk"
. 2013-01-28 15:26:27.058 Using username "hex166t".
. 2013-01-28 15:26:27.108 Waiting for the server to continue with the initialisation
. 2013-01-28 15:26:27.158 Detected network event
. 2013-01-28 15:26:27.168 Offered public key
. 2013-01-28 15:26:27.168 Waiting for the server to continue with the initialisation
. 2013-01-28 15:26:27.228 Detected network event
. 2013-01-28 15:26:27.228 Server refused our key
. 2013-01-28 15:26:27.258 Server refused our key
. 2013-01-28 15:26:27.258 Attempting keyboard-interactive authentication
. 2013-01-28 15:26:27.258 Waiting for the server to continue with the initialisation
. 2013-01-28 15:26:27.298 Detected network event
. 2013-01-28 15:26:27.298 Server refused keyboard-interactive authentication
. 2013-01-28 15:26:27.298 Prompt (7, SSH password, , &Password: )
. 2013-01-28 15:26:27.298 Using stored password.
. 2013-01-28 15:26:27.308 Sent password
. 2013-01-28 15:26:27.308 Waiting for the server to continue with the initialisation
. 2013-01-28 15:26:27.418 Detected network event
. 2013-01-28 15:26:27.418 Password authentication failed
. 2013-01-28 15:26:27.418 Access denied
. 2013-01-28 15:26:27.458 Prompt (7, SSH password, , &Password: )
. 2013-01-28 15:26:45.497 Attempt to close connection due to fatal exception:
. 2013-01-28 15:26:45.497 Closing connection.
. 2013-01-28 15:26:45.497 Sending special code: 12
. 2013-01-28 15:26:45.559 (ESshFatal)
You do not have the private key authentication setup correctly.
Make sure you add the public key to your ~/.ssh/authorized_keys on the server.
You will obtain the public key fingerprint in the correct format in PuTTYgen in Public key for pasting into OpenSSH authorized_keys file box when your load your private key.
For more details refer to the article Set up SSH public key authentication.
While not the case for OP, you might get the same error message (Server refused our key), when connecting with an old version of WinSCP to a server that requires rsa-sha2. WinSCP supports rsa-sha2 since 5.20 only. OpenSSH servers require rsa-sha2 by default since 8.8. Older versions can be configured to require it too. On the other hand, even 8.8 and newer can be configured not to require rsa-sha2 (PubkeyAcceptedAlgorithms +ssh-rsa).
Yes another option is that you are trying to connect using a key signed by an OpenSSH detached certificate (supported by PuTTY since 0.78). The current version of WinSCP does not support OpenSSH certificates yet. The next version will.
For my case, I tried
$chmod 0600 authorized_keys
and it works fine then.
I faced the same issue, finding around and I solved by run these commands on destination server:
chmod 700 .ssh
chmod 600 .ssh/authorized_keys
chown $USER:$USER .ssh -R
See also https://winscp.net/forum/viewtopic.php?t=31767: Winscp with version before 5.20 cannot authenticate anymore with openssh-8.8.
Updating the Winscp to the latest version(5.21.5 or later) resolved my issue, try that once as older Winscp not supporting the latest generated key pairs
I cannot access localhost / 0.0.0.0:8000 from any other device.
The current django project is built off of an older project I was playing around with last year where this worked. Unfortunately i've lost the previous project so I cannot compare their settings.py files, although there should be hardly any difference between them.
.
The setup
Dropbox - holds project and sqlite database file
Laptop - running
server, had no changes over last year
Desktop - /
iPhone - /
.
Where the problem is
The fault must be on my laptop where the server is running because I cannot access the server on either my desktop nor my iPhone, the latter worked last year with the previous project, I did not have my desktop at the time.
.
The project's allowed hosts list
I've added several as i've been trying out different solutions recommended by others.
ALLOWED_HOSTS = [
'*',
'0.0.0.0.',
'0.0.0.0:8000',
'localhost'
'localhost:8000'
'{laptop's IP address}',
'{desktop's IPv4 address}',
'{desktop's Default gateway}',
]
.
When I try to access the localhost on desktop or iPhone
Nothing appears in the laptop's terminal, the quit server help line remains the last line. I remember last year, it would update with notifcations that something remotely was accessing the server.
On the desktop, Firefox tells me it's 'Unable to connect', Edge tells me 'localhost refused to connect' with a 'ERR_CONNECTION_REFUSED'.
On the iPhone, 'could not connect to the server'.
.
what I've tried in the other devices' URL address bar
0.0.0.0:8000
localhost:8000
localhost:8000/admin
https://{laptop IP address}
.
.
Any help would be appreciated.
To host on a local network, first ensure that your IP address is added to the ALLOWED_HOSTS of settings.py.
ALLOWED_HOSTS = ['192.168.1.X']
Note: Your IP address can be locate via running ipconfig in the command prompt
Ensure you also execute runserver on ip address 0.0.0.0:8000. For example:
python manage.py runserver 0.0.0.0:8000
When connecting with other devices put the IP address and the port number of the host in the URL within the browser. Like so:
192.168.1.X:8000/<app_name>/other_pages
I am trying to implement a basic pp example as shown below (SCRIPT1).
import pp
ppservers = ("*",) # autodiscovery mode on!
# create the job server
job_server = pp.Server(ppservers=ppservers)
for computer, cpu_count in job_server.get_active_nodes().iteritems():
print "Found {} with CPU count {}!".format(computer, cpu_count)
Environment Details
OS : windows10
python version : 2.7 (on machine 1 and machine 2)
machine1 IP : 192.168.1.4
machine2 IP : 192.168.56.1
Steps followed till now :
machine1 and machine2 are connected in same network using wifi
SCRIPT1 is placed on machine1 (machine1 is job server)
installed pp in machine2(worker node) and started server on machine2 (port 60000) using
python ppserver.py -a
triggered SCRIPT1 on machine1, machine 1 output is as shown below
Found local with CPU count 8!
But output at step4 is expected to also detect machine 2 and show output as
Found 192.168.56.1:60000 with CPU count 2!
Found local with CPU count 4!
A newbie to parrallel computing, how do i debug this ?
Appreciate any kinda pointers for this.
Firewall and virtualBox was the issue.
Steps followed to get to the fix:
ping xxx.xxx.x.x. (machine1 IP)
run ppserver on same machine1 and see if jobserver can list the same machine1 as a worker node
if 1 and 2 is the issue, it is mostly caused by firewall, in this case add an inbound rule for the required port and continue.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
Here is my setup:
- Host: Windows XP
- Guest: Ubuntu 10.04
- Networking: NAT
I am setting an Apache web server on the Guest, but I want to be able to do this on the Windows machine:
- go to the browser, type http://localhost:8000
Also, I tried to change my networking to bridge and I got a new IP. But when I tried to do http://:8000, it says that it could not connect.
Network communication Host -> Guest
Connect to the Guest and find out the ip address:
ifconfig
example of result (ip address is 10.0.2.15):
eth0 Link encap:Ethernet HWaddr 08:00:27:AE:36:99
inet addr:10.0.2.15 Bcast:10.0.2.255 Mask:255.255.255.0
Go to Vbox instance window -> Menu -> Network adapters:
adapter should be NAT
click on "port forwarding"
insert new record (+ icon)
for host ip enter 127.0.0.1, and for guest ip address you got from prev. step (in my case it is 10.0.2.15)
in your case port is 8000 - put it on both, but you can change host port if you prefer
Go to host system and try it in browser:
http://127.0.0.1:8000
or your network ip address (find out on the host machine by running: ipconfig).
Network communication Guest -> Host
In this case port forwarding is not needed, the communication goes over the LAN back to the host.
On the host machine - find out your netw ip address:
ipconfig
example of result:
IP Address. . . . . . . . . . . . : 192.168.5.1
On the guest machine you can communicate directly with the host, e.g. check it with ping:
# ping 192.168.5.1
PING 192.168.5.1 (192.168.5.1) 56(84) bytes of data.
64 bytes from 192.168.5.1: icmp_seq=1 ttl=128 time=2.30 ms
...
Firewall issues?
#Stranger suggested that in some cases it would be necessary to open used port (8000 or whichever is used) in firewall like this (example for ufw firewall, I haven't tested):
sudo ufw allow 8000
That's not possible. localhost always defaults to the loopback device on the local operating system.
As your virtual machine runs its own operating system it has its own loopback device which you cannot access from the outside.
If you want to access it e.g. in a browser, connect to it using the local IP instead:
http://192.168.180.1:8000
This is just an example of course, you can find out the actual IP by issuing an ifconfig command on a shell in the guest operating system.
I am facing some unique problem , not sure how to solve it . I am using the Netsiebin SSH C++ library for connecting with my server . It works perfectly well . I Connected to remote host using SSH2 protocol, with publickey authentication, sent come command to execute at the server too .
But the problem comes when I started using SCP or rsync "system( scp or rsync )in between .Its necessary for me to upload some files to server in between and then run Netseiben SSH function again to run that command file at server.But this never happen . Whenever I use some scp or rsync command and then execute some netseiben function it keeps on waiting and never returns .
Implementation sample:
Initialize Netseiben
Ne7SftpSubsystem _sftp;
ne7ssh *_ssh = new ne7ssh();
2.Connect with Key
channel1 = _ssh->connectWithKey ("serverAddress", 22, "userame", "pub key path");
3. Send command and read result
_ssh->send ("ls\n", channel1))
_ssh->waitFor (channel1, "$", 5)
result = _ssh->read (channel1); //read result
System function to put some file in server (Which i think is cause for all)
system( "rsync /home/user/Makefile user#server:~");
system( "scp /home/user/file.tgz user#server:~/new");// this Executes
Send come command to server (fails here ...This statement never executes)
ssh->send ("mkdir Tester\n", channel1)
If I dont have the above "system" function to execute some command it works fine .
Is it something to do with Port number . Because at the time of establishing connection I give port number 22
and if I am not wrong scp happens via port the same port which might cause problem . ot sure though
. Have been setting with this for a day . Thanks for your help .