Dismiss Notice
We would like to remind you that we’re updating our login process for all 3CX forums whereby you will be able to login with the same credentials you use for the Partner or Customer Portal. Click here to read more.

Upgrade to 15.5 SP2 Fails

Discussion in '3CX Phone System - General' started by leviticus, Feb 20, 2018.

Thread Status:
Not open for further replies.
  1. leviticus

    Joined:
    Nov 12, 2011
    Messages:
    13
    Likes Received:
    3
    I am trying to update our 15.5 instance and the updater2.log ends in the following:

    Code:
    2018/02/02 22:03:18.780|0011| ERROR: ExecuteScript returns FAIL: Npgsql.PostgresException (0x80004005): 23505: duplicate key value violates unique constraint "parameter_name_key"
       at Npgsql.NpgsqlConnector.DoReadMessage(DataRowLoadingMode dataRowLoadingMode, Boolean isPrependedMessage)
       at Npgsql.NpgsqlConnector.ReadMessageWithPrepended(DataRowLoadingMode dataRowLoadingMode)
       at Npgsql.NpgsqlDataReader.NextResultInternal()
       at Npgsql.NpgsqlDataReader.NextResult()
       at Npgsql.NpgsqlCommand.Execute(CommandBehavior behavior)
       at Npgsql.NpgsqlCommand.ExecuteScalarInternal()
       at Updater2Db.UpdateInfoExtractor.ExecuteScript(String sqlQuery, String transactionName)
    2018/02/02 22:03:18.780|0001| Overall result of update is fail. Failed task(s):
    2018/02/02 22:03:18.780|0001| Update DB Instance1 task
    2018/02/02 22:03:18.780|0001| Starting to rollback...
    
    Reboot of server it's hosted on makes no changes (didn't think it would).

    Thought about running a backup and reinstalling, but I suspect that'll be an evening at the keyboard if I'm not careful.

    Anyone have any thoughts, ideas, or experiences?
     
  2. leviticus

    Joined:
    Nov 12, 2011
    Messages:
    13
    Likes Received:
    3
    I've been looking through the logs of the updater and from what I can tell, the SQL update script adds the following values (insert into parameter):
    Code:
    SEC_IGNORE_USER_AGENT_CUSTOM (no previous delete) (exists in my parameters table)
    HOTDESKING_DIALCODE (No previous delete) (exists in my parameters table)
    MAILTEMPLATE_WMICS_PARAMETERS (no previous delete) (does not exist in my parameters table)
    MAILTEMPLATE_CONFERENCE_DEFAULT (with a previous delete) (exists in my parameters table)
    MAILTEMPLATE_WMICS_DEFAULT (With a previous delete) (does not exist in my parameters table)
    INSTALLING (With a previous delete) (does not exist in my parameters table)
    
    So, logically the SEC_IGNORE_USER_AGENT_CUSTOM or HOTDESKING_DIALCODE has to be colliding to result in the duplicate key error.

    Would be interesting if this required getting into the DB to clear out anything. The only thing that I can think of is that I recently had to reinstall the PBX due to a public IP change (ugh... don't get me started.) Not sure what could have gone wrong with that if it impacted this. I did a standard backup/uninstall/reinstall/restore...
     
  3. leviticus

    Joined:
    Nov 12, 2011
    Messages:
    13
    Likes Received:
    3
    Well, the only thing I can think of is that I either had an update partially process, leaving these values in the DB. The update script on SP2 just assumes they will be there and doesn't handle the error very well. Thank god the updater2.log had the script in it so I could actually go get the details.

    I copied the phone system database to a test postgresql instance and verified that if I ran
    Code:
    delete from parameter where name='SEC_IGNORE_USER_AGENT_CUSTOM';
    delete from parameter where name='HOTDESKING_DIALCODE';
    
    that I could then process the full script successfully.

    I went for broke, snapshotted the VM on which our PBX lives and then did the same on the production DB. Update then ran fine.

    Glad I read some of the posts about SP3 on here... not going to update to it just yet.

    Now if the default Snom template would set CW_Dialtone to 'no'... I wouldn't need to customize templates!
     
Thread Status:
Not open for further replies.