{"action":"created","issue":{"url":"https://api.github.com/repos/Componolit/componolit/issues/134","repository_url":"https://api.github.com/repos/Componolit/componolit","labels_url":"https://api.github.com/repos/Componolit/componolit/issues/134/labels{/name}","comments_url":"https://api.github.com/repos/Componolit/componolit/issues/134/comments","events_url":"https://api.github.com/repos/Componolit/componolit/issues/134/events","html_url":"https://github.com/Componolit/componolit/issues/134","id":331476541,"node_id":"MDU6SXNzdWUzMzE0NzY1NDE=","number":134,"title":"http_downlink fails with \"Error: failed  to connect\"","user":{"login":"senier","id":6357197,"node_id":"MDQ6VXNlcjYzNTcxOTc=","avatar_url":"https://avatars1.githubusercontent.com/u/6357197?v=4","gravatar_id":"","url":"https://api.github.com/users/senier","html_url":"https://github.com/senier","followers_url":"https://api.github.com/users/senier/followers","following_url":"https://api.github.com/users/senier/following{/other_user}","gists_url":"https://api.github.com/users/senier/gists{/gist_id}","starred_url":"https://api.github.com/users/senier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/senier/subscriptions","organizations_url":"https://api.github.com/users/senier/orgs","repos_url":"https://api.github.com/users/senier/repos","events_url":"https://api.github.com/users/senier/events{/privacy}","received_events_url":"https://api.github.com/users/senier/received_events","type":"User","site_admin":false},"labels":[{"id":554712614,"node_id":"MDU6TGFiZWw1NTQ3MTI2MTQ=","url":"https://api.github.com/repos/Componolit/componolit/labels/bug","name":"bug","color":"ee0701","default":true}],"state":"open","locked":false,"assignee":{"login":"jklmnn","id":7999005,"node_id":"MDQ6VXNlcjc5OTkwMDU=","avatar_url":"https://avatars2.githubusercontent.com/u/7999005?v=4","gravatar_id":"","url":"https://api.github.com/users/jklmnn","html_url":"https://github.com/jklmnn","followers_url":"https://api.github.com/users/jklmnn/followers","following_url":"https://api.github.com/users/jklmnn/following{/other_user}","gists_url":"https://api.github.com/users/jklmnn/gists{/gist_id}","starred_url":"https://api.github.com/users/jklmnn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jklmnn/subscriptions","organizations_url":"https://api.github.com/users/jklmnn/orgs","repos_url":"https://api.github.com/users/jklmnn/repos","events_url":"https://api.github.com/users/jklmnn/events{/privacy}","received_events_url":"https://api.github.com/users/jklmnn/received_events","type":"User","site_admin":false},"assignees":[{"login":"jklmnn","id":7999005,"node_id":"MDQ6VXNlcjc5OTkwMDU=","avatar_url":"https://avatars2.githubusercontent.com/u/7999005?v=4","gravatar_id":"","url":"https://api.github.com/users/jklmnn","html_url":"https://github.com/jklmnn","followers_url":"https://api.github.com/users/jklmnn/followers","following_url":"https://api.github.com/users/jklmnn/following{/other_user}","gists_url":"https://api.github.com/users/jklmnn/gists{/gist_id}","starred_url":"https://api.github.com/users/jklmnn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jklmnn/subscriptions","organizations_url":"https://api.github.com/users/jklmnn/orgs","repos_url":"https://api.github.com/users/jklmnn/repos","events_url":"https://api.github.com/users/jklmnn/events{/privacy}","received_events_url":"https://api.github.com/users/jklmnn/received_events","type":"User","site_admin":false}],"milestone":null,"comments":19,"created_at":"2018-06-12T07:53:47Z","updated_at":"2018-06-20T07:14:40Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"I refactored the HTTP filter demo run file to accept external connections and passing them to lighttpd where our HMI resides. When connection from outside with a web browser (usermode networking redirected to localhost:5555) http_uplink gets the request, (apparently) passes it on to http_downlink which fails to connect to the web server. Output from nic_bridge looks good to me.\r\n\r\n```\r\nspawn qemu-system-x86_64 -no-kvm -display sdl -cpu core2duo -net nic,model=e1000 -net user -redir tcp:5555::80 -nographic -serial mon:stdio -m 512 -cdrom var/run/http_filter.iso -machine q35\r\nqemu-system-x86_64: -redir tcp:5555::80: The -redir option is deprecated. Please use '-netdev user,hostfwd=...' instead.\r\nBender: Hello World.\r\n\r\nframebuffer at [b8000+b8fa0) 80x25@16\r\n\r\nwarning - unknown framebuffer type\r\n\r\nframebuffer at [b8000+b8fa0) 80x25@16\r\n\r\nwarning - unknown framebuffer type\r\n\r\n\fNOVA Microhypervisor v7-9b24eb4 (x86_64): Jun 12 2018 00:15:29 [gcc 6.3.0] [MBI2]\r\n\r\n[ 0] TSC:2011989 kHz BUS:1005939 kHz (measured)\r\n[ 0] CORE:0:0:0 6:f:b:0 [0] Intel(R) Core(TM)2 Duo CPU     T7700  @ 2.40GHz\r\nHypervisor reports 1x1 CPU\r\nWarning: CPU has no invariant TSC.\r\nCPU ID (genode->kernel:package:core:thread) remapping\r\n remap (0->0:0:0:0) boot cpu\r\nHypervisor info page contains 12 memory descriptors:\r\ncore     image  [0000000000100000,000000000082b000)\r\nbinaries region [000000000027a000,000000000082b000) free for reuse\r\ndetected physical memory: 0x0000000000000000 - size: 0x000000000009fc00\r\nuse      physical memory: 0x0000000000000000 - size: 0x000000000009f000\r\ndetected physical memory: 0x0000000000100000 - size: 0x000000001fedf000\r\nuse      physical memory: 0x0000000000100000 - size: 0x000000001fedf000\r\nROM modules:\r\n ROM: [000000001fc8c000,000000001fcab210) acpi_drv\r\n ROM: [000000001fa88000,000000001fa89554) config\r\n ROM: [0000000000016000,0000000000017000) core_log\r\n ROM: [000000001fd4f000,000000001fd7c8b0) http_downlink\r\n ROM: [000000001fd17000,000000001fd3bf18) http_uplink\r\n ROM: [000000001faff000,000000001faff565) index.html\r\n ROM: [000000001fa8a000,000000001fade380) init\r\n ROM: [000000001fb52000,000000001fc31b20) ld.lib.so\r\n ROM: [000000001fd7d000,000000001ff35950) libc.lib.so\r\n ROM: [000000001ff79000,000000001ffa6fa8) libm.lib.so\r\n ROM: [000000001fa2d000,000000001fa790d8) lighttpd\r\n ROM: [000000001fd3c000,000000001fd4e648) log_terminal\r\n ROM: [000000001ff36000,000000001ff78ac8) lwip.lib.so\r\n ROM: [000000001ffa7000,000000001ffdd8c8) nic_bridge\r\n ROM: [000000001fcac000,000000001fd02898) nic_drv\r\n ROM: [000000001fc56000,000000001fc72270) nic_loopback\r\n ROM: [000000001fb00000,000000001fb51c58) platform_drv\r\n ROM: [0000000000014000,0000000000015000) platform_info\r\n ROM: [000000001fa7a000,000000001fa87d30) posix.lib.so\r\n ROM: [000000001fadf000,000000001fafe198) report_rom\r\n ROM: [000000001fd03000,000000001fd16490) test-http_clnt\r\n ROM: [000000001fc32000,000000001fc552e8) timer\r\n ROM: [000000001fc73000,000000001fc8b460) zlib.lib.so\r\n\r\nGenode 16.11-1991-gb626e4220 <local changes>\r\n467 MiB RAM and 63253 caps assigned to init\r\n[init -> nic_drv] --- iPXE NIC driver started ---\r\n[init -> nic_drv] -- init iPXE NIC\r\n[init -> nic_bridge] --- NIC bridge started (mac=01:02:03:04:05:06) ---\r\n[init -> http_downlink] using the lwIP libc plugin\r\n[init -> acpi_drv] Found MADT\r\n[init -> acpi_drv] MADT IRQ 0 -> GSI 2 flags: 0\r\n[init -> acpi_drv] MADT IRQ 5 -> GSI 5 flags: 13\r\n[init -> acpi_drv] MADT IRQ 9 -> GSI 9 flags: 13\r\n[init -> acpi_drv] MADT IRQ 10 -> GSI 10 flags: 13\r\n[init -> acpi_drv] MADT IRQ 11 -> GSI 11 flags: 13\r\n[init -> acpi_drv] Found MCFG\r\n[init -> acpi_drv] MCFG BASE 0xb0000000 seg 0x0 bus 0x0-0xff\r\n[init -> http_uplink] using the lwIP libc plugin\r\n[init -> http_downlink] init\r\n[init -> http_uplink] init\r\n[init -> http_downlink] Using DHCP for interface configuration.\r\n[init -> platform_drv] ECAM/MMCONF range 00:00.0-ff:1f.7 - addr [00000000b0000000,00000000c0000000)\r\n[init -> http_uplink] Using DHCP for interface configuration.\r\n[init -> lighttpd] using the lwIP libc plugin\r\n[init -> nic_bridge] vmac = 02:02:02:02:02:00 ip = 10.0.2.110\r\n[init -> lighttpd] init\r\n[init -> lighttpd] static network interface: ip_addr=10.0.2.55 netmask=255.255.255.0 gateway=10.0.2.1\r\n[init -> http_downlink] http_downlink\r\n[init -> nic_bridge] vmac = 02:02:02:02:02:01 ip = 10.0.2.55\r\n[init -> lighttpd] 2000-01-01 00:00:00: (/home/alex/Documents/Componolit_GmbH/Devel/src/componolit-master/contrib/lighttpd-33ef60a93420294641033417ab35d36d76372c93/src/app/lighttpd/src/network.c.453) can't set accept-filter 'httpready':  Protocol not\r\n[init -> lighttpd]  available\r\n[init -> lighttpd] Warning: getgid: getgid not implemented\r\n[init -> lighttpd] Warning: getuid: getuid not implemented\r\n[init -> lighttpd] 2000-01-01 00:00:00: (/home/alex/Documents/Componolit_GmbH/Devel/src/componolit-master/contrib/lighttpd-33ef60a93420294641033417ab35d36d76372c93/src/app/lighttpd/src/log.c.194) server started\r\n[init -> nic_drv] Found: 00:02.0 8086:100e (rev 03) IRQ 0b\r\n[init -> nic_drv] using driver 82540em\r\n[init -> nic_drv] PCI BIOS has not enabled device 00:02.0! Updating PCI command 0103->0107\r\n[init -> nic_drv]\r\n[ 0] sys_assign_pci: Invalid Hint (0x10)\r\n[init -> platform_drv] Error: nic_drv -> : assignment of PCI device 0:2.0 failed phys=0xb0010000 virt=0x1000\r\n[init -> nic_drv] PCI device 00:02.0 latency timer is unreasonably low at 0. Setting to 32.\r\n[init -> nic_drv]\r\n[init -> nic_drv] bus_addr = febc0000 len = 20000\r\n[init -> nic_drv] snprintf not implemented\r\n[init -> platform_drv] IRQ override 11->11, trigger mode: LEVEL, polarity: HIGH\r\n[init -> platform_drv] 00:02.0 uses IRQ, vector 0xb, non-maskable\r\n[init -> nic_drv] MAC address 52:54:00:12:34:56\r\n[init -> http_uplink] http_uplink\r\n[init -> http_uplink] got IP address 10.0.2.15\r\n[init -> http_uplink] Connection from: 10.0.2.2:39276\r\n[init -> http_downlink] pthread_main_np_int: pthread_main_np called, not implemented\r\n[init -> http_downlink] pthread_main_np_int: pthread_main_np called, not implemented\r\n[init -> http_downlink] Warning: rtc not configured, returning 0\r\n[init -> http_downlink] pthread_main_np_int: pthread_main_np called, not implemented\r\n[init -> http_downlink] Error: Failed to connect\r\nExpect: 'interact' received 'strg+c' and was cancelled\r\n```"},"comment":{"url":"https://api.github.com/repos/Componolit/componolit/issues/comments/398648561","html_url":"https://github.com/Componolit/componolit/issues/134#issuecomment-398648561","issue_url":"https://api.github.com/repos/Componolit/componolit/issues/134","id":398648561,"node_id":"MDEyOklzc3VlQ29tbWVudDM5ODY0ODU2MQ==","user":{"login":"senier","id":6357197,"node_id":"MDQ6VXNlcjYzNTcxOTc=","avatar_url":"https://avatars1.githubusercontent.com/u/6357197?v=4","gravatar_id":"","url":"https://api.github.com/users/senier","html_url":"https://github.com/senier","followers_url":"https://api.github.com/users/senier/followers","following_url":"https://api.github.com/users/senier/following{/other_user}","gists_url":"https://api.github.com/users/senier/gists{/gist_id}","starred_url":"https://api.github.com/users/senier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/senier/subscriptions","organizations_url":"https://api.github.com/users/senier/orgs","repos_url":"https://api.github.com/users/senier/repos","events_url":"https://api.github.com/users/senier/events{/privacy}","received_events_url":"https://api.github.com/users/senier/received_events","type":"User","site_admin":false},"created_at":"2018-06-20T07:14:40Z","updated_at":"2018-06-20T07:14:40Z","author_association":"CONTRIBUTOR","body":"No, removing the filter does not change anything. `ab` kills the setup reliably. Without the keepalive feature this happens immediately:\r\n\r\n```\r\n$ ab -n 1000 http://127.0.0.1:5555/demo.html                                                                                                                                        \r\nThis is ApacheBench, Version 2.3 <$Revision: 1757674 $>\r\nCopyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/\r\nLicensed to The Apache Software Foundation, http://www.apache.org/\r\n\r\nBenchmarking 127.0.0.1 (be patient)\r\napr_pollset_poll: The timeout specified has expired (70007)\r\n```\r\n\r\nWith the keepalive feature enabled (-k) it reliably dies after 16 requests, with the last message going form `http_downlink` to `nic_bridge` (according to `nic_dump`):\r\n\r\n```\r\n$ ab -n 1000 -k http://127.0.0.1:5555/demo.html\r\nThis is ApacheBench, Version 2.3 <$Revision: 1757674 $>\r\nCopyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/\r\nLicensed to The Apache Software Foundation, http://www.apache.org/\r\n\r\nBenchmarking 127.0.0.1 (be patient)\r\napr_pollset_poll: The timeout specified has expired (70007)\r\nTotal of 16 requests completed\r\n```\r\n\r\nCould `nic_bridge` be our problem?"}}
{"actor":{"display_login":"senier"}}