Announcement

Collapse
No announcement yet.

server filling syslog with messages

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • mrw
    replied
    Originally posted by mherger View Post
    When the log file is filling up the filesystem then you should first of
    all figure out why it is logging that much!
    Agree 100%.

    I had mostly picked up on the 'syslog' comments.

    Worth knowing:
    • systemd will direct anything emitted from STDOUT and STDERR to its own journal.

      Where it will be accumulated and pruned according to its own settings/environment.
      journalctl is the systemd access mechanism.

      The LMS Unit Service file could be modified so that this stuff is just thrown away, but LMS' --quiet option also does this.
    • LMS, by default, directs its log output both to the regular LMS log files and to STDOUT.

      Clarification: STDOUT comes about through use of the screen log4Perl appender.

      The --quiet option does, now, suppress STDOUT. (Requires LMS 8.3.1, I think...)
    • Debian, by default, configures the systemd journal to forward logs to syslog.

    • So we can end up with LMS' log output being stored in each of:
      • systemd's journal files
      • syslog
      • LMS' own log files


    I'm still not convinced that the --quiet option works precisely as intended, because I think it should be explicitly adding/removing the screen item from the log4perl.rootLogger = ERROR, server, screen setting every time LMS, or the Scanner, starts. It's been this way for 15 years or so.


    The recent change, https://github.com/Logitech/slimserv...1da7aa065c6a6f, seems to sidestep this point by pushing STDOUT to /dev/null.
    Last edited by mrw; 2022-11-22, 12:30. Reason: Clarify why LMS logs to STDOUT

    Leave a comment:


  • mrw
    replied
    Has the OP tried putting the line SLIMOPTIONS="--quiet" in the file /etc/default/logitechmediaserver ?

    It should work with LMS 8.3.1, this option was fixed up a year or two ago, specifically with systemd in mind.

    Perhaps this should be a default setting for the Debian package.

    Leave a comment:


  • Paul Webster
    replied
    Does scanner.log contain anything that is not from scanner?

    Leave a comment:


  • Millwood
    replied
    Originally posted by gordonb3 View Post
    Suddenly? Possibly your system got corrupted. If you go to the setting - information page, what does it state for `Operating System`?

    If it doesn't say `Debian...` then different paths apply for various settings. Another possibility is that the log file path went missing or became unwritable and a fallback came into play. Last, the log file location may have become overridden in the systemd service file. Check the command line that was used to start LMS.
    OS is correct in info page.
    Log is written BOTH in squeezebox/scanner and in syslog, so no access issues. the service file looks fine.
    #================================================= ======================
    # Unit section
    #================================================= ======================

    [Unit]

    Description=Logitech Media Server

    # Ensures LMS is shutdown before network. And that the network service
    # has at least been started.

    After=network.target

    # Make LMS wait for network-online.target (if it gets started).
    # See notes below.

    After=network-online.target

    #-----------------------------------------------------------------------
    # Some notes on networking targets:
    #-----------------------------------------------------------------------

    # We leave it to the user to specify 'Wants=network-online.target' if he
    # chooses, because it may not suit all users. But we specify
    # 'After=network-online.target' because the SysV init script has
    # essentially behaved that way by virtue of the 'Required-Start: $all'
    # stanza included within it.
    # This is also the approach taken in Debian's & Ubuntu's implementation
    # of 'rc.local.service'.
    #
    # On systemd >= 217, user might execute:
    # 'systemctl add-wants logitechmediaserver.service network-online.target'
    #
    # The effects of the 'After' and 'Wants' 'network-online' stanzas are
    # very system dependent. They may or may not ensure that LMS starts up
    # after network connections have been established, and they may or may
    # not cause a delay in LMS start up.
    #
    # 'After=network-online.target' schedules LMS to start after the network
    # is fully up, whatever that may mean. But it is only effective if the
    # 'network-online.target' is active and, even then, it is only effective
    # if the user's system has been, or can be, configured to wait
    # appropriately for network connections to be established before
    # reaching this target.
    #
    # 'Wants=network-online.target' would activate (pull in) that target.
    #

    #================================================= ======================
    # Service section
    #================================================= ======================

    [Service]

    #-----------------------------------------------------------------------
    # Set start up parameters, essentially replicating the SysV init script.
    #-----------------------------------------------------------------------

    # Use of '/etc/default/logitechmediaserver' to set start up parameters
    # is supported, for consistency with the init script.
    # But setting 'SLIMUSER' is not supported. This unit file will always
    # start LMS as user 'squeezeboxserver'.
    # The user may override that, the methods available depend on the
    # installed version of systemd.

    # Note one consequence of this approach: LMS can now see environment
    # variables that correspond to the start up parameters, should it choose
    # to look (it doesn't at present). This behaviour is an artefact of the
    # approach adopted by this unit file and may well change. It should not
    # be relied upon in any way.

    # Set PATH - same value as set by SysV init script.

    Environment="PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin"

    # Default run time settings. These are used as arguments to LMS when it
    # is launched.

    Environment="LOGDIR=/var/log/squeezeboxserver/"
    Environment="PREFSDIR=/var/lib/squeezeboxserver/prefs"
    Environment="CACHEDIR=/var/lib/squeezeboxserver/cache"
    Environment="CHARSET=utf8"

    # Supplementary run time settings may be defined in
    # '/etc/default/logitechmediaserver'. Entries made here would override
    # the defaults defined above.

    EnvironmentFile=-/etc/default/logitechmediaserver

    #
    # If you want to add additional options use
    # /usr/sbin/squeezeboxserver --help
    # for the supported options and place them into the file:
    # /etc/default/logitechmediaserver.
    # For example:
    # SLIMOPTIONS="--failsafe --nomysqueezebox"
    #

    #-----------------------------------------------------------------------
    # Set up user and logging.
    #-----------------------------------------------------------------------

    # Remark: User can't be parameterized in a unit file. We could choose to
    # run LMS as root, and pass the USER option to it. But that adds
    # unnecessary risk.

    User=squeezeboxserver

    # LMS will fail to start if a writeable log directory does not exist and
    # it cannot create it. This can easily happen where '/var/log' is
    # mounted on a temporary file system and requires root permissions to
    # create.
    # This stanza instructs systemd to create the standard directory
    # '/var/log/squeezeboxserver' if it does not exist, with appropriate
    # permissions and ownership.
    # The user may specify a different directory by setting the 'LOGDIR'
    # run time variable, but it is then his responsibility to ensure that
    # it exists and is writeable.
    # Note: Only effective in systemd >= 235. Earlier releases will see
    # harmless 'Unknown lvalue' messages logged.

    LogsDirectory=squeezeboxserver
    LogsDirectoryMode=0755

    #-----------------------------------------------------------------------
    # Execution start
    #-----------------------------------------------------------------------

    # We want LMS to handle SIGPIPE, as it can help terminate misbehaving
    # transcoder pipelines.

    IgnoreSIGPIPE=no

    # LMS is stable. So we don't want systemd to restart it if it fails.
    # That just obscures errors.

    Restart=no

    # We do not instruct LMS to daemonize with the '--daemon' option,
    # systemd prefers that we don't. We need 'Type=simple', or 'Type=exec'.

    # Type currently defaults to 'simple', but may usefully default to
    # 'exec' in future ('exec' available in systemd >= 240). So left unset.

    #Type=simple

    ExecStart=/usr/sbin/squeezeboxserver --prefsdir $PREFSDIR --logdir $LOGDIR --cachedir $CACHEDIR --charset $CHARSET $SLIMOPTIONS

    #-----------------------------------------------------------------------
    # Execution termination
    #-----------------------------------------------------------------------

    KillMode=control-group
    KillSignal=SIGTERM

    # Never send HUP, LMS uses this to reinitialize cache, etc.
    SendSIGHUP=no

    # Same timeout as SysV init script. We definitely want to send that
    # final SIGKILL.
    TimeoutStopSec=30
    SendSIGKILL=Yes

    #================================================= ======================
    # Install section
    #================================================= ======================

    [Install]
    # Directly equivalent to run levels 2,3,4.
    # Also run level 5, 'graphical.target', because that pulls in
    # 'multi-user.target'.

    WantedBy=multi-user.target

    Leave a comment:


  • gordonb3
    replied
    Originally posted by Millwood View Post
    Suddenly, I'm seeing messages like:
    Suddenly? Possibly your system got corrupted. If you go to the setting - information page, what does it state for `Operating System`?

    If it doesn't say `Debian...` then different paths apply for various settings. Another possibility is that the log file path went missing or became unwritable and a fallback came into play. Last, the log file location may have become overridden in the systemd service file. Check the command line that was used to start LMS.

    Leave a comment:


  • Millwood
    replied
    Originally posted by Paul Webster View Post
    Perhaps something in the referred to
    /var/lib/squeezeboxserver/prefs/log.conf
    might help
    No mention of syslog here.

    # This file is autogenerated by Slim::Utils::Log

    # If you wish to modify, make a copy and call Logitech Media Server
    # with the --logconf=customlog.conf option

    log4perl.additivity.perfmon = 0
    log4perl.appender.perfmon = Log::Log4perl::Appender::File
    log4perl.appender.perfmon.filename = sub { Slim::Utils::Log:erfmonLogFile() }
    log4perl.appender.perfmon.layout = Log::Log4perl::Layout::PatternLayout
    log4perl.appender.perfmon.layout.ConversionPattern = [%d{yy-MM-dd HH:mm:ss.SSSS}] %m%n
    log4perl.appender.perfmon.mode = sub { Slim::Utils::Log:erfmonLogMode() }
    log4perl.appender.perfmon.utf8 = 1
    log4perl.appender.scanner = Log::Log4perl::Appender::File
    log4perl.appender.scanner.filename = sub { Slim::Utils::Log::scannerLogFile() }
    log4perl.appender.scanner.layout = Log::Log4perl::Layout::PatternLayout
    log4perl.appender.scanner.layout.ConversionPattern = [%d{yy-MM-dd HH:mm:ss.SSSS}] %M (%L) %m%n
    log4perl.appender.scanner.mode = sub { Slim::Utils::Log::scannerLogMode() }
    log4perl.appender.scanner.utf8 = 1
    log4perl.appender.screen = Log::Log4perl::Appender::Screen
    log4perl.appender.screen-raw = Log::Log4perl::Appender::Screen
    log4perl.appender.screen-raw.layout = Log::Log4perl::Layout::PatternLayout
    log4perl.appender.screen-raw.layout.ConversionPattern = [%d{yy-MM-dd HH:mm:ss.SSSS}] %m%n
    log4perl.appender.screen-raw.stderr = 0
    log4perl.appender.screen-raw.utf8 = 1
    log4perl.appender.screen.layout = Log::Log4perl::Layout::PatternLayout
    log4perl.appender.screen.layout.ConversionPattern = [%d{yy-MM-dd HH:mm:ss.SSSS}] %M (%L) %m%n
    log4perl.appender.screen.stderr = 0
    log4perl.appender.screen.utf8 = 1
    log4perl.appender.server = Log::Log4perl::Appender::File
    log4perl.appender.server.filename = sub { Slim::Utils::Log::serverLogFile() }
    log4perl.appender.server.layout = Log::Log4perl::Layout::PatternLayout
    log4perl.appender.server.layout.ConversionPattern = [%d{yy-MM-dd HH:mm:ss.SSSS}] %M (%L) %m%n
    log4perl.appender.server.mode = sub { Slim::Utils::Log::serverLogMode() }
    log4perl.appender.server.recreate = 1
    log4perl.appender.server.recreate_check_signal = USR1
    log4perl.appender.server.utf8 = 1
    log4perl.logger.artwork = ERROR
    log4perl.logger.artwork.imageproxy = ERROR
    log4perl.logger.control.command = ERROR
    log4perl.logger.control.queries = ERROR
    log4perl.logger.control.stdio = ERROR
    log4perl.logger.database.info = ERROR
    log4perl.logger.database.mysql = ERROR
    log4perl.logger.database.sql = ERROR
    log4perl.logger.database.virtuallibraries = ERROR
    log4perl.logger.factorytest = ERROR
    log4perl.logger.favorites = ERROR
    log4perl.logger.formats.audio = ERROR
    log4perl.logger.formats.metadata = ERROR
    log4perl.logger.formats.playlists = ERROR
    log4perl.logger.formats.xml = ERROR
    log4perl.logger.menu.trackinfo = ERROR
    log4perl.logger.network.asyncdns = ERROR
    log4perl.logger.network.asynchttp = ERROR
    log4perl.logger.network.cometd = ERROR
    log4perl.logger.network.http = ERROR
    log4perl.logger.network.jsonrpc = ERROR
    log4perl.logger.network.protocol = ERROR
    log4perl.logger.network.protocol.slimp3 = ERROR
    log4perl.logger.network.protocol.slimproto = ERROR
    log4perl.logger.network.repositories = ERROR
    log4perl.logger.network.squeezenetwork = ERROR
    log4perl.logger.network.upnp = ERROR
    log4perl.logger.os.files = ERROR
    log4perl.logger.os.paths = ERROR
    log4perl.logger.perfmon = WARN, screen-raw, perfmon
    log4perl.logger.player.alarmclock = ERROR
    log4perl.logger.player.display = ERROR
    log4perl.logger.player.firmware = ERROR
    log4perl.logger.player.fonts = ERROR
    log4perl.logger.player.ir = ERROR
    log4perl.logger.player.jive = ERROR
    log4perl.logger.player.menu = ERROR
    log4perl.logger.player.playlist = ERROR
    log4perl.logger.player.source = ERROR
    log4perl.logger.player.streaming = ERROR
    log4perl.logger.player.streaming.direct = ERROR
    log4perl.logger.player.streaming.remote = ERROR
    log4perl.logger.player.sync = ERROR
    log4perl.logger.player.text = ERROR
    log4perl.logger.player.ui = ERROR
    log4perl.logger.player.ui.screensaver = ERROR
    log4perl.logger.plugin.SettingsManager = ERROR
    log4perl.logger.plugin.SrvrPowerCtrl = ERROR
    log4perl.logger.plugin.SyncOptions = ERROR
    log4perl.logger.plugin.audioscrobbler = ERROR
    log4perl.logger.plugin.bbciplayer = ERROR
    log4perl.logger.plugin.bbciplayer.extra = ERROR
    log4perl.logger.plugin.bbciplayer.hls = ERROR
    log4perl.logger.plugin.bbciplayer.livetxt = ERROR
    log4perl.logger.plugin.bbciplayer.rtmp = ERROR
    log4perl.logger.plugin.classical = ERROR
    log4perl.logger.plugin.cli = ERROR
    log4perl.logger.plugin.customskip = ERROR
    log4perl.logger.plugin.databasequery = ERROR
    log4perl.logger.plugin.deezer = ERROR
    log4perl.logger.plugin.digitalinput = ERROR
    log4perl.logger.plugin.dndplay = ERROR
    log4perl.logger.plugin.dontstopthemusic = ERROR
    log4perl.logger.plugin.extensions = ERROR
    log4perl.logger.plugin.findart = ERROR
    log4perl.logger.plugin.fulltext = ERROR
    log4perl.logger.plugin.gallery = ERROR
    log4perl.logger.plugin.imagebrowser = ERROR
    log4perl.logger.plugin.infobrowser = ERROR
    log4perl.logger.plugin.lfm = ERROR
    log4perl.logger.plugin.licensemanager = ERROR
    log4perl.logger.plugin.linein = ERROR
    log4perl.logger.plugin.live365 = ERROR
    log4perl.logger.plugin.mediafly = ERROR
    log4perl.logger.plugin.mog = ERROR
    log4perl.logger.plugin.musicinfoscr = ERROR
    log4perl.logger.plugin.napster = ERROR
    log4perl.logger.plugin.nprradio = ERROR
    log4perl.logger.plugin.onlinelibrary = ERROR
    log4perl.logger.plugin.orange = ERROR
    log4perl.logger.plugin.pandora = ERROR
    log4perl.logger.plugin.playreal = ERROR
    log4perl.logger.plugin.playwma = ERROR
    log4perl.logger.plugin.podcast = ERROR
    log4perl.logger.plugin.powersave = ERROR
    log4perl.logger.plugin.presetseditor = ERROR
    log4perl.logger.plugin.radio = ERROR
    log4perl.logger.plugin.randomplay = ERROR
    log4perl.logger.plugin.remotelibrary = ERROR
    log4perl.logger.plugin.rhapsodydirect = ERROR
    log4perl.logger.plugin.rssnews = ERROR
    log4perl.logger.plugin.siggen = ERROR
    log4perl.logger.plugin.sirius = ERROR
    log4perl.logger.plugin.slacker = ERROR
    log4perl.logger.plugin.sn = ERROR
    log4perl.logger.plugin.songscanner = ERROR
    log4perl.logger.plugin.spotifylogi = ERROR
    log4perl.logger.plugin.tidal = ERROR
    log4perl.logger.plugin.upnp = ERROR
    log4perl.logger.plugin.wimp = ERROR
    log4perl.logger.plugin.xpl = ERROR
    log4perl.logger.prefs = ERROR
    log4perl.logger.scan = ERROR
    log4perl.logger.scan.auto = DEBUG
    log4perl.logger.scan.import = ERROR
    log4perl.logger.scan.scanner = ERROR
    log4perl.logger.server = ERROR
    log4perl.logger.server.memory = OFF
    log4perl.logger.server.plugins = ERROR
    log4perl.logger.server.scheduler = ERROR
    log4perl.logger.server.select = ERROR
    log4perl.logger.server.timers = ERROR
    log4perl.logger.server.update = ERROR
    log4perl.logger.wizard = ERROR
    log4perl.rootLogger = ERROR, server, screen

    Leave a comment:


  • Paul Webster
    replied
    Perhaps something in the referred to
    /var/lib/squeezeboxserver/prefs/log.conf
    might help

    Leave a comment:


  • Millwood
    replied
    Originally posted by Paul Webster View Post
    While scanner is running can you check to see what command line it was launched with?

    ps -ef | grep perl

    will probably show it
    /usr/sbin/squeezeboxserver-scanner --logdir=/var/log/squeezeboxserver/ --prefsdir=/var/lib/squeezeboxserver/prefs --priority=0 --logconfig=/var/lib/squeezeboxserver/prefs/log.conf --rescan --debug artwork=ERROR,formats.playlists=ERROR,plugin.tidal =ERROR,database.info=ERROR,database.virtuallibrari es=ERROR,scan=ERROR,formats.audio=ERROR,scan.impor t=ERROR,scan.auto=DEBUG,scan.scanner=ERROR

    Leave a comment:


  • Paul Webster
    replied
    While scanner is running can you check to see what command line it was launched with?

    ps -ef | grep perl

    will probably show it

    Leave a comment:


  • Millwood
    replied
    Originally posted by Paul Webster View Post
    LMS uses Log4Perl ... so perhaps that has somehow been configured to send to syslog.

    It look like starting LMS with -logfile syslog will make it send data there instead of its own logs.

    Are you seeing the same log entries in syslog AND scanner.log/server.log ?
    As I said above, scanner seems duplicated in syslog. server log is NOT duplicated in syslog.

    Leave a comment:


  • Paul Webster
    replied
    LMS uses Log4Perl ... so perhaps that has somehow been configured to send to syslog.

    It look like starting LMS with -logfile syslog will make it send data there instead of its own logs.

    Are you seeing the same log entries in syslog AND scanner.log/server.log ?

    Leave a comment:


  • Millwood
    replied
    Removed xPL

    Nov 21 04:00:04 aptiva squeezeboxserver[606]: [22-11-21 04:00:04.4078] main::main (202) Starting Logitech Media Server scanner (v8.3.0, 1667251155, Fri 04 Nov 2022 09:14:25 AM CET) perl 5.028001
    Nov 21 04:00:07 aptiva squeezeboxserver[606]: [22-11-21 04:00:07.2408] Slim::Music::Import::runImporter (579) Starting Slim::Media::MediaFolderScan scan
    Nov 21 04:00:07 aptiva squeezeboxserver[606]: [22-11-21 04:00:07.2412] Slim::Utils::Scanner::Local::rescan (179) Discovering audio files in /home/marc/BigStuff/RIPDIR
    Nov 21 04:00:11 aptiva squeezeboxserver[606]: [22-11-21 04:00:11.5099] Slim::Utils::Scanner::Local::__ANON__ (191) Start processing found tracks
    Nov 21 04:00:11 aptiva squeezeboxserver[606]: [22-11-21 04:00:11.5103] Slim::Utils::Scanner::Local::__ANON__ (199) Connect do DB
    ...
    52 lines altogether in syslog which also appear in the squeezebox scanner log.

    Leave a comment:


  • BoomX2
    replied
    Originally posted by Millwood View Post
    I'm still seeing this with 8.3.0 in syslog.

    Nov 19 04:00:46 aptiva squeezeboxserver[606]: [22-11-18 04:00:11.0387] Slim::Plugin::xPL::Plugin::xplExecuteCallback (619) Warning: Called without a client: rescan
    Nov 19 04:00:46 aptiva squeezeboxserver[606]: [22-11-18 04:00:11.2374] Slim::Plugin::xPL::Plugin::xplExecuteCallback (619) Warning: Called without a client: prefset
    Nov 19 04:00:46 aptiva squeezeboxserver[606]: [22-11-18 04:00:14.7362] Slim::Plugin::xPL::Plugin::xplExecuteCallback (619) Warning: Called without a client: scanner notify
    Nov 19 04:00:46 aptiva squeezeboxserver[606]: [22-11-18 04:00:19.1037] Slim::Plugin::xPL::Plugin::xplExecuteCallback (619) Warning: Called without a client: scanner notify
    ...
    for about 100 lines.
    Unless you have a specific use for it disable the xPL Interface plugin.

    Leave a comment:


  • Millwood
    replied
    I'm still seeing this with 8.3.0 in syslog.

    Nov 19 04:00:46 aptiva squeezeboxserver[606]: [22-11-18 04:00:11.0387] Slim::Plugin::xPL::Plugin::xplExecuteCallback (619) Warning: Called without a client: rescan
    Nov 19 04:00:46 aptiva squeezeboxserver[606]: [22-11-18 04:00:11.2374] Slim::Plugin::xPL::Plugin::xplExecuteCallback (619) Warning: Called without a client: prefset
    Nov 19 04:00:46 aptiva squeezeboxserver[606]: [22-11-18 04:00:14.7362] Slim::Plugin::xPL::Plugin::xplExecuteCallback (619) Warning: Called without a client: scanner notify
    Nov 19 04:00:46 aptiva squeezeboxserver[606]: [22-11-18 04:00:19.1037] Slim::Plugin::xPL::Plugin::xplExecuteCallback (619) Warning: Called without a client: scanner notify
    ...
    for about 100 lines.

    Leave a comment:


  • mherger
    replied
    server filling syslog with messages

    > "squeezeboxserver[932]:
    > #011file:///var/lib/squeezeboxserver/prefs/clientplaylist_000000000000.m3u
    > doesn't exist on disk - skipping!"


    Is there no different line before or after that? Can you share a longer
    excerpt pluss the full server.log.zip file?

    > Logitech Media Server Version: 7.9.2 - 1578996832 @ Tue Jan 14 12:15:02


    If that's still true, then I'd recommend you upgrade your system.

    Leave a comment:

Working...
X