0

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 my case, as the admin UI 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

dfranca
  • 135
  • 8

1 Answers1

1

I'm still not pretty sure why the error was happening, but after several attempts, the error was finally gone.

What seems to have solved it was those steps:

  1. Drop the database created previously.
  2. Remove the environment variables related to Owncloud admin user: OWNCLOUD_ADMIN_PASSWORD and OWNCLOUD_ADMIN_USERNAME.

Then the instance was created with a default user admin/admin, you just need to change the password in the web UI.

dfranca
  • 135
  • 8