Comments (4)
Hi,
Thanks for reporting this issue and providing the simple reproducer.
We tried to fix this problem already in RHEL, we validated the fix was working in RHEL/Fedora environments. I need to investigate further what is different in your environment compared to the RHEL environment for the ansible pipelining=True
problem.
from tlog.
@roth-wine does this issue happen only when using delegate_to
, or can it be reproduced simply with pipelining=True
?
from tlog.
Hello @justin-stephenson,
this issue only happens when using delegate_to
in combination with pipelining=True
. If you use the Playbook above without delegate_to
everything will work as expected.
from tlog.
@justin-stephenson
I have created the following Dockerfile to reproduce the Issue more easily without ansible.
FROM ubuntu:jammy
ARG ARCH
RUN apt-get update && \
apt-get install -y build-essential pkg-config vim \
libjson-c-dev libsystemd-dev libcurl4-openssl-dev \
libutempter-dev autoconf automake libtool openssh-server \
whois
RUN useradd -ms /bin/bash tloguser
RUN mkdir -p /var/log/tlog && mkdir -p /var/run/tlog
RUN touch /var/log/tlog/session.log
RUN chown tloguser:tloguser /var/log/tlog/session.log
RUN chown -R tloguser:tloguser /var/run/tlog
RUN passroot=$(echo date +%s | sha256sum | base64 | head -c 32) && \
echo "root:${passroot}" | chpasswd && echo "root: ${passroot}" > /passroot
RUN passtloguser=$(echo date +%s | sha256sum | base64 | head -c 32) && \
echo "tloguser:${passtloguser}" | chpasswd && echo "tloguser: ${passtloguser}" > /passtloguser
RUN sed -i 's/#Port 22/Port 2222/g' /etc/ssh/sshd_config
RUN sed -i 's/#ListenAddress 0.0.0.0/ListenAddress 127.0.0.1/g' /etc/ssh/sshd_config
RUN sed -i '/AcceptEnv\ LANG\ LC_\*/d' /etc/ssh/sshd_config
RUN service ssh start
RUN git clone https://github.com/Scribery/tlog.git
WORKDIR /tlog
RUN git checkout main
RUN autoreconf -i -f
RUN ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var && make
RUN make install
RUN sed -i 's/\/\/."path".:.""/"path"\ :\ "\/var\/log\/tlog\/session.log"/g' /etc/tlog/tlog-rec-session.conf
RUN sed -i 's/\/\/."writer".:."journal"/"writer"\ :\ "file"/g' /etc/tlog/tlog-rec-session.conf
RUN sed -i 's/\/\/."window".:.true/"window"\ :\ false/g' /etc/tlog/tlog-rec-session.conf
RUN sed -i 's/\/\/."input".:.false/"input"\ :\ true/g' /etc/tlog/tlog-rec-session.conf
RUN sed -i 's/\/\/."output".:.true/"output"\ :\ true/g' /etc/tlog/tlog-rec-session.conf
RUN usermod -s /usr/bin/tlog-rec-session tloguser
ENTRYPOINT cat /passroot && cat /passtloguser && service ssh restart && tail -f /var/log/tlog/session.log
EXPOSE 2222
WORKDIR /root
You could build the Dockerfile docker build -t tlog-debug:main .
and then run the docker container afterwards docker run -it --network=host tlog-debug:main
Then the docker container will print the credentials for the root and tloguser and shows the output for the tlog session log:
root: ZDgzZjMyMGNiMWJiMDA3MWYxZjQzODJi
tloguser: ZDgzZjMyMGNiMWJiMDA3MWYxZjQzODJi
* Restarting OpenBSD Secure Shell server sshd [ OK ]
Then i could start with the one-liner to reproduce issue:
➜ ssh tloguser@localhost -p2222 sh -c 'echo "Hello world"'
tloguser@localhost's password:
Locale charset is ANSI_X3.4-1968 (ASCII)
Assuming locale environment is lost and charset is UTF-8
ATTENTION! Your session is being recorded!
➜
The stdout is empty, that's the reason why ansible breaks.
In the log file we could also see, that in_txt
,in_bin
,out_txt
and out_bin
is empty.
{"ver":"2.3","host":"thinkpad","rec":"de9598fe77594144b6a278887763d35d-37-11d189c","user":"tloguser","term":"","session":67,"id":1,"pos":0,"time":1667554409.541,"timing":">1","in_txt":"","in_bin":[],"out_txt":"\n","out_bin":[]}
from tlog.
Related Issues (20)
- Tlog is recording rsync data HOT 10
- Tlog v11 RHEL6 and/or RHEL7 binaries HOT 2
- tlog-play: Message ID is out of order even with --lax HOT 1
- Fedora RPM package adoption HOT 1
- Covscan fixes
- regression since Jan 2021 breaks ansible HOT 8
- SSH command with closed stdin doesn't work
- Playing back from Elasticsearch HOT 1
- HOW to get TLOG working in Ubuntu/Debian!????? HOT 6
- journal gets flooded when using cockpit with ssh session on remote hosts HOT 1
- tlog not working when auditd is disabled, and there's no /proc/PID/sessionid HOT 3
- how to ensure security when tlog is integrated with elasticsearch HOT 4
- Gather a set of records HOT 3
- Failed creating lock file HOT 2
- [Question] What's the difference between `in_txt` and `out_txt` fields in `tlog.log` file? HOT 2
- [Question] how to setup tlog to log to elasticsearch HOT 14
- tlog report question
- Why is the programming name of the tlog being logged different? HOT 1
- tlog-play: Option missing to list available users/sessions in log
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tlog.