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

    "clog: ERROR: could not write output (Bad address)"

    Scheduled Pinned Locked Moved Problems Installing or Upgrading pfSense Software
    4 Posts 2 Posters 2.2k 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.
    • D
      Delmir
      last edited by

      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.

      I´m also getting some "clog.core" dumps here and there.

      1 Reply Last reply Reply Quote 0
      • D
        Delmir
        last edited by

        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, I´m 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.

        1 Reply Last reply Reply Quote 0
        • C
          charliem
          last edited by

          '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.

          [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
          
          
          1 Reply Last reply Reply Quote 0
          • D
            Delmir
            last edited by

            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 doesn´t seem to be a good idea. Replaced…. much better!!!

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