# Logstash is not generating logs after I include the cmd under container

**URL:** <https://discuss.elastic.co/t/logstash-is-not-generating-logs-after-i-include-the-cmd-under-container/320271>\
**Category:** Logstash\
**Tags:** docker\
**Created:** [December 1, 2022, 4:44pm UTC](https://discuss.elastic.co/t/logstash-is-not-generating-logs-after-i-include-the-cmd-under-container/320271 "2022-12-01T16:44:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rravitech](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rravitech/32/108994_2.png) [@rravitech](https://discuss.elastic.co/u/rravitech)\
**Post date:** [December 1, 2022, 4:44pm UTC](https://discuss.elastic.co/t/logstash-is-not-generating-logs-after-i-include-the-cmd-under-container/320271/1 "2022-12-01T16:44:08Z")

</div>

How can print the logs in logstash, once after I add command and args in container.

```auto
containers:
        - name: logstash
          env:
            - name: LOGSTASH_PW
          image: docker.elastic.co/logstash/logstash-oss:7.7.1
          ports:
            - containerPort: 5044
          volumeMounts:
            - name: config-volume
              mountPath: /usr/share/logstash/config
          resources:
            limits:
              memory: 4Gi
              cpu: 2500m
            requests:
              memory: 4Gi
              cpu: 800m
          command: ["/bin/sh"]
          args: ["-c", "cd bin; logstash-plugin install logstash-filter-drop; sleep 1000;"]

```

it is just printing.

```auto
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.headius.backport9.modules.Modules to method sun.nio.ch.NativeThread.signal(long)
WARNING: Please consider reporting this to the maintainers of com.headius.backport9.modules.Modules
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
Validating logstash-filter-drop
Installing logstash-filter-drop
Installation successful

```

---

<div class="post-metadata">

**Author:** ![rravitech](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rravitech/32/108994_2.png) [@rravitech](https://discuss.elastic.co/u/rravitech)\
**Post date:** [December 1, 2022, 6:47pm UTC](https://discuss.elastic.co/t/logstash-is-not-generating-logs-after-i-include-the-cmd-under-container/320271/2 "2022-12-01T18:47:22Z")

</div>

```auto
command: ["/bin/sh"]
args: ["-c", "cd bin; logstash-plugin install logstash-filter-drop; sleep 25; logstash"]

```

starting logstash after sleep worked for me.

Thanks  
Ravi R

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [December 29, 2022, 6:47pm UTC](https://discuss.elastic.co/t/logstash-is-not-generating-logs-after-i-include-the-cmd-under-container/320271/3 "2022-12-29T18:47:29Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
