Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Pkg - need to re-create database -> Segmentation fault

    Scheduled Pinned Locked Moved Problems Installing or Upgrading pfSense Software
    29 Posts 6 Posters 15.5k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • rbgargaR Offline
      rbgarga Developer Netgate Administrator
      last edited by

      @dvl:

      @Renato:

      Just to make sure you are using the proper keys. What is the content of /usr/local/share/pfSense/keys/pkg/trusted/pkg.pfsense.org.20160406 ?

      [2.3.2-RELEASE][admin@bast.int.unixathome.org]/root: cat /usr/local/share/pfSense/keys/pkg/trusted/pkg.pfsense.org.20160406
      function: sha256
      fingerprint: 30be9cc2e7b2b3ba1ff3b2be1795f3f0719ab9a65322695703dc7b8f004035a8
      
      

      Interesting, you have CE keys but your system is configured to use factory repositories. I just don't know how this key ended up there. Did you make any custom change on this system? Is it expected to be a factory system or CE?

      Renato Botelho

      1 Reply Last reply Reply Quote 0
      • D Offline
        dvl
        last edited by

        @Renato:

        @dvl:

        @Renato:

        Just to make sure you are using the proper keys. What is the content of /usr/local/share/pfSense/keys/pkg/trusted/pkg.pfsense.org.20160406 ?

        [2.3.2-RELEASE][admin@bast.int.unixathome.org]/root: cat /usr/local/share/pfSense/keys/pkg/trusted/pkg.pfsense.org.20160406
        function: sha256
        fingerprint: 30be9cc2e7b2b3ba1ff3b2be1795f3f0719ab9a65322695703dc7b8f004035a8
        
        

        Interesting, you have CE keys but your system is configured to use factory repositories. I just don't know how this key ended up there. Did you make any custom change on this system? Is it expected to be a factory system or CE?

        CE is community edition, I'm guessing.

        pfSense was installed when I got this box (Netgate APU2).

        Does that answer?

        1 Reply Last reply Reply Quote 0
        • rbgargaR Offline
          rbgarga Developer Netgate Administrator
          last edited by

          @dvl:

          @Renato:

          @dvl:

          @Renato:

          Just to make sure you are using the proper keys. What is the content of /usr/local/share/pfSense/keys/pkg/trusted/pkg.pfsense.org.20160406 ?

          [2.3.2-RELEASE][admin@bast.int.unixathome.org]/root: cat /usr/local/share/pfSense/keys/pkg/trusted/pkg.pfsense.org.20160406
          function: sha256
          fingerprint: 30be9cc2e7b2b3ba1ff3b2be1795f3f0719ab9a65322695703dc7b8f004035a8
          
          

          Interesting, you have CE keys but your system is configured to use factory repositories. I just don't know how this key ended up there. Did you make any custom change on this system? Is it expected to be a factory system or CE?

          CE is community edition, I'm guessing.

          pfSense was installed when I got this box (Netgate APU2).

          Does that answer?

          Yes, CE is community edition.

          If you are using Netgate hardware you are supposed to be running factory. Now the question is how the CE key ended up on your system. Did you install any package manually? changed anything while testing?

          I'll send you factory public key.

          Renato Botelho

          1 Reply Last reply Reply Quote 0
          • D Offline
            dvl
            last edited by

            @Renato:

            @dvl:

            @Renato:

            @dvl:

            @Renato:

            Just to make sure you are using the proper keys. What is the content of /usr/local/share/pfSense/keys/pkg/trusted/pkg.pfsense.org.20160406 ?

            [2.3.2-RELEASE][admin@bast.int.unixathome.org]/root: cat /usr/local/share/pfSense/keys/pkg/trusted/pkg.pfsense.org.20160406
            function: sha256
            fingerprint: 30be9cc2e7b2b3ba1ff3b2be1795f3f0719ab9a65322695703dc7b8f004035a8
            
            

            Interesting, you have CE keys but your system is configured to use factory repositories. I just don't know how this key ended up there. Did you make any custom change on this system? Is it expected to be a factory system or CE?

            CE is community edition, I'm guessing.

            pfSense was installed when I got this box (Netgate APU2).

            Does that answer?

            Yes, CE is community edition.

            If you are using Netgate hardware you are supposed to be running factory. Now the question is how the CE key ended up on your system. Did you install any package manually? changed anything while testing?

            I'll send you factory public key.

            Yes, I know I installed at least one package (bacula-client) from my own repo. I know that was September 2016 because it was during EuroBSDCon.

            Later, I recall some pkg update which drew down from my repo.  That messed stuff up, so I went to a backup to restore service.

            1 Reply Last reply Reply Quote 0
            • D Offline
              dvl
              last edited by

              After replacing my CE key with the factory key:

              [2.3.2-RELEASE][admin@bast.int.unixathome.org]/root: pkg update -f
              Updating pfSense-core repository catalogue...
              pkg: Repository pfSense-core load error: access repo file(/var/db/pkg/repo-pfSense-core.sqlite) failed: No such file or directory
              meta.txz                                 : 100%  944 B     0.9kB/s    00:01    
              packagesite.txz                          : 100%    2 KiB   2.3kB/s    00:01    
              Processing entries: 100%
              pfSense-core repository update completed. 15 packages processed.
              Updating pfSense repository catalogue...
              pkg: Repository pfSense load error: access repo file(/var/db/pkg/repo-pfSense.sqlite) failed: No such file or directory
              meta.txz                                 : 100%  944 B     0.9kB/s    00:01    
              packagesite.txz                          : 100%  119 KiB 121.8kB/s    00:01    
              Processing entries: 100%
              pfSense repository update completed. 439 packages processed.
              All repositories are up to date.
              [2.3.2-RELEASE][admin@bast.int.unixathome.org]/root: 
              
              
              1 Reply Last reply Reply Quote 0
              • D Offline
                dvl
                last edited by

                On a side note, since correcting the key, this feature on the pfSense home page now works.  It has been broken for some time.  I think we know why.

                Version 2.3.3_1 is available.

                1 Reply Last reply Reply Quote 0
                • D Offline
                  dvl
                  last edited by

                  Upgraded: 2.3.4-RELEASE-p1 (amd64)

                  1 Reply Last reply Reply Quote 0
                  • D Offline
                    dvl
                    last edited by

                    All green on Nagios.  Thank you for your help.  I appreciate it.

                    1 Reply Last reply Reply Quote 0
                    • G Offline
                      graysam
                      last edited by

                      I cannot thank you enough Renato. I've been tearing my hair out for a few months with this issue before stumbling upon your suggestion here. Sure enough, /usr/local/share/pfSense/keys/pkg/revoked/.empty was there - and the moment it was removed, presto! All I wanted to do was install man :'(.

                      This will be pinned prominently in my notebook! (Though all other systems I manage have been upgraded past 2.3.3!)

                      Cheers,

                      Sam.

                      @Renato:

                      It's exactly what I suspected. There is a bug in pkg that causes this crash. You can see details here:

                      https://github.com/freebsd/pkg/pull/1586

                      We already fixed it in pfSense before submit the patch to upstream, and based on truss output we can see:

                      The presence of the empty file /usr/local/share/pfSense/keys/pkg/revoked/.empty is the cause. I suspect there is a /usr/local/share/pfSense/keys/pkg/trusted/.empty file too. Just remove them and it will work as expected. As soon as you update pkg to latest version bug will be fixed.

                      1 Reply Last reply Reply Quote 0
                      • First post
                        Last post
                      Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.