Operations and Management

System Maintenance

Service Start/Stop Commands

Method 1: Users can start and stop the Sinan system through the management page. For detailed operation methods, please refer to the relevant instructions in the “Sinan Status Page”.

Method 2: Restart the image. For detailed operation methods, please refer to the content in section “2.5 Service Start and Verification”.

Database Backup and Recovery

The MySQL and MongoDB databases used by the Sinan service are configured by the user. Users can choose appropriate database backup solutions according to their own needs.

User Permission Management

For detailed operation methods, please refer to the relevant instructions in “User Management”.

System Upgrade Process

For detailed operation methods, please refer to the relevant instructions in the “Sinan Status Page”.

Troubleshooting

List of common problems and their solutions.

Problem List:

  • Task stuck in “Sent” status

    Possible cause: Disconnected from measurement and control system.

    Solution: Check network connection and restart measurement and control service.

  • Database connection failed

    Possible cause: Redis is not running.

    Solution: Execute systemctl start redis.

  • Compilation failed

    Possible cause: Syntax error.

    Solution: Check the circuit format of the submitted task.

  • Page loading slowly

    Possible cause: Cache accumulation.

    Solution: Clear browser cache or server-side cache.

Deployment FAQ

This section summarizes common problems and corresponding solutions during system deployment for quick troubleshooting and localization.

PilotOS Service Exception & Sinan License Verification Service Temporarily Unavailable

Problem Phenomenon

After completing Sinan deployment, when accessing http://<server IP>:10020=page and clicking verify, it prompts PilotOS service exception and Sinan license verification temporarily unavailable.

Possible Causes

  • IP configuration error

  • MySQL table structure not initialized or initialization error

  • MongoDB connection error

Troubleshooting Steps

According to the configuration in Config.json, check the configured MySQL connectivity and MongoDB connectivity in sequence. The following commands need to be executed on the host machine:

  1. IP Configuration Check

    Check the database IP configured in config.json. Do not configure the IP as 127.0.0.1, because the image is a separate environment. Configuring 127.0.0.1 means configuring the database to be inside the image rather than the host machine. You need to configure it as the host machine IP.

  2. Check MySQL Connectivity

    This step is divided into server-side check and client-side check to ensure MySQL service is running normally and remotely accessible.

    (1) Server-side Check

    # 1. Check MySQL service status
    sudo systemctl status mysql
    # If not started, start the service
    sudo systemctl start mysql
    
    # 2. Check MySQL listening port and address
    ss -lntp | grep 3306
    # Note: If only binding 127.0.0.1, remote access is not allowed
    
    # 3. Check configuration file
    sudo nano /etc/mysql/mysql.conf.d/mysqld.cnf
    # Verify the following:
    # bind-address = 0.0.0.0      # Supports remote access
    # skip-networking            # Should be commented or ensure not enabled
    
    # 4. Check if firewall allows 3306
    sudo ufw status
    sudo ufw allow 3306/tcp
    
    # 5. Login to MySQL to check user permissions
    mysql -u root -p
    # View users and accessible hosts
    SELECT User, Host FROM mysql.user;
    # Ensure the user requiring remote access has Host as '%' or client IP
    # View database permissions
    SHOW GRANTS FOR '<username>'@'<client IP or %>';
    

    (2) Client-side Check

    # Confirm network connectivity between client and server
    ping <MySQL server IP>
    
    # Try connecting to MySQL
    mysql -h <MySQL server IP> -P 3306 -u <username> -p
    
    # View if the database configured during initialization exists
    SHOW DATABASES;
    
    # Enter target database
    USE <your database name>;
    
    # View table status to ensure initialization success
    SHOW TABLE STATUS;
    # Terminal should display similar to "26 rows in set", otherwise initialization failed
    

    If the client does not display 26 tables above, you need to re-execute the database initialization steps.

  3. MongoDB Database Deployment and Permission Configuration (Execute the following operations on the MongoDB server)

    (1) Check MongoDB Service Status

    sudo systemctl status mongod
    sudo systemctl start mongod
    

    (2) Check or Create Pilot Database

    mongosh
    show dbs
    use Pilot
    db.init.insertOne({init: 1})
    

    (3) Create User for Accessing Pilot Database

    use Pilot
    db.createUser({
      user: "username",
      pwd: "password",
      roles: [
        { role: "readWrite", db: "Pilot" }
      ]
    })
    

    (4) Enable Authentication Mechanism

    Edit configuration file: .. code-block:: bash

    sudo nano /etc/mongod.conf

    Add content: .. code-block:: yaml

    security:

    authorization: enabled

    Restart service: .. code-block:: bash

    sudo systemctl restart mongod

    (5) Configure Remote Access Permissions

    Modify configuration file: .. code-block:: yaml

    net:

    bindIp: 0.0.0.0

    Open firewall port (ignore if firewall not enabled): .. code-block:: bash

    sudo ufw allow 27017/tcp

    (6) Remote Connection Test

    mongosh "mongodb://pilotUser:StrongPassword123!@serverIP:27017/Pilot?authSource=Pilot"
    

Verification Method

After confirming MySQL and MongoDB connectivity, you need to restart the Sinan image: Execute the following command in the pilotos-4.0 folder to restart the Sinan image service:

sudo docker compose down
sudo python3 AutoDeploy.py start

After restarting, visit http://<server IP>:10020 again to verify the license. If the above problems are still not resolved, please contact operations personnel through the official website.

License Verification Server Connection Error, Please Check Network

Problem Phenomenon

When clicking to verify the license, it prompts Cannot connect to the license verification server.

Problem Cause

Accessing the Sinan license verification server requires the local machine to be connected to the public network. This problem is a local network issue. Please check if the local network is normal.

Verification Method

After confirming the local machine can connect to the network, execute the following command in the image to verify that the local machine can access the Sinan license verification server. First execute the first step to enter the Sinan image, then use the curl tool to test connectivity.

sudo docker exec -it pilotos-server bash
curl -v -k -X POST https://qcloud.originqc.com.cn/api/license/authLicense.json -H "Content-Type: application/json" -d '{"test":1}

If the connection is normal, the server will return the following information:

{"success":false,"code":60001,"message":"License is invalid, please enter correct License","obj":null}