Closed coolbrg closed 7 years ago
@hferentschik Looks like centos-iso issue and created here as not reproducible with boot2docker one.
Will be debugging now.
@budhrg any update on this. Did you get a chance to investigate?
any update on this. Did you get a chance to investigate?
Not yet @hferentschik due to service-manager issues last week. Will investigate if @gbraad is not (he seems to assigned himself 4 days ago)
@budhrg you can have a look. I thought I was able to resolve it alongside of the other minor issues, but at the moment the other issue seems to consume a lot of time.
Ok @gbraad sure.
I am having the same issue.
Starting local OpenShift cluster using 'virtualbox' hypervisor... E0307 15:12:18.770542 15868 start.go:150] Error starting the VM: Error configuring authorization on host: something went wrong running an SSH command command : sudo hostname minishift && echo "minishift" | sudo tee /etc/hostname
Further looking into the issue, I found the problem. ( not sure this is correct )
the config file under .minishift\machines\minishift ssh port needs to be 22
"ConfigVersion": 3,
"Driver": {
"IPAddress": "192.168.99.100",
"MachineName": "minishift",
"SSHUser": "docker",
"SSHPort": 22,
the config file under .minishift\machines\minishift ssh port needs to be 22
@chelapurath , interesting finding. Will need to check our end. Thanks.
So what is the SSHPort right now?
it does not work with port 22
(minishift) Waiting for an IP... Waiting for machine to be running, this may take a few minutes... Detecting operating system of created instance... Waiting for SSH to be available... Detecting the provisioner... Provisioning with minishift... E0308 10:48:11.786105 11372 start.go:150] Error starting the VM: Error creating the VM. Error creating machine: Error running provisioning: something went wrong running an SSH command command : sudo hostname minishift && echo "minishift" | sudo tee /etc/hostname err : The handle is invalid. output : . Retrying.
@chelapurath
I hope you are running only PowerShell or CMD here which doesn't have ssh
package and hence the failure.
We are still detecting here why Golang native ssh is not working here.
In the meantime, could you install mingw
(http://www.mingw.org/) and verify it works for you?
We tried with cygwin and it works but this seems to be heavy package.
Yes, that did work. Now facing issue with red hat subscription behind self-signed proxy I am passing http-proxy and https-proxy variables... since it is self signed the subscription manager failed on handshake
@praveenkumar Any clue on it? I think we have faced similar issue with CDK 2.* right?
BTW, @chelapurath we hangout on #minishift in irc.freenode.net. Feel free to join us .
@chelapurath We don't have any support yet for self signed proxy (ssl support) for http/https one :(, We would love to hear how you set up your proxy environment so we can add support and test those piece out.
Thanks @praveenkumar
At this time, all of the developers are behind proxy (self-signed ssl) and need to connect to RHN network via proxy to subscribe their docker instances.
when I start minishift I see the following. What is exactly happening. Is there a provision to add my self signed cert into .minishift/certs folder and then it gets copied to /etc/rhsm/ca folder during the startup, so that the subscription can take place, securely?
Copying certs to the local machine directory... Copying certs to the remote machine.
@chelapurath below certs are related to docker which generated when minishift start. As of now you can do it manually after minishift ssh
Copying certs to the local machine directory...
Copying certs to the remote machine.
Happening with VirtualBox
driver too.
Some interesting bits:
PS C:\WINDOWS\system32> minishift.exe ssh "df -h"
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/live-rw 9.8G 770M 8.9G 8% /
devtmpfs 979M 0 979M 0% /dev
tmpfs 1001M 0 1001M 0% /dev/shm
tmpfs 1001M 17M 984M 2% /run
tmpfs 1001M 0 1001M 0% /sys/fs/cgroup
/dev/sr0 335M 335M 0 100% /run/initramfs/live
/dev/sda1 18G 56M 17G 1% /mnt/sda1
tmpfs 201M 0 201M 0% /run/user/0
tmpfs 201M 0 201M 0% /run/user/1000
I did some debugging and found that the error is coming up from docker/machine#redhat_ssh_commander.go
and then found already opened issue in docker/machine#issue-3937
.
The logs are exactly same as ours.
cc @hferentschik @gbraad @praveenkumar @LalatenduMohanty .
Also, introduced a new label status/blocked-by-other
to mark it.
I think we should keep looking. Just because the issue might be in libmachine does not mean that we cannot debug it.
I think we should keep looking. Just because the issue might be in libmachine does not mean that we cannot debug it.
Ya @hferentschik , need a deep look into it. No update in the issue about resolution since 3 months
Note: once the VM is running, doing a minishift ssh echo hello
will work as expected from both cmd and powershell. (confirms the finding from Budhram made earlier)
It seems different paths are used for communication using minishift ssh
and the provisioning...
when using the generic ssh commander:
diff --git a/pkg/minishift/provisioner/minishift_provisioner.go b/pkg/minishift/provisioner/minishift_provisioner.go
index a2dd9394..10e235ef 100644
--- a/pkg/minishift/provisioner/minishift_provisioner.go
+++ b/pkg/minishift/provisioner/minishift_provisioner.go
@@ -35,7 +35,7 @@ import (
func NewMinishiftProvisioner(osReleaseID string, d drivers.Driver) *MinishiftProvisioner {
systemdProvisioner := provision.NewSystemdProvisioner(osReleaseID, d)
- systemdProvisioner.SSHCommander = provision.RedHatSSHCommander{Driver: d}
+ systemdProvisioner.SSHCommander = provision.GenericSSHCommander{Driver: d}
return &MinishiftProvisioner{
the code can run. The difference is in the generic implementation, ssh is invoked with:
func (sshCmder GenericSSHCommander) SSHCommand(args string) (string, error) {
return drivers.RunSSHCommandFromDriver(sshCmder.Driver, args)
}
calling client.go
: NewClient
func NewClient(user string, host string, port int, auth *Auth) (Client, error) {
sshBinaryPath, err := exec.LookPath("ssh")
if err != nil {
log.Debug("SSH binary not found, using native Go implementation")
client, err := NewNativeClient(user, host, port, auth)
log.Debug(client)
return client, err
}
if defaultClientType == Native {
log.Debug("Using SSH client type: native")
client, err := NewNativeClient(user, host, port, auth)
log.Debug(client)
return client, err
}
log.Debug("Using SSH client type: external")
client, err := NewExternalClient(sshBinaryPath, user, host, port, auth)
log.Debug(client)
return client, err
}
and in the Red hat specific implementation as:
var output string
switch c := client.(type) {
case *ssh.ExternalClient:
c.BaseArgs = append(c.BaseArgs, "-tt")
output, err = c.Output(args)
case *ssh.NativeClient:
log.Debugf("Using native client:\n%s", args)
output, err = c.OutputWithPty(args)
}
once the VM is running, doing a minishift ssh echo hello
interesting
The difference is in the generic implementation,
Does this mean we have a potential solution?
@hferentschik I am trying to find out WHY there is a RedHat implementation. It seems they handle the requiretty case ? But in our case we are not having an issue with this on CentOS ? confused
I am trying to find out WHY there is a RedHat implementation. It seems they handle the requiretty case ? But in our case we are not having an issue with this on CentOS
Not sure. If not we should be able to just change the implementation, right. @praveenkumar was working on this initially, maybe he has some insights?
@hferentschik just asked him on IRC, but again here... @praveenkumar why do we use the RedHatSSHCommander during the provisioning? is there a special need for this?
Would still have to test with the actual ssh clients being used (as they add -tt
in the RedHatSSHCommander
for similar reasons). Also still want to find why the handle is invalid...
The problem occurs in RedHatSSHCommander
at:
fd := int(os.Stdin.Fd())
termWidth, termHeight, err := terminal.GetSize(fd)
it seems the filehandle is not valid at this point, so it will never get the term size.
When ignored and using fixed values for termsize, like:
///fd := int(os.Stdin.Fd())
termWidth := 80
termHeight := 25
it will pass....
Replacing RedHatSSHCommander
(redhat.go
) with:
package provision
import (
"github.com/docker/machine/libmachine/drivers"
)
type RedHatSSHCommander struct {
Driver drivers.Driver
}
func (sshCmder RedHatSSHCommander) SSHCommand(args string) (string, error) {
return drivers.RunSSHCommandFromDriver(sshCmder.Driver, args)
}
passes install
Proposed a fix to libmachine which address this problem: https://github.com/docker/machine/pull/4094
So with the merge of https://github.com/minishift/minishift/issues/912, can we close this issue. No external ssh client needed anymore on Windows, right?
If so, could we also resolve the corresponding CDK issue?
Right. We can close this issue.
When trying to run
minishift start
in Windows 10 with nossh
binary in PowerShell/CMD, it fails with errorError configuring authorization on host: Something went wrong running an SSH command
.Full debug logs:
Running following command seems to work:
NOTE : Not reproducible in Boot2docker-iso and happening with both
HyperV
andVirtualbox
.