Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[오류] p.358 deploy.sh 프로세스 ID 조회 #586

Open
ahyz0569 opened this issue Feb 13, 2021 · 5 comments
Open

[오류] p.358 deploy.sh 프로세스 ID 조회 #586

ahyz0569 opened this issue Feb 13, 2021 · 5 comments

Comments

@ahyz0569
Copy link

기존에 올라온 질문이 아닌지 먼저 검색해주세요!

가장 자주 나온 제보

어떤 @오류인가요?

오류설명:
p.358 ~359 deploy.sh 내 프로세스 아이디(CURRENT_PID)를 조회할 때 grep jar로 검색하면 PID가 조회되지 않는 오류가 발생합니다.

image-20210212000523656

스프링부트 애플리케이션 프로세스를 조회할 때 jar가 아닌 java로 검색해야 조회가 되었습니다.
하여, 코드를 다음과 같이 변경하였을 때 프로레스 ID 조회가 정상적으로 됩니다.

CURRENT_PID=$(pgrep -fl springboot-webservice-practice | grep java | awk '{print $1}')

참고로 저는 Amazon Linux 2 AMI를 사용하고 있습니다.
Amazon Linux 2로 변경되면서 바뀐 것인지는 찾을 수 없었으나 이 부분 공유하는 것이 좋을 것 같아 올립니다.

@HyunJik-Lee
Copy link

와 30분 헤맸는데 감사합니다.

@tachyon83
Copy link

정말 감사합니다. 저도 Amazon Linux2 AMI사용하고 있습니다. 책에서 말한 1이 없었기 때문입니다.
jar로 검색하면 나오지 않았는데 java로 고치니깐 잘 됩니다.

@minkyoungryul
Copy link

와 2시간 헤맸는데;; 감사합니다.
@jojoldu님 이 글 상단에 고정해주세요.

jongho-git pushed a commit to jongho-git/sprintboot2-aws that referenced this issue Feb 23, 2022
@water-case
Copy link

저도 다른거 모두 정상인데 갱신이 안되길래 1시간 헤메다 java로 수정하니 잘되네요 감사합니다

@wohok
Copy link

wohok commented Nov 13, 2022

감사합니다... 리눅스2라 그랬군요...

mingeonho1 pushed a commit to mingeonho1/springboot-webservice that referenced this issue Sep 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants