- Renamed auth-service to iam-service across various files for consistency. - Updated Dockerfiles, deployment configurations, and documentation to reflect the service name change. - Enhanced testing commands in documentation to point to the new iam-service. - Removed outdated auth-service files and configurations to streamline the project structure. - Improved bilingual documentation for clarity on the new service structure and usage.
1.5 KiB
1.5 KiB
Hướng Dẫn Xử Lý Sự Cố
Các Vấn Đề Thường Gặp
Kết Nối Database Thất Bại
Triệu chứng: Service không thể kết nối database
Giải pháp:
- Kiểm tra PostgreSQL có đang chạy:
docker ps - Xác minh DATABASE_URL trong .env
- Kiểm tra kết nối mạng:
docker network ls - Xem logs:
docker logs postgres-auth-local
Port Đã Được Sử Dụng
Triệu chứng: Service không khởi động với lỗi port
Giải pháp:
- Tìm process đang dùng port:
lsof -i :5001 - Kill process hoặc thay đổi PORT trong .env
- Kiểm tra docker-compose cho port conflicts
Prisma Client Chưa Được Generate
Triệu chứng: Lỗi import cho Prisma Client
Giải pháp:
cd services/iam-service
pnpm prisma generate
Build Failures
Triệu chứng: Lỗi TypeScript hoặc build
Giải pháp:
- Xóa build artifacts:
./scripts/utils/cleanup.sh - Cài đặt lại dependencies:
pnpm install - Kiểm tra lỗi TypeScript:
pnpm typecheck
Traefik Không Routing
Triệu chứng: Lỗi 404 từ Traefik
Giải pháp:
- Kiểm tra Traefik dashboard: http://localhost:8080
- Xác minh service labels trong docker-compose
- Kiểm tra cấu hình routes.yml
- Xem Traefik logs:
docker logs traefik-local
Tìm Kiếm Trợ Giúp
- Kiểm tra service logs:
./scripts/dev/logs.sh <service> - Xem lại GitHub Issues
- Liên hệ team lead