Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

empty lines in alloc logs when logging.driver is journald #339

Open
viniciusartur opened this issue May 8, 2024 · 0 comments
Open

empty lines in alloc logs when logging.driver is journald #339

viniciusartur opened this issue May 8, 2024 · 0 comments

Comments

@viniciusartur
Copy link

viniciusartur commented May 8, 2024

In RHEL 9, when running a task with logging.driver set to journald, the alloc logs shows empty lines between the real lines.
It doesn't happen when logging.driver is set to nomad

Given the following redis.hcl:

job "redis" {
  datacenters = ["dc1"]
  type        = "service"

  group "cache" {
    network {
      port "redis" { to = 6379 }
    }

    task "redis" {
      driver = "podman"

      config {
        image = "docker.io/redis"
        ports = ["redis"]
        logging = {
          driver = "journald"
        }
      }
    }
  }
}

  1. Run ./nomad agent -dev -plugin-dir /root/plugins
  2. In another terminal run nomad job run redis.hcl
  3. The output of nomad alloc logs -task redis -job redis is:
1:C 08 May 2024 04:38:17.279 # WARNING Memory overcommit must be enabled! Without it, a background save or replication may fail under low memory condition. Being disabled, it can also cause failures without low memory condition, see https://github.com/jemalloc/jemalloc/issues/1328. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.

1:C 08 May 2024 04:38:17.281 * oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo

1:C 08 May 2024 04:38:17.281 * Redis version=7.2.4, bits=64, commit=00000000, modified=0, pid=1, just started

1:C 08 May 2024 04:38:17.281 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf

1:M 08 May 2024 04:38:17.283 * monotonic clock: POSIX clock_gettime

1:M 08 May 2024 04:38:17.284 * Running mode=standalone, port=6379.

1:M 08 May 2024 04:38:17.285 * Server initialized

1:M 08 May 2024 04:38:17.285 * Ready to accept connections tcp

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant