From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35104) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zikmx-0005h1-1P for qemu-devel@nongnu.org; Sun, 04 Oct 2015 11:01:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zikmt-0008RV-Or for qemu-devel@nongnu.org; Sun, 04 Oct 2015 11:01:22 -0400 Received: from mail-wi0-x236.google.com ([2a00:1450:400c:c05::236]:34977) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zikmt-0008RM-FG for qemu-devel@nongnu.org; Sun, 04 Oct 2015 11:01:19 -0400 Received: by wicge5 with SMTP id ge5so88641798wic.0 for ; Sun, 04 Oct 2015 08:01:18 -0700 (PDT) From: poma Message-ID: <56113F3B.4040701@gmail.com> Date: Sun, 4 Oct 2015 17:01:15 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: [Qemu-devel] CharUDP - Connection refused List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "qemu-devel@nongnu.org" Cc: libvir-list@redhat.com, Gal Hammer , Paolo Bonzini , Amit Shah , Cole Robinson Hi Fi With or without the patch[1] the same result - "Connection refused". UDP network console, the character device acts as a UDP netconsole service, sending and receiving packets. This is a lossy service. = HOST: virt-manager: Add New Virtual Serial Device Device Type: UDP net cosnole (udp) Host: 127.0.0.1 Port: 4555 Bind Host: Server mode (bind) Serial Device 1 (Primary Console) Device Type: udp Source host: 127.0.0.1:4555 Bind host: 127.0.0.1:4556 /etc/libvirt/qemu/domain.xml ... qemu-system-x86_64 ... \ -chardev udp,id=charserial0,host=127.0.0.1,port=4555,localaddr=127.0.0.1,localport=4556 \ -device isa-serial,chardev=charserial0,id=serial0 # netstat -an | grep 4555 udp 0 0 127.0.0.1:4556 127.0.0.1:4555 ESTABLISHED # nc -vv -u 127.0.0.1 4555 Ncat: Version 6.47 ( http://nmap.org/ncat ) libnsock nsi_new2(): nsi_new (IOD #1) libnsock nsock_connect_udp(): UDP connection requested to 127.0.0.1:4555 (IOD #1) EID 8 libnsock nsock_trace_handler_callback(): Callback: CONNECT SUCCESS for EID 8 [127.0.0.1:4555] Ncat: Connected to 127.0.0.1:4555. libnsock nsi_new2(): nsi_new (IOD #2) libnsock nsock_read(): Read request from IOD #1 [127.0.0.1:4555] (timeout: -1ms) EID 18 libnsock nsock_readbytes(): Read request for 0 bytes from IOD #2 [peer unspecified] EID 26 libnsock nsock_trace_handler_callback(): Callback: READ SUCCESS for EID 26 [peer unspecified] (1 bytes): . libnsock nsock_trace_handler_callback(): Callback: WRITE SUCCESS for EID 35 [127.0.0.1:4555] libnsock nsock_readbytes(): Read request for 0 bytes from IOD #2 [peer unspecified] EID 42 libnsock nsock_trace_handler_callback(): Callback: READ ERROR [Connection refused (111)] for EID 18 [127.0.0.1:4555] Ncat: Connection refused. # nc -vv -u 127.0.0.1 4556 Ncat: Version 6.47 ( http://nmap.org/ncat ) libnsock nsi_new2(): nsi_new (IOD #1) libnsock nsock_connect_udp(): UDP connection requested to 127.0.0.1:4556 (IOD #1) EID 8 libnsock nsock_trace_handler_callback(): Callback: CONNECT SUCCESS for EID 8 [127.0.0.1:4556] Ncat: Connected to 127.0.0.1:4556. libnsock nsi_new2(): nsi_new (IOD #2) libnsock nsock_read(): Read request from IOD #1 [127.0.0.1:4556] (timeout: -1ms) EID 18 libnsock nsock_readbytes(): Read request for 0 bytes from IOD #2 [peer unspecified] EID 26 libnsock nsock_trace_handler_callback(): Callback: READ SUCCESS for EID 26 [peer unspecified] (1 bytes): . libnsock nsock_trace_handler_callback(): Callback: WRITE SUCCESS for EID 35 [127.0.0.1:4556] libnsock nsock_readbytes(): Read request for 0 bytes from IOD #2 [peer unspecified] EID 42 libnsock nsock_trace_handler_callback(): Callback: READ ERROR [Connection refused (111)] for EID 18 [127.0.0.1:4556] Ncat: Connection refused. # socat -d -d UDP:127.0.0.1:4555 - 2015/10/04 13:18:29 socat[5655] N opening connection to AF=2 127.0.0.1:4555 2015/10/04 13:18:29 socat[5655] N successfully connected from local address AF=2 127.0.0.1:40785 2015/10/04 13:18:29 socat[5655] N reading from and writing to stdio 2015/10/04 13:18:29 socat[5655] N starting data transfer loop with FDs [3,3] and [0,1] 2015/10/04 13:18:34 socat[5655] E read(3, 0x557184904210, 8192): Connection refused 2015/10/04 13:18:34 socat[5655] N exit(1) # socat -d -d UDP:127.0.0.1:4556 - 2015/10/04 13:18:47 socat[5658] N opening connection to AF=2 127.0.0.1:4556 2015/10/04 13:18:47 socat[5658] N successfully connected from local address AF=2 127.0.0.1:49650 2015/10/04 13:18:47 socat[5658] N reading from and writing to stdio 2015/10/04 13:18:47 socat[5658] N starting data transfer loop with FDs [3,3] and [0,1] 2015/10/04 13:18:51 socat[5658] E read(3, 0x561b414be210, 8192): Connection refused 2015/10/04 13:18:51 socat[5658] N exit(1) How is it supposed to work? = DOMAIN: $ hostnamectl status | egrep Chassis\|Virtualization Chassis: vm Virtualization: kvm $ cat /proc/cmdline BOOT_IMAGE=vmlinuz0 initrd=initrd0.img root=live:CDLABEL=Rawhide-Xfce-Live-1003 rootfstype=auto ro rd.live.image console=tty0 console=ttyS0 $ systemctl status serial-getty@ttyS0.service ● serial-getty@ttyS0.service - Serial Getty on ttyS0 Loaded: loaded (/usr/lib/systemd/system/serial-getty@.service; disabled; vendor preset: disabled) Active: active (running) since Sun 2015-10-04 09:02:06 EDT; 48s ago Docs: man:agetty(8) man:systemd-getty-generator(8) http://0pointer.de/blog/projects/serial-console.html Main PID: 1109 (agetty) CGroup: /system.slice/system-serial\x2dgetty.slice/serial-getty@ttyS0.service └─1109 /sbin/agetty --keep-baud 115200 38400 9600 ttyS0 vt220 Oct 04 09:02:06 localhost systemd[1]: Started Serial Getty on ttyS0. = SW VERSIONS: $ qemu-system-x86_64 -version QEMU emulator version 2.4.0.1 (qemu-2.4.0.1-2.fc24), Copyright (c) 2003-2008 Fabrice Bellard $ libvirtd --version libvirtd (libvirt) 1.2.20 $ virt-manager --version 1.2.1 $ rpm -q qemu libvirt virt-manager qemu-2.4.0.1-2.fc24.x86_64 libvirt-1.2.20-1.fc24.x86_64 virt-manager-1.2.1-3.fc24.noarch [1] char: udp chardev shouldn't require an explicit open. http://patchwork.ozlabs.org/patch/311730