Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

If you wish to look at the Opal server or DataSHIELD logs:

  • Login into the Opal server using the console window for the Virtual Machine

  • Change to directory"/var/log/opal" 


    Code Block
    cd /var/log/opal


  • List the contents using:

    Code Block
     ls -lt

    (the "-lt" command instructs it to list in order of most recent change

  • The directory contains four log files:

...

  •  

    • datashield.log

    • opal.log

    • rest.log

    • stdout.log

Monitoring Logging

If you wish to create a blank slate to view what logs are created as you try to recreate a problem on the opal server, you can clear out the logs using the following steps.

...

Firstly, delete anything with a hyphen in the file name:

Code Block
rm *-*

Then map blank contents into remove the existing contents of the four remaining files (effectively the same as deleting the contents of them).

Code Block

...

cat < /dev/null> datashield.log > opal.log > rest.log > stdout.log

Now that these are blank, you can give a command that will list the changes of all the commands that are output: using the * at the end.

Code Block
tail -n 0 -f *

is useful for monitoring logging, for example, "tail -n 0 -f stdlog.log"This will create output that looks like:

Code Block
==> datashield.log <==

==> opal.log <==

==> rest.log <==

==> stdout.log <==

==> rest.log <==
{"@timestamp":"2020-03-12T07:42:57.006-07:00","@version":1,"message":"/files/_meta/home/administrator/testdata/TESTING_GROUP","logger_name":"org.obiba.opal.web.security.AuditInterceptor","thread_name":"qtp872452937-133","level":"WARN","level_value":30000,"HOSTNAME":"localhost","method":"GET","created":"/datasource/776f8442-cfdc-45b8-a96d-fac6b3c63c6b","username":"Unknown","status":"401"}
{"@timestamp":"2020-03-12T07:42:57.738-07:00","@version":1,"message":"/system/name","logger_name":"org.obiba.opal.web.security.AuditInterceptor","thread_name":"qtp872452937-147","level":"INFO","level_value":20000,"HOSTNAME":"localhost","method":"GET","created":"/shell/command/1","username":"Unknown","status":"200"}
{"@timestamp":"2020-03-12T07:42:57.746-07:00","@version":1,"message":"/auth/providers","logger_name":"org.obiba.opal.web.security.AuditInterceptor","thread_name":"qtp872452937-133","level":"INFO","level_value":20000,"HOSTNAME":"localhost","method":"GET","created":"/datasource/776f8442-cfdc-45b8-a96d-fac6b3c63c6b","username":"Unknown","status":"200"}

==> stdout.log <==
2020-03-12 07:43:08,687 ERROR org.obiba.shiro.realm.ObibaRealm - Connection failure with identification server: [I/O error on POST request for "https://localhost:8444/ws/tickets": Connect to localhost:8444 [localhost/127.0.0.1, localhost/127.0.1.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused (Connection refused); nested exception is org.apache.http.conn.HttpHostConnectException: Connect to localhost:8444 [localhost/127.0.0.1, localhost/127.0.1.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused (Connection refused)]

If you are interested in only one file, say stdout.log, the command will be:

Code Block
tail -n 0 -f stdout.log

The advantage of this method is it is all in one line . The disadvantage is that the outputs can’t be scrolled through to find where the problem first started, if a large log is produced.