Netgate SG-1000 microFirewall

Author Topic: "clog: ERROR: could not write output (Bad address)"  (Read 1111 times)

0 Members and 1 Guest are viewing this topic.

Offline Delmir

  • Newbie
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
"clog: ERROR: could not write output (Bad address)"
« on: May 19, 2014, 04:48:50 pm »
Would anyone please advise as to why I'm getting errors on every log with clog, while other commands like cat, tail, less, etc, works fine?

#clog dmesg.boot
...
clog: ERROR: could not write output (Bad address)
#

Problems started to happen after squid was added on version 2.1.2, and it still remains after upgrade via webConfig to 2.1.3.

Im also getting some "clog.core" dumps here and there.
« Last Edit: May 20, 2014, 05:47:35 am by Delmir »

Offline Delmir

  • Newbie
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Re: "clog: ERROR: could not write output (Bad address)"
« Reply #1 on: May 20, 2014, 07:10:19 am »
Yet another grand new and fresh install was done. Everything was fine until system was restored via web/configuration file. Packages iftop and squid were automatically downloaded and installed. I had to "manually" run "squid -z" because squid would not start from the webgui/status/services session. Now, Im starting to see the same errors:

[2.1.3-RELEASE][admin@pfSense.XXXXX]/var/squid/logs(32): clog -f access.log
....
1400586024.807   1089 192.168.1.100 TCP_MISS/200 880 GET http://www.XXXXX.com/ - DIRECT/XXX.XX.98.1 text/html
1400586027.144   2254 192.168.1.100 TCP_MISS/304 311 GET http://www.XXXXX.com/images/XXXXX.com.png - DIRECT/XXX.XX.98.1 -
clog: ERROR: could not write output (Bad address)
[2.1.3-RELEASE][admin@pfSense.XXXXX]/var/squid/logs(33):

I bet that if I continue to use the system, then this same CLOG error will spread to other *.log files.

PS.: Private data was replaced with XXXXX on the above log.

Offline charliem

  • Sr. Member
  • ****
  • Posts: 565
  • Karma: +43/-1
    • View Profile
Re: "clog: ERROR: could not write output (Bad address)"
« Reply #2 on: May 20, 2014, 10:17:37 am »
'clog' is used to view circular log files, but not all pfSense logs are circular.  For my system, circular logs are fixed size 511488 bytes, see below.

There is no problem, just don't use clog for plain text logs or you'll see that error.  I don't use squid, but I'm guessing squid logs are plain text file logs.  Would be nice though to fix clog to handle plain text without dumping core.

Code: [Select]
[2.2-ALPHA][root@pfsense.localdomain]/var/log(12): ls -l
total 9868
-rw-r--r--  1 root  wheel     279 Apr 27 11:01 aculog
-rw-------  1 root  wheel  511488 May 20 10:59 dhcpd.log
-rw-r--r--  1 root  wheel    9261 May 19 22:27 dmesg.boot
-rw-------  1 root  wheel  511488 May 20 11:10 filter.log
-rw-------  1 root  wheel  511488 May 19 22:27 gateways.log
-rw-------  1 root  wheel   34893 Apr 26 20:53 installer.log
-rw-------  1 root  wheel  511488 May 19 23:58 ipsec.log
-rw-------  1 root  wheel  511488 Apr 26 20:50 l2tps.log
-rw-r--r--  1 root  wheel       0 Apr 26 20:59 lastlog
-rw-------  1 root  wheel  511488 Apr 26 20:50 lighttpd.log
drwxr-xr-x  2 root  wheel    1536 May 19 22:28 ntp
-rw-------  1 root  wheel  511488 May 19 22:30 ntpd.log
-rw-------  1 root  wheel  511488 Apr 26 20:50 openvpn.log
-rw-------  1 root  wheel  511488 Apr 26 20:50 poes.log
-rw-------  1 root  wheel  511488 Apr 26 20:50 portalauth.log
-rw-------  1 root  wheel  511488 Apr 26 20:50 ppp.log
-rw-------  1 root  wheel  511488 Apr 26 20:50 pptps.log
-rw-------  1 root  wheel  511488 Apr 26 20:50 relayd.log
-rw-------  1 root  wheel  511488 May 19 22:27 resolver.log
-rw-------  1 root  wheel  511488 May 19 22:27 routing.log
-rw-------  1 root  wheel  511488 May 20 10:43 system.log
-rw-------  1 root  wheel   12202 May 19 22:27 userlog
-rw-r--r--  1 root  wheel     197 May 20 10:28 utx.lastlogin
-rw-------  1 root  wheel    3891 May 20 10:28 utx.log
-rw-------  1 root  wheel  511488 Apr 26 20:50 vpn.log
-rw-------  1 root  wheel  511488 Apr 26 20:50 wireless.log

Offline Delmir

  • Newbie
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Re: "clog: ERROR: could not write output (Bad address)"
« Reply #3 on: June 25, 2014, 07:07:32 am »
Thanks for the info on CLOG, but I was getting similar errors on other logs as well, for example /var/log/system.log and dmesg.log, after a day or two. I also had other issues, as weak MB battery, so my settings kept on changing randomly, but the main problem was an old HD with bad sectors! Rrrr. Using old hardware doesnt seem to be a good idea. Replaced.... much better!!!