Error deploying to AWS: The username is already being used (not WebDAV related)


#1

Hi guys,
I have an instance of Owncloud running on AWS Elastic Beanstalk
I’m just deploying it from the docker, so I have a very simple Dockerrun.aws.json

{
  "AWSEBDockerrunVersion": "1",
  "Image": {
    "Name": "owncloud/server:latest",
    "Update": "true"
  },
  "Ports": [
    {
      "ContainerPort": "8080",
      "hostPort": "80"
    }
  ],
  "Volumes": []
}

I first setup it running with SQLite, and it was running fine for a couple days
Now I’m trying to setup it using a MariaDB backedn instead.

For that I just add environment variables to my Elastic Beanstalk environment:
OWNCLOUD_ADMIN_PASSWORD=<admin-password>
OWNCLOUD_ADMIN_USERNAME=admin
OWNCLOUD_DB_HOST=<my-db-host-endpoint>
OWNCLOUD_DB_NAME=owncloud
OWNCLOUD_DB_PASSWORD=<db-password>
OWNCLOUD_DB_TYPE=mysql
OWNCLOUD_DB_USERNAME=owncloud
OWNCLOUD_DOMAIN=cloud.mydomain.com
OWNCLOUD_MYSQL_UTF8MB4=true
OWNCLOUD_REDIS_ENABLED=false

Then I just deployed this, and I got this log:

Docker container quit unexpectedly after launch: moving config folder…
Linking config folder…
Writing config file…
Fixing base perms…
Fixing data perms…
Fixing hook perms…
Installing server database…
The username is already being used. Check snapshot logs for details.

I checked the database and the username is not there.
I have tried using different OWNCLOUD_ADMIN_USERNAME, no success.
If I run the docker locally it runs fine and I can access it normally, I got this error message only once while running locally, but I just had to change the username and it worked.
However, the EB version is not accessible, and the instance keeps in “SEVERE/FAILURE” state.
I also have tried restarting the app server and even rebuilding the environment…
I saw similar issues, but they were always related to using WebDAV as an authentication backend, which is not my case. And in all the cases I saw this error was happening while creating a new user from the admin interface, which is not even accessible to me.

Any idea what else can I do?

Expected behaviour

Owncloud should be running and connected to the correct database

Actual behaviour

Elastic Beanstalk keep failing the deployment with the error above

Server configuration

Mostly of the configuration is the default coming from the Docker image: owncloud/server:latest


#2

I don’t think you will get much help here since AWS is mostly used by enterprise customers.

You could try to ask this question in the server channel and maybe an ownCloud engineer will have a hint for you:

https://talk.owncloud.com/channel/server