I keep encountering a 404 error in the authentication of eclipse ditto despite following troubleshooting steps

I am a research student at IIIT Hyderabad. I have been working on a project related to digital twins, and we are trying to implement Eclipse Ditto for our use case.

We use sensor nodes with MQTT connections in the implementation stage at the edge. We are facing issues when we are deploying Eclipse ditto. We have deployed ditto on WSL working on a Windows 11 system. We are using Docker Compose with Nginx for reverse proxy and basic authentication for Eclipse Ditto.

The app deploys correctly on localhost:8080. When we try to authorise Ditto UI using a username and password, I keep encountering a 404 error despite following troubleshooting steps like verifying URLs, checking Nginx configuration, inspecting Ditto logs, and restarting services. We have also tried using the Ubuntu virtual machine, but the issue persists.

We have done the following troubleshooting steps to resolve this issue:

  • Checked ports on docker-compose.yaml file.
  • Checked nginx.conf and other configuration files.
  • Created nginx.htpasswd file and added a new user in format ditto:{open SSL password hash}

We keep getting the 404 error when trying to authenticate Eclipse ditto. We searched everywhere for the solution, but the steps were identical to those we had performed.
Let me know if you need any additional info.

Hi kratikasingh,

It’s great to see you reaching out for help on the HiveMQ forum for your Eclipse Ditto deployment. It speaks volumes about the community here and its willingness to assist across various IoT and related technologies.

Are you following the steps for Ditto from the HiveMQ blog article Hands-on Guide: Using MQTT, HiveMQ, and Eclipse Ditto for Digital Twins and IIoT or do you have your own instructions (please share them)?

While we may not have specific expertise in Eclipse Ditto, you are running it in Docker, so here are some general troubleshooting steps that could help resolve your issue with the 404 error:

  1. Check Docker Networking: Ensure that both the Ditto and Nginx Docker containers are on the same Docker network (e.g., ‘backend’ as an example). Containers on the same network can communicate using their service names (e.g., http://ditto:8080 in Nginx configuration).
  2. Inspect Docker Logs:
  • Ditto Logs: Look into Ditto’s logs (docker logs ditto) for any errors or warnings related to authentication or resource loading.
  • Nginx Logs: Check Nginx logs (docker logs nginx) to ensure requests are being forwarded correctly to Ditto and to identify any potential errors.

These steps should help pinpoint where the issue lies in your Docker Compose setup. If you need further assistance, please feel free to provide more details, and we’ll do our best to help you out!

Best regards,
Dasha from the HiveMQ Team