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

    cron package lead to boot issue

    Scheduled Pinned Locked Moved pfSense Packages
    3 Posts 3 Posters 329 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.
    • L
      luxopok
      last edited by

      Hello folks,

      iam using the pfsense plus plackage with latest version and tried to implement a cronjob via the cron package.
      After saving the cronjab. Pfsense reports me a programming bug 🐶

      Crash report begins.  Anonymous machine information:
      
      amd64
      15.0-CURRENT
      FreeBSD 15.0-CURRENT #0 plus-RELENG_24_11-n256407-1bbb3194162: Fri Nov 22 05:08:46 UTC 2024     root@freebsd:/var/jenkins/workspace/pfSense-Plus-snapshots-24_11-main/obj/amd64/AKWlAIiM/var/jenkins/workspace/pfSense-Plus-snapshots-24_11-main/sources/FreeBS
      
      Crash report details:
      
      PHP Errors:
      [05-Jan-2025 16:19:32 Europe/Berlin] PHP Fatal error:  Uncaught TypeError: Cannot access offset of type string on string in /etc/inc/services.inc:5293
      Stack trace:
      #0 /usr/local/pkg/cron.inc(27): configure_cron()
      #1 /etc/inc/pkg-utils.inc(734) : eval()'d code(1): cron_sync_package()
      #2 /etc/inc/pkg-utils.inc(734): eval()
      #3 /etc/rc.start_packages(66): sync_package()
      #4 {main}
        thrown in /etc/inc/services.inc on line 5293
      [05-Jan-2025 16:22:09 Europe/Berlin] PHP Fatal error:  Uncaught TypeError: Cannot access offset of type string on string in /etc/inc/config.lib.inc:496
      Stack trace:
      #0 /etc/rc.bootup(169): convert_config()
      #1 {main}
        thrown in /etc/inc/config.lib.inc on line 496
      [05-Jan-2025 16:22:10 Europe/Berlin] PHP Fatal error:  Uncaught TypeError: Cannot access offset of type string on string in /etc/inc/services.inc:5293
      Stack trace:
      #0 /usr/local/pkg/cron.inc(27): configure_cron()
      #1 /etc/inc/pkg-utils.inc(734) : eval()'d code(1): cron_sync_package()
      #2 /etc/inc/pkg-utils.inc(734): eval()
      #3 /etc/rc.start_packages(66): sync_package()
      #4 {main}
        thrown in /etc/inc/services.inc on line 5293
      [05-Jan-2025 16:35:11 Europe/Berlin] PHP Fatal error:  Uncaught TypeError: Cannot access offset of type string on string in /etc/inc/config.lib.inc:496
      Stack trace:
      #0 /etc/rc.bootup(169): convert_config()
      #1 {main}
        thrown in /etc/inc/config.lib.inc on line 496
      [05-Jan-2025 16:35:12 Europe/Berlin] PHP Fatal error:  Uncaught TypeError: Cannot access offset of type string on string in /etc/inc/services.inc:5293
      Stack trace:
      #0 /usr/local/pkg/cron.inc(27): configure_cron()
      #1 /etc/inc/pkg-utils.inc(734) : eval()'d code(1): cron_sync_package()
      #2 /etc/inc/pkg-utils.inc(734): eval()
      #3 /etc/rc.start_packages(66): sync_package()
      #4 {main}
        thrown in /etc/inc/services.inc on line 5293
      [05-Jan-2025 16:38:18 Europe/Berlin] PHP Fatal error:  Uncaught TypeError: Cannot access offset of type string on string in /etc/inc/config.lib.inc:496
      Stack trace:
      #0 /etc/rc.bootup(169): convert_config()
      #1 {main}
        thrown in /etc/inc/config.lib.inc on line 496
      [05-Jan-2025 16:38:19 Europe/Berlin] PHP Fatal error:  Uncaught TypeError: Cannot access offset of type string on string in /etc/inc/services.inc:5293
      Stack trace:
      #0 /usr/local/pkg/cron.inc(27): configure_cron()
      #1 /etc/inc/pkg-utils.inc(734) : eval()'d code(1): cron_sync_package()
      #2 /etc/inc/pkg-utils.inc(734): eval()
      #3 /etc/rc.start_packages(66): sync_package()
      #4 {main}
        thrown in /etc/inc/services.inc on line 5293
      [05-Jan-2025 16:44:43 Europe/Berlin] PHP Fatal error:  Uncaught TypeError: Cannot access offset of type string on string in /etc/inc/config.lib.inc:496
      Stack trace:
      #0 /etc/rc.bootup(169): convert_config()
      #1 {main}
        thrown in /etc/inc/config.lib.inc on line 496
      [05-Jan-2025 16:56:07 Europe/Berlin] PHP Fatal error:  Uncaught TypeError: Cannot access offset of type string on string in /etc/inc/config.lib.inc:496
      Stack trace:
      #0 /etc/rc.bootup(169): convert_config()
      #1 {main}
        thrown in /etc/inc/config.lib.inc on line 496
      
      
      
      No FreeBSD crash data found.
      			
      

      I made a REALLY big mistake and reboots the pfsense, that leads to completly boot error.

      Why is that cron package so buggy?? Crontabs via ssh will be wiped after time.

      Iam new to pfsense, iam not sure how to handle this. Help Article tolds me to made a post here.

      Thanks Guys!

      GertjanG 1 Reply Last reply Reply Quote 0
      • GertjanG
        Gertjan @luxopok
        last edited by Gertjan

        @luxopok said in cron package lead to boot issue:

        and tried to implement a cronjob via the cron package

        Still console access ?
        Not afraid of using vi ?

        If you answered yes and no, access console, use option 8.
        The 'viconfig' and search for the <cron> section.

        It should (start) look like this (up until the closing </cron>:

        	<cron>
        		<item>
        			<minute>*/1</minute>
        			<hour>*</hour>
        			<mday>*</mday>
        			<month>*</month>
        			<wday>*</wday>
        			<who>root</who>
        			<command>/usr/sbin/newsyslog</command>
        		</item>
        		<item>
        			<minute>1</minute>
        			<hour>3</hour>
        			<mday>*</mday>
        			<month>*</month>
        			<wday>*</wday>
        			<who>root</who>
        			<command>/etc/rc.periodic daily</command>
        		</item>
        		<item>
        			<minute>15</minute>
        			<hour>4</hour>
        			<mday>*</mday>
        			<month>*</month>
        			<wday>6</wday>
        			<who>root</who>
        			<command>/etc/rc.periodic weekly</command>
        		</item>
        		<item>
        			<minute>30</minute>
        			<hour>5</hour>
        			<mday>1</mday>
        			<month>*</month>
        			<wday>*</wday>
        			<who>root</who>
        			<command>/etc/rc.periodic monthly</command>
        		</item>
        		<item>
        			<minute>1,31</minute>
        			<hour>0-5</hour>
        			<mday>*</mday>
        			<month>*</month>
        .....
        

        Find the one(s) you've added, and delete their de entire

        		<item>
        ......
        		</item>
        

        now save, and boot again.

        Btw : I'm using the con package for many years now.
        I guess some error checking is done when you enter one yourself, but something has failed for you for sure.

        No "help me" PM's please. Use the forum, the community will thank you.
        Edit : and where are the logs ??

        1 Reply Last reply Reply Quote 0
        • M
          marcosm Netgate
          last edited by

          I'm not seeing how the errors would trigger via the GUI - was the config.xml file manually modified?

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