-
Notifications
You must be signed in to change notification settings - Fork 4
TroubleShooting
For security reasons, AGILE-IDM must check the locations (URI) of clients relying on IDM for authentication of users. For example, the AGILE OSJS interface. So, to make this work by default, IDM and OSJS are configured during the fist boot. IDM creates a default client for OSJS, and also agile-OSJS is permanently configured with a redirect URI pointing to the OSJS web interface. For this, the host and port used are taken from:
- AGILE_HOST env variable: this variable is used by the docker compose file. If this variable is present, it is for the configuration.
- /etc/hostname file: if there is no AGILE_HOST set, the configuration is done assuming that the name of the machine hosting the conatiners is reachable through the local network. This is the case with a resin gateway that would be reachable under resin.local.
To solve this, if your gateway's name or IP has changed you would need to set it on the AGILE_HOST and then trigger that IDM and OS.js get configured again:
- remove the the folder in $DATA/idm/db (by default /mnt/data/.agile/idm/db/)
- execute a shell on OS.js container: For this go to the location of the docker-compose file and do docker-compose exec agile-osjs rm /etc/configured ** Once you are in remove /etc/configured (this is an empty file used by AGILE-OSJS to detect whether it has been configured or not).
- Then, restart the containers and you should have a new configuration of client and redirection of URIs used for the OSJS login
If you get something like this:
wrong schema error when validating entity {"name":"my sensor","credentials":{"xively":"123"}} error: SchemaError: no such schema
It means you are trying to create an entity type that is not there (referenced by the $DATA/idm/conf/agile-idm-core-conf.js file in your gateway). To change this add this to the configuration file the entity type and the default policies.