2 Replies Latest reply on Sep 25, 2017 12:40 PM by Ivan Klimovich

    Replicating Site error

    Ivan Klimovich

      Hello friends.


      We are migrating from Tableau Online to Tableau Server. I have Tableau's site export zip as a source for the import.

      We are also trying to split our site into 2 separate sites, so my strategy is to import 2 similar sites and delete everything that I don't need after the import. Sounds easy enough...


      Now, my first site is imported successfully. No errors, 1 to 1 mapping.

      When I try to import the same zip/verified site to another site on my Server, I can't do that.


      tabadmin error:

        *** javax.persistence.PersistenceException: org.hibernate.exception.ConstraintViolationException: could not execute statement


      tabsvc-tabadmin-java log file contains following error:


      2017-09-24 17:58:19.512 +0000 2580@WIN-O0J03JT0ADM main WARN  org.hibernate.engine.jdbc.spi.SqlExceptionHelper - SQL Error: 0, SQLState: 23505

      2017-09-24 17:58:19.512 +0000 2580@WIN-O0J03JT0ADM main ERROR org.hibernate.engine.jdbc.spi.SqlExceptionHelper - ERROR: duplicate key value violates unique constraint "remote_agents_device_id_key"

      Detail: Key (device_id)=({D245578C-4378-459A-858A-B6F1EF2B4EC1}) already exists.

      2017-09-24 17:58:19.892 +0000 2580@WIN-O0J03JT0ADM main ERROR com.tableausoftware.domain.export.SiteImporter - Exception thrown while finishing the import.

      javax.persistence.PersistenceException: org.hibernate.exception.ConstraintViolationException: could not execute statement



      Here is what I tried so far:

      • Deleting the first site I imported - after that the import goes fine again, but only for the first site;
      • I tried importing 1st site from original .zip, after that exporting site from my server and importing second .zip - still no luck



      Could anyone help me?

      There is a good chance that this happens by design, but I found a demo of exportsite, where copy is created without any trouble: Tableau Server | How to Import Export Entire Sites - YouTube  so should be

        • 1. Re: Replicating Site error
          Jeff Strauss

          Hi Ivan.  I was able to take the text "remote_agents_device_id_key" from the error you are seeing and then did a little searching through the Tableau internal Postgres database and found the following.



          There's a unique key that exists on table remote_agents.


          The description for remote_agents appears to apply only to Tableau Online.  When I looked at the data within my deployment (on-premise), the table is empty.




          One possible option is to login as an admin to the internal postgres and do a truncate of this table and then apply your site imports.  But, I'm not really sure of all the ramifications.  It would need to be tested out, or you could open a case with Tableau Support.

          • 2. Re: Replicating Site error
            Ivan Klimovich

            Thanks a lot Jeff, deleting all records worked like a charm.


            After deleting all records in remote_agents table and importing site for the second time, the table is repopulated with the same values.


            So I assume this is some rare unaccounted behaviour. Hope Tableau can address that.