# Troubleshoot Docker installation issues

## Issues when installing Docker <a href="#installationissues-and-troubleshooting-loginissues" id="installationissues-and-troubleshooting-loginissues"></a>

### Centos 7 and RHEL 7

Notice: this distro features a known issue since Docker default execution group is named `dockerroot` instead of `docker` . To make docker work edit (or create) `/etc/docker/daemon.json` to include the following fragment:

```json
{
  "group": "dockerroot"
}
```

After editing or creating the file, please restart Docker and then check the group permission of the Docker socket (`/var/run/docker.sock`), which should show `dockerroot` as a group:

```
srw-rw----. 1 root dockerroot 0 Jul  4 09:57 /var/run/docker.sock
```

Then, add the newly created *`akamas`* user to the `dockerroot` group so that it can run docker containers:

```bash
sudo usermod -aG dockerroot <user_name>
```

and check the `akamas` user has been correctly added to `dockerroot` group by running:

```bash
lid -g dockerroot
```

## Issues when running AWS CLI <a href="#installationissues-and-troubleshooting-loginissues" id="installationissues-and-troubleshooting-loginissues"></a>

In case of issues in logging in through AWS CLI, when executing the following command:

```bash
aws ecr get-login-password --region us-east-2
```

Please check that:

* Environment variables `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, `AWS_DEFAULT_REGION` are correctly set
* AWS CLI version is 2.0+

We recommend using the [official AWS CLI installation guide](https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html) for a smoother experience.

## Issue when starting Akamas services <a href="#installationissues-and-troubleshooting-startingservices" id="installationissues-and-troubleshooting-startingservices"></a>

### Akamas failed to start some services

Please notice that the very first time Akamas is started, up to 30 minutes might be required to initialize the environment.

In case the issue persists you can run the following command to identify which service is not able to start up correctly

```bash
akamas status -d
```

### License service unable to access docker socket

In some systems, the Docker socket, usually located in `/var/run/docker.sock` can not be accessed within a container. This causes Akamas to signal this behavior by reporting the Access Denied error in the license service logs.

To overcome this limitation edit the `docker-compose.yaml` file adding the line `privileged: true` to the following services:

* License
* Optimizer
* Telemetry
* Airflow

The following is a sample configuration where this change is applied to the license service:

```yaml
license:
  image: 485790562880.dkr.ecr.us-east-2.amazonaws.com/akamas/license_service:2.3.0
  container_name: license
  privileged: true
```

Finally, you can issue the following command to apply these changes

```bash
docker compose up -d
```

### Missing Akamas Customer variable <a href="#missing-akamas-customer-variable" id="missing-akamas-customer-variable"></a>

When installing Akamas it’s mandatory to provide the AKAMAS\_CUSTOMER variable as illustrated in the [installation guide](https://docs.akamas.io/akamas-docs/3.6/installing/docker/install-the-akamas-server). This variable must match the one provided by Akamas representatives when issuing a license. If the variable is not properly exported license installation will fail with an error message indicating that the name of the customer installation does not match the one provided in the license.

You can easily inspect which value of this variable has been used when starting Akamas by running the following command on the Akamas server:

```bash
docker inspect license | grep AKAMAS_CUSTOMER
```

If you find out that the value is not the one you expect, you can update the `.env` file and then start again the license service by running:

```bash
docker compose up -d license
```

Once Akamas is up and running you can re-install your license.

### Other issues <a href="#installationissues-and-troubleshooting-otherissues" id="installationissues-and-troubleshooting-otherissues"></a>

For any other issues please contact Akamas [Customer Support Services](https://docs.akamas.io/akamas-docs/3.6/getting-started/maintenance-and-support-m-and-s-services/customer-support-services).
