pfSense Gold Subscription

Author Topic: [LCDProc] - Could not read config file  (Read 15208 times)

0 Members and 1 Guest are viewing this topic.

Offline Borage

  • Jr. Member
  • **
  • Posts: 36
  • Karma: +2/-0
    • View Profile
Re: [LCDProc] - Could not read config file
« Reply #60 on: December 28, 2014, 01:35:51 pm »
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.  :)

Code: [Select]
[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

Offline stephenw10

  • Administrator
  • Hero Member
  • *****
  • Posts: 11909
  • Karma: +467/-15
    • View Profile
Re: [LCDProc] - Could not read config file
« Reply #61 on: December 28, 2014, 04:12:57 pm »
Using the lcdproc or lcdproc-dev package? What hardware?

Steve

Offline Borage

  • Jr. Member
  • **
  • Posts: 36
  • Karma: +2/-0
    • View Profile
Re: [LCDProc] - Could not read config file
« Reply #62 on: December 28, 2014, 04:54:07 pm »
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

Code: [Select]
[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.

Code: [Select]
DriverPath=/usr/pbi/lcdproc-i386/local/lib/lcdproc/

Offline stephenw10

  • Administrator
  • Hero Member
  • *****
  • Posts: 11909
  • Karma: +467/-15
    • View Profile
Re: [LCDProc] - Could not read config file
« Reply #63 on: December 28, 2014, 05:00:53 pm »
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

Offline Borage

  • Jr. Member
  • **
  • Posts: 36
  • Karma: +2/-0
    • View Profile
Re: [LCDProc] - Could not read config file
« Reply #64 on: December 28, 2014, 05:08:13 pm »
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.

Offline stephenw10

  • Administrator
  • Hero Member
  • *****
  • Posts: 11909
  • Karma: +467/-15
    • View Profile
Re: [LCDProc] - Could not read config file
« Reply #65 on: December 28, 2014, 05:26:59 pm »
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

Offline Borage

  • Jr. Member
  • **
  • Posts: 36
  • Karma: +2/-0
    • View Profile
Re: [LCDProc] - Could not read config file
« Reply #66 on: December 28, 2014, 05:59:42 pm »
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.

Code: [Select]
/usr/local/etc/rc.d/lcdproc.sh restart

Offline stephenw10

  • Administrator
  • Hero Member
  • *****
  • Posts: 11909
  • Karma: +467/-15
    • View Profile
Re: [LCDProc] - Could not read config file
« Reply #67 on: December 28, 2014, 08:24:37 pm »
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

Offline Borage

  • Jr. Member
  • **
  • Posts: 36
  • Karma: +2/-0
    • View Profile
Re: [LCDProc] - Could not read config file
« Reply #68 on: December 29, 2014, 11:15:15 am »
Only one process when i ran this command.

Code: [Select]
[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.


Code: [Select]
[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

Offline Borage

  • Jr. Member
  • **
  • Posts: 36
  • Karma: +2/-0
    • View Profile
Re: [LCDProc] - Could not read config file
« Reply #69 on: December 29, 2014, 12:19:54 pm »
I disabled the firewall with the following command, but it is not possible to connect to localhost.

Code: [Select]
'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

Code: [Select]
define('LCDPROC_HOST','localhost');
define('LCDPROC_PORT','13666');


My changes: See line 36

Code: [Select]
define('LCDPROC_HOST','127.0.0.1');
define('LCDPROC_PORT','13666');
« Last Edit: December 30, 2014, 11:47:23 am by Borage »

Offline Topper727

  • Full Member
  • ***
  • Posts: 245
  • Karma: +25/-0
    • View Profile
Re: [LCDProc] - Could not read config file
« Reply #70 on: January 06, 2015, 11:53:15 pm »
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.

Offline Borage

  • Jr. Member
  • **
  • Posts: 36
  • Karma: +2/-0
    • View Profile
Re: [LCDProc] - Could not read config file
« Reply #71 on: January 07, 2015, 03:10:26 am »
When I start the service I get
Could not read config file: /usr/local/etc/LCDd.conf

For some reason the conf file must be located in the following path.


32-bit

Code: [Select]
/usr/pbi/lcdproc-i386/local/etc/
64-bit

Code: [Select]
/usr/pbi/lcdproc-amd64/local/etc

Offline stephenw10

  • Administrator
  • Hero Member
  • *****
  • Posts: 11909
  • Karma: +467/-15
    • View Profile
Re: [LCDProc] - Could not read config file
« Reply #72 on: January 07, 2015, 07:43:04 am »
More accurately you can put the conf file anywhere but /usr/local/etc because if you do LCDd will look in the wrong place. This appears to be an issue with the pbi packaging.

Steve

Offline Topper727

  • Full Member
  • ***
  • Posts: 245
  • Karma: +25/-0
    • View Profile
Re: [LCDProc] - Could not read config file
« Reply #73 on: January 15, 2015, 12:16:22 am »
Has someone started to work on this or not.. I wish I had this working.. if working i might spend some effort to make some new features for it
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.

Offline Topper727

  • Full Member
  • ***
  • Posts: 245
  • Karma: +25/-0
    • View Profile
Re: [LCDProc] - Could not read config file
« Reply #74 on: January 17, 2015, 10:55:03 pm »
BUMP
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.