Troubleshooting
Table of Contents |
---|
Tip:
Also check out the Usage tips.
A command fails on permission issues
Simple fix: prepend the command with 'sudo', this runs it with root permissions. Do note that this is less secure.
Tip!
You can execute the previous command with sudo rights using 'sudo !!'
Cross origin requests
The server needs to accept Cross origin requests. Nginx usually has problems with OPTIONS request which is used by AngularUI router. As a workaround we use this in the microservice virtual host file:
location / { try_files $uri $uri/ /index.php?$query_string; if ($request_method = OPTIONS ) { add_header Access-Control-Allow-Origin "*"; add_header Access-Control-Allow-Methods "GET, OPTIONS"; add_header Access-Control-Allow-Headers "X-Auth-Token"; return 200; } add_header Access-Control-Allow-Origin "*"; }
Domains
In the development environment, you may need to add the microservice and core module domains to the /etc/hosts file like this:
127.0.0.1 appserver
(Because Traefik works reading the URL of the request)
Accessing the core database
You can access the database of the core using the pgadmin docker container, reachable by http://localhost:5050.
Next you have to add the server: the address should be that of the docker container (use 'postgres'). The default database is 'homestead', the default password is 'secret'.
Error codes
deploy.sh - Error code 9
For safety reasons the ADMIN_PASSWORD, used for creating the admin accounts in oms-core cannot be equal to the default value of '1234' when running the deploy.sh script. Changing this in the `oms-core.env` file should fix it.