ssh_timeout is not honored

ssh_timeout setting in /usr/libexec/webmin/server-manager/config is ignored, it is clobbered by /usr/libexec/webmin/server-manager/server-manager-lib-funcs.pl line 1777

Status: 
Closed (fixed)

Comments

I changed 5 to 120 at line 1777 but seems like it may be hard coded elsewhere too. VM provisioned but some commands timed out still. I am provisioning on hardware in Singapore from a Cloudmin box in Amsterdam, thus high latency and slow throughput...

Copying 212.61 MB image file to system x.x.x.x .. .. already in host cache Creating virtual system with Xen .. .. creation started with IP x.x.x.x.

Waiting for creation to complete .... .. creation has completed successfully.

Creating swap file of 2 GB .. .. done

Removing missing disks from fstab file .. .. done

Expanding filesystem to 20 GB .. .. done

Mounting new instance's filesystem .. .. mounted on /mnt/xen-test-sgp

Configuring kernel for Xen instance .. .. setup to boot Xen system's kernel with Pv-Grub

Fixing GRUB configuration file .. .. done

Setting root password .. .. done

Updating configuration files with hostname and IP address .. .. failed : Failed to save fixed /etc/hosts : SSH failed to complete in 5 seconds

Updating network configuration files .. .. failed : Failed to save network config /etc/sysconfig/network-scripts/ifcfg-eth0 : SSH failed to complete in 5 seconds. The Xen instance may be in-accessible after it is started

Modifying /etc/fstab file .. .. done

Allowing SSH logins by root .. .. already allowed

Setting SSH server port .. .. done

Un-mounting instance's filesystem .. .. done

Adding DNS entry x.x.x.x. for IP address x.x.x.x .. .. done

Configuring Xen instance for VNC console access .. .. added on dynamic port

Registering Xen configuration file .. .. done

Starting up new Xen instance .. .. done

Regenerating SSH host keys .. .. done

Fetching current status .. .. status successfully retrieved (SSH)

Re-fetching current status of host system x.x.x.x.. .. status successfully retrieved (Webmin down)

Enabling system at host boot time .. .. done

Creating console access user .. .. done

The ssh_timeout setting controls the amount of time Cloudmin will wait for the SSH connection used to check the status of the system. However, for small file transfers, a 5s timeout is used instead.

Does it really take more than 5 seconds to connect to your VM from the Cloudmin master? That suggests that maybe DNS resolution is slow ..

Hi Jamie

The Cloudmin master and the Xen dom0 I'm connecting to are 10,000km apart. We only have 3 servers in Singapore so I wanted to use one of our existing Cloudmin servers to manage them for now. If we later end up with a bigger deployment we'll put in a dedicated Cloudmin server there.

DNS resolution is not the issue:

[root@ams1-dcm ~]# time host sgp1-xen-1-1.anu.net

sgp1-xen-1-1.anu.net has address 103.11.188.178

real 0m0.012s user 0m0.005s sys 0m0.003s

However an SSH connection does take on average > 4 seconds and sometimes > 5:

[root@ams1-dcm ~]# time ssh -p 1984 sgp1-xen-1-1.anu.net "uname -a"

Linux sgp1-xen-1-1.anu.net 3.10.68-11.el6.centos.alt.x86_64 #1 SMP Fri Feb 6 10:40:16 CST 2015 x86_64 x86_64 x86_64 GNU/Linux

real 0m4.421s user 0m0.007s sys 0m0.004s [root@ams1-dcm ~]# time ssh -p 1984 sgp1-xen-1-1.anu.net "uname -a"

Linux sgp1-xen-1-1.anu.net 3.10.68-11.el6.centos.alt.x86_64 #1 SMP Fri Feb 6 10:40:16 CST 2015 x86_64 x86_64 x86_64 GNU/Linux

real 0m4.237s user 0m0.008s sys 0m0.004s [root@ams1-dcm ~]# time ssh -p 1984 sgp1-xen-1-1.anu.net "uname -a"

Linux sgp1-xen-1-1.anu.net 3.10.68-11.el6.centos.alt.x86_64 #1 SMP Fri Feb 6 10:40:16 CST 2015 x86_64 x86_64 x86_64 GNU/Linux

real 0m5.338s user 0m0.010s sys 0m0.000s [root@ams1-dcm ~]# time ssh -p 1984 sgp1-xen-1-1.anu.net "uname -a"

Linux sgp1-xen-1-1.anu.net 3.10.68-11.el6.centos.alt.x86_64 #1 SMP Fri Feb 6 10:40:16 CST 2015 x86_64 x86_64 x86_64 GNU/Linux

real 0m4.237s user 0m0.007s sys 0m0.003s [root@ams1-dcm ~]# time ssh -p 1984 sgp1-xen-1-1.anu.net "uname -a"

Linux sgp1-xen-1-1.anu.net 3.10.68-11.el6.centos.alt.x86_64 #1 SMP Fri Feb 6 10:40:16 CST 2015 x86_64 x86_64 x86_64 GNU/Linux

real 0m4.222s user 0m0.007s sys 0m0.004s

I was thinking of DNS resolution on the remote system - if it is setup to reverse-resolve connecting IPs, that may account for some of the slowness.

Good thinking but I have just disabled DNS lookups in sshd_config on the remote server, no noticeable change...

Is it possible to increase the timeout from 5 to say 10 or 15 seconds? That should be sufficient...

Chris

Sure, I will increase it to 10s in the next release.

Automatically closed -- issue fixed for 2 weeks with no activity.

Automatically closed -- issue fixed for 2 weeks with no activity.