java.io.FileNotFoundException occurs by enabling access log with stdout settings for embedded Tomcat on Spring Boot

Solution Verified - Updated -

Issue

"java.io.FileNotFoundException '' occurs by enabling access log with stdout settings as follows.

application.yml

server:
  tomcat:
    accesslog:
      enabled: true
      directory: "/dev"
      prefix: "stdout"
      buffered: false
      suffix: ""
      file-date-format: ""

log

ava.io.FileNotFoundException: /dev/management_stdout (Permission denied)
at java.io.FileOutputStream.open0(Native Method) 
at java.io.FileOutputStream.open(FileOutputStream.java:270) 
at java.io.FileOutputStream.<init>(FileOutputStream.java:213) 
at org.apache.catalina.valves.AccessLogValve.open(AccessLogValve.java) 
at org.apache.catalina.valves.AccessLogValve.startInternal(AccessLogValve.java) 

Environment

  • Red Hat Fuse 7.7
    • OCP 3.11
    • SB2 runtime with "spring-boot-starter-web" dependency

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content