Skip to content
This repository has been archived by the owner on May 20, 2022. It is now read-only.

Install on aws beanstalk #7

Closed
eungjun-yi opened this issue Apr 11, 2016 · 5 comments
Closed

Install on aws beanstalk #7

eungjun-yi opened this issue Apr 11, 2016 · 5 comments

Comments

@eungjun-yi
Copy link
Contributor

No description provided.

@eungjun-yi
Copy link
Contributor Author

I'm trying to deploy on aws beanstalk with https://github.com/npcode/mattermost-docker/blob/next/Dockerrun.aws.json but failed with this error:

Update environment operation is complete, but with errors. For more information, see troubleshooting documentation.

@eungjun-yi
Copy link
Contributor Author

I tried it again but it still not work. The database seems not to start.

Here is the log of the db container:

-------------------------------------
/var/log/containers/db-9b074b96866c-stdouterr.log
-------------------------------------
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.

The database cluster will be initialized with locale "en_US.utf8".
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".

Data page checksums are disabled.

fixing permissions on existing directory /var/lib/postgresql/data ... ok
creating subdirectories ... ok
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting dynamic shared memory implementation ... posix
creating configuration files ... ok
creating template1 database in /var/lib/postgresql/data/base/1 ... ok
initializing pg_authid ... ok
initializing dependencies ... ok
creating system views ... ok
loading system objects' descriptions ... ok
creating collations ... ok
creating conversions ... ok
creating dictionaries ... ok
setting privileges on built-in objects ... ok
creating information schema ... ok
loading PL/pgSQL server-side language ... ok
vacuuming database template1 ... ok
copying template1 to template0 ... ok
copying template1 to postgres ... ok
syncing data to disk ... ok

WARNING: enabling "trust" authentication for local connections
You can change this by editing pg_hba.conf or using the option -A, or
--auth-local and --auth-host, the next time you run initdb.

Success. You can now start the database server using:

    postgres -D /var/lib/postgresql/data
or
    pg_ctl -D /var/lib/postgresql/data -l logfile start

****************************************************
WARNING: No password has been set for the database.
         This will allow anyone with access to the
         Postgres port to access your database. In
         Docker's default configuration, this is
         effectively any other container on the same
         system.

         Use "-e POSTGRES_PASSWORD=password" to set
         it in "docker run".
****************************************************
waiting for server to start....LOG:  database system was shut down at 2016-04-12 19:22:01 UTC
LOG:  MultiXact member wraparound protections are now enabled
LOG:  database system is ready to accept connections
LOG:  autovacuum launcher started
 done
server started
ALTER ROLE


/docker-entrypoint.sh: running /docker-entrypoint-initdb.d/make_db.sh
CREATE DATABASE
CREATE ROLE
GRANT

LOG:  received fast shutdown request
LOG:  aborting any active transactions
LOG:  autovacuum launcher shutting down
LOG:  shutting down
waiting for server to shut down....LOG:  database system is shut down
 done
server stopped

PostgreSQL init process complete; ready for start up.

LOG:  database system was shut down at 2016-04-12 19:22:05 UTC
LOG:  MultiXact member wraparound protections are now enabled
LOG:  database system is ready to accept connections
LOG:  autovacuum launcher started
LOG:  incomplete startup packet
LOG:  received smart shutdown request
LOG:  autovacuum launcher shutting down
LOG:  shutting down
LOG:  database system is shut down

@eungjun-yi
Copy link
Contributor Author

Well, this might not be a problem of db. eb local run displays errors of app and I think this is the culprit.

app_1 | Starting platform
app_1 | [10:51:48 UTC 2016/04/24] [INFO] (github.com/mattermost/platform/utils.GetTranslationsBySystemLocale:52) Loaded system translations for 'en' from '/mattermost/i18n/en.json'
app_1 | [2016/04/24 10:51:48 UTC] [INFO] Current version is 2.1.0 (2.1.0/Mon Mar 14 20:45:23 UTC 2016/f189bc2073cf800c5f4506a69bdb51d7065269bf)
app_1 | [2016/04/24 10:51:48 UTC] [INFO] Enterprise Enabled: false
app_1 | [2016/04/24 10:51:48 UTC] [INFO] Current working directory is /mattermost/bin
app_1 | [2016/04/24 10:51:48 UTC] [INFO] Loaded config file from /mattermost/config/config.json
app_1 | [2016/04/24 10:51:48 UTC] [INFO] Server is initializing...
app_1 | [2016/04/24 10:51:48 UTC] [INFO] Pinging sql master database
app_1 | [2016/04/24 10:51:48 UTC] [CRIT] Failed to ping db err:dial tcp: lookup dockerhost on 192.168.1.1:53: no such host
app_1 | panic: Failed to open sql connection dial tcp: lookup dockerhost on 192.168.1.1:53: no such host
app_1 | 
app_1 | goroutine 1 [running]:
app_1 | panic(0xb2e0c0, 0xc82041c450)
app_1 |  /usr/local/go/src/runtime/panic.go:464 +0x3e6
app_1 | github.com/mattermost/platform/store.setupConnection(0xd40f40, 0x6, 0xc820432348, 0x5, 0xc82047b9a0, 0x48, 0xa, 0xa, 0xc8203be000, 0x0)
app_1 |  /var/lib/jenkins/jobs/mattermost-platform-release/workspace/src/github.com/mattermost/platform/store/sql_store.go:169 +0x894
app_1 | github.com/mattermost/platform/store.NewSqlStore(0x0, 0x0)
app_1 |  /var/lib/jenkins/jobs/mattermost-platform-release/workspace/src/github.com/mattermost/platform/store/sql_store.go:61 +0x122
app_1 | github.com/mattermost/platform/api.NewServer()
app_1 |  /var/lib/jenkins/jobs/mattermost-platform-release/workspace/src/github.com/mattermost/platform/api/server.go:35 +0xe8
app_1 | main.main()
app_1 |  /var/lib/jenkins/jobs/mattermost-platform-release/workspace/src/github.com/mattermost/platform/mattermost.go:67 +0x756

@eungjun-yi
Copy link
Contributor Author

Now I can reproduce this with docker-compose.yml in my local machine. This problem occurs when I remove 'volumes' option in docker-compose.yml

@eungjun-yi
Copy link
Contributor Author

Fixed by 1b1dc3c.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant