What network error could be responsible for Status (failed) and type Pending in Chrome? - google-chrome

From time to time a site I'm maintaining get failed GET requests on some resources. The status is returned as (failed) and the type as Pending. The headers containg nothing more than the request itself, no response whatsoever.
The server is running Drupal and Varnish.
Any thoughts on what causes the failure or where to start debugging?
This might be related to What kind of network error is Chrome encountering when 'Status = (failed)' and 'Type = undefined' even though the type return a different message. Could someone maybe confirm this? If so, how could I debug this?
Thanks in advance
EDIT, I just installed wireshark to try to debug a bit more.
Here's the entire followup on the failed request
A dump of 94645, 94651, 94686 and 94688
No. Time Source Destination Protocol Length Info
94645 211.219995 192.168.0.101 85.134.37.196 HTTP 1192 [TCP Retransmission] GET /sites/default/files/css/css_4PXz_aZSHtm7FWHqYsMdm7sl9C4802BFn9tXlePfpJU.css HTTP/1.1
Frame 94645: 1192 bytes on wire (9536 bits), 1192 bytes captured (9536 bits)
Arrival Time: Nov 7, 2012 22:55:18.002267000 EET
Epoch Time: 1352321718.002267000 seconds
[Time delta from previous captured frame: 0.006199000 seconds]
[Time delta from previous displayed frame: 0.815800000 seconds]
[Time since reference or first frame: 211.219995000 seconds]
Frame Number: 94645
Frame Length: 1192 bytes (9536 bits)
Capture Length: 1192 bytes (9536 bits)
[Frame is marked: True]
[Frame is ignored: False]
[Protocols in frame: eth:ip:tcp:http]
[Coloring Rule Name: Bad TCP]
[Coloring Rule String: tcp.analysis.flags]
Ethernet II, Src: HonHaiPr_e7:39:2f (38:59:f9:e7:39:2f), Dst: D-LinkIn_2f:a4:a4 (14:d6:4d:2f:a4:a4)
Destination: D-LinkIn_2f:a4:a4 (14:d6:4d:2f:a4:a4)
Address: D-LinkIn_2f:a4:a4 (14:d6:4d:2f:a4:a4)
.... ...0 .... .... .... .... = IG bit: Individual address (unicast)
.... ..0. .... .... .... .... = LG bit: Globally unique address (factory default)
Source: HonHaiPr_e7:39:2f (38:59:f9:e7:39:2f)
Address: HonHaiPr_e7:39:2f (38:59:f9:e7:39:2f)
.... ...0 .... .... .... .... = IG bit: Individual address (unicast)
.... ..0. .... .... .... .... = LG bit: Globally unique address (factory default)
Type: IP (0x0800)
Internet Protocol Version 4, Src: 192.168.0.101 (192.168.0.101), Dst: 85.134.37.196 (85.134.37.196)
Version: 4
Header length: 20 bytes
Differentiated Services Field: 0x00 (DSCP 0x00: Default; ECN: 0x00: Not-ECT (Not ECN-Capable Transport))
0000 00.. = Differentiated Services Codepoint: Default (0x00)
.... ..00 = Explicit Congestion Notification: Not-ECT (Not ECN-Capable Transport) (0x00)
Total Length: 1178
Identification: 0x4e23 (20003)
Flags: 0x02 (Don't Fragment)
0... .... = Reserved bit: Not set
.1.. .... = Don't fragment: Set
..0. .... = More fragments: Not set
Fragment offset: 0
Time to live: 64
Protocol: TCP (6)
Header checksum: 0xabe3 [correct]
[Good: True]
[Bad: False]
Source: 192.168.0.101 (192.168.0.101)
Destination: 85.134.37.196 (85.134.37.196)
Transmission Control Protocol, Src Port: 51714 (51714), Dst Port: http (80), Seq: 1, Ack: 1, Len: 1126
Source port: 51714 (51714)
Destination port: http (80)
[Stream index: 5205]
Sequence number: 1 (relative sequence number)
[Next sequence number: 1127 (relative sequence number)]
Acknowledgement number: 1 (relative ack number)
Header length: 32 bytes
Flags: 0x018 (PSH, ACK)
000. .... .... = Reserved: Not set
...0 .... .... = Nonce: Not set
.... 0... .... = Congestion Window Reduced (CWR): Not set
.... .0.. .... = ECN-Echo: Not set
.... ..0. .... = Urgent: Not set
.... ...1 .... = Acknowledgement: Set
.... .... 1... = Push: Set
.... .... .0.. = Reset: Not set
.... .... ..0. = Syn: Not set
.... .... ...0 = Fin: Not set
Window size value: 229
[Calculated window size: 14656]
[Window size scaling factor: 64]
Checksum: 0xb15e [validation disabled]
[Good Checksum: False]
[Bad Checksum: False]
Options: (12 bytes)
No-Operation (NOP)
No-Operation (NOP)
Timestamps: TSval 30409363, TSecr 1723048723
Kind: Timestamp (8)
Length: 10
Timestamp value: 30409363
Timestamp echo reply: 1723048723
[SEQ/ACK analysis]
[Bytes in flight: 1126]
[TCP Analysis Flags]
[This frame is a (suspected) retransmission]
[Expert Info (Note/Sequence): Retransmission (suspected)]
[Message: Retransmission (suspected)]
[Severity level: Note]
[Group: Sequence]
[The RTO for this segment was: 1.480371000 seconds]
[RTO based on delta from frame: 92823]
Hypertext Transfer Protocol
GET /sites/default/files/css/css_4PXz_aZSHtm7FWHqYsMdm7sl9C4802BFn9tXlePfpJU.css HTTP/1.1\r\n
[Expert Info (Chat/Sequence): GET /sites/default/files/css/css_4PXz_aZSHtm7FWHqYsMdm7sl9C4802BFn9tXlePfpJU.css HTTP/1.1\r\n]
[Message: GET /sites/default/files/css/css_4PXz_aZSHtm7FWHqYsMdm7sl9C4802BFn9tXlePfpJU.css HTTP/1.1\r\n]
[Severity level: Chat]
[Group: Sequence]
Request Method: GET
Request URI: /sites/default/files/css/css_4PXz_aZSHtm7FWHqYsMdm7sl9C4802BFn9tXlePfpJU.css
Request Version: HTTP/1.1
Host: www.snellman.fi\r\n
Connection: keep-alive\r\n
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1229.94 Safari/537.4\r\n
Accept: text/css,*/*;q=0.1\r\n
Referer: http://www.snellman.fi/sv\r\n
Accept-Encoding: gzip,deflate,sdch\r\n
Accept-Language: en-US,en;q=0.8\r\n
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3\r\n
[truncated] Cookie: v_tid=82524dc4552b4cd4a22d1fa4e7e78d72; Drupal.toolbar.collapsed=0; ctools-collapsible-state=views-ui-advanced-column-uusimmat_reseptit%3A1%2Cviews-ui-advanced-column-Related%3A1; Drupal.tableDrag.showWeight=0; SESS4049
\r\n
[Full request URI: http://www.snellman.fi/sites/default/files/css/css_4PXz_aZSHtm7FWHqYsMdm7sl9C4802BFn9tXlePfpJU.css]
---------------------------------------------------------------------------------------------------------------------------------------------------------
No. Time Source Destination Protocol Length Info
94651 211.228592 85.134.37.196 192.168.0.101 TCP 66 [TCP Dup ACK 92860#3] http > 51714 [ACK] Seq=1 Ack=1 Win=14592 Len=0 TSval=1723049571 TSecr=1723044620
Frame 94651: 66 bytes on wire (528 bits), 66 bytes captured (528 bits)
Arrival Time: Nov 7, 2012 22:55:18.010864000 EET
Epoch Time: 1352321718.010864000 seconds
[Time delta from previous captured frame: 0.001166000 seconds]
[Time delta from previous displayed frame: 0.008597000 seconds]
[Time since reference or first frame: 211.228592000 seconds]
Frame Number: 94651
Frame Length: 66 bytes (528 bits)
Capture Length: 66 bytes (528 bits)
[Frame is marked: True]
[Frame is ignored: False]
[Protocols in frame: eth:ip:tcp]
[Coloring Rule Name: Bad TCP]
[Coloring Rule String: tcp.analysis.flags]
Ethernet II, Src: D-LinkIn_2f:a4:a4 (14:d6:4d:2f:a4:a4), Dst: HonHaiPr_e7:39:2f (38:59:f9:e7:39:2f)
Destination: HonHaiPr_e7:39:2f (38:59:f9:e7:39:2f)
Address: HonHaiPr_e7:39:2f (38:59:f9:e7:39:2f)
.... ...0 .... .... .... .... = IG bit: Individual address (unicast)
.... ..0. .... .... .... .... = LG bit: Globally unique address (factory default)
Source: D-LinkIn_2f:a4:a4 (14:d6:4d:2f:a4:a4)
Address: D-LinkIn_2f:a4:a4 (14:d6:4d:2f:a4:a4)
.... ...0 .... .... .... .... = IG bit: Individual address (unicast)
.... ..0. .... .... .... .... = LG bit: Globally unique address (factory default)
Type: IP (0x0800)
Internet Protocol Version 4, Src: 85.134.37.196 (85.134.37.196), Dst: 192.168.0.101 (192.168.0.101)
Version: 4
Header length: 20 bytes
Differentiated Services Field: 0x00 (DSCP 0x00: Default; ECN: 0x00: Not-ECT (Not ECN-Capable Transport))
0000 00.. = Differentiated Services Codepoint: Default (0x00)
.... ..00 = Explicit Congestion Notification: Not-ECT (Not ECN-Capable Transport) (0x00)
Total Length: 52
Identification: 0x8b62 (35682)
Flags: 0x02 (Don't Fragment)
0... .... = Reserved bit: Not set
.1.. .... = Don't fragment: Set
..0. .... = More fragments: Not set
Fragment offset: 0
Time to live: 58
Protocol: TCP (6)
Header checksum: 0x790a [correct]
[Good: True]
[Bad: False]
Source: 85.134.37.196 (85.134.37.196)
Destination: 192.168.0.101 (192.168.0.101)
Transmission Control Protocol, Src Port: http (80), Dst Port: 51714 (51714), Seq: 1, Ack: 1, Len: 0
Source port: http (80)
Destination port: 51714 (51714)
[Stream index: 5205]
Sequence number: 1 (relative sequence number)
Acknowledgement number: 1 (relative ack number)
Header length: 32 bytes
Flags: 0x010 (ACK)
000. .... .... = Reserved: Not set
...0 .... .... = Nonce: Not set
.... 0... .... = Congestion Window Reduced (CWR): Not set
.... .0.. .... = ECN-Echo: Not set
.... ..0. .... = Urgent: Not set
.... ...1 .... = Acknowledgement: Set
.... .... 0... = Push: Not set
.... .... .0.. = Reset: Not set
.... .... ..0. = Syn: Not set
.... .... ...0 = Fin: Not set
Window size value: 114
[Calculated window size: 14592]
[Window size scaling factor: 128]
Checksum: 0xd246 [validation disabled]
[Good Checksum: False]
[Bad Checksum: False]
Options: (12 bytes)
No-Operation (NOP)
No-Operation (NOP)
Timestamps: TSval 1723049571, TSecr 1723044620
Kind: Timestamp (8)
Length: 10
Timestamp value: 1723049571
Timestamp echo reply: 1723044620
[SEQ/ACK analysis]
[TCP Analysis Flags]
[This is a TCP duplicate ack]
[Duplicate ACK #: 3]
[Duplicate to the ACK in frame: 92860]
[Expert Info (Note/Sequence): Duplicate ACK (#3)]
[Message: Duplicate ACK (#3)]
[Severity level: Note]
[Group: Sequence]
---------------------------------------------------------------------------------------------------------------------------------------------------------
No. Time Source Destination Protocol Length Info
94686 211.305208 85.134.37.196 192.168.0.101 TCP 66 http > 51714 [FIN, ACK] Seq=1 Ack=1 Win=14592 Len=0 TSval=1723049647 TSecr=1723044620
Frame 94686: 66 bytes on wire (528 bits), 66 bytes captured (528 bits)
Arrival Time: Nov 7, 2012 22:55:18.087480000 EET
Epoch Time: 1352321718.087480000 seconds
[Time delta from previous captured frame: 0.000026000 seconds]
[Time delta from previous displayed frame: 0.076616000 seconds]
[Time since reference or first frame: 211.305208000 seconds]
Frame Number: 94686
Frame Length: 66 bytes (528 bits)
Capture Length: 66 bytes (528 bits)
[Frame is marked: True]
[Frame is ignored: False]
[Protocols in frame: eth:ip:tcp]
[Coloring Rule Name: HTTP]
[Coloring Rule String: http || tcp.port == 80]
Ethernet II, Src: D-LinkIn_2f:a4:a4 (14:d6:4d:2f:a4:a4), Dst: HonHaiPr_e7:39:2f (38:59:f9:e7:39:2f)
Destination: HonHaiPr_e7:39:2f (38:59:f9:e7:39:2f)
Address: HonHaiPr_e7:39:2f (38:59:f9:e7:39:2f)
.... ...0 .... .... .... .... = IG bit: Individual address (unicast)
.... ..0. .... .... .... .... = LG bit: Globally unique address (factory default)
Source: D-LinkIn_2f:a4:a4 (14:d6:4d:2f:a4:a4)
Address: D-LinkIn_2f:a4:a4 (14:d6:4d:2f:a4:a4)
.... ...0 .... .... .... .... = IG bit: Individual address (unicast)
.... ..0. .... .... .... .... = LG bit: Globally unique address (factory default)
Type: IP (0x0800)
Internet Protocol Version 4, Src: 85.134.37.196 (85.134.37.196), Dst: 192.168.0.101 (192.168.0.101)
Version: 4
Header length: 20 bytes
Differentiated Services Field: 0x00 (DSCP 0x00: Default; ECN: 0x00: Not-ECT (Not ECN-Capable Transport))
0000 00.. = Differentiated Services Codepoint: Default (0x00)
.... ..00 = Explicit Congestion Notification: Not-ECT (Not ECN-Capable Transport) (0x00)
Total Length: 52
Identification: 0x8b63 (35683)
Flags: 0x02 (Don't Fragment)
0... .... = Reserved bit: Not set
.1.. .... = Don't fragment: Set
..0. .... = More fragments: Not set
Fragment offset: 0
Time to live: 58
Protocol: TCP (6)
Header checksum: 0x7909 [correct]
[Good: True]
[Bad: False]
Source: 85.134.37.196 (85.134.37.196)
Destination: 192.168.0.101 (192.168.0.101)
Transmission Control Protocol, Src Port: http (80), Dst Port: 51714 (51714), Seq: 1, Ack: 1, Len: 0
Source port: http (80)
Destination port: 51714 (51714)
[Stream index: 5205]
Sequence number: 1 (relative sequence number)
Acknowledgement number: 1 (relative ack number)
Header length: 32 bytes
Flags: 0x011 (FIN, ACK)
000. .... .... = Reserved: Not set
...0 .... .... = Nonce: Not set
.... 0... .... = Congestion Window Reduced (CWR): Not set
.... .0.. .... = ECN-Echo: Not set
.... ..0. .... = Urgent: Not set
.... ...1 .... = Acknowledgement: Set
.... .... 0... = Push: Not set
.... .... .0.. = Reset: Not set
.... .... ..0. = Syn: Not set
.... .... ...1 = Fin: Set
[Expert Info (Chat/Sequence): Connection finish (FIN)]
[Message: Connection finish (FIN)]
[Severity level: Chat]
[Group: Sequence]
Window size value: 114
[Calculated window size: 14592]
[Window size scaling factor: 128]
Checksum: 0xd1f9 [validation disabled]
[Good Checksum: False]
[Bad Checksum: False]
Options: (12 bytes)
No-Operation (NOP)
No-Operation (NOP)
Timestamps: TSval 1723049647, TSecr 1723044620
Kind: Timestamp (8)
Length: 10
Timestamp value: 1723049647
Timestamp echo reply: 1723044620
---------------------------------------------------------------------------------------------------------------------------------------------------------
No. Time Source Destination Protocol Length Info
94688 211.305660 192.168.0.101 85.134.37.196 TCP 66 51714 > http [FIN, ACK] Seq=1127 Ack=2 Win=14656 Len=0 TSval=30409384 TSecr=1723049647
Frame 94688: 66 bytes on wire (528 bits), 66 bytes captured (528 bits)
Arrival Time: Nov 7, 2012 22:55:18.087932000 EET
Epoch Time: 1352321718.087932000 seconds
[Time delta from previous captured frame: 0.000264000 seconds]
[Time delta from previous displayed frame: 0.000452000 seconds]
[Time since reference or first frame: 211.305660000 seconds]
Frame Number: 94688
Frame Length: 66 bytes (528 bits)
Capture Length: 66 bytes (528 bits)
[Frame is marked: True]
[Frame is ignored: False]
[Protocols in frame: eth:ip:tcp]
[Coloring Rule Name: HTTP]
[Coloring Rule String: http || tcp.port == 80]
Ethernet II, Src: HonHaiPr_e7:39:2f (38:59:f9:e7:39:2f), Dst: D-LinkIn_2f:a4:a4 (14:d6:4d:2f:a4:a4)
Destination: D-LinkIn_2f:a4:a4 (14:d6:4d:2f:a4:a4)
Address: D-LinkIn_2f:a4:a4 (14:d6:4d:2f:a4:a4)
.... ...0 .... .... .... .... = IG bit: Individual address (unicast)
.... ..0. .... .... .... .... = LG bit: Globally unique address (factory default)
Source: HonHaiPr_e7:39:2f (38:59:f9:e7:39:2f)
Address: HonHaiPr_e7:39:2f (38:59:f9:e7:39:2f)
.... ...0 .... .... .... .... = IG bit: Individual address (unicast)
.... ..0. .... .... .... .... = LG bit: Globally unique address (factory default)
Type: IP (0x0800)
Internet Protocol Version 4, Src: 192.168.0.101 (192.168.0.101), Dst: 85.134.37.196 (85.134.37.196)
Version: 4
Header length: 20 bytes
Differentiated Services Field: 0x00 (DSCP 0x00: Default; ECN: 0x00: Not-ECT (Not ECN-Capable Transport))
0000 00.. = Differentiated Services Codepoint: Default (0x00)
.... ..00 = Explicit Congestion Notification: Not-ECT (Not ECN-Capable Transport) (0x00)
Total Length: 52
Identification: 0x4e24 (20004)
Flags: 0x02 (Don't Fragment)
0... .... = Reserved bit: Not set
.1.. .... = Don't fragment: Set
..0. .... = More fragments: Not set
Fragment offset: 0
Time to live: 64
Protocol: TCP (6)
Header checksum: 0xb048 [correct]
[Good: True]
[Bad: False]
Source: 192.168.0.101 (192.168.0.101)
Destination: 85.134.37.196 (85.134.37.196)
Transmission Control Protocol, Src Port: 51714 (51714), Dst Port: http (80), Seq: 1127, Ack: 2, Len: 0
Source port: 51714 (51714)
Destination port: http (80)
[Stream index: 5205]
Sequence number: 1127 (relative sequence number)
Acknowledgement number: 2 (relative ack number)
Header length: 32 bytes
Flags: 0x011 (FIN, ACK)
000. .... .... = Reserved: Not set
...0 .... .... = Nonce: Not set
.... 0... .... = Congestion Window Reduced (CWR): Not set
.... .0.. .... = ECN-Echo: Not set
.... ..0. .... = Urgent: Not set
.... ...1 .... = Acknowledgement: Set
.... .... 0... = Push: Not set
.... .... .0.. = Reset: Not set
.... .... ..0. = Syn: Not set
.... .... ...1 = Fin: Set
[Expert Info (Chat/Sequence): Connection finish (FIN)]
[Message: Connection finish (FIN)]
[Severity level: Chat]
[Group: Sequence]
Window size value: 229
[Calculated window size: 14656]
[Window size scaling factor: 64]
Checksum: 0x3c7e [validation disabled]
[Good Checksum: False]
[Bad Checksum: False]
Options: (12 bytes)
No-Operation (NOP)
No-Operation (NOP)
Timestamps: TSval 30409384, TSecr 1723049647
Kind: Timestamp (8)
Length: 10
Timestamp value: 30409384
Timestamp echo reply: 1723049647
[SEQ/ACK analysis]
[This is an ACK to the segment in frame: 94686]
[The RTT to ACK the segment was: 0.000452000 seconds]

In my case, Adblock was denying the request (because it was a Twitter request and I block most Twitter things).

I'm getting this exact problem in Chrome and for me it was the Offline Cache that was causing trouble.
I have an asp.net html5 application designed for mobile usage with offline support. So I hade the manifest attribute like this:
<html manifest="Manifest.ashx">
And I had an ashx handler that served the manifest file dynamically. For developing I had deleted the the manifest attribute on the main page but I had another page that was seldom used that had the manifest attribute. The latest files in the project (one image, and two js-files) had not been added to the manifest. When I visited the other page and went back to the main page the files missing in the manifest was starting to fail in the logs, no friendly error message, just type: pending and "failed". And this was just testing on Chrome on the desktop, no going offline.
Adding the files to the manifest list solved the problem for me.

My specific issue was solved by upgrading from Varnish 3.0.2 to 3.0.3.

Related

how can I config virtio-net-pci to emulate a big endian linux for qemu-system-aarch64 running at a little endian

I emulate big endian linux by qemu-system-aarch64 with '-device virtio-net-pci' running at a little endian, and get the following error when i run dpdk l3fwd example.
#./examples/dpdk-l3fwd --log-level=pmd,8 -l 0 -- -p 0xf -L --config="(0,0,0)" --parse-ptype
EAL: Detected CPU lcores: 8
EAL: Detected NUMA nodes: 1
EAL: Detected static linkage of DPDK
EAL: Multi-process socket /var/run/dpdk/rte/mp_socket
EAL: Selected IOVA mode 'PA'
EAL: Probe PCI driver: net_virtio (1af4:1000) device: 0000:00:02.0 (socket 0)
[ 150.096996] igb_uio 0000:00:02.0: uio device registered with irq 44
virtio_read_caps(): [98] skipping non VNDR cap id: 11
virtio_read_caps(): [84] cfg type: 5, bar: 0, offset: 0000, len: 0
virtio_read_caps(): [70] cfg type: 2, bar: 4, offset: 300000, len: 1048576
get_cfg_addr(): invalid cap: overflows bar space: 4194304 > 16384
virtio_read_caps(): [60] cfg type: 4, bar: 4, offset: 200000, len: 1048576
get_cfg_addr(): invalid cap: overflows bar space: 3145728 > 16384
virtio_read_caps(): [50] cfg type: 3, bar: 4, offset: 100000, len: 1048576
get_cfg_addr(): invalid cap: overflows bar space: 2097152 > 16384
virtio_read_caps(): [40] cfg type: 1, bar: 4, offset: 0000, len: 1048576
get_cfg_addr(): invalid cap: overflows bar space: 1048576 > 16384
virtio_read_caps(): no modern virtio pci device found.
vtpci_init(): trying with legacy virtio pci.
EAL: Cannot mmap IO port resource: No such device
eth_virtio_pci_init(): Failed to init PCI device
EAL: Requested device 0000:00:02.0 cannot be used
EAL: Probe PCI driver: net_virtio (1af4:1000) device: 0000:00:03.0 (socket 0)
virtio_read_caps(): failed to map pci device!
vtpci_init(): trying with legacy virtio pci.
vtpci_init(): skip kernel managed virtio device.
eth_virtio_pci_init(): Failed to init PCI device
EAL: Requested device 0000:00:03.0 cannot be used
TELEMETRY: No legacy callbacks, legacy socket not created
soft parse-ptype is enabled
L3FWD: Missing 1 or more rule files, using default instead
port 0 is not present on the board
EAL: Error - exiting with code: 1
Cause: check_port_config failed
I find that it read config with following code in function virtio_read_caps
ret = rte_pci_read_config(pci_dev, &cap, sizeof(cap), pos);
if (ret != sizeof(cap)) {
PMD_INIT_LOG(DEBUG,
"failed to read pci cap at pos: %x ret %d",
pos, ret);
break;
}
with definition of virtio_pci_cap as follows,
struct virtio_pci_cap {
uint8_t cap_vndr; /* Generic PCI field: PCI_CAP_ID_VNDR */
uint8_t cap_next; /* Generic PCI field: next ptr. */
uint8_t cap_len; /* Generic PCI field: capability length */
uint8_t cfg_type; /* Identifies the structure. */
uint8_t bar; /* Where to find it. */
uint8_t padding[3]; /* Pad to full dword. */
uint32_t offset; /* Offset within bar. */
uint32_t length; /* Length of the structure, in bytes. */
};
so the offset and length is big-endian. but in virtio-v1.1-cs01 section 2.4, i get
Note: The device configuration space uses the little-endian format for multi-byte fields.
I guess that causes the problem, but there's no further information when i google it. It confuses me. Is it true that dpdk net/virtio driver does't support big-endian?
there is option listed in QEMU for changing the endianness. Please refer
VHOST_USER_SET_VRING_ENDIAN
id: 23
equivalent ioctl:
VHOST_SET_VRING_ENDIAN
master payload: vring state description
Set the endianness of a VQ for legacy devices. Little-endian is indicated with state.num set to 0 and big-endian is indicated with state.num set to 1. Other values are invalid.
This request should be sent only when VHOST_USER_PROTOCOL_F_CROSS_ENDIAN has been negotiated. Backends that negotiated this feature should handle both endiannesses and expect this message once (per VQ) during device configuration (ie. before the master starts the VQ).
Note: I am not aware of the setting to be passed in KVM-QEMU (libxml) achieve the same.

TypeORM Performance problem - Loading object with many relations

TS + Node 12 + TypeORM + MySQL - AWS 2GB instance EC2 (medium I think)
The issue is simple.
For get orders API request - we load orders from the database - each order comes with more related fields from other tables - via join. Something like:
const galleries: Gallery[] = await relationshipAModel.createQueryBuilder('model')
.leftJoinAndSelect('model.subRelationshipA', 'a')
.leftJoinAndSelect('model.subRelationshipB', 'b')
.whereInIds(firstResultIds)
.getMany();
The code is from: https://github.com/typeorm/typeorm/issues/4499
Our issue is the exact same issue as linked here.
NodeJS process crashes when loading 5-10 requests - each request loads 500 orders - loading 25 / 50 / 100 orders is ok.
Memory profiling didn't help.
Order object in typescript looks like:
#Entity()
export class Order {
#PrimaryColumn({ type: 'varchar', name: 'id' })
id: string;
#OneToMany(type => OrderItem, orderItem => orderItem.order, {
cascade: true
})
orderItems: OrderItem[];
#ManyToOne(type => ServiceLevel, serviceLevel => serviceLevel.orders, {
cascade: true
})
serviceLevel: ServiceLevel;
#ManyToOne(type => Customer, customer => customer.orders, { cascade: true })
customer: Customer;
#JoinColumn()
#OneToOne(type => Address, { cascade: true, nullable: true })
shippingAddress: Address;
#JoinColumn()
#OneToOne(type => Address, { cascade: true, nullable: true })
billingAddress: Address;
#ManyToMany(type => OrderTag, orderTag => orderTag.orders, {
cascade: true
})
#JoinTable()
orderTags: OrderTag[];
Left only the fields that are "suspects"
Node heap stack for 350 orders:
Nov 25 15:24:58 ip-172-31-38-186 web: {
Nov 25 15:24:58 ip-172-31-38-186 web: page: 0,
Nov 25 15:24:58 ip-172-31-38-186 web: maxResults: 350,
Nov 25 15:24:58 ip-172-31-38-186 web: filters: [ { fieldName: 'orderStatus', operator: 'NOT IN', values: [Array] } ],
Nov 25 15:24:58 ip-172-31-38-186 web: stepFilter: { fieldName: 'orderStatus', operator: 'IN', values: [ 'stepPrint' ] },
Nov 25 15:24:58 ip-172-31-38-186 web: sortFields: [ { fieldName: 'createdDate', value: 'DESC' } ]
Nov 25 15:24:58 ip-172-31-38-186 web: }
Nov 25 15:25:18 ip-172-31-38-186 web: <--- Last few GCs --->
Nov 25 15:25:18 ip-172-31-38-186 web: [20326:0x31ad300] 113205 ms: Mark-sweep 993.9 (999.1) -> 993.7 (997.4) MB, 766.6 / 0.0 ms (+ 127.3 ms in 23 steps since start of marking, biggest step 25.9 ms, walltime since start of marking 969 ms) (average mu = 0.231, current mu = 0.082) allocation [20326:0x31ad300] 114167 ms: Mark-sweep 994.1 (997.4) -> 993.2 (997.1) MB, 881.2 / 0.0 ms (+ 47.2 ms in 7 steps since start of marking, biggest step 26.7 ms, walltime since start of marking 963 ms) (average mu = 0.138, current mu = 0.036) allocation fa
Nov 25 15:25:18 ip-172-31-38-186 web: <--- JS stacktrace --->
Nov 25 15:25:18 ip-172-31-38-186 web: ==== JS stack trace =========================================
Nov 25 15:25:18 ip-172-31-38-186 web: 0: ExitFrame [pc: 0x13555cd]
Nov 25 15:25:18 ip-172-31-38-186 web: Security context: 0x003cbef008d1 <JSObject>
Nov 25 15:25:18 ip-172-31-38-186 web: 1: slice [0x2c5dd3dc3561] [buffer.js:~606] [pc=0xb6e02716b7c](this=0x3b080493db19 <Object map = 0x3047472a6099>,0x3b0942d12c71 <Uint8Array map = 0x3047472a55a9>,44922,45232)
Nov 25 15:25:18 ip-172-31-38-186 web: 2: _typeCast(aka typeCast) [0x20293188c3e9] [/var/app/current/node_modules/mysql/lib/protocol/packets/RowDataPacket.js:~53] [pc=0xb6e027ab692](this=0x338ac1d1b739 <RowDataPacket map =...
Nov 25 15:25:18 ip-172-31-38-186 web: FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
Nov 25 15:25:18 ip-172-31-38-186 web: 1: 0xa093f0 node::Abort() [node]
Nov 25 15:25:18 ip-172-31-38-186 web: 2: 0xa097fc node::OnFatalError(char const*, char const*) [node]
Nov 25 15:25:18 ip-172-31-38-186 web: 3: 0xb842ae v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [node]
Nov 25 15:25:18 ip-172-31-38-186 web: 4: 0xb84629 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [node]
Nov 25 15:25:18 ip-172-31-38-186 web: 5: 0xd30fe5 [node]
Nov 25 15:25:18 ip-172-31-38-186 web: 6: 0xd31676 v8::internal::Heap::RecomputeLimits(v8::internal::GarbageCollector) [node]
Nov 25 15:25:18 ip-172-31-38-186 web: 7: 0xd3def5 v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::GCCallbackFlags) [node]
Nov 25 15:25:18 ip-172-31-38-186 web: 8: 0xd3eda5 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [node]
Nov 25 15:25:18 ip-172-31-38-186 web: 9: 0xd4185c v8::internal::Heap::AllocateRawWithRetryOrFail(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [nod
e]
Any help will be much apperciated!
If id is the PRIMARY KEY for order, then the DISTINCT is unnecessary.
A LIMIT should have an ORDER BY.
order needs
INDEX(shopId, orderBatchId, id)
A hundred columns for 100 rows? That seems like a lot. Rethink which columns you really need and whether you need 100 rows.
Are there nodejs or "packet" or other networking limits? (Since 100 rows, but 500 croaks.)
5 Unique keys implies that there could be a separate table that equates 4 of them to one. It also implies that there is probably a design error; I commented on another question that had both shipping_addr and billing_addr being UNIQUE. If I try to send something to two relatives at different addresses, I will have trouble. Especially if anyone else is using your system to send to either of those addresses.
Even 3 UNIQUEs is probably a mistake. I know of very few valid cases for 2 UNIQUEs; the common one is for 'normalization'.
This construct makes my head spin. I need to figure out if it does what you wanted:
FROM a LEFT JOIN b INNER JOIN c
If that is equivalent to this, then you don't have what you wanted:
FROM a LEFT JOIN (b INNER JOIN c)
This, on the other hand, is probably what you wanted:
FROM (a LEFT JOIN b) INNER JOIN c
This would clearer, especially since c is a subquery:
FROM (c JOIN a) LEFT JOIN b
Please provide EXPLAIN SELECT ... so we can see how it was evaluated.
Meanwhile, if you can get the subquery first, my quandry is avoided. And it may help performance.
LEFT -- Are you using LEFT JOIN because each of those things may be missing data? For example, might the shippingAddress be missing (and you are expecting NULLs)? I ask because it makes a difference to performance, readability, optimization, etc. Use LEFT when needed, else don't.

How to load ConfigMaps using kubernetes-config extension

I've been following https://quarkus.io/guides/kubernetes-config in order to create a configMap and test my Quarkus service into my CDK v3.5.0-1 before to push it to OpenShift 3.11 but KubernetesConfigSourceProvider is not happy:
Using:
Quarkus 1.8.1.Final
Java 11
CDK 3.5
Here is the yaml file I want to convert into a configMap doing: oc create configmap quarkus-service-configmap --from-file=application.yml
jaeger_endpoint: http://192.168.56.100:14268/api/traces
jaeger_sampler_manager_host_port: 192.168.56.100:14250
sql_debug: false
quarkus:
datasource:
db-kind: h2
jdbc:
detect-statement-leaks: true
driver: io.opentracing.contrib.jdbc.TracingDriver
enable-metrics: true
url: jdbc:tracing:h2:./db;AUTO_SERVER=TRUE
max-size: 13
metrics:
enabled: false
password: sa
username: sa
flyway:
locations: db/prod/migration
migrate-at-start: true
hibernate-orm:
database:
charset: UTF-8
generation: none
dialect: org.hibernate.dialect.H2Dialect
http:
port: 6280
jaeger:
enabled: true
endpoint: ${jaeger_endpoint}
sampler-manager-host-port: ${jaeger_sampler_manager_host_port}
sampler-param: 1
sampler-type: const
resteasy:
gzip:
enabled: true
max-input: 10M
smallrye-health:
ui:
always-include: true
swagger-ui:
always-include: true
Here is the generated configMap:
apiVersion: v1
data:
application.yml: |
jaeger_endpoint: http://192.168.56.100:14268/api/traces
jaeger_sampler_manager_host_port: 192.168.56.100:14250
sql_debug: false
quarkus:
datasource:
db-kind: h2
jdbc:
detect-statement-leaks: true
driver: io.opentracing.contrib.jdbc.TracingDriver
enable-metrics: true
url: jdbc:tracing:h2:./db;AUTO_SERVER=TRUE
max-size: 13
metrics:
enabled: false
password: sa
username: sa
flyway:
locations: db/prod/migration
migrate-at-start: true
hibernate-orm:
database:
charset: UTF-8
generation: none
dialect: org.hibernate.dialect.H2Dialect
http:
port: 6280
jaeger:
enabled: true
endpoint: ${jaeger_endpoint}
sampler-manager-host-port: ${jaeger_sampler_manager_host_port}
sampler-param: 1
sampler-type: const
resteasy:
gzip:
enabled: true
max-input: 10M
smallrye-health:
ui:
always-include: true
swagger-ui:
always-include: true
kind: ConfigMap
metadata:
creationTimestamp: '2020-09-21T17:56:40Z'
name: quarkus-service-configmap
namespace: dci
resourceVersion: '9572968'
selfLink: >-
/api/v1/namespaces/dci/configmaps/quarkus-service-configmap
uid: cd4570ff-fc33-11ea-bff0-080027af1c97
Here my quarkus-service/src/main/resources/application.yml:
quarkus:
application:
name: quarkus-service
kubernetes-config: # https://quarkus.io/guides/kubernetes-config
enabled: true
fail-on-missing-config: true
config-maps: quarkus-service-configmap
# secrets: quarkus-service-secrets
jaeger:
service-name: ${quarkus.application.name}
http:
port: 6280
log:
category:
"io.quarkus.kubernetes.client":
level: DEBUG
"io.fabric8.kubernetes.client":
level: DEBUG
console:
format: '%d{HH:mm:ss} %-5p traceId=%X{traceId}, spanId=%X{spanId}, sampled=%X{sampled} [%c{2.}] (%t) %s%e%n'
native:
additional-build-args: -H:ReflectionConfigurationFiles=reflection-config.json
'%minishift':
quarkus:
kubernetes: # https://quarkus.io/guides/deploying-to-openshift / https://quarkus.io/guides/kubernetes
container-image:
group: dci
registry: image-registry.openshift-image-registry.svc:5000
deploy: true
expose: true
The command I run: mvn clean package -Dquarkus.profile=minishift
The result I get:
WARN: Unrecognized configuration key "%s" was provided; it will be ignored; verify that the dependency extension for this configuration is set or you did not make a typo
Sep 21, 2020 6:36:15 PM io.quarkus.config
WARN: Unrecognized configuration key "%s" was provided; it will be ignored; verify that the dependency extension for this configuration is set or you did not make a typo
Sep 21, 2020 6:36:15 PM org.hibernate.validator.internal.util.Version
INFO: HV000001: Hibernate Validator %s
Sep 21, 2020 6:36:27 PM io.quarkus.application
ERROR: Failed to start application (with profile minishift)
java.lang.RuntimeException: Unable to obtain configuration for ConfigMap objects from Kubernetes API Server at: https://172.30.0.1:443/
at io.quarkus.kubernetes.client.runtime.KubernetesConfigSourceProvider.getConfigMapConfigSources(KubernetesConfigSourceProvider.java:85)
at io.quarkus.kubernetes.client.runtime.KubernetesConfigSourceProvider.getConfigSources(KubernetesConfigSourceProvider.java:45)
at io.quarkus.runtime.configuration.ConfigUtils.addSourceProvider(ConfigUtils.java:107)
at io.quarkus.runtime.configuration.ConfigUtils.addSourceProviders(ConfigUtils.java:121)
at io.quarkus.runtime.generated.Config.readConfig(Config.zig:2060)
at io.quarkus.deployment.steps.RuntimeConfigSetup.deploy(RuntimeConfigSetup.zig:60)
at io.quarkus.runner.ApplicationImpl.doStart(ApplicationImpl.zig:509)
at io.quarkus.runtime.Application.start(Application.java:90)
at io.quarkus.runtime.ApplicationLifecycleManager.run(ApplicationLifecycleManager.java:91)
at io.quarkus.runtime.Quarkus.run(Quarkus.java:61)
at io.quarkus.runtime.Quarkus.run(Quarkus.java:38)
at io.quarkus.runtime.Quarkus.run(Quarkus.java:106)
at io.quarkus.runner.GeneratedMain.main(GeneratedMain.zig:29)
Caused by: io.fabric8.kubernetes.client.KubernetesClientException: Operation: [get] for kind: [ConfigMap] with name: [quarkus-service-configmap] in namespace: [dci] failed.
at io.fabric8.kubernetes.client.KubernetesClientException.launderThrowable(KubernetesClientException.java:64)
at io.fabric8.kubernetes.client.KubernetesClientException.launderThrowable(KubernetesClientException.java:72)
at io.fabric8.kubernetes.client.dsl.base.BaseOperation.getMandatory(BaseOperation.java:244)
at io.fabric8.kubernetes.client.dsl.base.BaseOperation.get(BaseOperation.java:187)
at io.fabric8.kubernetes.client.dsl.base.BaseOperation.get(BaseOperation.java:79)
at io.quarkus.kubernetes.client.runtime.KubernetesConfigSourceProvider.getConfigMapConfigSources(KubernetesConfigSourceProvider.java:69)
... 12 more
Caused by: java.net.SocketTimeoutException: Read timed out
at java.base/java.net.SocketInputStream.socketRead0(Native Method)
at java.base/java.net.SocketInputStream.socketRead(SocketInputStream.java:115)
at java.base/java.net.SocketInputStream.read(SocketInputStream.java:168)
at java.base/java.net.SocketInputStream.read(SocketInputStream.java:140)
at java.base/sun.security.ssl.SSLSocketInputRecord.read(SSLSocketInputRecord.java:467)
at java.base/sun.security.ssl.SSLSocketInputRecord.readHeader(SSLSocketInputRecord.java:461)
at java.base/sun.security.ssl.SSLSocketInputRecord.decode(SSLSocketInputRecord.java:160)
at java.base/sun.security.ssl.SSLTransport.decode(SSLTransport.java:110)
at java.base/sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl.java:1403)
at java.base/sun.security.ssl.SSLSocketImpl.readHandshakeRecord(SSLSocketImpl.java:1309)
at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:440)
at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:411)
at okhttp3.internal.connection.RealConnection.connectTls(RealConnection.java:336)
at okhttp3.internal.connection.RealConnection.establishProtocol(RealConnection.java:300)
at okhttp3.internal.connection.RealConnection.connect(RealConnection.java:185)
at okhttp3.internal.connection.ExchangeFinder.findConnection(ExchangeFinder.java:224)
at okhttp3.internal.connection.ExchangeFinder.findHealthyConnection(ExchangeFinder.java:108)
at okhttp3.internal.connection.ExchangeFinder.find(ExchangeFinder.java:88)
at okhttp3.internal.connection.Transmitter.newExchange(Transmitter.java:169)
at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:41)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)
at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:94)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)
at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:88)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)
at io.fabric8.kubernetes.client.utils.BackwardsCompatibilityInterceptor.intercept(BackwardsCompatibilityInterceptor.java:134)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)
at io.fabric8.kubernetes.client.utils.ImpersonatorInterceptor.intercept(ImpersonatorInterceptor.java:68)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)
at io.fabric8.kubernetes.client.utils.HttpClientUtils.lambda$createHttpClient$3(HttpClientUtils.java:147)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)
at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:229)
at okhttp3.RealCall.execute(RealCall.java:81)
at io.fabric8.kubernetes.client.dsl.base.OperationSupport.handleResponse(OperationSupport.java:490)
at io.fabric8.kubernetes.client.dsl.base.OperationSupport.handleResponse(OperationSupport.java:451)
at io.fabric8.kubernetes.client.dsl.base.OperationSupport.handleGet(OperationSupport.java:416)
at io.fabric8.kubernetes.client.dsl.base.OperationSupport.handleGet(OperationSupport.java:397)
at io.fabric8.kubernetes.client.dsl.base.BaseOperation.handleGet(BaseOperation.java:890)
at io.fabric8.kubernetes.client.dsl.base.BaseOperation.getMandatory(BaseOperation.java:233)
... 15 more

ejabberd mod_rest installation warning & crash report

I've tried to test mod_rest for my ejabberd. Received 'OK' result but with warning : "Warning: undefined callback function depends/2 (behaviour 'gen_mod')" during installation of the module. When I tried to test mod_rest that I installed using REST client, there's CRASH REPORT in log.
ejabberd version : 16.08.23
URL : http://localhost:5280/rest
ejabberd.yml
hosts:
- "localhost"
- "192.168.88.88"
- "127.0.0.1"
listen:
-
port: 5280
module: ejabberd_http
request_handlers:
"/websocket": ejabberd_http_ws
"/rest": mod_rest
web_admin: true
http_bind: true
captcha: true
modules:
mod_rest: {}
INSTALLATION INFO
$/sbin/ejabberdctl module_install mod_rest
src/mod_rest.erl:27: Warning: undefined callback function depends/2 (behaviour 'gen_mod')
ok
ejabberd.log
2016-08-24 11:14:31.516 [error] <0.3683.0> CRASH REPORT Process
<0.3683.0> with 0 neighbours crashed with reason: bad argument in call
to erlang:binary_to_list({127,0,0,1}) in str:tokens/2 line 242
crash.log
2016-08-24 14:42:20 =CRASH REPORT====
crasher:
initial call: ejabberd_http:init/2
pid: <0.3274.0>
registered_name: []
exception error: bad argument: [{erlang,binary_to_list,[{127,0,0,1}],[]},{str,tokens,2,[{file,"src/str.erl"},{line,242}]},{acl,parse_ip_netmask,1,[{file,"src/acl.erl"},{line,536}]},{mod_rest,'-ip_matches/2-fun-0-',2,[{file,"src/mod_rest.erl"},{line,144}]},{lists,any,2,[{file,"lists.erl"},{line,1225}]},{mod_rest,check_member_option,3,[{file,"src/mod_rest.erl"},{line,134}]},{mod_rest,process,2,[{file,"src/mod_rest.erl"},{line,55}]},{ejabberd_http,process,5,[{file,"src/ejabberd_http.erl"},{line,363}]}]
ancestors: [<0.3190.0>,ejabberd_listeners,ejabberd_sup,<0.2578.0>]
messages: []
links: [#Port<0.35648>]
dictionary: []
trap_exit: false
status: running
heap_size: 1598
stack_size: 27
reductions: 1894
neighbours:

Using NXLog with IIS and have json output

I am trying to use nxlog to oarse the IIS files and create a JSON output so that I can later push it into logstash
However all I get is the raw data in the file and not the formatted output I was led to expect e.g. https://github.com/StephenHynes7/confs/blob/master/windows_iis_JSON/nxlog-iis.conf.
This is my config file
## This is a sample configuration file. See the nxlog reference manual about the
## configuration options. It should be installed locally and is also available
## online at http://nxlog.org/nxlog-docs/en/nxlog-reference-manual.html
## Please set the ROOT to the folder your nxlog was installed into,
## otherwise it will not start.
#define ROOT C:\Program Files\nxlog
define ROOT D:\Program Files (x86)\nxlog
Moduledir %ROOT%\modules
CacheDir %ROOT%\data
Pidfile %ROOT%\data\nxlog.pid
SpoolDir %ROOT%\data
LogFile %ROOT%\data\nxlog.log
<Extension _syslog>
Module xm_syslog
</Extension>
<Extension json>
Module xm_json
</Extension>
# Select the input folder where logs will be scanned
# Create the parse rule for IIS logs. You can copy these from the header of the IIS log file.
# Uncomment Extension w3c for IIS logging
<Extension w3c>
Module xm_csv
#Fields: date time s-sitename s-computername s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs-version cs(User-Agent) cs(Cookie) cs(Referer) cs-host sc-status sc-substatus sc-win32-status sc-bytes cs-bytes time-taken
Fields $date, $time, $s-sitename, $s-computername, $s-ip, $cs-method, $cs-uri-stem, $cs-uri-query, $s-port, $cs-username, $c-ip, $csUser-Agent, $cs-cookie, $cs-referrer, $cs-host, $sc-status, $sc-substatus, $sc-win32-status, $sc-bytes, $cs-bytes, $time-taken
FieldTypes string, string, string, string, string, string, string, string, integer, string, string, string, string, string, string, integer, integer, integer, integer, integer, integer
Delimiter ' '
UndefValue -
QuoteChar '"'
EscapeControl FALSE
</Extension>
<Input iis_logs>
Module im_file
File "C:\\Resources\\Directory\\\\u_ex*.log"
ReadFromLast True
Recursive True
SavePos True
Exec if $raw_event =~ /^#/ drop(); \
else \
{ \
w3c->parse_csv(); \
$EventTime = parsedate($date + " " + $time); \
$SourceName = "IIS"; \
$Message = to_json(); \
}
</Input>
<Output debug>
Module om_file
File "C:\\nxlog-debug.txt"
</Output>
<Route 1>
Path iis_logs => debug
</Route>
and my output (not json)
2015-09-05 07:42:00 W3SVC1273337584 ****** *.*.*.* GET / - 443 - *.*.*.* HTTP/1.1 Mozilla/5.0+(compatible;+MSIE+10.0;+Windows+NT+6.2;+WOW64;+Trident/6.0) - - *.*.*.* 403 14 0 5530 258 31
2015-09-05 07:42:00 W3SVC1273337584 ****** *.*.*.* GET / - 443 - *.*.*.* HTTP/1.1 Mozilla/5.0+(compatible;+MSIE+10.0;+Windows+NT+6.2;+WOW64;+Trident/6.0) - - *.*.*.* 403 14 0 5530 258 16
2015-09-05 07:53:05 W3SVC1273337584 ****** *.*.*.* GET / - 443 - *.*.*.* HTTP/1.1 Mozilla/5.0+(compatible;+MSIE+10.0;+Windows+NT+6.2;+WOW64;+Trident/6.0) - - *.*.*.* 403 14 0 5530 258 31
2015-09-05 07:53:06 W3SVC1273337584 ****** *.*.*.* GET / - 443 - *.*.*.* HTTP/1.1 Mozilla/5.0+(compatible;+MSIE+10.0;+Windows+NT+6.2;+WOW64;+Trident/6.0) - - *.*.*.* 403 14 0 5530 258 31
I assume I am close but what am I missing?
om_file writes $raw_event into the output by default and all other fields are discarded including $Message. So you need either
$raw_event = to_json();
or simply just
to_json();
The two are equivalent.