Hi Eric, thanks for reply<br><br>My netcat version is v1.10-38 and I am using Debian on 192.XXX.XXX.XX<br><br># nc -h<br>[v1.10-38]<br>connect to somewhere:    nc [-options] hostname port[s] [ports] ... <br>listen for inbound:    nc -l -p port [-options] [hostname] [port]<br>

<br>I use Ubuntu to access the Debian machine, and now my Java class is like this:<br><br>public static void main(String[] args) {<br>        Connect conn = null;<br>        try {<br>            conn = new Connect("xen+ssh://root@192.168.XXX.XX/?netcat=/bin/netcat", true);<br>

<br>but is still throwing the error:<br>libvir: RPC error : End of file while reading data: /bin/netcat: invalid option -- 'U'<br>nc -h for help: Input/output error<br>exception caught:org.libvirt.LibvirtException: End of file while reading data: /bin/netcat: invalid option -- 'U'<br>

<br>I have files on the client machine that are /usr/bin/ncat , /bin/netcat and /etc/alternatives/netcat. I am not sure which I should use.<br><br>Thanks, Felipe<br><br><br><div class="gmail_quote">On Tue, Oct 2, 2012 at 12:27 PM, Eric Blake <span dir="ltr"><<a href="mailto:eblake@redhat.com" target="_blank">eblake@redhat.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On 10/02/2012 09:10 AM, Felipe Oliveira Gutierrez wrote:<br>
> Hi,<br>
><br>
> I am using java to connect to the xen, but my class is throwing a<br>
> exception. Does anyone know what is happening?<br>
><br>
> public class TestConnection {<br>
>     public static void main(String[] args) {<br>
>         Connect conn = null;<br>
>         try {<br>
>             conn = new Connect("xen+ssh://root@192.XXX.XXX.XX/", true);<br>
><br>
> libvir: RPC error : End of file while reading data: nc: invalid option --<br>
> 'U'<br>
<br>
</div>What distro is running the machine at 192.XXX.XXX.XX, and what version<br>
of nc is it using (remembering that Fedora and Debian nc come from<br>
different heritages)?  What does 'nc --help' output on that machine?<br>
<br>
It may be possible to connect by installing an updated nc on that<br>
machine, and/or altering your xen+ssh://... URI to include a ?netcat=...<br>
parameter that points to an alternate location on that server that<br>
understands -U.<br>
<br>
<a href="http://libvirt.org/remote.html#Remote_URI_parameters" target="_blank">http://libvirt.org/remote.html#Remote_URI_parameters</a><br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Eric Blake   <a href="mailto:eblake@redhat.com">eblake@redhat.com</a>    <a href="tel:%2B1-919-301-3266" value="+19193013266">+1-919-301-3266</a><br>
Libvirt virtualization library <a href="http://libvirt.org" target="_blank">http://libvirt.org</a><br>
<br>
</font></span></blockquote></div><br><br clear="all"><br>-- <br><div><b><font color="#000099">-- Felipe Oliveira Gutierrez</font></b></div>
<div><b><font color="#000099">-- </font></b><a href="mailto:lipe.82@gmail.com" target="_blank"><b><font color="#000099">lipe.82@gmail.com</font></b></a></div>
<div><b><font color="#000099">-- <a href="https://sites.google.com/site/lipe82/Home/diaadia" target="_blank">https://sites.google.com/site/lipe82/Home/diaadia</a></font></b></div><br>