Installation step3 - duplicate key « ast_lnk_tree_pk »


(Sylvie Fiat) #1

Hi,


I am new to Matrix CMS and this seems to be the solution I have been looking for.

I tried the VM version for an alpha test and now I am trying to deploy it on my test server (I cannot use VM) but I am getting fatal error at step 3.

I have been installing again - drop database remove folder restart install - a number of time - I got quite a few errors due to dependences and other stuff - and yesterday I ran into this one at step 3:


    
    
    Fatal error: Uncaught exception 'Exception' with message 'Unable to add new tree entry for link #4, between "Root Folder" (#1) and "Web Folder Designs #4" (#4), due to database error: SQLSTATE[23505]: Unique violation: 7 ERREUR:  la valeur d'une clé dupliquée rompt la contrainte unique « ast_lnk_tree_pk » (means duplicate key constraint error)
    DETAIL:  key « (treeid)=(\x783264783330333033303330) » already exist.' in /home/websites/squiz_matrix/core/include/asset_manager.inc:4990
    Stack trace:
    #0 /home/websites/squiz_matrix/core/include/asset.inc(2765): Asset_Manager->createAssetLink(Object(Root_Folder), Object(Web_Folder_Designs), 1, '', -1, 0, 1, false)
    #1 /home/websites/squiz_matrix/core/include/asset.inc(398): Asset->createLink(Object(Web_Folder_Designs), 1, '', -1, 0, 1)
    #2 /home/websites/squiz_matrix/core/assets/system/web_folders/web_folder/web_folder.inc(65): Asset->create(Array)
    #3 /home/websites/squiz_matrix/core/assets/package_manager_core.inc(588): Web_Folder->create(Array)
    #4 /home/websites/squiz_matrix/core/include/package_manager.inc(856 in /home/websites/squiz_matrix/core/include/asset_manager.inc on line 4990
    


I tried reinstall a couple of time (after checking forum and errors reports) then I thought about some postgres issue as I am doing a lot of installations on this machine so I started a new server from Centos iso image and restarted installation from java and httpd... But today after all this installation I still have the same error, do you have any idea about what this problem can be ?

Thanks in advance, I am really interested in MatrixCMS,
Sylvie

(Dan Simmons) #2

Did you drop the database, delete the data directory and start again after getting previous errors?


If step_03 fails during installation then it's almost impossible to recover. You generally have to drop the database, delete all the files and begin the installation again.


(Sylvie Fiat) #3

Yes I dropped the database and removed the folder and started from scratch each time, still getting the same error of duplicate key, I will try again today.


(Chris Smith) #4

[quote]
Hi,



I am new to Matrix CMS and this seems to be the solution I have been looking for.

I tried the VM version for an alpha test and now I am trying to deploy it on my test server (I cannot use VM) but I am getting fatal error at step 3.

I have been installing again - drop database remove folder restart install - a number of time - I got quite a few errors due to dependences and other stuff - and yesterday I ran into this one at step 3:


    
    
    Fatal error: Uncaught exception 'Exception' with message 'Unable to add new tree entry for link #4, between "Root Folder" (#1) and "Web Folder Designs #4" (#4), due to database error: SQLSTATE[23505]: Unique violation: 7 ERREUR:  la valeur d'une clé dupliquée rompt la contrainte unique « ast_lnk_tree_pk » (means duplicate key constraint error)
    DETAIL:  key « (treeid)=(\x783264783330333033303330) » already exist.' in /home/websites/squiz_matrix/core/include/asset_manager.inc:4990
    Stack trace:
    #0 /home/websites/squiz_matrix/core/include/asset.inc(2765): Asset_Manager->createAssetLink(Object(Root_Folder), Object(Web_Folder_Designs), 1, '', -1, 0, 1, false)
    #1 /home/websites/squiz_matrix/core/include/asset.inc(398): Asset->createLink(Object(Web_Folder_Designs), 1, '', -1, 0, 1)
    #2 /home/websites/squiz_matrix/core/assets/system/web_folders/web_folder/web_folder.inc(65): Asset->create(Array)
    #3 /home/websites/squiz_matrix/core/assets/package_manager_core.inc(588): Web_Folder->create(Array)
    #4 /home/websites/squiz_matrix/core/include/package_manager.inc(856 in /home/websites/squiz_matrix/core/include/asset_manager.inc on line 4990
    


I tried reinstall a couple of time (after checking forum and errors reports) then I thought about some postgres issue as I am doing a lot of installations on this machine so I started a new server from Centos iso image and restarted installation from java and httpd... But today after all this installation I still have the same error, do you have any idea about what this problem can be ?

Thanks in advance, I am really interested in MatrixCMS,
Sylvie
[/quote]

What version of postgresql is this? I have a suspicion it's version 9+, in which case you'll need to change the bytea_output type to 'escape'. The easiest way to do this is:
    
    alter database $matrixdb SET bytea_output TO 'escape';


and change the $matrixdb to the real database name ;)

Then try the install again. If you recreate the database, do this before doing any of the matrix install steps.

(Sylvie Fiat) #5

[quote]
What version of postgresql is this? I have a suspicion it's version 9+, in which case you'll need to change the bytea_output type to 'escape'. The easiest way to do this is:

    
    alter database $matrixdb SET bytea_output TO 'escape';


and change the $matrixdb to the real database name ;)

Then try the install again. If you recreate the database, do this before doing any of the matrix install steps.
[/quote]

That was it, thank you so much !