Applies to
- DMC
Conditions
- N/A
Issue Summary
After cloning and migrating a DMC server to a new environment, DMC fails to start. Attempts to start the DMC services (i.e., datical-services, keycloak, or proxy) produce a permission-related error, as shown below.
Error Message
datical-control[29085]: ERROR: This script must be run as the datical user
Root Cause
When the services and directories are configured with the "root" user as the owner instead of the required "datical" user, this misconfiguration causes permission issues that prevent the services from starting properly.
Resolution
-
Check Configuration Files:
- Verify the configuration files do not reference the "root" user.
- Local configuration files should point to a non-root user with sudo permissions as per the DMC installation instructions.
-
Check datical-service and keycloak file owners:
- Identify the files and directories for datical-service and keycloak using the following commands:
-
sudo find /etc/ -name datical-service* -ls
sudo find /etc/ -name keycloak* -ls
-
- Confirm that the "datical" user is the owner of these files.
- If files are owned by the wrong user (e.g., "root"), update ownership to the "datical" user using:
-
sudo chown -R datical:datical /path/to/service/files
-
- Identify the files and directories for datical-service and keycloak using the following commands:
-
Restart DMC Services:
- Restart DMC services using the following commands.
- Demo mode, use:
-
sudo datical-control service start ALL
-
- Production mode, use:
-
sudo datical-control service start keycloak
sudo datical-control service start datical-service
sudo datical-control service start proxy
-
- Verify that all services start without errors.
- Demo mode, use:
- Restart DMC services using the following commands.
-
Final Validation:
- After all DMC services have been successfully restarted, test the DMC in a browser to confirm it loads successfully.
- If issues persist, review logs for additional errors and repeat relevant steps.
-
If there are any additional errors:
- If a service fails to restart (e.g., Keycloak), review the service status and logs for specific errors:
-
sudo datical-control service status keycloak
-
- Address any permission or file access issues. Permissions and ownership should be set to the "datical" user.
- Use chown to update ownership as needed.
- If a service fails to restart (e.g., Keycloak), review the service status and logs for specific errors:
Comments
0 comments
Article is closed for comments.