Project

General

Profile

Bug #4904

Captive Portal databases are not upgraded from sqlite 2.x to sqlite 3.x, must be removed post-upgrade

Added by Jim Pingle over 4 years ago. Updated about 4 years ago.

Status:
Resolved
Priority:
Low
Assignee:
Category:
Captive Portal
Target version:
Start date:
07/29/2015
Due date:
% Done:

100%

Estimated time:
Affected Version:
2.2.x
Affected Architecture:
All

Description

Upgrading from pfSense 2.1.x to 2.2, the captive portal databases are in the older sqlite 2.x format and cannot be read:

Jul 28 10:12:59 pfsense logportalauth[11289]: Zone: zonename - Error during table zonename creation. Error message: file is encrypted or is not a database

Removing the database files with rm /var/db/*.db and then re-saving all CP zones and voucher tabs will recreate the files in the proper format.

We should either convert the files up or remove/reinitialize the files if they are detected in the wrong format.

Associated revisions

Revision 2ae65d99 (diff)
Added by Jim Pingle over 4 years ago

Reinitialize the captive portal database for a zone if it is corrupt/unreadable. Fixes #4904

Revision 79e46ebd (diff)
Added by Jim Pingle over 4 years ago

Reinitialize the captive portal database for a zone if it is corrupt/unreadable. Fixes #4904

History

#1 Updated by Jim Pingle over 4 years ago

  • Priority changed from Normal to Low

Though I saw this happen on a production unit when performing an upgrade, I can't seem to reproduce it locally.

On the system with the problem, there were four captive portals:

A: No Authentication + Vouchers
B: Disabled (RADIUS + Vouchers)
C: RADIUS Auth only
D: RADIUS Auth only

Of those, the database error only happened to the last one, D.

Even if it's not a general issue, we could catch the above error and reset the database file if it happens.

#2 Updated by Jim Pingle over 4 years ago

  • Status changed from Confirmed to Feedback
  • % Done changed from 0 to 100

#4 Updated by Jim Thompson about 4 years ago

  • Assignee set to Jim Pingle

#5 Updated by Jim Pingle about 4 years ago

  • Status changed from Feedback to Resolved

#6 Updated by Jim Pingle about 4 years ago

I've tested this multiple times/ways since the code went in and couldn't manage to break it any longer. If anyone can replicate the problem with the current code in place we'll need copies of their captive portal databases and settings (pre and post upgrade if possible)

Also available in: Atom PDF