OPNsense
  • Home
  • Help
  • Search
  • Login
  • Register

  • OPNsense Forum »
  • Archive »
  • 18.1 Legacy Series »
  • Captive Portal: Allowed addresses/MACs has no effect + sqlite error
« previous next »
  • Print
Pages: [1]

Author Topic: Captive Portal: Allowed addresses/MACs has no effect + sqlite error  (Read 2863 times)

AFSaltLife

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
    • View Profile
Captive Portal: Allowed addresses/MACs has no effect + sqlite error
« on: July 26, 2018, 05:11:23 am »
Greetings and thanks for any help you can provide.

As the title suggests, addresses I apply in the "allowed" field are still not permitted to communicate over the WAN. I have a couple VoIP phones I need to allow through. Disabling the zone confirms the phones can communicate. Addresses that I apply do show up in the "sessions" list.

I've checked the log and I noticed the following error:
Code: [Select]
captiveportal: Traceback (most recent call last): File "/usr/local/opnsense/scripts/OPNsense/CaptivePortal/cp-background-process.py", line 218, in main
 bgprocess.db.update_accounting_info(bgprocess.ipfw.list_accounting_info()) File
"/usr/local/opnsense/scripts/OPNsense/CaptivePortal/lib/db.py", line 271, in update_accounting_info for row in
 cur.fetchall(): DatabaseError: database disk image is malformed

I'm really hoping I won't have to drop/recreate the database, I've already created/distributed vouchers.

Problem was present in 18.1.12 as well.

Code: [Select]
OPNsense 18.1.13-amd64
FreeBSD 11.1-RELEASE-p11
OpenSSL 1.0.2o 27 Mar 2018

Thanks again.
Logged

AFSaltLife

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
    • View Profile
Re: Captive Portal: Allowed addresses/MACs has no effect + sqlite error
« Reply #1 on: July 31, 2018, 05:09:53 am »
Solved by following user "tee4cute"s steps in thread https://github.com/opnsense/core/issues/1700


Database was apparently corrupted somehow. Removing the database and forcing captiveportal to create a new one all was returned to normal.

  • cd /var/captiveportal/

  • mv captiveportal.sqlite captiveportal.sqlite.b
    I guess that CP will automatically create sqlite db file if is not found.

  • /usr/local/opnsense/scripts/OPNsense/CaptivePortal/cp-background-process.py
    At this point, I found that the captiveportal.sqlite is automatically created.

  • /usr/local/etc/rc.d/captiveportal stop
    Stop the service to ensure that it is cleanly restarted.

  • /usr/local/etc/rc.d/captiveportal start
    Start service again.

Logged

  • Print
Pages: [1]
« previous next »
  • OPNsense Forum »
  • Archive »
  • 18.1 Legacy Series »
  • Captive Portal: Allowed addresses/MACs has no effect + sqlite error
 

OPNsense is an OSS project © Deciso B.V. 2015 - 2023 All rights reserved
  • SMF 2.0.19 | SMF © 2021, Simple Machines
    Privacy Policy
    | XHTML | RSS | WAP2