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

    Problems with captiveportal after upgrading to 2.2

    Scheduled Pinned Locked Moved Problems Installing or Upgrading pfSense Software
    46 Posts 6 Posters 12.6k 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.
    • M
      markusxyz
      last edited by

      I've upgraded to 2.2 from 2.15 and I've a lot of problems. Captive portal seems not working properly. I get an error:
      "Zone: cpzone - Error during table cpzone creation. Error message: file is encrypted or is not a database"
      so nobody can authenticate in cp.

      1 Reply Last reply Reply Quote 0
      • marcellocM
        marcelloc
        last edited by

        Try to rename current captive portal database and see if it get's working again.

        file is under /var/db/captiveportal….db

        Treinamentos de Elite: http://sys-squad.com

        Help a community developer! ;D

        1 Reply Last reply Reply Quote 0
        • M
          markusxyz
          last edited by

          @marcelloc:

          Try to rename current captive portal database and see if it get's working again.

          file is under /var/db/captiveportal….db

          ok…but if I rename the db how can the pfsense know which is the db?

          1 Reply Last reply Reply Quote 0
          • M
            markusxyz
            last edited by

            @marcelloc:

            Try to rename current captive portal database and see if it get's working again.

            file is under /var/db/captiveportal….db

            I've tried, I've called it captiveportalNEW.db but it seems not working yet.

            1 Reply Last reply Reply Quote 0
            • marcellocM
              marcelloc
              last edited by

              @markusxyz:

              @marcelloc:

              Try to rename current captive portal database and see if it get's working again.

              file is under /var/db/captiveportal….db

              ok…but if I rename the db how can the pfsense know which is the db?

              The active users database is created automatically on captive user login process. 2.1 uses sqlite2 and 2.2 uses sqlite3. As pfsense does not comes with sqlite 2.2, database can't be migrated but can be recreated.

              Can you see if there are only this captive database on your dir? Did ou tried to reinstall the service after renaming it?

              Treinamentos de Elite: http://sys-squad.com

              Help a community developer! ;D

              1 Reply Last reply Reply Quote 0
              • M
                markusxyz
                last edited by

                @marcelloc:

                @markusxyz:

                @marcelloc:

                Try to rename current captive portal database and see if it get's working again.

                file is under /var/db/captiveportal….db

                ok…but if I rename the db how can the pfsense know which is the db?

                The active users database is created automatically on captive user login process. 2.1 uses sqlite2 and 2.2 uses sqlite3. As pfsense does not comes with sqlite 2.2, database can't be migrated but can be recreated.

                Can you see if there are only this captive database on your dir? Did ou tried to reinstall the service after renaming it?

                There is also captiveportalcpzone.db
                I've only tried to restart the service.

                1 Reply Last reply Reply Quote 0
                • marcellocM
                  marcelloc
                  last edited by

                  @markusxyz:

                  There is also captiveportalcpzone.db
                  I've only tried to restart the service.

                  Try to rename that too.

                  Treinamentos de Elite: http://sys-squad.com

                  Help a community developer! ;D

                  1 Reply Last reply Reply Quote 0
                  • M
                    markusxyz
                    last edited by

                    @marcelloc:

                    @markusxyz:

                    There is also captiveportalcpzone.db
                    I've only tried to restart the service.

                    Try to rename that too.

                    Nothing it doesn't work

                    1 Reply Last reply Reply Quote 0
                    • marcellocM
                      marcelloc
                      last edited by

                      I have captive portal working on 2.2. I guess you're still with old database files being called.

                      The errors shows what database file is broken?

                      Treinamentos de Elite: http://sys-squad.com

                      Help a community developer! ;D

                      1 Reply Last reply Reply Quote 0
                      • M
                        markusxyz
                        last edited by

                        @marcelloc:

                        I have captive portal working on 2.2. I guess you're still with old database files being called.

                        The errors shows what database file is broken?

                        I get this:Zone: cpzone - Error during table cpzone creation. Error message: file is encrypted or is not a database

                        1 Reply Last reply Reply Quote 0
                        • marcellocM
                          marcelloc
                          last edited by

                          Make a config backp and then disable captive portal and move/delete  old databases to another folder.
                          Captive portal configuration stays on xml.

                          Treinamentos de Elite: http://sys-squad.com

                          Help a community developer! ;D

                          1 Reply Last reply Reply Quote 0
                          • M
                            markusxyz
                            last edited by

                            @marcelloc:

                            Make a config backp and then disable captive portal and move/delete  old databases to another folder.
                            Captive portal configuration stays on xml.

                            I've already done config backup before upgrade to 2.2. Anyway which database in /var/db have I to delete?

                            1 Reply Last reply Reply Quote 0
                            • marcellocM
                              marcelloc
                              last edited by

                              Captive portal databases.
                              You move to another folder instead of deleting it if you prefer.

                              Treinamentos de Elite: http://sys-squad.com

                              Help a community developer! ;D

                              1 Reply Last reply Reply Quote 0
                              • M
                                markusxyz
                                last edited by

                                @marcelloc:

                                Captive portal databases.
                                You move to another folder instead of deleting it if you prefer.

                                ok I've copied all files captiveportal***.db and then deleted.
                                These are the logs:
                                Jan 31 19:20:05 logportalauth[95869]: Zone: cpzone - Reconfiguring captive portal().
                                Jan 31 19:20:27 check_reload_status: Reloading filter
                                Jan 31 19:20:05 check_reload_status: Syncing firewall
                                and this  lighttpd[89587]: (server.c.1558) server stopped by UID = 0 PID = 27770

                                But it seems not working yet…

                                1 Reply Last reply Reply Quote 0
                                • marcellocM
                                  marcelloc
                                  last edited by

                                  Did you disabled/enabled  the service after removing the database files?

                                  Treinamentos de Elite: http://sys-squad.com

                                  Help a community developer! ;D

                                  1 Reply Last reply Reply Quote 0
                                  • M
                                    markusxyz
                                    last edited by

                                    @marcelloc:

                                    Did you disabled/enabled  the service after removing the database files?

                                    yes done! it doesn't work.

                                    1 Reply Last reply Reply Quote 0
                                    • marcellocM
                                      marcelloc
                                      last edited by

                                      Well,  I have it working.  You need somebody else experience with 2.1 to 2.2 captive portal migration.

                                      Postfix package will have similar issues but I'm writing a guide for package migration when pbi binaries get working…

                                      Treinamentos de Elite: http://sys-squad.com

                                      Help a community developer! ;D

                                      1 Reply Last reply Reply Quote 0
                                      • D
                                        doktornotor Banned
                                        last edited by

                                        No problems with migration here… (If you cannot get it working, a clean install and config restore takes minutes.)

                                        1 Reply Last reply Reply Quote 0
                                        • M
                                          markusxyz
                                          last edited by

                                          @doktornotor:

                                          No problems with migration here… (If you cannot get it working, a clean install and config restore takes minutes.)

                                          a clean install of 2.1.5 or 2.2?

                                          1 Reply Last reply Reply Quote 0
                                          • D
                                            doktornotor Banned
                                            last edited by

                                            Up to you, though 2.1 is pretty much a dead end.

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