Skip to content

Commit 8e1e49c

Browse files
committed
fix: deploy.sh 진단 로그 캡처 (의도적 실패)
1 parent 03955a7 commit 8e1e49c

File tree

1 file changed

+43
-1
lines changed

1 file changed

+43
-1
lines changed

scripts/deploy.sh

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,4 +107,46 @@ echo "> 스위칭"
107107
sleep 10
108108
/home/ubuntu/app/nonstop/switch.sh
109109

110-
echo "> 배포 완료"
110+
echo "> 배포 완료. 진단 정보 출력 (logTail 캡처용)..."
111+
echo "=========================================="
112+
echo "=== [DIAG] Public IP ==="
113+
curl -s --connect-timeout 3 http://169.254.169.254/latest/meta-data/public-ipv4 2>/dev/null || echo "메타데이터 접근 불가"
114+
echo ""
115+
echo "=== [DIAG] Instance ID ==="
116+
curl -s --connect-timeout 3 http://169.254.169.254/latest/meta-data/instance-id 2>/dev/null || echo "메타데이터 접근 불가"
117+
echo ""
118+
echo "=== [DIAG] Security Groups ==="
119+
curl -s --connect-timeout 3 http://169.254.169.254/latest/meta-data/security-groups 2>/dev/null || echo "메타데이터 접근 불가"
120+
echo ""
121+
echo "=== [DIAG] Listening Ports ==="
122+
sudo ss -tlnp 2>/dev/null | head -20
123+
echo ""
124+
echo "=== [DIAG] Nginx Status ==="
125+
sudo systemctl is-active nginx 2>&1
126+
echo ""
127+
echo "=== [DIAG] Java Processes ==="
128+
pgrep -a java 2>/dev/null | head -5
129+
echo ""
130+
echo "=== [DIAG] iptables ==="
131+
sudo iptables -L -n 2>/dev/null | head -20
132+
echo ""
133+
echo "=== [DIAG] UFW Status ==="
134+
sudo ufw status 2>/dev/null
135+
echo ""
136+
echo "=== [DIAG] Network Interfaces ==="
137+
ip addr show 2>/dev/null | grep -E "inet |state" | head -10
138+
echo ""
139+
echo "=== [DIAG] Localhost Tests ==="
140+
echo "8081: $(curl -s -o /dev/null -w '%{http_code}' http://localhost:8081/actuator/health 2>/dev/null)"
141+
echo "8082: $(curl -s -o /dev/null -w '%{http_code}' http://localhost:8082/actuator/health 2>/dev/null)"
142+
echo "80: $(curl -s -o /dev/null -w '%{http_code}' http://localhost/actuator/health 2>/dev/null)"
143+
echo "profile: $(curl -s http://localhost/profile 2>/dev/null)"
144+
echo ""
145+
echo "=== [DIAG] Memory ==="
146+
free -h 2>/dev/null | head -3
147+
echo ""
148+
echo "=== [DIAG] nohup.out (last 20 lines) ==="
149+
tail -20 /home/ubuntu/app/nohup.out 2>/dev/null
150+
echo "=========================================="
151+
echo "> 진단 출력 완료. 의도적 실패 (logTail 캡처)..."
152+
exit 1

0 commit comments

Comments
 (0)