systemd / systemd/systemd

journal-upload & journal-remote: Changing TCP port doesn't work

Open
#13,205 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

journal-remote
Dominant language
C
Stars
16.7k
Forks
4.7k
Avg merge
1d 6h
Merged PRs (30d)
140

Description

systemd version the issue has been seen with

CLIENT
systemd 242 (242.84-1-arch)
+PAM +AUDIT -SELINUX -IMA -APPARMOR +SMACK -SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD +IDN2 -IDN +PCRE2 default-hierarchy=hybrid

SERVER
systemd 237
+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN2 +IDN -PCRE2 default-hierarchy=hybrid

Used distribution

CLIENT
arch

SERVER
Ubuntu 1804 on AWS

Expected behaviour you didn't see

journal-upload and journal-remote working together using a non-default TCP port.

Unexpected behaviour you saw

They work together using the default port (19532) but not a different port.

With Firefox, I confirmed the default port is closed and the server is listening on the new port. This could be a documentation error, not a programming error.

Steps to reproduce the problem

CLIENT

changed /etc/systemd/journal-upload.conf:
URL=https://server/
to
URL=https://server:12345/

SERVER

created /etc/systemd/system/systemd-journal-remote.socket.d/override.conf:
[Socket]
ListenStream=
ListenStream=12345

CLIENT

Jul 28 22:16:32.202717 client systemd[1]: Started Journal Remote Upload Service.
Jul 28 22:16:32.834654 client systemd-journal-upload[328]: [89B blob data]
Jul 28 22:16:32.947118 client systemd[1]: systemd-journal-upload.service: Main process exited, code=exited, status=1/FAILURE
Jul 28 22:16:32.994406 client kernel: audit: type=1131 audit(1564373792.939:37): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-journal-upload comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=failed'
Jul 28 22:16:32.939000 client audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-journal-upload comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=failed'
Jul 28 22:16:32.947643 client systemd[1]: systemd-journal-upload.service: Failed with result 'exit-code'.

~$ systemctl status systemd-journal-upload
● systemd-journal-upload.service - Journal Remote Upload Service
   Loaded: loaded (/usr/lib/systemd/system/systemd-journal-upload.service; enabled; vendor preset: disabled)
  Drop-In: /etc/systemd/system/systemd-journal-upload.service.d
           └─override.conf
   Active: activating (auto-restart) (Result: exit-code) since Sun 2019-07-28 22:17:07 PDT; 1min 11s ago
     Docs: man:systemd-journal-upload(8)
  Process: 356 ExecStart=/usr/lib/systemd/systemd-journal-upload --save-state (code=exited, status=1/FAILURE)
 Main PID: 356 (code=exited, status=1/FAILURE)
   Status: "Shutting down..."

Jul 28 22:17:07 client systemd[1]: systemd-journal-upload.service: Failed with result 'exit-code'.

SERVER

Jul 29 04:17:26.695761 server systemd-journal-remote[1086]: microhttpd: Error: received handshake message out of context

~$ systemctl status systemd-journal-remote.socket
● systemd-journal-remote.socket - Journal Remote Sink Socket
   Loaded: loaded (/lib/systemd/system/systemd-journal-remote.socket; enabled; vendor preset: disabled)
  Drop-In: /etc/systemd/system/systemd-journal-remote.socket.d
           └─override.conf
   Active: active (running) since Mon 2019-07-29 04:08:19 UTC; 1min 50s ago
   Listen: [::]:12345 (Stream)
    Tasks: 0 (limit: 1152)
   CGroup: /system.slice/systemd-journal-remote.socket

Jul 29 04:08:19 server systemd[1]: Listening on Journal Remote Sink Socket.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the journal-upload.conf URL and the systemd-journal-remote.socket override.conf described in the report, then trace the systemd-journal-upload and systemd-journal-remote entry points while reviewing the client and server logs. Done means determining whether a non-default TCP port works correctly or documenting the configuration limitation.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, linux
Domain
networking, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.