Previous Next JavaScript must be enabled to correctly display this content

## Micronaut on Oracle Database Appliance

FAQs on Micronaut on Oracle Database Appliance.

Are there any changes visible to the user in Oracle Database Appliance release 19.16, because of the replacement of Dropwizard with Micronaut?

Yes, Existing Dropwizard-based DCS configuration JSON file is replaced with Micronaut based DCS configuration YML file and logback XML file. Running the `ps` command to list DCS processes displays different JVM parameters as the java command used to invoke Micronaut based DCS Application varies.
For example, the Dropwizard-based output is as follows:

    java -Doracle.security.jps.config=/opt/oracle/dcs/agent/jps-config.xml -jar  /opt/oracle/dcs/bin/dcs-agent*.jar server /opt/oracle/dcs/conf/dcs-agent.json

The Micronaut-based output is as follows:

    java -Doracle.security.jps.config=/opt/oracle/dcs/agent/jps-config.xml -Dlogback.configurationFile=/opt/oracle/dcs/conf/dcs-agent-logback.xml -Dmicronaut.config.files=/opt/oracle/dcs/conf/dcs-agent.yml -Dold.config.files=/opt/oracle/dcs/conf/dcs-agent.json -Djavax.xml.parsers.SAXParserFactory=com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl -jar /opt/oracle/dcs/bin/dcs-agent*.jar

How do I know whether DCS application is running on Micronaut on Oracle Database Appliance?

Check the DCS Application logs to see whether the application uses Micronaut or Dropwizard. When the DCS application completes startup, the following Micronaut informational message is displayed in the DCS application log file:

    ---------------
    2022-01-29 14:14:20,886 INFO [main] [] i.m.r.Micronaut: Startup completed in 1226ms. Server Running: https://<host>:<port>
    ---------------
    Note: i.m.r.Micronaut means io.micronaut.runtime.Micronaut

From the above log message, it is clear that the DCS application is running on Micronaut instead of Dropwizard.

With Dropwizard based DCS application, the log message is as follows:

    ---------------
    2022-01-27 03:08:49,398 INFO [main] [] o.e.j.s.AbstractConnector: Started application@67be1284{SSL, (ssl, http/1.1)}{0.0.0.0:<port>}
    ---------------
    Note : Here, o.e.j.s.AbstractConnector means org.eclipse.jetty.server.AbstractConnector

Are there any changes to the log messages format after moving to Micronaut?

No. The existing log message format is carried forward to Micronaut.

Is there a difference in logging functionality between Oracle Database Appliance release 19.16 and earlier releases?

Yes. Logging configuration file has changed. Earlier logging configuration file changes were a part of application specific JSON configuration file such as `dcs-agent.json` for DCS agent, `dcs-admin.json` for DCS admin, and `dcs-controller.yml` for DCS controller.

From Oracle Database Appliance release 19.16 and later, logging configuration changes are in a separate application specific logback XML configuration file, such as the `dcs-agent-logback.xml` for DCS agent, `dcs-admin-logback.xml` for DCS admin and `dcs-controller-logback.xml` for DCS controller. Note that the log messages pattern and log file names remain unchanged.

In Oracle Database Appliance release 19.16 and later, dynamic reloading of log configuration is also supported. Whenever the DCS application-specific logback XML file is modified, such as when changing the log level from INFO to DEBUG, then the new changes are auto-detected. The new logging configuration changes are automatically applied without requiring restart of the DCS application. Note that this feature is introduced in Micronaut-based Oracle Database Appliance release 19.16 DCS applications and is not available in Oracle Database Appliance release 19.15 or earlier DropWizard-based DCS applications.

Where are the configuration parameters set with Micronaut-based DCS applications?

Configuration file location remains the same but file names are changed in Oracle Database Appliance release 19.16 and later.

In Oracle Database Appliance release 19.15 or earlier, DCS application-specific JSON configuration files had three sections:

- Server configuration parameters such as server port, HTTP or HTTPS, MTLS enabled or not, truststore and keystore certificate details, and so on.
- Custom configuration parameters such as node ID, nodes list, emulation mode, and so on.
- Log configuration parameters such as log file name, log rotation details, log messages format, log levels, and so on.

In Oracle Database Appliance release 19.16 or later DCS applications, configuration files are split into two files:

- YML configuration file had two sections: Server configuration parameters such as server port, HTTP or HTTPS, MTLS enabled or not, truststore and keystore certificate details, and so on. Custom configuration parameters such as node ID, nodes list, emulation mode, and so on.
- Logback XML configuration contains logging specific configuration changes only: Log configuration parameters such as log file name, log rotation details, log messages format, log levels, and so on.

When patching DCS applications, custom settings in JSON file are migrated to YML and logback XML files accordingly.

Table 1-3

DCS application | DCS application-specific configuration file (Server configuration parameters + Log configuration parameters + Custom configuration parameters) Note that releases earlier than 19.14 use JSON, whereas 19.14 or later use YML for DCS controller | DCS application specific configuration file (Server configuration parameters + Custom configuration parameters). Note that release 19.16 or later use YML | DCS application specific logging configuration file (Log configuration parameters). Note that release 19.16 or later use application-specific logback.xml
--- | --- | --- | ---
DCS agent | `dcs-agent.json` | `dcs-agent.yml` | `dcs-agent-logback.xml`
DCS admin | `dcs-admin.json` | `dcs-admin.yml` | `dcs-admin-logback.xml`
DCS controller | `dcs-controller.json` (release 19.13 or earlier) `dcs-controller.yml` (release 19.14 or later) | `dcs-controller.yml` | `dcs-controller-logback.xml`

How is the logging configuration file structure in Oracle Database Appliance release 19.16 and later?

DCS agent logging configuration file (`dcs-agent-logback.xml`):

    <configuration scan="true" scanPeriod="60 seconds">
       <property name="DCS_LOG_DIR" value="/opt/oracle/dcs/log" />

       <appender name="ROLLING" class="ch.qos.logback.core.rolling.RollingFileAppender">
         <file>${DCS_LOG_DIR}/dcs-agent.log</file>
         <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
           <!-- rollover daily -->
           <fileNamePattern>${DCS_LOG_DIR}/dcs-agent-%d{yyyy-MM-dd}.%i.log</fileNamePattern>
           <!-- each file should be at most 100MB, keep 10 days worth of history -->
           <maxFileSize>100MB</maxFileSize>
           <maxHistory>10</maxHistory>
         </rollingPolicy>
         <encoder>
           <pattern>%date{"yyyy-MM-dd HH:mm:ss,SSS"} %level [%thread] [%mdc] %logger{15}: %m%n%rEx</pattern>
         </encoder>
       </appender>

       <appender name="httpAccessLogAppender" class="ch.qos.logback.core.rolling.RollingFileAppender">
         <file>${DCS_LOG_DIR}/dcs-agent-requests.log</file>
         <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
           <!-- rollover daily -->
           <fileNamePattern>${DCS_LOG_DIR}/dcs-agent-requests-%d{yyyy-MM-dd}.log
           </fileNamePattern>
           <maxFileSize>100MB</maxFileSize>
           <maxHistory>10</maxHistory>
         </rollingPolicy>
         <encoder>
           <charset>UTF-8</charset>
           <pattern>%msg%n</pattern>
         </encoder>
       </appender>

       <root level="INFO">
         <appender-ref ref="ROLLING" />
       </root>

       <logger name="HTTP_ACCESS_LOGGER" additivity="false" level="info">
         <appender-ref ref="httpAccessLogAppender" />
       </logger>

       <logger name="io.micronaut" level="INFO"/>
       <logger name="com.oracle.dcs.agent" level="DEBUG"/>
    </configuration>

DCS admin logging configuration file (`dcs-admin-logback.xml`):

    <configuration scan="true" scanPeriod="60 seconds">
       <property name="DCS_LOG_DIR" value="/opt/oracle/dcs/log" />

       <appender name="ROLLING" class="ch.qos.logback.core.rolling.RollingFileAppender">
         <file>${DCS_LOG_DIR}/dcs-admin.log</file>
         <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
           <!-- rollover daily -->
           <fileNamePattern>${DCS_LOG_DIR}/dcs-admin-%d{yyyy-MM-dd}.%i.log</fileNamePattern>
           <!-- each file should be at most 100MB, keep 10 days worth of history -->
           <maxFileSize>100MB</maxFileSize>
           <maxHistory>10</maxHistory>
         </rollingPolicy>
         <encoder>
           <pattern>%date{"yyyy-MM-dd HH:mm:ss,SSS"} %level [%thread] [%mdc] %logger{15}: %m%n%rEx</pattern>
         </encoder>
       </appender>

       <appender name="httpAccessLogAppender" class="ch.qos.logback.core.rolling.RollingFileAppender">
         <file>${DCS_LOG_DIR}/dcs-admin-requests.log</file>
         <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
           <!-- rollover daily -->
           <fileNamePattern>${DCS_LOG_DIR}/dcs-admin-requests-%d{yyyy-MM-dd}.log
           </fileNamePattern>
           <maxFileSize>100MB</maxFileSize>
           <maxHistory>10</maxHistory>
         </rollingPolicy>
         <encoder>
           <charset>UTF-8</charset>
           <pattern>%msg%n</pattern>
         </encoder>
       </appender>

       <root level="INFO">
         <appender-ref ref="ROLLING" />
       </root>

       <logger name="HTTP_ACCESS_LOGGER" additivity="false" level="info">
         <appender-ref ref="httpAccessLogAppender" />
       </logger>

       <logger name="io.micronaut" level="INFO"/>
       <logger name="com.oracle.dcs.admin" level="DEBUG"/>
    </configuration>

DCS controller logging configuration file (`dcs-controller-logback.xml`):

    <configuration scan="true" scanPeriod="60 seconds">
       <property name="DCS_LOG_DIR" value="/opt/oracle/dcs/log" />

       <appender name="ROLLING" class="ch.qos.logback.core.rolling.RollingFileAppender">
         <file>${DCS_LOG_DIR}/dcs-controller.log</file>
         <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
           <!-- rollover daily -->
           <fileNamePattern>${DCS_LOG_DIR}/dcs-controller-%d{yyyy-MM-dd}.%i.log</fileNamePattern>
           <!-- each file should be at most 100MB, keep 10 days worth of history -->
           <maxFileSize>100MB</maxFileSize>
           <maxHistory>10</maxHistory>
         </rollingPolicy>
         <filter class="com.oracle.oda.controller.CORSLogFilter" />
         <encoder>
           <pattern>%date{"yyyy-MM-dd HH:mm:ss,SSS"} %level [%thread] [%mdc] %logger{15}: %m%n%rEx</pattern>
         </encoder>
       </appender>

       <appender name="httpAccessLogAppender" class="ch.qos.logback.core.rolling.RollingFileAppender">
         <file>${DCS_LOG_DIR}/dcs-controller-requests.log</file>
         <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
           <!-- rollover daily -->
           <fileNamePattern>${DCS_LOG_DIR}/dcs-controller-requests-%d{yyyy-MM-dd}.log
           </fileNamePattern>
           <maxFileSize>100MB</maxFileSize>
           <maxHistory>10</maxHistory>
         </rollingPolicy>
         <encoder>
           <charset>UTF-8</charset>
           <pattern>%msg%n</pattern>
         </encoder>
       </appender>

       <root level="INFO">
         <appender-ref ref="ROLLING" />
       </root>

       <logger name="HTTP_ACCESS_LOGGER" additivity="false" level="info">
         <appender-ref ref="httpAccessLogAppender" />
       </logger>

       <logger name="io.micronaut" level="INFO"/>
       <logger name="com.oracle.oda.controller" level="DEBUG"/>
    </configuration>

Parent topic: Oracle Database Appliance Frequently Asked Questions