blockchain-explorer icon indicating copy to clipboard operation
blockchain-explorer copied to clipboard

BE-874 Fix script to specify the BC Exprorer process

Open takayuki-nagai opened this issue 4 years ago • 2 comments

"stop.sh" uses "ps" command to identify the process ID of Explorer.

ps aux | grep -v "awk" | awk '/name - hyperledger-explorer/ {print $2}'

But Alpine Linux, which is used by Explorer container, returns the following values for "ps" command.

PID USER TIME COMMAND 45 root 0:12 node app/main.js name - hyperledger-explorer

So correct process ID cannot be obtained by the above method. (Misidentify "root" as process ID.) It works correctly by specifying the format of the output of "ps" command like follows.

ps -eo pid,args | grep -v "awk" | awk '/name - hyperledger-explorer/ {print $1}'

takayuki-nagai avatar Sep 14 '21 14:09 takayuki-nagai

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

sonarqubecloud[bot] avatar Sep 14 '21 14:09 sonarqubecloud[bot]

Thanks for your PR. Currently our test environment on Azure Pipeline seems to have a problem. We're looking at this issue.

nekia avatar Sep 24 '21 04:09 nekia