Help → POPFile Control Centre - Configuration changes do not survive reboot

POPFile Control Centre - Configuration changes do not survive reboot

Following from the discussion in the thread starting at 283, I am now using POPfile with local settings of POP3 listening port 123 (instead of the default port 110) and POP3 host:port separator character "%". But I have to set these changes in POPfile Control Centre every time I reboot the PC. When I make the changes I shut down POPFile and then restart it to let the changes be read, and my mail works.

But after rebooting the PC (its a laptop, I generally shut it down completely at night), POPFile has re-set the settings to the POP3 defaults of port 110 and ":" as the host:port separator. I can't find where these settings are saved to see what's changing them. Can anyone suggest what's causing this?

Gerard Lardner

  • Message #1209

    Those settings are stored in POPFile's configuration file (popfile.cfg). The ADVANCED page in the UI displays the location of this file, near the top of the "All POPFile Parameters" column.

    If the location is shown using SFN format it can be hard to read. The Windows installer creates a Start Menu shortcut that will display the location in an easier to read format:

    Start -- All Programs -- POPFile -- Support -- PFI Diagnostic utility (simple)

    (the location is identified as the "User Data folder")

    When POPFile shuts down it saves the current configuration. Have you tried shutting down POPFile before rebooting?

    Brian

    • Message #1210

      Those settings are stored in POPFile's configuration file (popfile.cfg). The ADVANCED page in the UI displays the location of this file, near the top of the "All POPFile Parameters" column.

      I had looked at that page several times and hadn't noticed that the config file location is displayed there.

      If the location is shown using SFN format it can be hard to read. The Windows installer creates a Start Menu shortcut that will display the location in an easier to read format:

      That's OK. I can generally interpret SFN format


      Thanks for pointing me to the location. Now to try to see what changes it!

      Gerard

    • Message #1211

      Interesting!

      When POPFile is shut down using the "Shutdown POPFile" link in the POPFile UI, all is well and popfile.cfg is saved/closed properly. But when POPFile is shut down by shutting down the computer or (sometimes) by right clicking on POPFile in the taskbar notification area and selecting Quit POPFile, then popfile.cfg is corrupted: it is truncated, and about 2/3 of the file is lost.

      Now to see how that is happening - or even if it continues to be repeatable; since I shut down POPFile manually a few times, the problem has suddenly gone away. Once I identified the problem it was repeatable over 3-4 cycles of shutting down and restarting POPFile; then after about 4 tries of shutting down POPFile in different ways, the popfile.cfg file is now being saved correctly.

      Gerard

      • Message #1212

        Which version of POPFile are you using?

        Which version of Windows are you using?

        Do you log off before logging on as a different user or do you use the "Switch user" feature in Windows?

        Which anti-virus program are you using?

        Are you using the Start Menu "Startup" shortcut to start POPFile?

        Brian

        • Message #1213

          I think it would be a good idea to run the diagnostic program:

          Start -- All Programs -- POPFile -- Support -- PFI Diagnostic utility (full)

          This performs some checks and produces a report that can be copied to the clipboard and pasted into a reply.

          If you have more than one Windows account which uses POPFile, run this diagnostic for each of these Windows accounts.

          Brian

        • Message #1214

          Thanks for continuing to help.

          As I said in message #1211, it seems to be working again at present; the fault was present for a number of days and was repeatable over a small number of cycles of stopping and restarting POPFile yesterday, but then it disappeared and has not returned when I rebooted today.

          Answers to your questions are appended below (in case the problem returns)

          Gerard

          POPFile v 1.1.1

          Windows XP Pro, fully updated

          I don't use the "Switch user" feature. It is enabled (for some reason I thought I had disabled it, but on checking I see I have not), but I am the only user and I have only one Windows account (plus Administrator) on the computer.

          AV is F-Prot v 6.0.9.3

          Normally POPFile is started from the Startup folder, but when I shut down POPFile and want to restart it I do that from the Start -- All Programs -- POPFile -- Run POPFile shortcut

          Diagnostic output follows:


          POPFile PFI Diagnostic Utility v0.1.14 (full mode)


          String data report format (not used for numeric data)

          string not found : ><
          empty string found : < >
          string with 'xyz' value found : < xyz >


          Current UserName? = Gerard Lardner (Admin)

          Windows version = XP Professional
          IsNT return code = 1
          Internet Explorer = 8.0


          Location used to store temporary files


          $TEMP folder path = < C:\DOCUME~1\GERARD~1\LOCALS~1\Temp >


          Start Menu Locations


          AU: $SMPROGRAMS = < C:\Documents and Settings\All Users\Start Menu\Programs >
          AU: $SMSTARTUP = < C:\Documents and Settings\All Users\Start Menu\Programs\Startup >

          Search results for the "AU: $SMSTARTUP" folder:

          *.lnk files found = 5
          POPFile shortcuts = 0

          CU: $SMPROGRAMS = < C:\Documents and Settings\Gerard Lardner\Start Menu\Programs >
          CU: $SMSTARTUP = < C:\Documents and Settings\Gerard Lardner\Start Menu\Programs\Startup >

          Search results for the "CU: $SMSTARTUP" folder:

          Shortcut name = < Run POPFile.lnk >
          Shortcut start in = < C:\Program Files\POPFile >
          Shortcut target = < C:\Program Files\POPFile\runpopfile.exe >
          Shortcut argument = < /startup >
          Target status = found

          *.lnk files found = 4
          POPFile shortcuts = 1


          Obsolete/testbed Registry Entries


          [1] Pre-0.21 Data:

          Pre-0.21 POPFile = < C:\Program Files\POPFile >
          Pre-0.21 Testbed = ><

          [2] 0.21 Test Installer Data:

          HKLM: RootDir?_LFN = ><
          HKLM: RootDir?_SFN = ><

          HKCU: RootDir?_LFN = ><
          HKCU: RootDir?_SFN = ><
          HKCU: UserDir?_LFN = ><
          HKCU: UserDir?_SFN = ><

          [3] Current PFI Testbed Data:

          MRI PFI Testbed = ><
          MRI PFI Testdata = ><


          POPFile Registry Data


          NTFS SFN Disabled = < 0 >

          HKLM: MRI Version = < 1.1.1 >

          HKLM: NewParser? = ><

          HKLM: InstallPath? = < C:\Program Files\POPFile >
          HKLM: RootDir?_LFN = < C:\Program Files\POPFile >
          HKLM: RootDir?_SFN = < C:\PROGRA~1\POPFile >

          HKLM: *.exe count = 6 (this is OK)

          HKCU: Data Owner = < Gerard Lardner >
          HKCU: MRI Version = < 1.1.1 >
          HKCU: RootDir?_LFN = < C:\Program Files\POPFile >
          HKCU: RootDir?_SFN = < C:\PROGRA~1\POPFile >

          HKCU: UserDir?_LFN = < C:\Documents and Settings\Gerard Lardner\Application Data\POPFile >
          HKCU: UserDir?_SFN = < C:\DOCUME~1\GERARD~1\APPLIC~1\POPFile >

          HKCU: popfile.pl = found
          HKCU: popfile.cfg = found

          HKCU: *.exe count = 6 (this is OK)


          POPFile Environment Variables


          'POPFILE_ROOT' = < C:\PROGRA~1\POPFile >
          'POPFILE_USER' = < C:\DOCUME~1\GERARD~1\APPLIC~1\POPFile >

          Env: popfile.pl = found
          Env: popfile.cfg = found

          ROOT: *.exe count = 6 (this is OK)

          'ITAIJIDICTPATH' = >< (this is OK)
          'KANWADICTPATH' = >< (this is OK)

          'MECABRC' = >< (this is OK)


          (report created 18-Feb-2010 @ 22:47:55)


          • Message #1215

            Which version of POPFile are you using?

            POPFile v 1.1.1

            POPFile used to simply save the current configuration data in 'popfile.cfg' when it shuts down. For the 1.1.0 release (30 November 2008) the "shut down" code was changed so it saves the current configuration in a temporary file and then renames this file as 'popfile.cfg' (see changeset:3293 dated 4 July 2008).

            There have been occasional (and isolated) reports of the configuration data problems after a reboot in the past. SourceForge Bug reports 849028 (25 November 2003) and 1713185 (4 May 2007) are the examples referenced when Naoki tried changing the way the configuration data is saved when POPFile shuts down.

            It seems that this fix has not solved the problem, at least as far as your system is concerned.

            Thanks for the diagnostic report; everything there seems to be OK.

            when POPFile is shut down by shutting down the computer ... then popfile.cfg is corrupted: it is truncated, and about 2/3 of the file is lost.

            Normally POPFile only takes a few seconds to shut down but I have found that in some cases it can take 45 seconds or longer to shut down.

            If you normally shut down the computer when POPFile and your email client are both running then it is possible that sometimes POPFile will take much longer than normal to shut down (e.g. if the email client was checking for new mail when the computer was starting to shut down) ... and Windows may think POPFile has got stuck and therefore terminate the POPFile process abruptly. But if this is happening then I don't see how 'popfile.cfg' ends up corrupted with the current temporary file approach.

            when POPFile is shut down by ... right clicking on POPFile in the taskbar notification area and selecting Quit POPFile, then popfile.cfg is corrupted: it is truncated, and about 2/3 of the file is lost.

            Thanks for this extra information. Right-clicking the icon in the notification area to shut down POPFile does not use the same code as the other methods for shutting down so your report gives us some new ideas about where to look.

            it seems to be working again at present; the fault was present for a number of days and was repeatable over a small number of cycles of stopping and restarting POPFile yesterday, but then it disappeared and has not returned when I rebooted today.

            As far as I know nobody has come up with a scenario where it will always fail, so a proper diagnosis has not yet been achieved.

            Brian

            • Message #1216

              Thanks for the explanation. Well, I can confirm it's definitely still happening. I shut down POPFile from the notification area this evening, expecting no problems, but nevertheless I checked popfile.cfg and found it to be truncated again:

              popfile.cfg (what's left of it this evening)

              bayes_bad_sqlite_version 3.0.0
              bayes_corpus corpus
              bayes_database popfile.db
              bayes_dbauth
              bayes_dbconnect dbi:SQLite:dbname=$dbname
              bayes_dbuser
              bayes_hostname waterside
              bayes_localhostname
              bayes_nihongo_parser kakasi
              bayes_sqlite_journal_mode delete
              bayes_sqlite_tweaks 4294967295
              bayes_subject_mod_left [
              bayes_subject_mod_pos 1
              bayes_subject_mod_right ]
              bayes_unclassified_weight 100
              bayes_xpl_angle 0
              config_pidcheck_interval 5
              config_piddir ./
              GLOBAL_debug 1
              GLOBAL_last_update_check 1266607259
              GLOBAL_message_cutoff 100000
              GLOBAL_msgdir messages/
              GLOBAL_timeout 60
              GLOBAL_update_check 1
              html_language English
              logger_format default
              logger_level 0
              logger_logdir ./

              Gerard

              • Message #1217

                Thanks for posting the truncated popfile.cfg file. When I compared it with one from a "clean" POPFile 1.1.1 installation I noticed several things:

                (1) The entries are not in the correct order. I expected them to be ordered by ASCII code, i.e. uppercase before lowercase so all of the "GLOBAL_" entries should appear before the "bayes_" entries.

                (2) Some entries are missing. Your copy only has "html_language English" instead of something like this:

                html_cache_templates 0
                html_column_characters 0
                html_columns +inserted,+from,+to,-cc,+subject,-date,-size,+bucket
                html_date_format 
                html_language English
                html_last_reset Sat Feb 20 16:32:05 2010
                html_local 1
                html_page_size 20
                html_password b61124a488acc5f4406e74272629ee86
                html_port 8080
                html_send_stats 0
                html_session_dividers 1
                html_show_bucket_help 1
                html_show_training_help 0
                html_skin simplyblue
                html_strict_templates 0
                html_test_language 0
                html_wordtable_format 
                

                (3) The file does not seem to be truncated in the middle of a line; it just has far fewer entries in it.

                (4) Your copy has "bayes_bad_sqlite_version 3.0.0" while a clean install has "bayes_bad_sqlite_version 4.0.0"

                Did you upgrade an existing POPFile installation to 1.1.1. or did you start using POPFile with the 1.1.1 release?

                If you upgraded an existing (older) version of POPFile then it is possible that the installer has caused your problem (i.e. it is my fault). If so then this will be a simple thing to fix, but I doubt the solution will be that simple.

                Brian

                • Message #1218

                  I have been using POPFile for a number of years and have upgraded it several times, but not always on this computer. I believe I have upgraded it at least once since I got this computer; the original installation on this PC was in summer '08, so probably one of the v0.99 releases.

                  Gerard

                  • Message #1219

                    I believe I have upgraded it at least once since I got this computer

                    If I had taken the time to re-read the diagnostic report you supplied earlier I would have seen that you had in fact upgraded from an older release of POPFile.

                    I think it might be worth re-installing POPFile 1.1.1 but this time select a new location for the POPFile program.

                    Shut down POPFile before running the installer.

                    When you run the installer it will detect your existing installation at C:\Program Files\POPFile but do NOT accept this default. Choose a new location, such as C:\Program Files\POPFileX for this new installation.

                    After the program files have been installed the installer should detect your existing POPFile data at C:\Documents and Settings\Gerard Lardner\Application Data\POPFile and offer to "upgrade" it. Let it do this and it will update the environment variables, registry entries and shortcuts for you.

                    When the installer offers to start POPFile for you, select the "No" radio button. After the installer has finished, use the Start Menu to check that the installer has "done the right thing":

                    Start -- All Programs -- POPFile -- Support -- PFI Diagnostic utility (simple)

                    The diagnostic report should include these entries:

                    Current UserName  = Gerard Lardner (Admin)
                    
                    Program folder    = < C:\Program Files\POPFileX >
                    SFN equivalent    = < C:\PROGRA~1\POPFileX >
                    
                    User Data folder  = < C:\Documents and Settings\Gerard Lardner\Application Data\POPFile >
                    SFN equivalent    = < C:\DOCUME~1\GERARD~1\APPLIC~1\POPFile >
                    
                    popfile.pl  file  = found
                    popfile.cfg file  = found
                    
                    ...
                    
                    'POPFILE_ROOT' = < C:\PROGRA~1\POPFileX > 
                    'POPFILE_USER' = < C:\DOCUME~1\GERARD~1\APPLIC~1\POPFile >
                    
                    popfile.pl  file  = found
                    popfile.cfg file  = found
                    

                    This might solve your problem ... if it does not then at least it should be no worse than your current situation.

                    If you want to revert to your old 1.1.1 installation all you need to do is shut down POPFile and then run the 'adduser.exe' program found in C:\Program Files\POPFile and let it "upgrade" your user data.

                    After doing this you can switch back to the newer 1.1.1 installation by running the 'adduser.exe' program in C:\Program Files\POPFileX instead.

                    If these instructions don't make sense to you, ask for help before you try to follow them.

                    Brian

                • Message #1221

                  (2) Some entries are missing. Your copy only has "html_language English" instead of something like this:

                  This means that POPFile has been running as non-server mode.
                  But the configuration file has no entries of the history module. My popfile.cfg has these entries:

                  history_archive 0
                  history_archive_classes 0
                  history_archive_dir archive
                  history_history_days 366
                  

                  The current version of POPFile always loads the history module. This means that the history entries should exist in the configuration file if it is updated by POPFile itself.
                  I think this problem is caused by the older version of the utility scripts or some third-party utilities (such as Outclass). Gerard, are you using any of these?

                  BTW, I've found a bug that the current version of the utility scripts remove some entries of the configuration file. I'll fix the bug later. [EDIT] I've created a new ticket for this bug: #135

                  Naoki

                  • Message #1222

                    BTW, I've found a bug that the current version of the utility scripts remove some entries of the configuration file. I'll fix the bug later.

                    Fixed. [3661]

                    Naoki