Symptoms

  1. When a user navigates to the 'Mail' tab in the Customer Control Panel the following error message is dispalyed:

    Fatal error An unforeseen error occurred.
    
  2. In the poa.debug.log on the POA Management Node the following error message is logged when a user goes to the 'Mail' tab in CCP:

    ERROR:  more than one row returned by a subquery used as an expression
    

The problem affects POA for Linux installations.

Cause

  1. The 'DUAL' table in POA database has 2 or more rows (records) instead of 1.
  2. The 'DUAL' table is the PostgreSQL system table which should only have 1 row.
  3. More than 1 row in the 'DUAL' table makes subquery in the SQL query POA executes to return more than 1 row which POA treats as error.

Resolution

Remove the extra row(s) in the 'DUAL' table using the steps below.

  1. Log into POA database server as root.

  2. Log in as the 'postgres' user:

    # su - postgres
    
  3. Connect to the POA database 'plesk' using the 'psql' utility:

    $ psql plesk
    
  4. Find out the number of records in the 'DUAL' table:

    plesk=# SELECT * FROM dual;
     dummy
    -------
     X
     X
    (2 rows)
    
  5. If you see more than one record in the output of the SQL query above then delete all rows in the 'DUAL' table and insert only one row after that:

    plesk=# BEGIN;
    BEGIN
    plesk=# DELETE FROM dual WHERE dummy = 'X';
    DELETE 2
    plesk=# INSERT INTO dual VALUES ('X');
    INSERT 6429875 1
    plesk=# COMMIT; -- Commit changes only if you are sure that the correct records were deleted and inserted
    COMMIT
    
  6. Make sure that only one row is present in the 'DUAL' table now:

    plesk=# select * from dual;
     dummy
    -------
     X
    (1 row)
    

Internal content

Link on internal Article