I am trying to setup a simple test system emulated under qemu.

Problem is I seem unable to connect to web applications using the standard command line because applications usually listen to a well defined port, but after they try to open a separate websocket for actual communication.

This behavior is consistent between the toolkits I commonly use (e.g.: Remi or bottle, both are python packages)

Other net applications (e.g.: ssh) work as expected.

The command line I'm using to start qemu is:

qemu-system-arm -M versatilepb -kernel output/images/zImage -dtb output/images/versatile-pb.dtb -drive file=output/images/rootfs.ext2,if=scsi,format=raw -append "root=/dev/sda console=ttyAMA0,115200" -serial stdio -net nic,model=rtl8139 -net user,hostfwd=tcp::7777-:7777,hostfwd=tcp::7722-:22

and I try to connect to (connection reset) or ssh -p 7722 root@ (succeeds).

I tested with the standard "demo" of both Remi and bottle. They both behave essentially in the same way: after initial connection communication is reset.

Remi actually works a bit better and manages to display the page, but functionality (via websocket) is not there.

What am I missing?

  • Please update you question with the something reproducible (what servers you ran on the guest, what command exactly you used to connect to localhost:7777). You may be running into limitations of qemu's 'user mode' network backend (in which case you will have to build a proper network with tap devices, forwarding on the host, etc), or it may be something completely different. Afaik websockets do not bind to another port, and I would be very surprised if those python toolkits were reinventing the ftp nightmare in 2018. – mosvy Oct 6 '18 at 18:37
  • @mosvy: I updated the answer (and also posted a question on meta on how enhance update). Basically Remi instantiates a socketserver.StreamRequestHandler (standard python3 lib) with client (on host) address to answer requests and this apparently never reaches host. – ZioByte Oct 7 '18 at 10:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.