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

    [LCDProc] - Could not read config file

    Scheduled Pinned Locked Moved 2.2 Snapshot Feedback and Problems - RETIRED
    79 Posts 9 Posters 34.9k 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.
    • stephenw10S
      stephenw10 Netgate Administrator
      last edited by

      Yep, that is the issue. If you put the conf file in:

      /usr/pbi/lcdproc-amd64/local/etc
      

      (or i386 deppending on your architechture) LCDd runs no problem.

      Steve

      1 Reply Last reply Reply Quote 0
      • J
        jjstecchino
        last edited by

        @stephenw10:

        Yep, that is the issue. If you put the conf file in:

        /usr/pbi/lcdproc-amd64/local/etc
        

        (or i386 deppending on your architechture) LCDd runs no problem.

        Steve

        Interesting. so even if LCDd fails saying it cannot read config from /usr/local/etc/LCDd.conf it is actually looking for it in the pbi path. Also if you specify with -c /usr/local/etc/LCDd.conf, it clearly disregards that manual override. I tried that many times. In that case does it still looks into the pbi path? probably if you specify with -c anything but the default path (/usr/local…) it respects that overrides otherwise it substitutes the obi path.

        Good info. How do we use it to our advantage for a seamless install of lcdproc persistent across snapshots upgrades? pfsense lcdproc package writes the config to /usr/local/etc/LCDd.conf, so the php code that does that, would need to be changed on the package in the repository with the path pointing to the pbi, or LCDd modified to respect the override with -c. Pending that your solution with shellcmd is probably the cleanest one but it requires an additional reboot. What is the exact function of LCDd.pbiopt? are there parameters that could be placed there to point to the correct path?
        If we get lcdproc-dev to work as it did in 2.15, do you think it will still suffer from lcdproc crashes as before?
        By the way with shellcmd as you suggested my lcd server hasn't crashed once yet.

        As far as 0.5.6 vs 0.5.7, no specific reasons other than lcdproc (non dev) is on that version.

        1 Reply Last reply Reply Quote 0
        • stephenw10S
          stephenw10 Netgate Administrator
          last edited by

          I would suggest it's a bug in the pbi, some path is incorrectly specified. So either we can go away learn about PBIs, find the bug and submit a patch or find someone who already knows and ask them nicely.  ;)

          Rebooting the box is the easiest way to get the lcd functioning after an update but you can also just run the commands manually. I found it easier to read having the client and server as two separate commands but they could be strung together. What would be nice would be a button on the Shellcmd screen to run the command now.

          I think the lcdproc-dev package will still crash. It may start better, I've not tried it. It would be better to merge the dev back into the original at this point. No point maintaining two packages. Since the dev package was forked an update in php meant that php processes had a limited run time. There is a workaround for that but I don't think it went into the package. In 2.2 php has changed quite a bit so I don't know if that still holds.

          Steve

          1 Reply Last reply Reply Quote 0
          • J
            jjstecchino
            last edited by

            Hello Steve a quick question for you as I guess you may have encountered this before.
            I setup lcdproc-dev as we previously discussed with the config file in /conf and LCDd+lcdproc stared in shellcmd. The lcdproc service is disabled in the gui and the com port is set to none as you described in your post.
            At startup pfsense still try to load LCDd so it get loaded twice, messing up the start up process. It hangs as lcdproc gets run.
            when I pgrep for LCDd and lcdproc I see 2 instances of LCDd (2 pids)and none for lcdproc (I do this while the startup proces is hung but fortunatelly sshd has started already) When I kill the first instance of LCDd the second instance get killed as well. if I pgrep for lcdproc now I see one pid for it which was not present while the 2 LCDd were running. As I kill the lcdproc pid the startup scripts continues until it displays the menu and the beeps on the serial console.
            Now if I restart LCDd and lcdproc from the command line using the /conf path the lcd works ok with all the screens I setup previously.

            It looks like pfsense despite having the lcdproc service disabled still runs LCDd and then I end up with 2 instances of it.
            I found a lcdproc.sh in /usr/local/etc/rc.d but removing that still does not prevent the double LCDd. Is there another place where LCDd could be started? I looked in the obvious places like  /etc/rc but unless I missed I did not see anything useful there. Any suggestions?

            Thanks

            1 Reply Last reply Reply Quote 0
            • stephenw10S
              stephenw10 Netgate Administrator
              last edited by

              Hmm. I found that in 2.2 the start up file in usr/local/etc/rc.d was not removed even when the webgui was configured to remove it. I had to remove it manually. That worked for me.
              Another option that works is to uninstall lcdproc-dev, reinstall it and then don't ever enable it or set the driver. The Shellcmd lines will still run and start it using the lcdd.conf in /conf.

              Steve

              1 Reply Last reply Reply Quote 0
              • T
                Topper727
                last edited by

                I helped improve this package with my limited skills and time back in 2.1 but now in 2.2 it will only work somewhat if I do those commands you did to get it working.  Specify a config in the /conf folder that I moved not in the normal location.  Glad to see it  doing something but not 100% normal looking.

                I run a crystal fonts 735 display

                Dell 2950 g3 server
                Intel(R) Xeon(R) CPU E5430 @ 2.66GHz
                Current: 2000 MHz, Max: 2667 MHz
                8 CPUs: 2 package(s) x 4 core(s)
                8152 MiB and 600meg 10k drive
                Pfsense 2.4 .. Hoping to get the phpvirtualbox going again.

                1 Reply Last reply Reply Quote 0
                • J
                  jjstecchino
                  last edited by

                  @Steve and Topper, maybe we can put our heads together and fix this package

                  1 Reply Last reply Reply Quote 0
                  • T
                    Topper727
                    last edited by

                    I am not that good at fixing it.. I need to relearn since I forgot a few things over the years
                    I don't know the new php stuff they just changed to in new version .. never used before..

                    Dell 2950 g3 server
                    Intel(R) Xeon(R) CPU E5430 @ 2.66GHz
                    Current: 2000 MHz, Max: 2667 MHz
                    8 CPUs: 2 package(s) x 4 core(s)
                    8152 MiB and 600meg 10k drive
                    Pfsense 2.4 .. Hoping to get the phpvirtualbox going again.

                    1 Reply Last reply Reply Quote 0
                    • stephenw10S
                      stephenw10 Netgate Administrator
                      last edited by

                      What did you update from/to? What method were you using to start lcdd?

                      Steve

                      1 Reply Last reply Reply Quote 0
                      • B
                        Borage
                        last edited by

                        The lcdproc_client.php does not even start after the last three updates. It looks like the client is unable to connect, but this is bullshit because the other client /usr/pbi/lcdproc-i386/bin/lcdproc works like a treat.

                        Hm, it looks like i also found a bug in the php file.  :)

                        [2.2-RC][admin@pfsense.localdomain]/root: /usr/bin/nice -20 /usr/local/bin/php -f /usr/local/pkg/lcdproc_client.php
                        
                        Warning: fsockopen(): unable to connect to localhost:13666 (Operation timed out) in /usr/local/pkg/lcdproc_client.php on line 915
                        
                        Warning: stream_set_timeout() expects parameter 1 to be resource, boolean given in /usr/local/pkg/lcdproc_client.php on line 916
                        
                        1 Reply Last reply Reply Quote 0
                        • stephenw10S
                          stephenw10 Netgate Administrator
                          last edited by

                          Using the lcdproc or lcdproc-dev package? What hardware?

                          Steve

                          1 Reply Last reply Reply Quote 0
                          • B
                            Borage
                            last edited by

                            I use lcdproc-dev and my hardware is a Watchguard X1000. I found something strange in the file LCDd.conf, the path to the drivers seem to be wrong.

                            LCDd.conf

                            [server]
                            DriverPath=/usr/local/lib/lcdproc/
                            Driver=sdeclcd
                            Bind=127.0.0.1
                            Port=13666
                            ReportLevel=3
                            ReportToSyslog=yes
                            User=nobody
                            Foreground=no
                            ServerScreen=no
                            GoodBye="Thanks for using"
                            GoodBye="    pfSense     "
                            WaitTime=5
                            PrevScreenKey=Down
                            NextScreenKey=Up
                            [menu]
                            MenuKey=Left
                            EnterKey=Right
                            UpKey=Up
                            DownKey=Down
                            [sdeclcd]
                            

                            It seems to work after I changed the path to the following. I rebooted my firewall several times and no problem whatsoever with the lcdproc_client.php.

                            DriverPath=/usr/pbi/lcdproc-i386/local/lib/lcdproc/
                            
                            1 Reply Last reply Reply Quote 0
                            • stephenw10S
                              stephenw10 Netgate Administrator
                              last edited by

                              I'm using /usr/local/lib/lcdproc/ and it's working fine. I'm not using the php client though.
                              The path to the driver cannot affect the client directly but it could stop the daemon running. Did you see the lcdproc server start?

                              Steve

                              1 Reply Last reply Reply Quote 0
                              • B
                                Borage
                                last edited by

                                I have no drivers in this path, only in /usr/pbi/lcdproc-i386/local/lib/lcdproc/. The lcdproc started, I can see that in the LCD display and with the ps command.

                                1 Reply Last reply Reply Quote 0
                                • stephenw10S
                                  stephenw10 Netgate Administrator
                                  last edited by

                                  I have no drivers there either. It shouldn't matter because the PBI system is supposed to take care of that. When you call the LCDd executable it is actually a link to file within the PBI subdirectories. From there the relative path results in the location you are entering.

                                  Was LCDd starting before you changed the driver path?

                                  Steve

                                  1 Reply Last reply Reply Quote 0
                                  • B
                                    Borage
                                    last edited by

                                    My LCD started every time before i changed the path, except that the display showed zero screens (the LCD screen showed only LCDproc Server Cli: 0 Scr: 0).

                                    The only problem for now, if the service dies I cannot simply restart it to get the displays back. In the previous pfSense version, I just ran the following script to solve the problem. Now I only get the message unable to connect to localhost:13666.

                                    /usr/local/etc/rc.d/lcdproc.sh restart
                                    
                                    1 Reply Last reply Reply Quote 0
                                    • stephenw10S
                                      stephenw10 Netgate Administrator
                                      last edited by

                                      Have you read the rest of this thread where I talked about having to use a different startup procedure? I suspect that if you're still using the package method you probably have two copies of LCDd running on different ports one of which isn't responding.

                                      Steve

                                      1 Reply Last reply Reply Quote 0
                                      • B
                                        Borage
                                        last edited by

                                        Only one process when i ran this command.

                                        [2.2-RC][admin@pfsense.localdomain]/root: pgrep -anx LCDd
                                        70130
                                        

                                        Something changed in one of the latest updates, now I cannot restart the service like before. The only way to get the screens back is to reboot pfsense.

                                        [2.2-RC][admin@pfsense.localdomain]/root: /usr/local/etc/rc.d/lcdproc.sh restart
                                        [2.2-RC][admin@pfsense.localdomain]/root: 
                                        Warning: fsockopen(): unable to connect to localhost:13666 (Operation timed out) in /usr/local/pkg/lcdproc_client.php on line 915
                                        
                                        Warning: stream_set_timeout() expects parameter 1 to be resource, boolean given in /usr/local/pkg/lcdproc_client.php on line 916
                                        
                                        1 Reply Last reply Reply Quote 0
                                        • B
                                          Borage
                                          last edited by

                                          I disabled the firewall with the following command, but it is not possible to connect to localhost.

                                          'pfctl -d
                                          

                                          Everything works as expected after that I changed the LCDd daemon to listen on the LAN IP address and the client to connect to the same address.

                                          Edit:

                                          I permanently fixed the problem by editing the following file.

                                          /usr/local/pkg/lcdproc.inc

                                          	define('LCDPROC_HOST','localhost');
                                          	define('LCDPROC_PORT','13666');
                                          

                                          My changes: See line 36

                                          	define('LCDPROC_HOST','127.0.0.1');
                                          	define('LCDPROC_PORT','13666');
                                          
                                          1 Reply Last reply Reply Quote 0
                                          • T
                                            Topper727
                                            last edited by

                                            I made those code changes in /usr/local/pkg/lcdproc.inc and changes in the LCDd.conf file.

                                            I am using LCDproc-dev

                                            DriverPath=/usr/pbi/lcdproc-amd64/local/lib/lcdproc

                                            This is where my drivers are in the 64 bit version.

                                            When I start the service I get
                                            Could not read config file: /usr/local/etc/LCDd.conf
                                            Critical error while processing settings, abort.

                                            but I have the file there. It has 644 permissions to the Proxy group

                                            I get nothing back when I run pgrep -anx LCDd

                                            I ran the service by
                                            /usr/local/etc/rc.d/lcdproc.sh restart

                                            and got
                                            Could not read config file: /usr/local/etc/LCDd.conf
                                            Critical error while processing settings, abort.

                                            Warning: fsockopen(): unable to connect to 127.0.0.1:13666 (Operation timed out) in /usr/local/pkg/lcdproc_client.php on line 915

                                            Warning: stream_set_timeout() expects parameter 1 to be resource, boolean given in /usr/local/pkg/lcdproc_client.php on line 916

                                            If someone gets me the fix code I will put it into the version and have it merged so it will be updated for everyone

                                            Dell 2950 g3 server
                                            Intel(R) Xeon(R) CPU E5430 @ 2.66GHz
                                            Current: 2000 MHz, Max: 2667 MHz
                                            8 CPUs: 2 package(s) x 4 core(s)
                                            8152 MiB and 600meg 10k drive
                                            Pfsense 2.4 .. Hoping to get the phpvirtualbox going again.

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