Sunbird UCI
  • Overview of Sunbird UCI
  • 📙Learn
    • UCI use cases
    • UCI for Education(Case study)
    • Tech Overview
      • Glossary
      • High-level Architecture Design
      • Design Principles
      • Standards
  • 🚀Use
    • Choose your Persona
    • Adopter - Install and use UCI
      • Pre-requisites, Installation Setup, Post Setup
      • Setting up your very first conversation
      • API Documentation
      • Data Exhaust and Analytics
      • Posthog Event
      • Whatsapp (Netcore)
      • Environment Variables
    • Developer - Contribute to UCI
      • UCI Basics
        • XMessage Specification
        • Transformers
          • ODK Transformer
            • Interactive-Messages
            • Media Messages
            • Location
          • Broadcast Transformer
        • Adapters
          • Firebase Notification Adapter
        • User Segment
        • Schema Overview
          • UCI Core Schema
            • XMessage Schema
            • Assessment DB Schema
          • UCI API Schema
      • Development environment
        • Backend Setup
        • Setting up IDE
        • Environment variable setup
        • Debug services
        • Build and Execute UCI
        • Frontend Setup (Admin Console)
        • Frontend Setup (PWA)
        • Transport Socket
      • API Documentation
        • Bot Setup APIs
        • History APIs
        • Direct Message APIs
        • Vault APIs
      • Database Schema
        • Cassandra Xmessage Database
        • Postgres Forms Database
        • Postgres User Analytics Database
        • Postgres Comms Database
      • Contribution Guide
        • Your first PR
        • Contribute an Adapter
        • Adapter Implementation
        • Create a Transformer
    • Contact the administrator
  • ✅Releases
    • Release V2
  • 🤝Engage
    • Software License
    • Acceptable Use Policy
    • Terms of Service
    • Source Code
    • Discussion Forum
Powered by GitBook
On this page
  • 1. Overview
  • 2. Order of debugging services
  • 3. Debug on IDE Tool
  • 4. Debug for Docker Image
  • 5. Common mistakes or errors

Was this helpful?

Edit on GitHub
  1. Use
  2. Developer - Contribute to UCI
  3. Development environment

Debug services

PreviousEnvironment variable setupNextBuild and Execute UCI

Last updated 2 years ago

Was this helpful?

1. Overview

A service can be debugged via a IDE tool if you are using one to run the services or via checking the docker conatiner logs if you are using the docker image to run it.

2. Order of debugging services

To debug any issue or error, follow below order. We should check the service in this order as the message processes in this order only.

  1. Inbound

  2. Orchestrator

  3. Transformer

  4. Outbound

A message will be first received in the inbound service to convert the message to XMessage format then it will be sent to the kafka topic which is being listened by the orchestrator service. To check the build/execution flow of the services click chere.

3. Debug on IDE Tool

When a service is started from a IDE tool, it will also show the logs associated with the service. If you are not receiving message reply or the service is not starting, please see the logs to check the issue, and work on the solution accordingly.

You can also add debugger to the IDE tool to add break points in the code to check where the issues is generating from. If you don't know how to, check below videos for reference.

  • How to add debugger in

  • How to add debugger in

4. Debug for Docker Image

If you have started the services using docker images, you should follow below steps to debug them.

1. Check All Services logs

  • Run command below to check logs for all the running services.

    docker-compose logs --follow --tail 10

2. Check Single Service logs

  • If you are sure about the service which is giving error, we can check the logs for that particular service. First check the container id by running the command below.

    docker ps

It will return a list of running containers. Each container has a container id as shown in the image.

  • To check logs for the container, run command

    docker logs --follow --tail 10 container_id

To check the logs for kafka/redis etc services, you should follow the above steps.

5. Common mistakes or errors

  1. Missing environment variables

  2. Connection issues with kafka/cassandra/postgresql etc.

  3. Port in use by another service.

  4. Java version conflict

🚀
Spring boot tool
intellij