[RESOLVED] 2.2.6 to 2.3 beta upgrade full install package issues



  • i tried a full install update from 2.2.6 to 2.3 which went fine but after that the package reinstall keeps saying forever and enver completes, i use cron, squid and lightsquid packages only but none seem to install, i get a lot of these in systemlog

    Mar 1 22:19:57 	kernel 		ATE TABLE pkg_licenses (package_id INTEGER REFERENCES packages(id) ON DELETE CASCADE ON UPDATE CASCADE,license_id INTEGER REFERENCES licenses(id) ON DELETE RESTRICT ON UPDATE RESTRICT,UNIQUE(package_id, license_id));CREATE TABLE option (option_id INTEGER PRIMARY KEY,option TEXT NOT NULL UNIQUE);CREATE TABLE option_desc (option_desc_id INTEGER PRIMARY KEY,option_desc TEXT NOT NULL UNIQUE);CREATE TABLE pkg_option (package_id INTEGER NOT NULL REFERENCES packages(id) ON DELETE CASCADE ON UPDATE CASCADE,option_id INTEGER NOT NULL REFERENCES option(option_id) ON DELETE RESTRICT ON UPDATE CASCADE,value TEXT NOT NULL,PRIMARY KEY(package_id, option_id));CREATE TABLE pkg_option_desc (package_id INTEGER NOT NULL REFERENCES packages(id) ON DELETE CASCADE ON UPDATE CASCADE,option_id INTEGER NOT NULL REFERENCES option(option_id) ON DELETE RESTRICT ON UPDATE CASCADE,option_desc_id INTEGER NOT NULL REFERENCES option_desc(option_desc_id) ON DELETE RESTRICT ON UPDATE CASCADE,PRIMARY KEY(package_id, option_id));CREATE
    Mar 1 22:19:57 	kernel 		pkg_option_default (package_id INTEGER NOT NULL REFERENCES packages(id) ON DELETE CASCADE ON UPDATE CASCADE,option_id INTEGER NOT NULL REFERENCES option(option_id) ON DELETE RESTRICT ON UPDATE CASCADE,default_value TEXT NOT NULL,PRIMARY KEY(package_id, option_id));CREATE TABLE shlibs (id INTEGER PRIMARY KEY,name TEXT NOT NULL UNIQUE );CREATE TABLE pkg_shlibs_required (package_id INTEGER NOT NULL REFERENCES packages(id) ON DELETE CASCADE ON UPDATE CASCADE,shlib_id INTEGER NOT NULL REFERENCES shlibs(id) ON DELETE RESTRICT ON UPDATE RESTRICT,UNIQUE(package_id, shlib_id));CREATE TABLE pkg_shlibs_provided (package_id INTEGER NOT NULL REFERENCES packages(id) ON DELETE CASCADE ON UPDATE CASCADE,shlib_id INTEGER NOT NULL REFERENCES shlibs(id) ON DELETE RESTRICT ON UPDATE RESTRICT,UNIQUE(package_id, shlib_id));CREATE TABLE annotation (annotation_id INTEGER PRIMARY KEY,annotation TEXT NOT NULL UNIQUE);CREATE TABLE pkg_annotation (package_id INTERGER REFERENCES packages(id) ON DELETE CASCADE ON UPDATE RESTRI
    Mar 1 22:19:57 	kernel 		id INTEGER NOT NULL REFERENCES annotation(annotation_id) ON DELETE CASCADE ON UPDATE RESTRICT,value_id INTEGER NOT NULL REFERENCES annotation(annotation_id) ON DELETE CASCADE ON UPDATE RESTRICT,UNIQUE (package_id, tag_id));CREATE TABLE pkg_conflicts (package_id INTEGER NOT NULL REFERENCES packages(id) ON DELETE CASCADE ON UPDATE CASCADE,conflict_id INTEGER NOT NULL,UNIQUE(package_id, conflict_id));CREATE TABLE provides( id INTEGER PRIMARY KEY, provide TEXT NOT NULL);CREATE TABLE pkg_provides (package_id INTEGER NOT NULL REFERENCES packages(id) ON DELETE CASCADE ON UPDATE CASCADE,provide_id INTEGER NOT NULL REFERENCES provides(id) ON DELETE RESTRICT ON UPDATE RESTRICT,UNIQUE(package_id, provide_id));CREATE TABLE requires( id INTEGER PRIMARY KEY, require TEXT NOT NULL);CREATE TABLE pkg_requires (package_id INTEGER NOT NULL REFERENCES packages(id) ON DELETE CASCADE ON UPDATE CASCADE,require_id INTEGER NOT NULL REFERENCES requires(id) ON DELETE RESTRICT ON UPDATE RESTRICT,UNIQUE(package_i
    Mar 1 22:19:57 	kernel 		ire_id));CREATE VIRTUAL TABLE pkg_search USING fts4(id, name, origin);PRAGMA user_version=2012; in file pkgdb.c:2394: attempt to write a readonly database 
    

  • Rebel Alliance Developer Netgate

    Is this on nanobsd? a full install? a full install with /tmp and /var in RAM?



  • Full install and tmp and var not in RAM



  • When I upgrade to newer snaps or reinstall any package I get errors of pfsense database errors like it doesn't exist so need to recreate etc but multiple reboots also don't solve it, is there a way to manually delete this read only or locked database and recreate it because other than this the firewall works all good and the upgrade went all good



  • i tried clearing the /var/db/pkg folder but it seems the DB gets locked because the pkg update runs for ever and keeps it locked, anyway to kill the pkg update so can do a fresh start of package reinstall?

    update

    i cleared tge /var/db/pkg folder, rebooted and then pkg update didnt run then was able to install squid and cron but now when i goto squid config page and hit save it keeps going for ever and squid wont run so need to find a way to fix that now



  • i had to delete the squid cache after which only squid started working but if i goto squid settings and hit save on any page the page never refreshes and timeouts (504 Gateway Time-out)

    update

    after being able to atleast run squid, if i now try to update the system from console option 13 i get this

    pkg: No package(s) matching pfSense-kernel-*
    >>> Updating repositories metadata...
    Updating pfSense-core repository catalogue...
    pfSense-core repository is up-to-date.
    Updating pfSense repository catalogue...
    pfSense repository is up-to-date.
    All repositories are up-to-date.
    return: Illegal number: -1
    Your packages are up to date
    

    anyway i can manually install this kernel so can fix the issues caused by clearing the /var/db/pkg folder?


  • Rebel Alliance Developer Netgate

    What does "pkg info" show?

    Try something like this:

    pkg update -f
    pkg install -f pfSense
    


  • pkg info shows below, trying the other commands

    arc-5.21p                      Create & extract files from DOS .ARC files
    arj-3.10.22_4                  Open source implementation of the ARJ archiver
    c-icap-0.3.5_2,2               ICAP server implementation
    c-icap-modules-0.3.2_5         c-icap modules virus_scan and srv_url_check
    ca_root_nss-3.22               Root certificate bundle from the Mozilla Project
    clamav-0.99                    Command line virus scanner written entirely in C
    curl-7.47.0                    Non-interactive tool to get files from FTP, GOPHER, HTTP(S) servers
    cyrus-sasl-2.1.26_12           RFC 2222 SASL (Simple Authentication and Security Layer)
    freetype2-2.6.2                Free and portable TrueType font rendering engine
    gettext-runtime-0.19.6         GNU gettext runtime libraries and programs
    indexinfo-0.2.4                Utility to regenerate the GNU info page index
    jbigkit-2.1_1                  Lossless compression for bi-level images such as scanned pages, faxes
    jpeg-turbo-1.4.2               SIMD-accelerated JPEG codec which replaces libjpeg
    json-c-0.12_2                  JSON (JavaScript Object Notation) implementation in C
    krb5-1.14                      Authentication system developed at MIT, successor to Kerberos IV
    lha-1.14i_6                    Archive files using LZSS and Huffman compression (.lzh files)
    libgd-2.1.0_7,1                Graphics library for fast creation of images
    libltdl-2.4.6                  System independent dlopen wrapper
    libxml2-2.9.3                  XML parser library for GNOME
    lightsquid-1.8_4               Light and fast web based squid proxy traffic analyser
    lighttpd-1.4.38                Secure, fast, compliant, and flexible Web Server
    openldap-client-2.4.44         Open source LDAP client implementation
    p5-GD-2.56_2                   Perl5 interface to Gd Graphics Library version2
    pcre-8.37_4                    Perl Compatible Regular Expressions library
    perl5-5.20.3_8                 Practical Extraction and Report Language
    pfSense-pkg-Cron-0.3.6_1       pfSense package Cron
    pfSense-pkg-Lightsquid-3.0.2   pfSense package Lightsquid
    pfSense-pkg-squid-0.4.15       pfSense package squid
    pfSense-repo-devel-2.3.b.20160302.0550 pfSense pkg repository configuration (devel)
    pkgconf-0.9.12_1               Utility to help to configure compiler and linker flags
    png-1.6.20                     Library for manipulating PNG images
    squid-3.5.15                   HTTP Caching Proxy
    squid_radius_auth-1.10         RADIUS authenticator for squid proxy 2.5 and later
    squidclamav-6.13               Clamav c-icap service and redirector for Squid
    tiff-4.0.6_1                   Tools and library routines for working with TIFF images
    unzoo-4.4_2                    ZOO archive extractor
    
    


  • i tried the pkg install -f pfsense and it installed everything but it seems the system is in more mess as whenever i login into console using SSH i get a ton of lines saying warning module xxxx already loaded

    is there any way i can update the system to latest snap using the upgrade from file method used in 2.2.6 etc to come back to a factory state without having to to reinstall as this machine is thousands of kms away


  • Rebel Alliance Developer Netgate

    No, there is not a way to reapply an old style firmware.

    Most likely it is fine now, though the extensions.ini may need some cleanup. I don't think our code would clean up after that sort of mess.

    Try this:

    sort -u /usr/local/etc/php/extensions.ini > /tmp/extensions.ini
    mv /tmp/extensions.ini /usr/local/etc/php/extensions.ini
    


  • thanks, that fixed the warnings but option 13 to update still gives issues

    Enter an option: 13
    
    pkg: No package(s) matching pfSense-kernel-*
    
    

  • Rebel Alliance Developer Netgate

    try this:

    pkg install -f pfSense-kernel-pfSense
    


  • after that even option 13 gives

    Enter an option: 13
    
    >>> Updating repositories metadata...
    Updating pfSense-core repository catalogue...
    pfSense-core repository is up-to-date.
    Updating pfSense repository catalogue...
    pfSense repository is up-to-date.
    All repositories are up-to-date.
    return: Illegal number: -1
    Your packages are up to date
    
    

  • Rebel Alliance Developer Netgate

    You would be up-to-date until a new snap comes out – the pkg install commands would have pulled the latest from the repo. Give it a bit until a new update comes out and then see what happens.


  • Rebel Alliance Developer Netgate

    Tried this locally, breaking the pkg db intentionally, and this got things going again:

    
    /bin/mkdir -p /var/db/pkg/ /root/var/db/pkg/
    /usr/sbin/pkg update -f
    /usr/sbin/pkg install -yf pkg pfSense pfSense-kernel-pfSense
    sort -u /usr/local/etc/php/extensions.ini > /tmp/extensions.ini
    mv /tmp/extensions.ini /usr/local/etc/php/extensions.ini
    
    


  • i tried today option 13 and it did update the system so seems fine now but saving in squid causes the page to timeout. i tried clearing squid cache, reinstalling but its same still, what could be wrong, no errors come up in log even



  • even after updating to latest snap the dashboard says this

    2.3-BETA (i386)
    built on Tue Mar 01 05:40:01 CST 2016
    FreeBSD 10.3-BETA3
    

    also when i try to install pfsense-kernel-pfsense pkg i keep getting this, the first time it installed but now it says the below

    Updating pfSense-core repository catalogue...
    pfSense-core repository is up-to-date.
    Updating pfSense repository catalogue...
    pfSense repository is up-to-date.
    All repositories are up-to-date.
    pkg: No packages available to install matching 'pfSense-kernel-pfSense' have been found in the repositories
    
    


  • any snap update still doesnt increment the build on date so no idea if its even updating, but in summary i think upgrades from 2.2.6 to 2.3 with packages installed would be deadly, other than packages the system updates just fine.



  • just an addition to this, the dashboard wasnt showing proper build dates and some of the GUI components were not updating, i even did a gitsync, the thing that resolved all that was by using the below modified commands given by jimp, use this if u messed up the pkg db or deleted the db during upgrade from 2.2.6 to 2.3 on a full install, hope it helps others

    /bin/mkdir -p /var/db/pkg/ /root/var/db/pkg/
    /usr/sbin/pkg update -f
    /usr/sbin/pkg install -yf pkg pfSense pfSense-kernel-pfSense pfSense-base pfSense-default-config
    sort -u /usr/local/etc/php/extensions.ini > /tmp/extensions.ini
    mv /tmp/extensions.ini /usr/local/etc/php/extensions.ini
    

    this even gets rid of the below message during option 13 from console

    return: Illegal number: -1
    

    it even fixes GUI update saying cant retrieve system version



  • For me, the above fixes the ability to update through option 13.
    The webgui still says that it is not able to check for updates and the build information shows "built on Tue Mar 01 23:43:51 CST 2016" allthough it did update.
    The problems for me started when I enabled the ramdrives, so no update from an older version.



  • there is a redmine related to ramdisk so no idea if the above would solve that, installing the pfsense-base package solved the GUI not showing updates for me.
    u can run the above commands again and see if it solves for u, it wont harm the system but if something is broken it might fix it