go-oauth2-server exits immediately
Closed this issue · 5 comments
abzfarah commented
After I run docker-compose up I get:
bash-3.2$ docker-compose up
gooauth2server_postgres_1 is up-to-date
gooauth2server_etcd_1 is up-to-date
Creating go-oauth2-server
Attaching to gooauth2server_postgres_1, gooauth2server_etcd_1, go-oauth2-server
go-oauth2-server | INFO: 2016/09/30 11:06:33 factory.go:155 ETCD Endpoints: http://localhost:2379
go-oauth2-server | FATAL: 2016/09/30 11:06:33 factory.go:92 client: etcd cluster is unavailable or misconfigured; error #0: dial tcp [::1]:2379: getsockopt: connection refused
go-oauth2-server |
etcd_1 | Using default CLIENT_URLS (http://0.0.0.0:4001,http://0.0.0.0:2379)
etcd_1 | Using default PEER_URLS (http://0.0.0.0:7001,http://0.0.0.0:2380)
etcd_1 | Running '/bin/etcd -data-dir=/data -listen-peer-urls=http://0.0.0.0:7001,http://0.0.0.0:2380 -listen-client-urls=http://0.0.0.0:4001,http://0.0.0.0:2379 '
etcd_1 | BEGIN ETCD OUTPUT
etcd_1 |
etcd_1 | 2016/09/30 10:35:52 etcd: listening for peers on http://0.0.0.0:2380
etcd_1 | 2016/09/30 10:35:52 etcd: listening for peers on http://0.0.0.0:7001
etcd_1 | 2016/09/30 10:35:52 etcd: listening for client requests on http://0.0.0.0:2379
etcd_1 | 2016/09/30 10:35:52 etcd: listening for client requests on http://0.0.0.0:4001
etcd_1 | 2016/09/30 10:35:52 etcdserver: datadir is valid for the 2.0.1 format
etcd_1 | 2016/09/30 10:35:52 etcdserver: name = default
etcd_1 | 2016/09/30 10:35:52 etcdserver: data dir = /data
etcd_1 | 2016/09/30 10:35:52 etcdserver: member dir = /data/member
etcd_1 | 2016/09/30 10:35:52 etcdserver: heartbeat = 100ms
etcd_1 | 2016/09/30 10:35:52 etcdserver: election = 1000ms
etcd_1 | 2016/09/30 10:35:52 etcdserver: snapshot count = 10000
etcd_1 | 2016/09/30 10:35:52 etcdserver: advertise client URLs = http://localhost:2379,http://localhost:4001
etcd_1 | 2016/09/30 10:35:52 etcdserver: initial advertise peer URLs = http://localhost:2380,http://localhost:7001
etcd_1 | 2016/09/30 10:35:52 etcdserver: initial cluster = default=http://localhost:2380,default=http://localhost:7001
etcd_1 | 2016/09/30 10:35:52 etcdserver: start member ce2a822cea30bfca in cluster 7e27652122e8b2ae
etcd_1 | 2016/09/30 10:35:52 raft: ce2a822cea30bfca became follower at term 0
etcd_1 | 2016/09/30 10:35:52 raft: newRaft ce2a822cea30bfca [peers: [], term: 0, commit: 0, applied: 0, lastindex: 0, lastterm: 0]
etcd_1 | 2016/09/30 10:35:52 raft: ce2a822cea30bfca became follower at term 1
etcd_1 | 2016/09/30 10:35:52 etcdserver: added local member ce2a822cea30bfca [http://localhost:2380 http://localhost:7001] to cluster 7e27652122e8b2ae
etcd_1 | 2016/09/30 10:35:54 raft: ce2a822cea30bfca is starting a new election at term 1
etcd_1 | 2016/09/30 10:35:54 raft: ce2a822cea30bfca became candidate at term 2
etcd_1 | 2016/09/30 10:35:54 raft: ce2a822cea30bfca received vote from ce2a822cea30bfca at term 2
etcd_1 | 2016/09/30 10:35:54 raft: ce2a822cea30bfca became leader at term 2
etcd_1 | 2016/09/30 10:35:54 raft.node: ce2a822cea30bfca elected leader ce2a822cea30bfca at term 2
etcd_1 | 2016/09/30 10:35:54 etcdserver: published {Name:default ClientURLs:[http://localhost:2379 http://localhost:4001]} to cluster 7e27652122e8b2ae
etcd_1 | Using default CLIENT_URLS (http://0.0.0.0:4001,http://0.0.0.0:2379)
postgres_1 | The files belonging to this database system will be owned by user "postgres".
etcd_1 | Using default PEER_URLS (http://0.0.0.0:7001,http://0.0.0.0:2380)
postgres_1 | This user must also own the server process.
etcd_1 | Running '/bin/etcd -data-dir=/data -listen-peer-urls=http://0.0.0.0:7001,http://0.0.0.0:2380 -listen-client-urls=http://0.0.0.0:4001,http://0.0.0.0:2379 '
postgres_1 |
etcd_1 | BEGIN ETCD OUTPUT
postgres_1 | The database cluster will be initialized with locale "en_US.utf8".
etcd_1 |
etcd_1 | 2016/09/30 10:56:10 etcd: already initialized as member before, starting as etcd member...
postgres_1 | The default database encoding has accordingly been set to "UTF8".
etcd_1 | 2016/09/30 10:56:10 etcd: listening for peers on http://0.0.0.0:2380
postgres_1 | The default text search configuration will be set to "english".
postgres_1 |
etcd_1 | 2016/09/30 10:56:10 etcd: listening for peers on http://0.0.0.0:7001
postgres_1 | Data page checksums are disabled.
etcd_1 | 2016/09/30 10:56:10 etcd: listening for client requests on http://0.0.0.0:2379
etcd_1 | 2016/09/30 10:56:10 etcd: listening for client requests on http://0.0.0.0:4001
postgres_1 |
etcd_1 | 2016/09/30 10:56:10 etcdserver: datadir is valid for the 2.0.1 format
postgres_1 | fixing permissions on existing directory /var/lib/postgresql/data ... ok
etcd_1 | 2016/09/30 10:56:10 etcdserver: name = default
etcd_1 | 2016/09/30 10:56:10 etcdserver: data dir = /data
etcd_1 | 2016/09/30 10:56:10 etcdserver: member dir = /data/member
postgres_1 | creating subdirectories ... ok
postgres_1 | selecting default max_connections ... 100
postgres_1 | selecting default shared_buffers ... 128MB
postgres_1 | selecting dynamic shared memory implementation ... posix
postgres_1 | creating configuration files ... ok
etcd_1 | 2016/09/30 10:56:10 etcdserver: heartbeat = 100ms
etcd_1 | 2016/09/30 10:56:10 etcdserver: election = 1000ms
postgres_1 | creating template1 database in /var/lib/postgresql/data/base/1 ... ok
postgres_1 | initializing pg_authid ... ok
postgres_1 | initializing dependencies ... ok
etcd_1 | 2016/09/30 10:56:10 etcdserver: snapshot count = 10000
postgres_1 | creating system views ... ok
etcd_1 | 2016/09/30 10:56:10 etcdserver: advertise client URLs = http://localhost:2379,http://localhost:4001
etcd_1 | 2016/09/30 10:56:10 etcdserver: restart member ce2a822cea30bfca in cluster 7e27652122e8b2ae at commit index 2412
postgres_1 | loading system objects' descriptions ... ok
etcd_1 | 2016/09/30 10:56:10 raft: ce2a822cea30bfca became follower at term 2
postgres_1 | creating collations ... ok
etcd_1 | 2016/09/30 10:56:10 raft: newRaft ce2a822cea30bfca [peers: [], term: 2, commit: 2412, applied: 0, lastindex: 2412, lastterm: 2]
etcd_1 | 2016/09/30 10:56:10 etcdserver: added local member ce2a822cea30bfca [http://localhost:2380 http://localhost:7001] to cluster 7e27652122e8b2ae
postgres_1 | creating conversions ... ok
etcd_1 | 2016/09/30 10:56:11 raft: ce2a822cea30bfca is starting a new election at term 2
postgres_1 | creating dictionaries ... ok
etcd_1 | 2016/09/30 10:56:11 raft: ce2a822cea30bfca became candidate at term 3
etcd_1 | 2016/09/30 10:56:11 raft: ce2a822cea30bfca received vote from ce2a822cea30bfca at term 3
postgres_1 | setting privileges on built-in objects ... ok
etcd_1 | 2016/09/30 10:56:11 raft: ce2a822cea30bfca became leader at term 3
postgres_1 | creating information schema ... ok
etcd_1 | 2016/09/30 10:56:11 raft.node: ce2a822cea30bfca elected leader ce2a822cea30bfca at term 3
postgres_1 | loading PL/pgSQL server-side language ... ok
etcd_1 | 2016/09/30 10:56:11 etcdserver: published {Name:default ClientURLs:[http://localhost:2379 http://localhost:4001]} to cluster 7e27652122e8b2ae
postgres_1 | vacuuming database template1 ... ok
postgres_1 | copying template1 to template0 ... ok
postgres_1 | copying template1 to postgres ... ok
postgres_1 | syncing data to disk ... ok
postgres_1 |
postgres_1 | WARNING: enabling "trust" authentication for local connections
postgres_1 | You can change this by editing pg_hba.conf or using the option -A, or
postgres_1 | --auth-local and --auth-host, the next time you run initdb.
postgres_1 |
postgres_1 | Success. You can now start the database server using:
postgres_1 |
postgres_1 | pg_ctl -D /var/lib/postgresql/data -l logfile start
postgres_1 |
postgres_1 | ****************************************************
postgres_1 | WARNING: No password has been set for the database.
postgres_1 | This will allow anyone with access to the
postgres_1 | Postgres port to access your database. In
postgres_1 | Docker's default configuration, this is
postgres_1 | effectively any other container on the same
postgres_1 | system.
postgres_1 |
postgres_1 | Use "-e POSTGRES_PASSWORD=password" to set
postgres_1 | it in "docker run".
postgres_1 | ****************************************************
postgres_1 | waiting for server to start....LOG: database system was shut down at 2016-09-30 10:35:53 UTC
postgres_1 | LOG: MultiXact member wraparound protections are now enabled
postgres_1 | LOG: database system is ready to accept connections
postgres_1 | LOG: autovacuum launcher started
postgres_1 | done
postgres_1 | server started
postgres_1 | CREATE DATABASE
postgres_1 |
postgres_1 | CREATE ROLE
postgres_1 |
postgres_1 |
postgres_1 | /docker-entrypoint.sh: ignoring /docker-entrypoint-initdb.d/*
postgres_1 |
postgres_1 | LOG: received fast shutdown request
postgres_1 | LOG: aborting any active transactions
postgres_1 | LOG: autovacuum launcher shutting down
postgres_1 | LOG: shutting down
postgres_1 | waiting for server to shut down....LOG: database system is shut down
postgres_1 | done
postgres_1 | server stopped
postgres_1 |
postgres_1 | PostgreSQL init process complete; ready for start up.
postgres_1 |
postgres_1 | LOG: database system was shut down at 2016-09-30 10:35:55 UTC
postgres_1 | LOG: MultiXact member wraparound protections are now enabled
postgres_1 | LOG: database system is ready to accept connections
postgres_1 | LOG: autovacuum launcher started
postgres_1 | LOG: database system was interrupted; last known up at 2016-09-30 10:35:56 UTC
postgres_1 | LOG: database system was not properly shut down; automatic recovery in progress
postgres_1 | LOG: invalid record length at 0/1708128
postgres_1 | LOG: redo is not required
postgres_1 | LOG: MultiXact member wraparound protections are now enabled
postgres_1 | LOG: database system is ready to accept connections
postgres_1 | LOG: autovacuum launcher started
go-oauth2-server exited with code 1
go-docker-oath2 container exits right away
docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
48e69da5974b elcolio/etcd "/bin/run.sh" 35 minutes ago Up 15 minutes 2379-2380/tcp, 4001/tcp, 7001/tcp gooauth2server_etcd_1
c4afdcde5778 postgres "/docker-entrypoint.s" 35 minutes ago Up 15 minutes 5432/tcp gooauth2server_postgres_1
docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
48e69da5974b elcolio/etcd "/bin/run.sh" 35 minutes ago Up 15 minutes 2379-2380/tcp, 4001/tcp, 7001/tcp gooauth2server_etcd_1
c4afdcde5778 postgres "/docker-entrypoint.s" 35 minutes ago Up 15 minutes 5432/tcp gooauth2server_postgres_1
50fa78b40360 go-oauth2-server "/docker-entrypoint.s" 9 minutes ago Exited (0) 8 minutes ago furious_mayer
RichardKnop commented
@abzfarah That's fixed now.
PumpkinSeed commented
Is this problem in the master, because I still had the same problem today.
RichardKnop commented
@PumpkinSeed @abzfarah I have tried a different solution. Let me know if it works now:
PumpkinSeed commented
I checked it, and the same, but for me only the first time do it, if I run it next time, everything okay.
Doesn't matter, it's not an issue which affect for usabaility. Thank you for the nice tool.
abzfarah commented
I will test it again soon.