Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8257911

Java Usage Tracker do not log to file

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P3 P3
    • None
    • 15
    • core-svc

      There is one instance where JUT cannot write any message to file. We cannot reproduce this bug on other instances, so maybe the problem with exact instance. What would you recommend to fix this?

      Let me describe the problem:
      ```
      $ ssh opc@100.103.0.83

      $ uname -a
      Linux agentinstance-20201014-1655 4.14.35-1902.306.2.el7uek.x86_64 #2 SMP Fri Aug 28 14:42:11 PDT 2020 x86_64 x86_64 x86_64 GNU/Linux

      $ java -version
      java version "15" 2020-09-15
      Java(TM) SE Runtime Environment (build 15+36-1562)
      Java HotSpot(TM) 64-Bit Server VM (build 15+36-1562, mixed mode, sharing)

      $ sestatus
      SELinux status: enabled
      SELinuxfs mount: /sys/fs/selinux
      SELinux root directory: /etc/selinux
      Loaded policy name: targeted
      Current mode: permissive
      Mode from config file: enforcing
      Policy MLS status: enabled
      Policy deny_unknown status: allowed
      Max kernel policy version: 31

      $ getenforce
      Permissive

      $ cd ./apps/ && cat ./com/oracle/Hi.java
      /*
       * Copyright (c) 2020, 2020, Oracle and/or its affiliates. All rights reserved.
       * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
       */
      package com.oracle;
      public class Hi {
          public static void main(String[] args) throws Exception {
              System.out.println("Hi!");
              Thread.sleep(2000);
          }
      }
      $ javac ./com/oracle/Hi.java

      $ cat ./test.props
      com.oracle.usagetracker.logToFile = /home/opc/apps/out.txt
      com.oracle.usagetracker.verbose = true
      com.oracle.usagetracker.debug = true

      $ java -Dcom.oracle.usagetracker.config.file=/home/opc/apps/test.props com.oracle.Hi
      UsageTracker: running synchronous.
      UsageTrackerRunnable.run: VM start, javaCommand: com.oracle.Hi
      Hi!

      $ ls -la /home/opc/apps
      drwxr-xr-x. 3 opc opc 4096 Dec 4 11:22 .
      drwx------. 7 opc opc 4096 Dec 4 09:07 ..
      drwxr-xr-x. 3 opc opc 20 Oct 14 17:00 com
      -rw-rw-r--. 1 opc opc 136 Dec 8 17:04 test.props
      ```

      Tried different versions of java without success. But on all other our instances (with same permissions and java versions) we can see log file with JUT output and a debug message from JUT :
      ```
      [opc@ekazlou-cust-dev apps]$ java com.oracle.Hi
      UsageTracker: running synchronous.
      Hi!
      UsageTracker: done sending to file.
      ```

            ekazlou Eugene Kazlou
            ekazlou Eugene Kazlou
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: