You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shenyu.apache.org by GitBox <gi...@apache.org> on 2022/02/09 06:28:26 UTC
[GitHub] [incubator-shenyu] lahmXu commented on issue #2836: [BUG] shell error
lahmXu commented on issue #2836:
URL: https://github.com/apache/incubator-shenyu/issues/2836#issuecomment-1033397225
> I have reproduced this problem. It was introduced by this issue #2338 to solve a problem in container. Change the `pgrep -f java` to` awk '{print $2}'` will make the script work in host machine but fail in container. Any suggestion? @lzqdename @lahmXu
I tried to modify the `start.sh` and `stop.sh` under the directory of `apache-shenyu-incubating-2.4.2-bootstrap-bin/bin/` and `apache-shenyu-incubating-2.4.2-admin-bin/bin/`, a total of 4 files need to be modified. as shown below
```shell
change
PIDS=`ps -ef | grep "$DEPLOY_DIR" | grep -v grep | pgrep -f java`
to
PIDS=`ps -eo pid,cmd |grep -v tail|grep -v grep|grep "$DEPLOY_DIR"|awk '{print $1}'`
```
specify the order of PID and it worked.
## Test Result
### Linux Server

### Docker Container
#### Shenyu Admin

#### Shenyu Bootstrap

--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shenyu.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org