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

    Lightsquid service not starting at boot time

    Scheduled Pinned Locked Moved 2.3-RC Snapshot Feedback and Issues - ARCHIVED
    38 Posts 4 Posters 12.5k 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.
    • jimpJ
      jimp Rebel Alliance Developer Netgate
      last edited by

      Any errors in the system log or anywhere else? I still can't reproduce this. I update, reboot, etc and it always starts up for me.

      Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

      Need help fast? Netgate Global Support!

      Do not Chat/PM for help!

      1 Reply Last reply Reply Quote 0
      • M
        maverick_slo
        last edited by

        I checked lighttpd_lightsquid.log there is nothing there…

        1 Reply Last reply Reply Quote 0
        • jimpJ
          jimp Rebel Alliance Developer Netgate
          last edited by

          Are the ones seeing failures perhaps using NanoBSD or /var in a RAM disk?

          Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

          Need help fast? Netgate Global Support!

          Do not Chat/PM for help!

          1 Reply Last reply Reply Quote 0
          • M
            maverick_slo
            last edited by

            No full install.
            If I save settings it starts and then it works as it should…

            1 Reply Last reply Reply Quote 0
            • jimpJ
              jimp Rebel Alliance Developer Netgate
              last edited by

              @maverick_slo:

              No full install.
              If I save settings it starts and then it works as it should…

              Yeah I get that part, a few people have said it, but since I can't replicate the problem I need more detail about why it's failing. There should be something logged somewhere, on the system log, console, etc. Maybe try, without saving the settings, to run the rc.d script by hand to start it up and see if it produces an error.

              Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

              Need help fast? Netgate Global Support!

              Do not Chat/PM for help!

              1 Reply Last reply Reply Quote 0
              • M
                maverick_slo
                last edited by

                Can you please point me to rc script?
                I'm just getting my baby to sleep and Im in bed on my phone :)

                1 Reply Last reply Reply Quote 0
                • jimpJ
                  jimp Rebel Alliance Developer Netgate
                  last edited by

                  /usr/local/etc/rc.d/lighttpd_ls.sh

                  Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

                  Need help fast? Netgate Global Support!

                  Do not Chat/PM for help!

                  1 Reply Last reply Reply Quote 0
                  • M
                    maverick_slo
                    last edited by

                    A ha!

                    2016-03-11 20:15:31: (configfile.c.1016) opening configfile  /var/etc/lightsquid/lighttpd_ls.conf failed: No such file or directory

                    After each reboot conf file dissapears ??

                    1 Reply Last reply Reply Quote 0
                    • jimpJ
                      jimp Rebel Alliance Developer Netgate
                      last edited by

                      Does /var/etc/lightsquid/ exist?

                      If not, add "mkdir -p /var/etc/lightsquid/" to the rc script in the start section, reboot, and see if it comes up

                      I don't recall it being cleared out each time, which is why I asked about /var in RAM, since that would be wiped on each boot.

                      Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

                      Need help fast? Netgate Global Support!

                      Do not Chat/PM for help!

                      1 Reply Last reply Reply Quote 0
                      • M
                        maverick_slo
                        last edited by

                        No there is no folder.
                        But it`s weird, this is happening on latest snapshots so something changed?

                        1 Reply Last reply Reply Quote 0
                        • jimpJ
                          jimp Rebel Alliance Developer Netgate
                          last edited by

                          Nothing changed at all in any area close to that which I'm aware of.

                          Maybe you added or removed some other package which is causing the boot process to change somehow?

                          I may split this issue off into its own thread since it seems to be taking over and the cause isn't clear.

                          Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

                          Need help fast? Netgate Global Support!

                          Do not Chat/PM for help!

                          1 Reply Last reply Reply Quote 0
                          • M
                            maverick_slo
                            last edited by

                            No, I changed nothing just pushed a snapshot or 2.

                            Now my /usr/local/etc/rc.d/lighttpd_ls.sh looks like:

                            #!/bin/sh
                            # This file was automatically generated
                            # by the pfSense service handler.
                            
                            rc_start() {
                            	# Start Lightsquid lighttpd webserver
                                mkdir -p /var/etc/lightsquid/
                            	if [ -f /var/etc/lightsquid/lighttpd_ls.conf ]; then
                            		/usr/local/sbin/lighttpd_ls -f /var/etc/lightsquid/lighttpd_ls.conf
                            	fi
                            }
                            
                            rc_stop() {
                            	# Terminate lightsquid Lighttpd webserver, if found.
                            	pidnum="$(/bin/pgrep lighttpd_ls)"
                            	if [ ! -z "${pidnum}" ]; then
                            		/usr/bin/killall lighttpd_ls
                            	fi
                            }
                            
                            case $1 in
                            	start)
                            		rc_start
                            		;;
                            	stop)
                            		rc_stop
                            		;;
                            	restart)
                            		rc_stop
                            		rc_start
                            		;;
                            esac
                            

                            It is still not started after reboot.

                            1 Reply Last reply Reply Quote 0
                            • M
                              maverick_slo
                              last edited by

                              Possible that something is preventing pkg_edit.php?xml=lightsquid.xml when you click on Save to apply correct permissions or something?

                              Forgot to mention… This happens on both of my pfsenses...

                              1 Reply Last reply Reply Quote 0
                              • jimpJ
                                jimp Rebel Alliance Developer Netgate
                                last edited by

                                If the pkg_edit page was failing to apply then it would work at bootup but not the other way around.

                                It's acting as though it's not performing the boot-time sync for you that it's doing for me. When it boots up I have /var/etc/lightsquid with the config inside and it's running.

                                Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

                                Need help fast? Netgate Global Support!

                                Do not Chat/PM for help!

                                1 Reply Last reply Reply Quote 0
                                • M
                                  maverick_slo
                                  last edited by

                                  So the cfg should be removed on every reboot?

                                  1 Reply Last reply Reply Quote 0
                                  • jimpJ
                                    jimp Rebel Alliance Developer Netgate
                                    last edited by

                                    It should be irrelevant - the boot-time sync of packages should trigger a rewrite of the config and restart of the daemon. Which appears to be happening OK on my test VMs.

                                    Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

                                    Need help fast? Netgate Global Support!

                                    Do not Chat/PM for help!

                                    1 Reply Last reply Reply Quote 0
                                    • X
                                      xbipin
                                      last edited by

                                      well same here on a full install after installing the 11th march snap

                                      1 Reply Last reply Reply Quote 0
                                      • M
                                        maverick_slo
                                        last edited by

                                        I noticed that on reboot there is no more starting packages as it used to be. There is definitly something borked as others report it too.

                                        1 Reply Last reply Reply Quote 0
                                        • M
                                          maverick_slo
                                          last edited by

                                          The question is how to fix it?
                                          I uninstalled and reinstalled and same thing…

                                          I`m out of ideas...

                                          1 Reply Last reply Reply Quote 0
                                          • M
                                            maverick_slo
                                            last edited by

                                            If it is relevant…

                                            Working system in a VM:

                                            Mar 12 12:42:10 	php-fpm 	24560 	/rc.start_packages: [squid] Starting a proxy monitor script
                                            Mar 12 12:42:09 	php-fpm 	24560 	/rc.start_packages: [squid] Starting service...
                                            Mar 12 12:42:08 	php-fpm 	24560 	/rc.start_packages: [squid] Removing freshclam cronjob.
                                            Mar 12 12:42:08 	php-fpm 	24560 	/rc.start_packages: [squid] Antivirus features disabled.
                                            Mar 12 12:42:08 	php-fpm 	24560 	/rc.start_packages: Checked cron job for /usr/local/pkg/swapstate_check.php, no change needed
                                            Mar 12 12:42:08 	php-fpm 	24560 	/rc.start_packages: Checked cron job for /usr/local/sbin/squid -k rotate -f /usr/local/etc/squid/squid.conf, no change needed
                                            Mar 12 12:42:08 	php-fpm 	24560 	/rc.start_packages: [squid] Adding cronjobs ...
                                            Mar 12 12:42:06 	php-fpm 	69629 	/rc.start_packages: Skipping STARTing packages process because previous/another instance is already running
                                            Mar 12 12:42:11 	php-fpm 	24560 	/rc.start_packages: [squid] - squid_resync function call pr: bp:1 rpc:no
                                            Mar 12 12:42:11 	php-fpm 	24560 	/rc.start_packages: [lightsquid] Removing old cronjobs...
                                            Mar 12 12:42:11 	php-fpm 	24560 	/rc.start_packages: [lightsquid] Successfully created '/usr/local/etc/lightsquid/lightsquid.cfg' configuration file.
                                            Mar 12 12:42:11 	php-fpm 	24560 	/rc.start_packages: [lightsquid] Loaded default '/usr/local/etc/lightsquid/lightsquid.cfg.sample' configuration file.
                                            Mar 12 12:42:10 	php-fpm 	24560 	/rc.start_packages: Restarting/Starting all packages. 
                                            

                                            Not working system:

                                            
                                            Mar 12 12:39:00 	php-fpm 	94533 	/rc.start_packages: Skipping STARTing packages process because previous/another instance is already running
                                            Mar 12 12:38:52 	php-fpm 	71733 	/rc.start_packages: [squid] Skipping antivirus services (re)start on boot.
                                            Mar 12 12:38:52 	php-fpm 	71733 	/rc.start_packages: The command '/sbin/route change -inet6 default fe80::2c1:64ff:fed8:3fff' returned exit code '1', the output was 'route: writing to routing socket: Network is unreachable route: writing to routing socket: Network is unreachable change net default: gateway fe80::2c1:64ff:fed8:3fff fib 0: Network is unreachable'
                                            Mar 12 12:38:47 	php-fpm 	260 	/rc.start_packages: Skipping STARTing packages process because previous/another instance is already running
                                            Mar 12 12:38:42 	php-fpm 	71733 	/rc.start_packages: [squid] - squid_resync function call pr: bp:1 rpc:no
                                            Mar 12 12:38:40 	php-fpm 	71733 	/rc.start_packages: Restarting/Starting all packages. 
                                            
                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post
                                            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.