Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't run in windows10 docker #38

Closed
Smith-Cruise opened this issue Oct 16, 2017 · 5 comments
Closed

Can't run in windows10 docker #38

Smith-Cruise opened this issue Oct 16, 2017 · 5 comments

Comments

@Smith-Cruise
Copy link

I have already see the logs, there are several errors blow. I think the main problem is network didn't connected. Beacuse they can't reslove host name db, please give me some advice.

db container log

2017-10-16 10:56:55.765 UTC [1] FATAL:  data directory "/var/lib/postgresql/data" has wrong ownership
2017-10-16 10:56:55.765 UTC [1] HINT:  The server must be started by the user that owns the data directory.
2017-10-16 10:56:58.173 UTC [1] FATAL:  data directory "/var/lib/postgresql/data" has wrong ownership
2017-10-16 10:56:58.173 UTC [1] HINT:  The server must be started by the user that owns the data directory.
2017-10-16 10:57:00.590 UTC [1] FATAL:  data directory "/var/lib/postgresql/data" has wrong ownership
2017-10-16 10:57:00.590 UTC [1] HINT:  The server must be started by the user that owns the data directory.
2017-10-16 10:57:03.387 UTC [1] FATAL:  data directory "/var/lib/postgresql/data" has wrong ownership
2017-10-16 10:57:03.387 UTC [1] HINT:  The server must be started by the user that owns the data directory.
2017-10-16 10:57:05.838 UTC [1] FATAL:  data directory "/var/lib/postgresql/data" has wrong ownership
2017-10-16 10:57:05.838 UTC [1] HINT:  The server must be started by the user that owns the data directory.
2017-10-16 10:57:09.235 UTC [1] FATAL:  data directory "/var/lib/postgresql/data" has wrong ownership
2017-10-16 10:57:09.235 UTC [1] HINT:  The server must be started by the user that owns the data directory.
2017-10-16 10:57:14.356 UTC [1] FATAL:  data directory "/var/lib/postgresql/data" has wrong ownership
2017-10-16 10:57:14.356 UTC [1] HINT:  The server must be started by the user that owns the data directory.
2017-10-16 10:57:30.599 UTC [1] FATAL:  data directory "/var/lib/postgresql/data" has wrong ownership
2017-10-16 10:57:30.599 UTC [1] HINT:  The server must be started by the user that owns the data directory.
2017-10-16 10:57:45.553 UTC [1] FATAL:  data directory "/var/lib/postgresql/data" has wrong ownership
2017-10-16 10:57:45.553 UTC [1] HINT:  The server must be started by the user that owns the data directory.
2017-10-16 10:58:12.888 UTC [1] FATAL:  data directory "/var/lib/postgresql/data" has wrong ownership
2017-10-16 10:58:12.888 UTC [1] HINT:  The server must be started by the user that owns the data directory.
2017-10-16 10:59:05.801 UTC [1] FATAL:  data directory "/var/lib/postgresql/data" has wrong ownership
2017-10-16 10:59:05.801 UTC [1] HINT:  The server must be started by the user that owns the data directory.
2017-10-16 11:00:07.586 UTC [1] FATAL:  data directory "/var/lib/postgresql/data" has wrong ownership
2017-10-16 11:00:07.586 UTC [1] HINT:  The server must be started by the user that owns the data directory.
2017-10-16 11:01:09.696 UTC [1] FATAL:  data directory "/var/lib/postgresql/data" has wrong ownership
2017-10-16 11:01:09.696 UTC [1] HINT:  The server must be started by the user that owns the data directory.
2017-10-16 11:02:11.600 UTC [1] FATAL:  data directory "/var/lib/postgresql/data" has wrong ownership
2017-10-16 11:02:11.600 UTC [1] HINT:  The server must be started by the user that owns the data directory.

worker log

Running Judge0 API with configuration settings:
ENABLE_WAIT_RESULT: true
CPU_TIME_LIMIT: 2.0
MAX_CPU_TIME_LIMIT: 15.0
CPU_EXTRA_TIME: 0.5
MAX_CPU_EXTRA_TIME: 2.0
WALL_TIME_LIMIT: 5.0
MAX_WALL_TIME_LIMIT: 20.0
MEMORY_LIMIT: 128000
MAX_MEMORY_LIMIT: 256000
STACK_LIMIT: 64000
MAX_STACK_LIMIT: 128000
MAX_PROCESSES_AND_OR_THREADS: 30
MAX_MAX_PROCESSES_AND_OR_THREADS: 60
ENABLE_PER_PROCESS_AND_THREAD_TIME_LIMIT: false
ALLOW_ENABLE_PER_PROCESS_AND_THREAD_TIME_LIMIT: true
ENABLE_PER_PROCESS_AND_THREAD_MEMORY_LIMIT: true
ALLOW_ENABLE_PER_PROCESS_AND_THREAD_MEMORY_LIMIT: true
MAX_FILE_SIZE: 1024
MAX_MAX_FILE_SIZE: 4096
NUMBER_OF_RUNS: 1
MAX_NUMBER_OF_RUNS: 20
rails aborted!
PG::ConnectionBad: could not translate host name "db" to address: Name or service not known
/opt/.gem/gems/activerecord-5.0.2/lib/active_record/connection_adapters/postgresql_adapter.rb:671:in `initialize'
/opt/.gem/gems/activerecord-5.0.2/lib/active_record/connection_adapters/postgresql_adapter.rb:671:in `new'
/opt/.gem/gems/activerecord-5.0.2/lib/active_record/connection_adapters/postgresql_adapter.rb:671:in `connect'
/opt/.gem/gems/activerecord-5.0.2/lib/active_record/connection_adapters/postgresql_adapter.rb:217:in `initialize'
/opt/.gem/gems/activerecord-5.0.2/lib/active_record/connection_adapters/postgresql_adapter.rb:37:in `new'
/opt/.gem/gems/activerecord-5.0.2/lib/active_record/connection_adapters/postgresql_adapter.rb:37:in `postgresql_connection'
/opt/.gem/gems/activerecord-5.0.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:729:in `new_connection'
/opt/.gem/gems/activerecord-5.0.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:773:in `checkout_new_connection'
/opt/.gem/gems/activerecord-5.0.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:752:in `try_to_checkout_new_connection'
/opt/.gem/gems/activerecord-5.0.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:713:in `acquire_connection'
/opt/.gem/gems/activerecord-5.0.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:490:in `checkout'
/opt/.gem/gems/activerecord-5.0.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:364:in `connection'
/opt/.gem/gems/activerecord-5.0.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:883:in `retrieve_connection'
/opt/.gem/gems/activerecord-5.0.2/lib/active_record/connection_handling.rb:128:in `retrieve_connection'
/opt/.gem/gems/activerecord-5.0.2/lib/active_record/connection_handling.rb:91:in `connection'
/opt/.gem/gems/activerecord-5.0.2/lib/active_record/model_schema.rb:442:in `load_schema!'
/opt/.gem/gems/activerecord-5.0.2/lib/active_record/attributes.rb:233:in `load_schema!'
/opt/.gem/gems/activerecord-5.0.2/lib/active_record/attribute_decorators.rb:28:in `load_schema!'
/opt/.gem/gems/activerecord-5.0.2/lib/active_record/model_schema.rb:437:in `load_schema'
/opt/.gem/gems/activerecord-5.0.2/lib/active_record/model_schema.rb:344:in `columns'
/opt/.gem/gems/activerecord-5.0.2/lib/active_record/model_schema.rb:385:in `column_names'
/usr/src/api/app/serializers/submission_serializer.rb:2:in `<class:SubmissionSerializer>'
/usr/src/api/app/serializers/submission_serializer.rb:1:in `<top (required)>'
/opt/.gem/gems/activesupport-5.0.2/lib/active_support/dependencies.rb:293:in `require'
/opt/.gem/gems/activesupport-5.0.2/lib/active_support/dependencies.rb:293:in `block in require'
/opt/.gem/gems/activesupport-5.0.2/lib/active_support/dependencies.rb:259:in `load_dependency'
/opt/.gem/gems/activesupport-5.0.2/lib/active_support/dependencies.rb:293:in `require'
/opt/.gem/gems/activesupport-5.0.2/lib/active_support/dependencies.rb:380:in `block in require_or_load'
/opt/.gem/gems/activesupport-5.0.2/lib/active_support/dependencies.rb:37:in `block in load_interlock'
/opt/.gem/gems/activesupport-5.0.2/lib/active_support/dependencies/interlock.rb:12:in `block in loading'
/opt/.gem/gems/activesupport-5.0.2/lib/active_support/concurrency/share_lock.rb:150:in `exclusive'
/opt/.gem/gems/activesupport-5.0.2/lib/active_support/dependencies/interlock.rb:11:in `loading'
/opt/.gem/gems/activesupport-5.0.2/lib/active_support/dependencies.rb:37:in `load_interlock'
/opt/.gem/gems/activesupport-5.0.2/lib/active_support/dependencies.rb:358:in `require_or_load'
/opt/.gem/gems/activesupport-5.0.2/lib/active_support/dependencies.rb:336:in `depend_on'
/opt/.gem/gems/activesupport-5.0.2/lib/active_support/dependencies.rb:252:in `require_dependency'
/opt/.gem/gems/railties-5.0.2/lib/rails/engine.rb:476:in `block (2 levels) in eager_load!'
/opt/.gem/gems/railties-5.0.2/lib/rails/engine.rb:475:in `each'
/opt/.gem/gems/railties-5.0.2/lib/rails/engine.rb:475:in `block in eager_load!'
/opt/.gem/gems/railties-5.0.2/lib/rails/engine.rb:473:in `each'
/opt/.gem/gems/railties-5.0.2/lib/rails/engine.rb:473:in `eager_load!'
/opt/.gem/gems/resque-1.26.0/lib/resque/tasks.rb:43:in `block (2 levels) in <top (required)>'
/opt/.gem/gems/railties-5.0.2/lib/rails/commands/rake_proxy.rb:14:in `block in run_rake_task'
/opt/.gem/gems/railties-5.0.2/lib/rails/commands/rake_proxy.rb:11:in `run_rake_task'
/opt/.gem/gems/railties-5.0.2/lib/rails/commands/commands_tasks.rb:51:in `run_command!'
/opt/.gem/gems/railties-5.0.2/lib/rails/commands.rb:18:in `<top (required)>'
bin/rails:9:in `require'
bin/rails:9:in `<main>'
Tasks: TOP => resque:work => resque:preload
(See full trace by running task with --trace)

api log

could not translate host name "db" to address: Name or service not known
Couldn't create database for {"adapter"=>"postgresql", "encoding"=>"unicode", "host"=>"db", "database"=>"postgres", "username"=>"postgres", "password"=>"YourPasswordHere1234", "pool"=>nil}
rails aborted!
PG::ConnectionBad: could not translate host name "db" to address: Name or service not known
/opt/.gem/gems/activerecord-5.0.2/lib/active_record/connection_adapters/postgresql_adapter.rb:671:in `initialize'
/opt/.gem/gems/activerecord-5.0.2/lib/active_record/connection_adapters/postgresql_adapter.rb:671:in `new'
/opt/.gem/gems/activerecord-5.0.2/lib/active_record/connection_adapters/postgresql_adapter.rb:671:in `connect'
/opt/.gem/gems/activerecord-5.0.2/lib/active_record/connection_adapters/postgresql_adapter.rb:217:in `initialize'
/opt/.gem/gems/activerecord-5.0.2/lib/active_record/connection_adapters/postgresql_adapter.rb:37:in `new'
/opt/.gem/gems/activerecord-5.0.2/lib/active_record/connection_adapters/postgresql_adapter.rb:37:in `postgresql_connection'
/opt/.gem/gems/activerecord-5.0.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:729:in `new_connection'
/opt/.gem/gems/activerecord-5.0.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:773:in `checkout_new_connection'
/opt/.gem/gems/activerecord-5.0.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:752:in `try_to_checkout_new_connection'
/opt/.gem/gems/activerecord-5.0.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:713:in `acquire_connection'
/opt/.gem/gems/activerecord-5.0.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:490:in `checkout'
/opt/.gem/gems/activerecord-5.0.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:364:in `connection'
/opt/.gem/gems/activerecord-5.0.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:883:in `retrieve_connection'
/opt/.gem/gems/activerecord-5.0.2/lib/active_record/connection_handling.rb:128:in `retrieve_connection'
/opt/.gem/gems/activerecord-5.0.2/lib/active_record/connection_handling.rb:91:in `connection'
/opt/.gem/gems/activerecord-5.0.2/lib/active_record/tasks/postgresql_database_tasks.rb:6:in `connection'
/opt/.gem/gems/activerecord-5.0.2/lib/active_record/tasks/postgresql_database_tasks.rb:15:in `create'
/opt/.gem/gems/activerecord-5.0.2/lib/active_record/tasks/database_tasks.rb:109:in `create'
/opt/.gem/gems/activerecord-5.0.2/lib/active_record/tasks/database_tasks.rb:129:in `block in create_current'
/opt/.gem/gems/activerecord-5.0.2/lib/active_record/tasks/database_tasks.rb:292:in `block in each_current_configuration'
/opt/.gem/gems/activerecord-5.0.2/lib/active_record/tasks/database_tasks.rb:291:in `each'
/opt/.gem/gems/activerecord-5.0.2/lib/active_record/tasks/database_tasks.rb:291:in `each_current_configuration'
/opt/.gem/gems/activerecord-5.0.2/lib/active_record/tasks/database_tasks.rb:128:in `create_current'
/opt/.gem/gems/activerecord-5.0.2/lib/active_record/railties/databases.rake:27:in `block (2 levels) in <top (required)>'
/opt/.gem/gems/railties-5.0.2/lib/rails/commands/rake_proxy.rb:14:in `block in run_rake_task'
/opt/.gem/gems/railties-5.0.2/lib/rails/commands/rake_proxy.rb:11:in `run_rake_task'
/opt/.gem/gems/railties-5.0.2/lib/rails/commands/commands_tasks.rb:51:in `run_command!'
/opt/.gem/gems/railties-5.0.2/lib/rails/commands.rb:18:in `<top (required)>'
bin/rails:9:in `require'
bin/rails:9:in `<main>'
Tasks: TOP => db:create
(See full trace by running task with --trace)
@hermanzdosilovic
Copy link
Member

Wish I could reproduce your issue but I don't have Windows 10 😄

I suppose you are using docker-compose.prod.yml. If that's the case then remove this two lines. Your problem could also happen in Redis service. If that's the case in the future then remove this three lines.

Before removing anything make sure you don't have any containers. So run docker-compose down command, remove mentioned lines and try again with docker-compose up -d.

If you are using docker-compose.dev.yml let me know procedure should be the same as above.

Let me know if we resolved your issue.

@Smith-Cruise
Copy link
Author

Smith-Cruise commented Oct 17, 2017

pitty, it didn't work. It seems something error in database.

this is api error log

Database 'postgres' already exists
Running Judge0 API with configuration settings:
ENABLE_WAIT_RESULT: true
CPU_TIME_LIMIT: 2.0
MAX_CPU_TIME_LIMIT: 15.0
CPU_EXTRA_TIME: 0.5
MAX_CPU_EXTRA_TIME: 2.0
WALL_TIME_LIMIT: 5.0
MAX_WALL_TIME_LIMIT: 20.0
MEMORY_LIMIT: 128000
MAX_MEMORY_LIMIT: 256000
STACK_LIMIT: 64000
MAX_STACK_LIMIT: 128000
MAX_PROCESSES_AND_OR_THREADS: 30
MAX_MAX_PROCESSES_AND_OR_THREADS: 60
ENABLE_PER_PROCESS_AND_THREAD_TIME_LIMIT: false
ALLOW_ENABLE_PER_PROCESS_AND_THREAD_TIME_LIMIT: true
ENABLE_PER_PROCESS_AND_THREAD_MEMORY_LIMIT: true
ALLOW_ENABLE_PER_PROCESS_AND_THREAD_MEMORY_LIMIT: true
MAX_FILE_SIZE: 1024
MAX_MAX_FILE_SIZE: 4096
NUMBER_OF_RUNS: 1
MAX_NUMBER_OF_RUNS: 20
rails aborted!
ActiveRecord::StatementInvalid: PG::UndefinedColumn: ERROR:  column "increment_by" does not exist
LINE 1: ...ages_id_seq"', (SELECT COALESCE(MAX("id")+(SELECT increment_...
                                                             ^
:               SELECT setval('"public"."languages_id_seq"', (SELECT COALESCE(MAX("id")+(SELECT increment_by FROM "public"."languages_id_seq"), (SELECT min_value FROM "public"."languages_id_seq")) FROM "languages"), false)
/opt/.gem/gems/activerecord-5.0.2/lib/active_record/connection_adapters/postgresql_adapter.rb:598:in `async_exec'
/opt/.gem/gems/activerecord-5.0.2/lib/active_record/connection_adapters/postgresql_adapter.rb:598:in `block in exec_no_cache'
/opt/.gem/gems/activerecord-5.0.2/lib/active_record/connection_adapters/abstract_adapter.rb:589:in `block in log'
/opt/.gem/gems/activesupport-5.0.2/lib/active_support/notifications/instrumenter.rb:21:in `instrument'
/opt/.gem/gems/activerecord-5.0.2/lib/active_record/connection_adapters/abstract_adapter.rb:583:in `log'
/opt/.gem/gems/activerecord-5.0.2/lib/active_record/connection_adapters/postgresql_adapter.rb:598:in `exec_no_cache'
/opt/.gem/gems/activerecord-5.0.2/lib/active_record/connection_adapters/postgresql_adapter.rb:585:in `execute_and_clear'
/opt/.gem/gems/activerecord-5.0.2/lib/active_record/connection_adapters/postgresql/database_statements.rb:13:in `select_value'
/opt/.gem/gems/activerecord-5.0.2/lib/active_record/connection_adapters/postgresql/schema_statements.rb:379:in `reset_pk_sequence!'
/usr/src/api/db/seeds.rb:287:in `<top (required)>'
/opt/.gem/gems/activesupport-5.0.2/lib/active_support/dependencies.rb:287:in `load'
/opt/.gem/gems/activesupport-5.0.2/lib/active_support/dependencies.rb:287:in `block in load'
/opt/.gem/gems/activesupport-5.0.2/lib/active_support/dependencies.rb:259:in `load_dependency'
/opt/.gem/gems/activesupport-5.0.2/lib/active_support/dependencies.rb:287:in `load'
/opt/.gem/gems/railties-5.0.2/lib/rails/engine.rb:549:in `load_seed'
/opt/.gem/gems/activerecord-5.0.2/lib/active_record/tasks/database_tasks.rb:268:in `load_seed'
/opt/.gem/gems/activerecord-5.0.2/lib/active_record/railties/databases.rake:196:in `block (2 levels) in <top (required)>'
/opt/.gem/gems/railties-5.0.2/lib/rails/commands/rake_proxy.rb:14:in `block in run_rake_task'
/opt/.gem/gems/railties-5.0.2/lib/rails/commands/rake_proxy.rb:11:in `run_rake_task'
/opt/.gem/gems/railties-5.0.2/lib/rails/commands/commands_tasks.rb:51:in `run_command!'
/opt/.gem/gems/railties-5.0.2/lib/rails/commands.rb:18:in `<top (required)>'
bin/rails:9:in `require'
bin/rails:9:in `<main>'
PG::UndefinedColumn: ERROR:  column "increment_by" does not exist
LINE 1: ...ages_id_seq"', (SELECT COALESCE(MAX("id")+(SELECT increment_...
                                                             ^
/opt/.gem/gems/activerecord-5.0.2/lib/active_record/connection_adapters/postgresql_adapter.rb:598:in `async_exec'
/opt/.gem/gems/activerecord-5.0.2/lib/active_record/connection_adapters/postgresql_adapter.rb:598:in `block in exec_no_cache'
/opt/.gem/gems/activerecord-5.0.2/lib/active_record/connection_adapters/abstract_adapter.rb:589:in `block in log'
/opt/.gem/gems/activesupport-5.0.2/lib/active_support/notifications/instrumenter.rb:21:in `instrument'
/opt/.gem/gems/activerecord-5.0.2/lib/active_record/connection_adapters/abstract_adapter.rb:583:in `log'
/opt/.gem/gems/activerecord-5.0.2/lib/active_record/connection_adapters/postgresql_adapter.rb:598:in `exec_no_cache'
/opt/.gem/gems/activerecord-5.0.2/lib/active_record/connection_adapters/postgresql_adapter.rb:585:in `execute_and_clear'
/opt/.gem/gems/activerecord-5.0.2/lib/active_record/connection_adapters/postgresql/database_statements.rb:13:in `select_value'
/opt/.gem/gems/activerecord-5.0.2/lib/active_record/connection_adapters/postgresql/schema_statements.rb:379:in `reset_pk_sequence!'
/usr/src/api/db/seeds.rb:287:in `<top (required)>'
/opt/.gem/gems/activesupport-5.0.2/lib/active_support/dependencies.rb:287:in `load'
/opt/.gem/gems/activesupport-5.0.2/lib/active_support/dependencies.rb:287:in `block in load'
/opt/.gem/gems/activesupport-5.0.2/lib/active_support/dependencies.rb:259:in `load_dependency'
/opt/.gem/gems/activesupport-5.0.2/lib/active_support/dependencies.rb:287:in `load'
/opt/.gem/gems/railties-5.0.2/lib/rails/engine.rb:549:in `load_seed'
/opt/.gem/gems/activerecord-5.0.2/lib/active_record/tasks/database_tasks.rb:268:in `load_seed'
/opt/.gem/gems/activerecord-5.0.2/lib/active_record/railties/databases.rake:196:in `block (2 levels) in <top (required)>'
/opt/.gem/gems/railties-5.0.2/lib/rails/commands/rake_proxy.rb:14:in `block in run_rake_task'
/opt/.gem/gems/railties-5.0.2/lib/rails/commands/rake_proxy.rb:11:in `run_rake_task'
/opt/.gem/gems/railties-5.0.2/lib/rails/commands/commands_tasks.rb:51:in `run_command!'
/opt/.gem/gems/railties-5.0.2/lib/rails/commands.rb:18:in `<top (required)>'
bin/rails:9:in `require'
bin/rails:9:in `<main>'
Tasks: TOP => db:seed
(See full trace by running task with --trace)

db error logs

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
running bootstrap script ... ok
performing post-bootstrap initialization ... ok
syncing data to disk ... ok

Success. You can now start the database server using:

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


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.
waiting for server to start....2017-10-17 11:46:52.478 UTC [36] LOG:  listening on IPv4 address "127.0.0.1", port 5432
2017-10-17 11:46:52.478 UTC [36] LOG:  could not bind IPv6 address "::1": Cannot assign requested address
2017-10-17 11:46:52.478 UTC [36] HINT:  Is another postmaster already running on port 5432? If not, wait a few seconds and retry.
2017-10-17 11:46:52.565 UTC [36] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2017-10-17 11:46:52.723 UTC [37] LOG:  database system was shut down at 2017-10-17 11:46:51 UTC
2017-10-17 11:46:52.772 UTC [36] LOG:  database system is ready to accept connections
 done
server started
ALTER ROLE


/usr/local/bin/docker-entrypoint.sh: ignoring /docker-entrypoint-initdb.d/*

waiting for server to shut down...2017-10-17 11:46:52.910 UTC [36] LOG:  received fast shutdown request
.2017-10-17 11:46:52.963 UTC [36] LOG:  aborting any active transactions
2017-10-17 11:46:52.969 UTC [36] LOG:  worker process: logical replication launcher (PID 43) exited with exit code 1
2017-10-17 11:46:52.974 UTC [38] LOG:  shutting down
2017-10-17 11:46:53.524 UTC [36] LOG:  database system is shut down
 done
server stopped

PostgreSQL init process complete; ready for start up.

2017-10-17 11:46:53.697 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
2017-10-17 11:46:53.697 UTC [1] LOG:  listening on IPv6 address "::", port 5432
2017-10-17 11:46:53.807 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2017-10-17 11:46:54.006 UTC [54] LOG:  database system was shut down at 2017-10-17 11:46:53 UTC
2017-10-17 11:46:54.067 UTC [1] LOG:  database system is ready to accept connections
2017-10-17 12:09:40.740 UTC [83] ERROR:  database "postgres" already exists
2017-10-17 12:09:40.740 UTC [83] STATEMENT:  CREATE DATABASE "postgres" ENCODING = 'unicode'
2017-10-17 12:09:40.991 UTC [84] ERROR:  relation "submissions" does not exist at character 563
2017-10-17 12:09:40.991 UTC [84] STATEMENT:                SELECT a.attname, format_type(a.atttypid, a.atttypmod),
                             pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod,
                     (SELECT c.collname FROM pg_collation c, pg_type t
                       WHERE c.oid = a.attcollation AND t.oid = a.atttypid AND a.attcollation <> t.typcollation),
                             col_description(a.attrelid, a.attnum) AS comment
                        FROM pg_attribute a LEFT JOIN pg_attrdef d
                          ON a.attrelid = d.adrelid AND a.attnum = d.adnum
                       WHERE a.attrelid = '"submissions"'::regclass
                         AND a.attnum > 0 AND NOT a.attisdropped
                       ORDER BY a.attnum

2017-10-17 12:09:43.152 UTC [85] ERROR:  column "increment_by" does not exist at character 95
2017-10-17 12:09:43.152 UTC [85] STATEMENT:                SELECT setval('"public"."languages_id_seq"', (SELECT COALESCE(MAX("id")+(SELECT increment_by FROM "public"."languages_id_seq"), (SELECT min_value FROM "public"."languages_id_seq")) FROM "languages"), false)

2017-10-17 12:09:45.757 UTC [87] ERROR:  database "postgres" already exists
2017-10-17 12:09:45.757 UTC [87] STATEMENT:  CREATE DATABASE "postgres" ENCODING = 'unicode'
2017-10-17 12:09:46.053 UTC [88] ERROR:  column "increment_by" does not exist at character 95
2017-10-17 12:09:46.053 UTC [88] STATEMENT:                SELECT setval('"public"."languages_id_seq"', (SELECT COALESCE(MAX("id")+(SELECT increment_by FROM "public"."languages_id_seq"), (SELECT min_value FROM "public"."languages_id_seq")) FROM "languages"), false)

2017-10-17 12:09:49.010 UTC [89] ERROR:  database "postgres" already exists
2017-10-17 12:09:49.010 UTC [89] STATEMENT:  CREATE DATABASE "postgres" ENCODING = 'unicode'
2017-10-17 12:09:49.305 UTC [90] ERROR:  column "increment_by" does not exist at character 95
2017-10-17 12:09:49.305 UTC [90] STATEMENT:                SELECT setval('"public"."languages_id_seq"', (SELECT COALESCE(MAX("id")+(SELECT increment_by FROM "public"."languages_id_seq"), (SELECT min_value FROM "public"."languages_id_seq")) FROM "languages"), false)

2017-10-17 12:09:58.151 UTC [92] ERROR:  database "postgres" already exists
2017-10-17 12:09:58.151 UTC [92] STATEMENT:  CREATE DATABASE "postgres" ENCODING = 'unicode'
2017-10-17 12:09:58.451 UTC [93] ERROR:  column "increment_by" does not exist at character 95
2017-10-17 12:09:58.451 UTC [93] STATEMENT:                SELECT setval('"public"."languages_id_seq"', (SELECT COALESCE(MAX("id")+(SELECT increment_by FROM "public"."languages_id_seq"), (SELECT min_value FROM "public"."languages_id_seq")) FROM "languages"), false)

2017-10-17 12:10:02.379 UTC [94] ERROR:  database "postgres" already exists
2017-10-17 12:10:02.379 UTC [94] STATEMENT:  CREATE DATABASE "postgres" ENCODING = 'unicode'
2017-10-17 12:10:02.674 UTC [95] ERROR:  column "increment_by" does not exist at character 95
2017-10-17 12:10:02.674 UTC [95] STATEMENT:                SELECT setval('"public"."languages_id_seq"', (SELECT COALESCE(MAX("id")+(SELECT increment_by FROM "public"."languages_id_seq"), (SELECT min_value FROM "public"."languages_id_seq")) FROM "languages"), false)

@hermanzdosilovic
Copy link
Member

Seems that Judge0 API is not compatible with latest postgres version. So please use postgres:9.6.5 in this line.

@Smith-Cruise
Copy link
Author

It works! Thank you. Maybe you should update your README.md , linux's deployment is different from windows. If you need help, I can help you to update documentation.

This is my docker-compose.yml

version: '2'
services:
  api:
    image: judge0/api
    env_file: judge0-api.conf
    ports:
      - "3000:3000"
    privileged: true
    restart: always

  worker:
    image: judge0/api
    env_file: judge0-api.conf
    command: rails resque:work
    privileged: true
    restart: always

  db:
    image: postgres:9.6.5
    env_file: judge0-api.conf
    restart: always

  redis:
    image: redis
    restart: always

@hermanzdosilovic
Copy link
Member

Yes please! 😃

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

No branches or pull requests

2 participants