Skip to content

fix: deploy.sh가 OTel agent jar를 앱 jar로 잘못 선택하는 버그 수정 - #204

Merged
unam98 merged 1 commit into
mainfrom
fix/deploy-jar-glob
Jul 28, 2026
Merged

fix: deploy.sh가 OTel agent jar를 앱 jar로 잘못 선택하는 버그 수정#204
unam98 merged 1 commit into
mainfrom
fix/deploy-jar-glob

Conversation

@unam98

@unam98 unam98 commented Jul 28, 2026

Copy link
Copy Markdown
Collaborator

문제

Redis 캐싱 PR(#203) 배포 중 8080 프로세스가 크래시하며 배포 실패(d-EO2NEUOXJ).

deploy.sh의 JAR 선택 로직:

JAR_PATH=$(ls $APP_DIR/*.jar | grep -v plain | head -1)

grafana-opentelemetry-java.jar가 알파벳순으로 server-0.0.1-SNAPSHOT.jar보다 앞에 와서, OTel agent jar 자체를 애플리케이션 jar로 잘못 선택java -javaagent:grafana-opentelemetry-java.jar -jar grafana-opentelemetry-java.jar를 실행하려다 즉시 크래시.

처음 배포 스크립트를 만들 때는 이 디렉토리에 OTel agent jar가 없어서 안 걸렸는데, 이후 OTel 경로 문제를 고치면서 /home/ec2-user/app/에 복사해둔 게 이번에 문제가 됨.

수정

grep -v opentelemetry 추가해 OTel agent jar를 명시적으로 제외.

영향

8080 배포는 실패했지만, 롤링 재시작 설계(포트 하나씩만 처리, 실패 시 그 포트만 멈춤) 덕분에 8081이 계속 서비스해서 전체 다운은 없었음(외부에서는 계속 200 응답). 이번 PR 머지 후 재배포하면 8080도 정상화됨.

JAR_PATH를 ls *.jar | grep -v plain | head -1로 고르고 있었는데,
grafana-opentelemetry-java.jar가 알파벳순으로 server-*.jar보다 앞에 와서
OTel agent jar 자체를 애플리케이션으로 실행하려다 즉시 크래시하는
문제가 있었음. grep -v opentelemetry를 추가해 제외.

8080 배포가 이 버그로 실패했으나, 롤링 재시작 설계 덕분에 8081이
계속 서비스해서 전체 다운은 없었음.
@unam98 unam98 self-assigned this Jul 28, 2026
@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 9c4fb5d7-b375-4096-882f-eecbef93e835

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/deploy-jar-glob

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@unam98
unam98 merged commit a1b02a9 into main Jul 28, 2026
2 checks passed
@unam98
unam98 deleted the fix/deploy-jar-glob branch July 28, 2026 21:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants