# After update to 1.8.1.801 Error trying to view Repositories in server configuartion

**URL:** https://www.finalbuilder.com/forums/t/after-update-to-1-8-1-801-error-trying-to-view-repositories-in-server-configuartion/6108
**Category:** Bugs
**Created:** [March 23, 2018, 10:11am UTC](https://www.finalbuilder.com/forums/t/after-update-to-1-8-1-801-error-trying-to-view-repositories-in-server-configuartion/6108 "2018-03-23T10:11:07Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![bkwalker](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/b/c0e974/32.png) [@bkwalker](https://www.finalbuilder.com/forums/u/bkwalker)
#### Post date: [March 23, 2018, 10:11am UTC](https://www.finalbuilder.com/forums/t/after-update-to-1-8-1-801-error-trying-to-view-repositories-in-server-configuartion/6108/1 "2018-03-23T10:11:07Z")

</div>

When trying to access Administration/Repositories  
  
"An unexpected error occurred: More than one row with the given identifier was found: 32, for class: Continua.Modules.Builds.Repositories.RepositoryData"  
  
And 'No repositories were found.'  
  
I’ve got snapshots so I can revert to the previous version easily, wondering if there’s something I can do to fix this easily?

---

<div class="post-metadata">

### Author: ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)
#### Post date: [March 24, 2018, 12:51pm UTC](https://www.finalbuilder.com/forums/t/after-update-to-1-8-1-801-error-trying-to-view-repositories-in-server-configuartion/6108/2 "2018-03-24T12:51:28Z")

</div>

Hi Brenden   
  
 This is a very strange error, since that table is part of a 1 to 1 mapping (looking like a bug in nhibernate) and there is a unique constraint on the id field.   
  
 Stop the Continua CI server service, then have a look at the builds\_repositorydata table in the database for rows with the id 32.   
  
 If you are using the bundled postgresql, you can use c:\Program Files\VSoft Technologies\ContinuaCI\Server\PostgreSQL\bin\pgAdmin3.exe - the db will be localhost, port 9001, username and pwd you can find in :   
  
 c:\Program Files\VSoft Technologies\ContinuaCI\Server\Continua.Server.Service.exe.config   
  
 If there are duplicate rows, then delete the one with the oldest lastchecked time.   
  
 While you are there, check for other duplicate rows.

---

<div class="post-metadata">

### Author: ![bkwalker](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/b/c0e974/32.png) [@bkwalker](https://www.finalbuilder.com/forums/u/bkwalker)
#### Post date: [March 26, 2018, 12:53pm UTC](https://www.finalbuilder.com/forums/t/after-update-to-1-8-1-801-error-trying-to-view-repositories-in-server-configuartion/6108/3 "2018-03-26T12:53:41Z")

</div>

Thanks. I had to revert the snapshot for now.   
  
 We’re using the bundled Postgresql, the installation appeared to backup and restore the DB (at least it said it was ;-). I should be able to take another run at this over the upcoming weekend.

---

<div class="post-metadata">

### Author: ![bkwalker](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/b/c0e974/32.png) [@bkwalker](https://www.finalbuilder.com/forums/u/bkwalker)
#### Post date: [March 26, 2018, 9:27am UTC](https://www.finalbuilder.com/forums/t/after-update-to-1-8-1-801-error-trying-to-view-repositories-in-server-configuartion/6108/4 "2018-03-26T09:27:39Z")

</div>

Just had a moment to check, ran:   
  
 select id, count(id) from builds\_repositorydata   
 group by id   
 having count(id) \> 1   
 order by id   
  
 Returned 2 rows, ID 32 and 20. I’ll delete the oldest prior to next attempt.

---

<div class="post-metadata">

### Author: ![Sparky](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/sparky/32/10_2.png) [@Sparky](https://www.finalbuilder.com/forums/u/Sparky)
#### Post date: [March 27, 2018, 12:10pm UTC](https://www.finalbuilder.com/forums/t/after-update-to-1-8-1-801-error-trying-to-view-repositories-in-server-configuartion/6108/5 "2018-03-27T12:10:48Z")

</div>

Hi Brenden,  
  
You may need to use the ctid to delete rows with duplicate primary keys. Run the following query to get the ctid values:  
  
SELECT ctid, \* FROM builds\_repositorydata&nbsp;&nbsp;  
WHERE id = 20 or id = 32  
  
Then use the ctid to delete a specific row:  
  
DELETE FROM builds\_repositorydata&nbsp;&nbsp;  
WHERE ctid = '(0,1)'  
  
Can you also check that there is indeed a primary key on the builds\_repositorydata table under constraints? It should be called pk\_builds\_repositorydata. If not, you can recreate it after deleting the duplicates using the following SQL query:  
  
ALTER TABLE public.builds\_repositorydata  
&nbsp; ADD CONSTRAINT pk\_builds\_repositorydata PRIMARY KEY(id);  
&nbsp;&nbsp;  
&nbsp;We recommend that you reindex the table after removing the duplicates by running:   
  
REINDEX TABLE builds\_repositorydata

---

<div class="post-metadata">

### Author: ![mrekdal](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/mrekdal/32/98_2.png) [@mrekdal](https://www.finalbuilder.com/forums/u/mrekdal)
#### Post date: [March 31, 2018, 11:04am UTC](https://www.finalbuilder.com/forums/t/after-update-to-1-8-1-801-error-trying-to-view-repositories-in-server-configuartion/6108/6 "2018-03-31T11:04:19Z")

</div>

I had the same problem, and discovered that there was no primary key on this table:   
  
 public.builds\_repositorydata   
  
 Removing the oldest of the duplicates and creating a primary key solved the problem.

---

<div class="post-metadata">

### Author: ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)
#### Post date: [April 1, 2018, 12:29pm UTC](https://www.finalbuilder.com/forums/t/after-update-to-1-8-1-801-error-trying-to-view-repositories-in-server-configuartion/6108/7 "2018-04-01T12:29:33Z")

</div>

That’s very odd, I went though our db migration code and that pk was there from day one, it’s also there on all our installs here, and on a fresh install I just did. We’ll see if we can add a check for it and add it if it’s missing.

---

<div class="post-metadata">

### Author: ![bkwalker](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/b/c0e974/32.png) [@bkwalker](https://www.finalbuilder.com/forums/u/bkwalker)
#### Post date: [April 2, 2018, 12:59pm UTC](https://www.finalbuilder.com/forums/t/after-update-to-1-8-1-801-error-trying-to-view-repositories-in-server-configuartion/6108/8 "2018-04-02T12:59:44Z")

</div>

The PK constraint is there.   
  
 I added a temporary unique index on ID + lastchecked so I could easily delete the duplicates, then dropped the temporary index I had created.   
  
 We’re upgraded to 1.8.1.801 and operating properly at this time.
