PageSequenceMonitor HTTP 1.1 traffic is missing host header

Description

After upgrading to 15.0.1, immediate outages occurred for systems that had a PageSequenceMonitor poll.
The systems now responded with a 400 HTTP error. Packet capture shows that the server is reporting a bad request.
Looking at the request packet, the request is missing the HOST: [ipaddr] header which is required with HTTP 1.1

Acceptance / Success Criteria

None

Lucidchart Diagrams

Activity

Show:

Chad Amberg February 24, 2015 at 12:06 PM

Thanks guys.

I already had the Host set, just not Virtual-Host. Now it looks like:
<page method="GET" http-version="1.1" virtual-host="${ipaddr}" scheme="http" host="${ipaddr}" disable-ssl-verification="true" port="80" path="/MME/Home/Start" successMatch="Enroll New Device" response-range="100-399"/>

And it's all working for me happily now. Appreciate it!

Benjamin Reed February 24, 2015 at 12:02 PM

While this is technically expected behavior, I've made a new issue () to make OpenNMS fall back to HTTP/1.0 if virtual-host is not set. This should be more in line with what you expect, while still being technically correct. Marking as won't fix. (kinda... )

Alejandro Galue February 24, 2015 at 11:28 AM

Starting from 15.0.1 if you want to send out the Host header, you MUST add a virtual-host entry to all the page sequence that require it. Otherwise it won't be sent.

The reason for it is, this is the expected behavior. On older version even if you don't want to send the Host header, the HttpClient library was forcing it, which was breaking some other use cases.

Makes sense?

Won't Fix

Details

Assignee

Reporter

Components

Affects versions

Priority

PagerDuty

Created February 23, 2015 at 3:56 PM
Updated February 24, 2015 at 12:06 PM
Resolved February 24, 2015 at 12:02 PM