Troubleshoot OC Admin
This section details some resolutions to common issues that may arise during use of OC Admin.
Logs
The OC Admin Server logs a sizable amount of information.
Location
All logs are accessible via the following Docker command:
docker logs --follow oc-admin
The logs are divided in several categories:
Categories | Comments | Examples |
---|---|---|
Login | Authentication-related logs. | 2021-12-10T23:09:13.521Z | INFORMATION | Login | Credentials for User are valid | user: ocAdmin |
Admin | Administrative task-related logs, such as RBAC admin. | 2021-12-13T23:12:22.256Z | INFORMATION | Admin | User Account created | Login: TonyMasse | Role UID: cb36e823-e68f-46aa-acbd-71c35cae43b5 | user: ocAdmin |
SOCKET | Web Socket-related logs. | 2021-12-11T06:30:46.819Z | INFORMATION | SOCKET | X8nxt_wxyz_cbylTAQHS | ocUser | CONNECTION - Connection requested. |
HTTP Request | Web server's access logs. Typically only available if LOGLEVEL is set to Verbose. | 2021-12-11T06:30:44.893Z | VERBOSE | HTTP Request | client_ip: 65.138.xx.xxx | client_port: 3030 | username: ocUser | roles: User | method: GET | path: /API/v1/config/GetPipelines |
HTTP Error | Web server's error logs. | 2021-12-13T17:25:15.536Z | ERROR | HTTP Error | client_ip: 65.138.xx.xxx | client_port: 56486 | username: - | roles: - | method: GET | path: /robot.txt | error code: HTTP Return Code: 404 |
Others | A grouping of less common logs. For example: service start/stop, greeting message at start up, etc. | 2021-12-13T22:39:33.759Z | INFORMATION | Listening for HTTPS requests on: https://0.0.0.0:xxx |
Changing the Log Level
This operation requires modifying an important OC Admin configuration file.
Please follow the instructions carefully, as an error could prevent OC Admin from functioning correctly.
To check or change the Log Level, perform the following steps:
Open a new Shell inside the OC Admin container (oc-admin).
CODEdocker exec -it oc-admin sh
Double check the current directory is
/app
.CODEpwd
Open the
.env
file into a Text editor.CODEvi .env
- Change the value of the
LOGLEVEL
variable to either:Critical
Error
Warning
Information
(default value)Verbose
(necessary to see theHTTP Request
logs)Debug
(not recommended)
Save the file by running the following from within
vi:
CODE: x
Do not include the space.
Exit the running container:
CODEexit
Restart the OC Admin Server container:
CODE./lrctl oc-admin restart
Configuration Files
Location
- Inside the OC Admin container (oc-admin), the files are all located under
/app
. - View the .env and .env.sample files from this directory.
- View the config/ directory for the current configuration.
Open the config.sample/ directory to see examples of configuration files
This directory contains a file set containing illustrative values.
Files
File Names | Location | Descriptions |
---|---|---|
.env | ./ | Stores low level configuration: Host binding IP, listening Port, Log level, etc. Use caution in this directory, as errors can cause OC Admin to stop functioning. |
.env.sample | ./ | Same as above, but with only illustrative values and comments |
https.cert.pem | ./config/ & ./config.sample/ | Provided as part of the Self-Signed HTTPS certificate. |
https.key.pem | ./config/ & ./config.sample/ | Provided as part of the Self-Signed HTTPS certificate. |
https.keytmp.pem | ./config/ & ./config.sample/ | Provided as part of the Self-Signed HTTPS certificate. |
https.HOW TO - README.txt | ./config/ & ./config.sample/ | Explanation on how to create your own Self-Signed HTTPS certificate. |
secure.json | ./config/ & ./config.sample/ | Stores the AES key used to encrypt secrets provided by the user via the UI. |
ez-market-place.json | ./config/ & ./config.sample/ | Stores the unique deployment ID, the base URL for the Marketplace API, and the Public Key of the Marketplace. |
HTTPS Certificate
By default, the certificate provided is a temporary Self-Signed certificate.
This default certificate could prevent some of the API calls from working if the window is left open for too long, as the "bypass the bad certificate" action from the user can timeout. The user will not see it, but the next API call will fail.
In this case, the solution is to either:
- Without losing unsaved changes:
- Open a second tab to the same URL.
- Bypass the "bad certificate" warning.
- Try to hit the API again (by clicking Save, or repeating the previous failed action).
- Losing all unsaved changes:
- Log out.
- Click refresh.
- Log back in.
Simply refreshing the page may not ask for a login, but it will break the socket connection. Logging out and then logging back in after a refresh ensures that the socket connection is properly established.
Shipper Logs (Tail/Field Mapping Editor)
These logs can reveal why the Tail is not providing logs to the Field Mapping Editor.
The shipper logs can be accessed from the main OC Admin page by performing the following steps:
- From the menu, open the Advanced drop-list.
- Toggle the Show Communication & Shipper's Logs to active.
- Scroll to the bottom of the page (past the last field of the Editor, if active).
Some errors may not be in red. The shipper's logs can be verbose and difficult to navigate.