Failed to Log in to OpenResty Edge Admin

This document will help you resolve common issues encountered when logging in to OpenResty Edge Admin.

Error Message: “Incorrect login credentials”

Physical Machine or Virtual Machine Environment

Method 1: Obtain Credentials Using the Installation Script

If you installed OpenResty Edge Admin Database using openresty-edge-installer.sh from openresty-edge-VERSION.tar.gz, follow these steps:

  1. Run the installation script again:

    bash openresty-edge-installer.sh
    
  2. Select the following options when prompted:

    • Choose action: 6) get
    • Select component: 1) default-info
  3. The script will display login information, including username and password.

Method 2: Locate the Initialization Script

If Method 1 fails, try the following commands:

find ./ -name 'init-admin-db.sh' | xargs -n1 grep -rs 'password :'

Use the password found and the username admin to log in.

Kubernetes Environment

For environments set up in Kubernetes using the openresty-edge-VERSION.yml file, execute:

grep -A 1 'EDGE_ADMIN_INIT_PASSWORD' openresty-edge-VERSION.yml | tail -n 1 | awk -F "'" '{print $2}'

Use the output password and the username admin to log in.

Reset Password

If the above methods fail, you can reset the password in the database:

  1. Log in to OpenResty Edge Admin Database:

    /usr/local/openresty-postgresql12/bin/psql -U postgres -d or_edge_admin
    

    Note: For openresty-postgresql15 or other database versions, use the appropriate path.

  2. Execute the following SQL command to reset the password:

    UPDATE users SET
    password = '8000$08$01$3a2c8ff2a9e24b1d$342b6a5a3472282be25c3cb1a6bb1db8a4ca8acf5644321e92ab6fb46d884ef9',
    requires_password_change = TRUE
    WHERE username = 'admin';
    
  3. The password will be reset to openresty@admin.

Error Message: “no pg_hba.conf entry for host “x.x.x.x”, user “or_edge_admin””

This error indicates that OpenResty Edge Admin lacks permission to access the database. Follow these steps to resolve:

Note: Adjust commands according to your OpenResty PostgreSQL version.

  1. Edit the pg_hba.conf file:

    vim /var/postgres12/data/pg_hba.conf
    
  2. Add the following content (replace x.x.x.x/x with the actual IP address):

    host    or_edge_admin    or_edge_admin    x.x.x.x/x    md5
    
  3. Restart the database service:

    sudo systemctl restart openresty-postgresql12
    

Need Further Assistance?

If you still encounter issues, please contact our support team:

Our technical support team will be happy to assist you.