Re: [systemd-devel] Why doe I not see the logging with -u
On 12/14/2013 09:22 AM, Cecil Westerhof wrote: I made a first setup to make a service for the H2 database. I made the folowing service file: [Unit] Description=H2 Database [Service] Type=simple ExecStart=/usr/bin/java -cp /home/cecil/java/h2/bin/h2-1.3.174.jar org.h2.tools.Console -tool -tcp Restart=always User=cecil [Install] WantedBy=multi-user.target After starting and stopping I got with ‘journalctl -u h2’: -- Logs begin at Tue, 2013-11-19 06:24:51 CET, end at Sat, 2013-12-14 09:15:01 CET. -- Dec 13 11:37:40 Equus.Decebal.nl java[20909]: Web Console server running at http://127.0.0.2:8082 (only local connections) Dec 13 11:37:40 Equus.Decebal.nl java[20909]: TCP server running at tcp://127.0.0.2:9092 (only local connections) Dec 13 11:42:21 Equus.Decebal.nl java[20975]: Web Console server running at http://127.0.0.2:8082 (only local connections) Dec 13 11:42:21 Equus.Decebal.nl java[20975]: TCP server running at tcp://127.0.0.2:9092 (only local connections) Dec 13 11:42:59 Equus.Decebal.nl java[21031]: Web Console server running at http://127.0.0.2:8082 (only local connections) Dec 13 11:42:59 Equus.Decebal.nl java[21031]: TCP server running at tcp://127.0.0.2:9092 (only local connections) Dec 13 11:43:06 Equus.Decebal.nl java[21068]: Web Console server running at http://127.0.0.2:8082 (only local connections) Dec 13 11:43:06 Equus.Decebal.nl java[21068]: TCP server running at tcp://127.0.0.2:9092 (only local connections) lines 1-9/9 (END) I made a VM with openSUSE 13.1 (which has version 208) and there I get: Dec 16 11:04:07 linux-r4lo.site systemd[1]: Starting H2 Database... Dec 16 11:04:07 linux-r4lo.site systemd[1]: Started H2 Database. Dec 16 11:04:07 linux-r4lo.site java[5521]: Web Console server running at http://127.0.0.2:8082 (only local connections) Dec 16 11:04:08 linux-r4lo.site java[5521]: TCP server running at tcp://127.0.0.2:9092 (only local connections) Dec 16 11:04:39 linux-r4lo.site systemd[1]: Stopping H2 Database... Dec 16 11:04:39 linux-r4lo.site systemd[1]: h2.service: main process exited, code=exited, status=143/n/a Dec 16 11:04:39 linux-r4lo.site systemd[1]: Stopped H2 Database. Dec 16 11:04:39 linux-r4lo.site systemd[1]: Unit h2.service entered failed state. So it looks like there was/is a problem with the 195 version. Time to upgrade my system. Luckily the holiday season is almost there. ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] Why doe I not see the logging with -u
On 12/15/2013 04:57 AM, Zbigniew Jędrzejewski-Szmek wrote: On Sun, Dec 15, 2013 at 01:08:29AM +0100, Cecil Westerhof wrote: And for good measure, the output from SYSTEMD_LOG_LEVEL=debug journalctl -u h2 21 /dev/null|grep 'Journal filter' That gives nothing. Even when I remove /dev/null So you have some old systemd version (= 204). What version is it exactly? systemd 195 suse +PAM +LIBWRAP +AUDIT +SELINUX +IMA +SYSVINIT +LIBCRYPTSETUP +GCRYPT +ACL +XZ My system needs to be upgraded from openSUSE 12.3 to 13.1. I'll do the same on a 13.1 virtual machine. If I do not have it there: problem solved. ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] Why doe I not see the logging with -u
On Sat, 14.12.13 09:22, Cecil Westerhof (cecil.wester...@snow.nl) wrote: I made a first setup to make a service for the H2 database. I made the folowing service file: [Unit] Description=H2 Database [Service] Type=simple ExecStart=/usr/bin/java -cp /home/cecil/java/h2/bin/h2-1.3.174.jar org.h2.tools.Console -tool -tcp Restart=always User=cecil Note that journal -u only shows you the journal files that have been split off for the calling user. How this splitting up takes place is configured via SplitMode= in journald.conf. The default of this value is login, which means only data generated from login sessions are split out, but not data that is just generated from a non-zero UID. A login session is here defined by whether we went though the PAM session hooks or not. The PAM session hooks have the effect that pam_limits and suchlike are applied too, which is usually what you want when you run some service as real user (i.e. where real user means not just as a system user like httpd or mysql, but as somebody who actually logs in via ssh from time to time). Now, by just using User=cecil you simply change user IDs, but you do not open a full PAM session. To get a full PAM session define PAMName= for a service. Lennart -- Lennart Poettering, Red Hat ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] Why doe I not see the logging with -u
On Mon, 16.12.13 00:41, Lennart Poettering (lenn...@poettering.net) wrote: On Sat, 14.12.13 09:22, Cecil Westerhof (cecil.wester...@snow.nl) wrote: I made a first setup to make a service for the H2 database. I made the folowing service file: [Unit] Description=H2 Database [Service] Type=simple ExecStart=/usr/bin/java -cp /home/cecil/java/h2/bin/h2-1.3.174.jar org.h2.tools.Console -tool -tcp Restart=always User=cecil Note that journal -u only shows you the journal files that have been split off for the calling user. How this splitting up takes place is configured via SplitMode= in journald.conf. The default of this value is login, which means only data generated from login sessions are split out, but not data that is just generated from a non-zero UID. A login session is here defined by whether we went though the PAM session hooks or not. The PAM session hooks have the effect that pam_limits and suchlike are applied too, which is usually what you want when you run some service as real user (i.e. where real user means not just as a system user like httpd or mysql, but as somebody who actually logs in via ssh from time to time). Now, by just using User=cecil you simply change user IDs, but you do not open a full PAM session. To get a full PAM session define PAMName= for a service. Oh, sorry, ignore all I wrote above. It's irrelevant for your case. As Zbigniew just pointed out to me -u is short for --unit= not for --user as I somehow mistakenly assummed... Sorry for the confusion, Lennart -- Lennart Poettering, Red Hat ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] Why doe I not see the logging with -u
В Sat, 14 Dec 2013 09:22:46 +0100 Cecil Westerhof cecil.wester...@snow.nl пишет: I made a first setup to make a service for the H2 database. I made the folowing service file: [Unit] Description=H2 Database [Service] Type=simple ExecStart=/usr/bin/java -cp /home/cecil/java/h2/bin/h2-1.3.174.jar org.h2.tools.Console -tool -tcp Restart=always User=cecil [Install] WantedBy=multi-user.target After starting and stopping I got with ‘journalctl -u h2’: ... Should I not see that with the first command, or am I overlooking something? Did you try journalctl -u h2.service? ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] Why doe I not see the logging with -u
On 12/14/2013 09:56 AM, Andrey Borzenkov wrote: I made a first setup to make a service for the H2 database. I made the folowing service file: [Unit] Description=H2 Database [Service] Type=simple ExecStart=/usr/bin/java -cp /home/cecil/java/h2/bin/h2-1.3.174.jar org.h2.tools.Console -tool -tcp Restart=always User=cecil [Install] WantedBy=multi-user.target After starting and stopping I got with ‘journalctl -u h2’: ... Should I not see that with the first command, or am I overlooking something? Did you try journalctl -u h2.service? I did not, but that should give the same result. I just tried it and it does give the same result. ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] Why doe I not see the logging with -u
В Sat, 14 Dec 2013 10:19:45 +0100 Cecil Westerhof cecil.wester...@snow.nl пишет: On 12/14/2013 09:56 AM, Andrey Borzenkov wrote: I made a first setup to make a service for the H2 database. I made the folowing service file: [Unit] Description=H2 Database [Service] Type=simple ExecStart=/usr/bin/java -cp /home/cecil/java/h2/bin/h2-1.3.174.jar org.h2.tools.Console -tool -tcp Restart=always User=cecil [Install] WantedBy=multi-user.target After starting and stopping I got with ‘journalctl -u h2’: ... Should I not see that with the first command, or am I overlooking something? Did you try journalctl -u h2.service? I did not, but that should give the same result. I just tried it and it does give the same result. As user or as root? ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] Why doe I not see the logging with -u
On Sat, Dec 14, 2013 at 09:22:46AM +0100, Cecil Westerhof wrote: I made a first setup to make a service for the H2 database. I made the folowing service file: [Unit] Description=H2 Database [Service] Type=simple ExecStart=/usr/bin/java -cp /home/cecil/java/h2/bin/h2-1.3.174.jar org.h2.tools.Console -tool -tcp Restart=always User=cecil [Install] WantedBy=multi-user.target After starting and stopping I got with ‘journalctl -u h2’: -- Logs begin at Tue, 2013-11-19 06:24:51 CET, end at Sat, 2013-12-14 09:15:01 CET. -- Dec 13 11:37:40 Equus.Decebal.nl java[20909]: Web Console server running at http://127.0.0.2:8082 (only local connections) Dec 13 11:37:40 Equus.Decebal.nl java[20909]: TCP server running at tcp://127.0.0.2:9092 (only local connections) Dec 13 11:42:21 Equus.Decebal.nl java[20975]: Web Console server running at http://127.0.0.2:8082 (only local connections) Dec 13 11:42:21 Equus.Decebal.nl java[20975]: TCP server running at tcp://127.0.0.2:9092 (only local connections) Dec 13 11:42:59 Equus.Decebal.nl java[21031]: Web Console server running at http://127.0.0.2:8082 (only local connections) Dec 13 11:42:59 Equus.Decebal.nl java[21031]: TCP server running at tcp://127.0.0.2:9092 (only local connections) Dec 13 11:43:06 Equus.Decebal.nl java[21068]: Web Console server running at http://127.0.0.2:8082 (only local connections) Dec 13 11:43:06 Equus.Decebal.nl java[21068]: TCP server running at tcp://127.0.0.2:9092 (only local connections) lines 1-9/9 (END) But ‘journalctl | grep h2’ gives: Dec 13 11:38:22 Equus.Decebal.nl systemd[1]: h2.service: main process exited, code=exited, status=143/n/a Dec 13 11:38:22 Equus.Decebal.nl systemd[1]: Unit h2.service entered failed state Dec 13 11:42:32 Equus.Decebal.nl systemd[1]: h2.service: main process exited, code=exited, status=143/n/a Dec 13 11:42:32 Equus.Decebal.nl systemd[1]: Unit h2.service entered failed state Dec 13 11:43:03 Equus.Decebal.nl systemd[1]: h2.service: main process exited, code=exited, status=143/n/a Dec 13 11:43:03 Equus.Decebal.nl systemd[1]: Unit h2.service entered failed state Should I not see that with the first command, or am I overlooking something? You should. Can you show the output of 'journalctl -o verbose' corresponding to both types of message above? And for good measure, the output from SYSTEMD_LOG_LEVEL=debug journalctl -u h2 21 /dev/null|grep 'Journal filter' Zbyszek ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] Why doe I not see the logging with -u
On 12/14/2013 05:25 PM, Zbigniew Jędrzejewski-Szmek wrote: On Sat, Dec 14, 2013 at 09:22:46AM +0100, Cecil Westerhof wrote: I made a first setup to make a service for the H2 database. I made the folowing service file: [Unit] Description=H2 Database [Service] Type=simple ExecStart=/usr/bin/java -cp /home/cecil/java/h2/bin/h2-1.3.174.jar org.h2.tools.Console -tool -tcp Restart=always User=cecil [Install] WantedBy=multi-user.target After starting and stopping I got with ‘journalctl -u h2’: -- Logs begin at Tue, 2013-11-19 06:24:51 CET, end at Sat, 2013-12-14 09:15:01 CET. -- Dec 13 11:37:40 Equus.Decebal.nl java[20909]: Web Console server running at http://127.0.0.2:8082 (only local connections) Dec 13 11:37:40 Equus.Decebal.nl java[20909]: TCP server running at tcp://127.0.0.2:9092 (only local connections) Dec 13 11:42:21 Equus.Decebal.nl java[20975]: Web Console server running at http://127.0.0.2:8082 (only local connections) Dec 13 11:42:21 Equus.Decebal.nl java[20975]: TCP server running at tcp://127.0.0.2:9092 (only local connections) Dec 13 11:42:59 Equus.Decebal.nl java[21031]: Web Console server running at http://127.0.0.2:8082 (only local connections) Dec 13 11:42:59 Equus.Decebal.nl java[21031]: TCP server running at tcp://127.0.0.2:9092 (only local connections) Dec 13 11:43:06 Equus.Decebal.nl java[21068]: Web Console server running at http://127.0.0.2:8082 (only local connections) Dec 13 11:43:06 Equus.Decebal.nl java[21068]: TCP server running at tcp://127.0.0.2:9092 (only local connections) lines 1-9/9 (END) But ‘journalctl | grep h2’ gives: Dec 13 11:38:22 Equus.Decebal.nl systemd[1]: h2.service: main process exited, code=exited, status=143/n/a Dec 13 11:38:22 Equus.Decebal.nl systemd[1]: Unit h2.service entered failed state Dec 13 11:42:32 Equus.Decebal.nl systemd[1]: h2.service: main process exited, code=exited, status=143/n/a Dec 13 11:42:32 Equus.Decebal.nl systemd[1]: Unit h2.service entered failed state Dec 13 11:43:03 Equus.Decebal.nl systemd[1]: h2.service: main process exited, code=exited, status=143/n/a Dec 13 11:43:03 Equus.Decebal.nl systemd[1]: Unit h2.service entered failed state Should I not see that with the first command, or am I overlooking something? You should. Can you show the output of 'journalctl -o verbose' corresponding to both types of message above? See attachments. And for good measure, the output from SYSTEMD_LOG_LEVEL=debug journalctl -u h2 21 /dev/null|grep 'Journal filter' That gives nothing. Even when I remove /dev/null -- Logs begin at Tue, 2013-11-19 06:24:51 CET, end at Sun, 2013-12-15 00:59:08 CET. -- Fri, 2013-12-13 11:37:40 CET [s=b6a58b6feb364b758ecb0ff6d531b755;i=ab73;b=36201f9cba90417c9c8ff931d14a17ed;m=8619d59103;t=4ed680d31f64a;x=4c5eb74b9e57f151] PRIORITY=6 _UID=0 _GID=0 _SELINUX_CONTEXT=[11B blob data] _MACHINE_ID=32d8e93f7e634d9d87d1021d9f47a2ad _HOSTNAME=Equus.Decebal.nl SYSLOG_FACILITY=3 _TRANSPORT=stdout _BOOT_ID=36201f9cba90417c9c8ff931d14a17ed SYSLOG_IDENTIFIER=java MESSAGE=Web Console server running at http://127.0.0.2:8082 (only local connections) _PID=20909 _COMM=java _EXE=/usr/lib64/jvm/java-1.7.0-openjdk-1.7.0/jre/bin/java _CMDLINE=/usr/bin/java -cp /home/cecil/java/h2/bin/h2-1.3.174.jar org.h2.tools.Console -tool -tcp _SYSTEMD_CGROUP=/system/h2.service _SYSTEMD_UNIT=h2.service Fri, 2013-12-13 11:37:40 CET [s=b6a58b6feb364b758ecb0ff6d531b755;i=ab74;b=36201f9cba90417c9c8ff931d14a17ed;m=8619d78765;t=4ed680d33ecac;x=c7dc6cedba777091] PRIORITY=6 _UID=0 _GID=0 _SELINUX_CONTEXT=[11B blob data] _MACHINE_ID=32d8e93f7e634d9d87d1021d9f47a2ad _HOSTNAME=Equus.Decebal.nl SYSLOG_FACILITY=3 _TRANSPORT=stdout _BOOT_ID=36201f9cba90417c9c8ff931d14a17ed SYSLOG_IDENTIFIER=java _PID=20909 _COMM=java _EXE=/usr/lib64/jvm/java-1.7.0-openjdk-1.7.0/jre/bin/java _CMDLINE=/usr/bin/java -cp /home/cecil/java/h2/bin/h2-1.3.174.jar org.h2.tools.Console -tool -tcp _SYSTEMD_CGROUP=/system/h2.service _SYSTEMD_UNIT=h2.service MESSAGE=TCP server running at tcp://127.0.0.2:9092 (only local connections) Fri, 2013-12-13 11:42:21 CET [s=b6a58b6feb364b758ecb0ff6d531b755;i=ab89;b=36201f9cba90417c9c8ff931d14a17ed;m=862a9286e4;t=4ed681deeec2b;x=de115828119e26b7] PRIORITY=6 _UID=0 _GID=0 _SELINUX_CONTEXT=[11B blob data] _MACHINE_ID=32d8e93f7e634d9d87d1021d9f47a2ad _HOSTNAME=Equus.Decebal.nl SYSLOG_FACILITY=3 _TRANSPORT=stdout _BOOT_ID=36201f9cba90417c9c8ff931d14a17ed SYSLOG_IDENTIFIER=java MESSAGE=Web Console server running at http://127.0.0.2:8082 (only local connections)