vhclient -t EXIT does not seem to work

<p>Hello,
</p>
<p>I am trying to call "vhclient -t EXIT" to finalize a running client daemon instance, but the process does not really shut down:
</p>
<p>docker@boot2docker:~$ vhclient --help<br />
VirtualHere Client 2.9.9, Use USB devices over a network<br />
Usage: vhclient [-h] [-c <str>] [-a] [-t <str>] [-r <str>] [-l <str>] [-m] [-n]<br />
-h, --help Display this help<br />
-c, --config=<str> configuration file to use<br />
-a, --admin administrator mode<br />
-t, --control=<str> Issue command to running client<br />
-r, --redirect=<str> When used t/d/x/i/u redirect output to file instead of console<br />
-l, --log=<str> log file to write ("OSEventLog"=syslog)<br />
-m<br />
-n, --daemon run as a daemon<br />
docker@boot2docker:~$ sudo vhclient -c /etc/virtualhere/config.ini -n -l /var/log/vhclient.log<br />
docker@boot2docker:~$ ps aux | grep vhclient<br />
root 731 0.0 0.0 2440 432 ? S 18:53 0:00 /bin/sh /etc/rc.d/vhclient-use-all<br />
root 21533 4.3 0.5 9140 5780 ? Ssl 19:18 0:00 vhclient -c /etc/virtualhere/config.ini -n -l /var/log/vhclient.log<br />
docker 22223 0.0 0.0 2444 436 pts/0 S+ 19:18 0:00 grep vhclient<br />
docker@boot2docker:~$ vhclient -t EXIT
</p>
<p>docker@boot2docker:~$ ps aux | grep vhclient<br />
root 731 0.0 0.0 2440 432 ? S 18:53 0:00 /bin/sh /etc/rc.d/vhclient-use-all<br />
root 21533 7.8 0.5 9140 5780 ? Ssl 19:18 0:00 vhclient -c /etc/virtualhere/config.ini -n -l /var/log/vhclient.log<br />
docker 22226 0.0 0.0 2444 452 pts/0 S+ 19:18 0:00 grep vhclient<br />
docker@boot2docker:~$ ps aux | grep vhclient<br />
root 731 0.0 0.0 2440 432 ? S 18:53 0:00 /bin/sh /etc/rc.d/vhclient-use-all<br />
root 21533 9.1 0.5 9140 5780 ? Ssl 19:18 0:01 vhclient -c /etc/virtualhere/config.ini -n -l /var/log/vhclient.log<br />
docker 22229 0.0 0.0 2444 444 pts/0 S+ 19:18 0:00 grep vhclient<br />
docker@boot2docker:~$ ps aux | grep vhclient<br />
root 731 0.0 0.0 2440 432 ? S 18:53 0:00 /bin/sh /etc/rc.d/vhclient-use-all<br />
root 21533 9.8 0.5 9140 5780 ? Ssl 19:18 0:06 vhclient -c /etc/virtualhere/config.ini -n -l /var/log/vhclient.log<br />
docker 22236 0.0 0.0 2444 428 pts/0 S+ 19:19 0:00 grep vhclient<br />
docker@boot2docker:~$
</p>
<p>The /var/log/vhclient.log looks like this (I did not clean after sending kill -9 to vhclient last time):
</p>
<p>18:53:25 INFO :Log Started<br />
18:53:25 INFO :VirtualHere Client 2.9.9 starting (Compiled: Jun 28 2015 10:10:37)<br />
18:53:25 INFO :Using config at /etc/virtualhere/config.ini<br />
18:53:25 INFO :IPC available at /tmp/vhclient<br />
18:53:25 INFO :VirtualHere client is running as a service<br />
18:53:25 INFO :connect select localhost:7575, error 111 (Connection refused)<br />
19:00:35 INFO :Server ping timeout, shutting down connection 1...<br />
19:00:35 INFO :recv msg size failed, error 9 (Bad file descriptor)<br />
19:08:58 INFO :Received IPC verb="LIST", arg=""<br />
19:10:03 INFO :Server ping timeout, shutting down connection 1...<br />
19:10:03 INFO :recv msg size failed, error 9 (Bad file descriptor)<br />
19:11:24 INFO :Received IPC verb="LIST", arg=""<br />
19:11:33 INFO :Received IPC verb="HELP", arg=""<br />
19:12:53 INFO :Server ping timeout, shutting down connection 1...<br />
19:12:53 INFO :recv msg size failed, error 9 (Bad file descriptor)<br />
19:13:47 INFO :Received IPC verb="EXIT", arg=""<br />
19:18:13 INFO :Log Started<br />
19:18:13 INFO :VirtualHere Client 2.9.9 starting (Compiled: Jun 28 2015 10:10:37)<br />
19:18:13 INFO :Using config at /etc/virtualhere/config.ini<br />
19:18:13 INFO :IPC available at /tmp/vhclient<br />
19:18:13 INFO :VirtualHere client is running as a service<br />
19:18:20 INFO :Received IPC verb="EXIT", arg=""
</p>
<p>Actually, I can not close the client even with a mild kill. Only kill -9 will work
</p>
<p>Regards,<br />
Roman</p>

#4

How are you installing usbip kernel modules on the tinycore under docker?

#5

<p>Hi,
</p>
<p>I am compiling a custom boot2docker.iso, where I offer customized .config for Linux kernel build. Here it is: http://filebin.ca/27ne1u9J00S9
</p>
<p>And here is the patch:
</p>
<p>$ git show 61e0ae335878ee600121ada61ab38066706942fe<br />
commit 61e0ae335878ee600121ada61ab38066706942fe<br />
Author: Roman Saveljev <roman.saveljev [at] haltian.com (roman[dot]saveljev[at]haltian[dot]com)><br />
Date: Wed Jul 1 12:57:25 2015 +0300
</p>
<p> Enable USB IP drivers for TCE kernel build
</p>
<p>diff --git a/kernel_config b/kernel_config<br />
index 667652d..e2c3d80 100644<br />
--- a/kernel_config<br />
+++ b/kernel_config<br />
@@ -3275,7 +3275,10 @@ CONFIG_USB_STORAGE_ENE_UB6250=y<br />
#<br />
# CONFIG_USB_MDC800 is not set<br />
# CONFIG_USB_MICROTEK is not set<br />
-# CONFIG_USBIP_CORE is not set<br />
+CONFIG_USBIP_CORE=m<br />
+CONFIG_USBIP_VHCI_HCD=m<br />
+CONFIG_USBIP_HOST=m<br />
+# CONFIG_USBIP_DEBUG is not set<br />
# CONFIG_USB_MUSB_HDRC is not set<br />
# CONFIG_USB_DWC3 is not set<br />
# CONFIG_USB_DWC2 is not set
</p>
<p>I update it through menuconfig
</p>
<p>Thanks,<br />
Roman</p>

#6

Yes i think this is because you are using the device at the same time as shutting down the client, will check my code on this ....

#7

<p>Ahha, thanks for the hint! I am indeed having auto-use on (as you have guessed in another topic) and even enforcing it whenever the flag drops. I manually configure hub access and deactivate discovery.
</p>
<p>Now I try this kind of sequence:
</p>
<p> vhclient -t "MANUAL HUB REMOVE ALL"<br />
vhclient -t EXIT
</p>
<p>And the client actually finishes. I think it is a better "workaround" than having it killed with SIGKILL.
</p>
<p>Thanks,<br />
Roman</p>

#8

OK, 3.0.2 of the client will shutdown correctly even if a device is currently in use or auto-use is on.

#9

<p>Thanks Michael! I appreciate very much your fast support and issue resolution.<br />
I want to bet big on VirtualHere to deliver - it will be an excellent leverage in infrastructure improvement.
</p>
<p>Meanwhile, I will continue the evaluation. There is one other issue that sometimes ACPI can not reboot/shutdown the machine with the running client (even after graceful client exit). I have to study it more and will come back with more details and on a separate topic.
</p>
<p>Regards,<br />
Roman</p>