• V20: 3CX Re-engineered. Get V20 for increased security, better call management, a new admin console and Windows softphone. Learn More.

Upgrade to 15.5 SP2 Fails

Status
Not open for further replies.

leviticus

Gold Partner
Intermediate Cert.
Joined
Nov 12, 2011
Messages
12
Reaction score
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?
 
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...
 
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!
 
Status
Not open for further replies.
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.