question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] The stop.sh script can't work in container

See original GitHub issue

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

The stop.sh script can’t work in container, while it can work in a host machine.

Expected Behavior

The stop.sh script can work in container.

Steps To Reproduce

In the container:

  1. ./start.sh
  2. ./stop.sh

Environment

ShenYu version(s): 2.4.1

Debug logs

No response

Anything else?

In a container, there’s no uid column when execute ps -ef.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:11 (10 by maintainers)

github_iconTop GitHub Comments

2reactions
songyuequancommented, Nov 13, 2021

I just test the new script in pr 2352 . It work both in the host ( Linux and MAC) and container

1reaction
lahmXucommented, Nov 13, 2021

Solved Problems

  1. The stop.sh script can’t work in container
  2. “ps: unrecognized option: p”. This problem was discovered when solving the first problem.
  • This problem is due to openjdk-8-jre-alpine ps is from busybox and it is not included -p switch for ps, so we need to add RUN apk --no-cache add procps in Dockerfile.
  • error info: image

Test Result

Docker Container

Shenyu Admin image-20211113100750658

Shenyu Bootstrap image-20211113101128530

Linux Server

Shenyu Admin image

Shenyu Bootstrap image

Read more comments on GitHub >

github_iconTop Results From Across the Web

sh script doesn't work in docker container - Stack Overflow
I have a problem running a .sh script inside a docker container. You have a number of issues here... Just some pointers:.
Read more >
Same command works in terminal but not in a bash script
I have the following script #!/bin/bash set -x docker stop ${MYSQL_CONTAINER_NAME} docker rm ${MYSQL_CONTAINER_NAME} docker run \ --detach ...
Read more >
Please stop writing shell scripts - Python⇒Speed
It is quite difficult to write correct shell scripts; you're much better off just using Python.
Read more >
Why Does My Docker Container Stop? - Tutorial Works
The container has been stopped using docker stop : You can manually stop a container using the docker stop command.
Read more >
Container permission denied: How to diagnose this error
Learn what is causing a container permissions error and how to work around the issue without resorting to the --privileged flag.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found