Common ERROR

1. Using MySQL database, 500 Internal Server Error occurs

Error messages similar to the following:

  • populate() isn't reentrant

  • MySQLdb._exceptions.OperationalError: (2059, NULL)

Solution:

Since Django currently does not support the cache_sha2_password encryption method of mysql8.0, it needs to be modified to the mysql_native_password encryption method.

Open the mysql command window and enter the command

ALTER USER '<account>'@'localhost' IDENTIFIED BY '<account>' PASSWORD EXPIRE NEVER;

Update password

ALTER USER '<account>'@'localhost' IDENTIFIED WITH mysql_native_password BY '<password>';

Restart the service after modification

2. When using SQL Server database, error.log appears during the installation or update process.

Looking at error.log, the following similar error message appears:

*SQL Server v16 is not supported.

  • raise FullResultSet

Solution:

Since django4.2 and SQL Server 2022, the original mssql related package is no longer supported. Please follow the steps below:

Download Kit

Please go to the Python folder to install the required packages:

For the Windows version, the path is C:\Program Files\OMFLOW Server\Python

python.exe -m pip install mssql-django -t Lib\site-packages

The Linux version enters the virtual Python environment

pip install mssql-django

Modify settings.py

The Windows version path is C:\Program Files\OMFLOW Server\omflow\omflow\settings.py

The Linux version path is /opt/omflow/server/omflow/settings.py

#Change the ENGINE parameter value to mssql
DATABASES = {"default": {"ENGINE": "sql_server.pyodbc","NAME":...The following will be omitted
#Change to
DATABASES = {"default": {"ENGINE": "mssql","NAME":......The following will be omitted

Re-execute the update file

3. Use Domain or external IP connection to return CSRF (403) error - 1.2.1 New

Solution:

After Django 4.2 version, using Domain for connection requires additional setting of CSRF_TRUSTED_ORIGINS parameter.

Modify settings.py

The Windows version path is C:\Program Files\OMFLOW Server\omflow\omflow\settings.py

The Linux version path is /opt/omflow/server/omflow/settings.py

DEBUG = False

#Add the following settings and replace the URL with the Domain used
CSRF_TRUSTED_ORIGINS = [
        'https://*.example1.com',
        'https://*.example2.com',
        ...
    ]

Re-execute the update file

Last updated