URI is too large >8192 message, but no idea which URI

OH2.4

I noticed I suddenly get a log message about every 5 seconds:
[org.eclipse.jetty.http.HttpParser ] - URI is too large >8192

Found out the warning is cause by an image widget in habpanel which is update via the ipcamera widget. Unclear yet what the root cause is.

Turns out it is the image widget in combination with the URI from the cemara image item. The URI contains the image and is approx. 32 KiB.

Any other solution for this ?

I do this to filter it out and another common warning i get when the IOS app is closed. The second log output that gets removed is…

[ERROR] [ersey.server.ServerRuntime$Responder] - An I/O error has occurred while writing a response message entity to the container output stream.

To apply the filter do this:

 sudo nano /var/lib/openhab2/etc/org.ops4j.pax.logging.cfg

Add this anywhere in the file and then restart openhab.

############ CUSTOM FILTERS START HERE #################

# filter out 2.4.0 stable warnings that can be ignored
log4j2.appender.out.filter.jettyWarn.type = RegexFilter
log4j2.appender.out.filter.jettyWarn.regex = .*(URI is too large >8192|while writing a response message entity to the container output stream).*
log4j2.appender.out.filter.jettyWarn.onMatch = DENY
log4j2.appender.out.filter.jettyWarn.onMisMatch = ACCEPT

################# END OF CUSTOM FILTERS ################

Then when you want to just delete the lines if you ever move to a newer Openhab version.

Hi Matt,

with this line:

log4j2.appender.out.filter.jettyWarn.regex = .*(URI is too large >8192|while writing a response message entity to the container output stream).*

can I just delete the bit between ** and add my own message? like the below. Ive tried it but the log is still getting hammered with these messages

Im trying to filter the Karaf Console



# filter out 2.4.0 stable warnings that can be ignored
log4j2.appender.out.filter.jettyWarn.type = RegexFilter
log4j2.appender.out.filter.jettyWarn.regex = .*An I/O error has occurred while writing a response message entity to the container output stream.*
log4j2.appender.out.filter.jettyWarn.onMatch = DENY
log4j2.appender.out.filter.jettyWarn.onMisMatch = ACCEPT

Yes you can but sometimes longer strings don’t match, why I don’t know which is why I used a shorter string. Also did the file already exist? Maybe your file is located here userdata/etc/org.ops4j.pax.logging.cfg

There are a lot of different ways to achieve similar things, see this thread…

@Dim has a better tutorial at Log4j2 Sample Config

2 Likes