zooniverse / panoptes

Zooniverse API to support user defined volunteer research projects
Apache License 2.0
103 stars 41 forks source link

Installation issue #569

Closed alianos- closed 9 years ago

alianos- commented 9 years ago

Hi people

I downloaded the latest version but I cannot seem to be able to start the server. Here is the log, any ideas?

Attaching to panoptes_postgres_1, panoptes_zookeeper_1, panoptes_cellect_1, panoptes_redis_1, panoptes_kafka_1, panoptes_panoptes_1
zookeeper_1 | + '[' '' == auto ']'
zookeeper_1 | + '[' '!' -z '' ']'
zookeeper_1 | + exec /usr/bin/supervisord
zookeeper_1 | /usr/lib/python2.7/dist-packages/supervisor/options.py:295: UserWarning: Supervisord is running as root and it is searching for its configuration file in default locations (including its current working directory); you probably want to specify a "-c" argument specifying an absolute path to a configuration file for improved security.
zookeeper_1 |   'Supervisord is running as root and it is searching '
zookeeper_1 | 2015-02-20 16:29:58,740 CRIT Supervisor running as root (no user in config file)
zookeeper_1 | 2015-02-20 16:29:58,740 WARN Included extra file "/etc/supervisor/conf.d/zookeeper.conf" during parsing
zookeeper_1 | 2015-02-20 16:29:58,772 INFO RPC interface 'supervisor' initialized
zookeeper_1 | 2015-02-20 16:29:58,772 CRIT Server 'unix_http_server' running without any HTTP authentication checking
zookeeper_1 | 2015-02-20 16:29:58,772 INFO supervisord started with pid 1
zookeeper_1 | 2015-02-20 16:29:59,775 INFO spawned: 'zookeeper' with pid 13
zookeeper_1 | 2015-02-20 16:30:00,783 INFO success: zookeeper entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
postgres_1  | *** Running /etc/rc.local...
postgres_1  | *** Booting runit daemon...
postgres_1  | *** Runit started as PID 12
postgres_1  | POSTGRES_USER=panoptes
postgres_1  | POSTGRES_PASS=panoptes
postgres_1  | POSTGRES_DATA_DIR=/data
postgres_1  | POSTGRES_DB=panoptes_development
postgres_1  | Starting PostgreSQL...
postgres_1  | Creating the superuser: panoptes
postgres_1  | 2015-02-20 16:29:58 UTC LOG:  database system was shut down at 2015-02-20 16:26:24 UTC
postgres_1  | 2015-02-20 16:29:58 UTC LOG:  database system is ready to accept connections
postgres_1  | 2015-02-20 16:29:58 UTC LOG:  autovacuum launcher started
postgres_1  | 2015-02-20 16:29:58 UTC ERROR:  role "panoptes" cannot be dropped because some objects depend on it
postgres_1  | 2015-02-20 16:29:58 UTC DETAIL:  owner of database development_panoptes
postgres_1  |   owner of database panoptes_test
postgres_1  |   owner of database panoptes_development
postgres_1  |   46 objects in database panoptes_development
postgres_1  | 2015-02-20 16:29:58 UTC STATEMENT:  DROP ROLE IF EXISTS panoptes;
postgres_1  | ERROR:  role "panoptes" cannot be dropped because some objects depend on it
postgres_1  | DETAIL:  owner of database development_panoptes
postgres_1  | owner of database panoptes_test
postgres_1  | owner of database panoptes_development
postgres_1  | 46 objects in database panoptes_development
postgres_1  | 2015-02-20 16:29:58 UTC ERROR:  role "panoptes" already exists
postgres_1  | 2015-02-20 16:29:58 UTC STATEMENT:  CREATE ROLE panoptes WITH ENCRYPTED PASSWORD 'panoptes';
postgres_1  | ERROR:  role "panoptes" already exists
postgres_1  | Creating database: panoptes_development
postgres_1  | 2015-02-20 16:29:58 UTC ERROR:  database "panoptes_development" already exists
postgres_1  | 2015-02-20 16:29:58 UTC STATEMENT:  CREATE DATABASE panoptes_development WITH OWNER=panoptes ENCODING='UTF8';
postgres_1  | ERROR:  database "panoptes_development" already exists
redis_1     |                 _._                                                  
redis_1     |            _.-``__ ''-._                                             
redis_1     |       _.-``    `.  `_.  ''-._           Redis 2.8.19 (00000000/0) 64 bit
redis_1     |   .-`` .-```.  ```\/    _.,_ ''-._                                   
redis_1     |  (    '      ,       .-`  | `,    )     Running in stand alone mode
redis_1     |  |`-._`-...-` __...-.``-._|'` _.-'|     Port: 6379
redis_1     |  |    `-._   `._    /     _.-'    |     PID: 1
redis_1     |   `-._    `-._  `-./  _.-'    _.-'                                   
redis_1     |  |`-._`-._    `-.__.-'    _.-'_.-'|                                  
redis_1     |  |    `-._`-._        _.-'_.-'    |           http://redis.io        
redis_1     |   `-._    `-._`-.__.-'_.-'    _.-'                                   
redis_1     |  |`-._`-._    `-.__.-'    _.-'_.-'|                                  
redis_1     |  |    `-._`-._        _.-'_.-'    |                                  
redis_1     |   `-._    `-._`-.__.-'_.-'    _.-'                                   
redis_1     |       `-._    `-.__.-'    _.-'                                       
redis_1     |           `-._        _.-'                                           
redis_1     |               `-.__.-'                                               
redis_1     | 
redis_1     | [1] 20 Feb 16:30:00.001 # Server started, Redis version 2.8.19
redis_1     | [1] 20 Feb 16:30:00.001 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.
redis_1     | [1] 20 Feb 16:30:00.002 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
redis_1     | [1] 20 Feb 16:30:01.050 * DB loaded from append only file: 1.049 seconds
redis_1     | [1] 20 Feb 16:30:01.050 * The server is now ready to accept connections on port 6379
cellect_1   | Puma starting in single mode...
cellect_1   | * Version 2.11.0 (ruby 2.1.5-p273), codename: Intrepid Squirrel
cellect_1   | * Min threads: 8, max threads: 16
cellect_1   | * Environment: development
cellect_1   | * Listening on tcp://0.0.0.0:80
cellect_1   | Use Ctrl-C to stop
kafka_1     | /usr/lib/python2.7/dist-packages/supervisor/options.py:295: UserWarning: Supervisord is running as root and it is searching for its configuration file in default locations (including its current working directory); you probably want to specify a "-c" argument specifying an absolute path to a configuration file for improved security.
kafka_1     |   'Supervisord is running as root and it is searching '
kafka_1     | 2015-02-20 16:30:01,072 CRIT Supervisor running as root (no user in config file)
kafka_1     | 2015-02-20 16:30:01,073 WARN Included extra file "/etc/supervisor/conf.d/supervisord.conf" during parsing
kafka_1     | 2015-02-20 16:30:01,092 INFO RPC interface 'supervisor' initialized
kafka_1     | 2015-02-20 16:30:01,093 CRIT Server 'unix_http_server' running without any HTTP authentication checking
kafka_1     | 2015-02-20 16:30:01,093 INFO supervisord started with pid 14
panoptes_1  | + cd /rails_app
panoptes_1  | + '[' -d /rails_conf/ ']'
panoptes_1  | + '[' development == development ']'
panoptes_1  | + exec foreman start
kafka_1     | 2015-02-20 16:30:02,095 INFO spawned: 'kafka' with pid 17
kafka_1     | 2015-02-20 16:30:03,157 INFO success: kafka entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
panoptes_1  | file:/usr/local/lib/jruby.jar!/jruby/kernel19/process.rb:13 warning: unsupported spawn option: err
panoptes_1  | file:/usr/local/lib/jruby.jar!/jruby/kernel19/process.rb:13 warning: unsupported spawn option: out
panoptes_1  | file:/usr/local/lib/jruby.jar!/jruby/kernel19/process.rb:13 warning: unsupported spawn option: err
panoptes_1  | file:/usr/local/lib/jruby.jar!/jruby/kernel19/process.rb:13 warning: unsupported spawn option: out
panoptes_1  | 16:30:05 sidekiq.1 | started with pid 29
panoptes_1  | 16:30:05 server.1  | started with pid 20
panoptes_1  | file:/usr/local/lib/jruby.jar!/jruby/kernel19/kernel.rb:28 warning: unsupported exec option: close_others
panoptes_1  | file:/usr/local/lib/jruby.jar!/jruby/kernel19/kernel.rb:28 warning: unsupported exec option: close_others
panoptes_1  | No such file or directory - /rails_app/tmp/pids/sidekiq.pid
panoptes_1  | org/jruby/RubyFile.java:362:in `initialize'
panoptes_1  | org/jruby/RubyIO.java:1177:in `open'
panoptes_1  | /usr/local/lib/ruby/gems/shared/gems/sidekiq-3.3.2/lib/sidekiq/cli.rb:347:in `write_pid'
panoptes_1  | /usr/local/lib/ruby/gems/shared/gems/sidekiq-3.3.2/lib/sidekiq/cli.rb:42:in `parse'
panoptes_1  | /usr/local/lib/ruby/gems/shared/gems/sidekiq-3.3.2/bin/sidekiq:7:in `(root)'
panoptes_1  | org/jruby/RubyKernel.java:1087:in `load'
panoptes_1  | /usr/local/bin/sidekiq:23:in `(root)'
panoptes_1  | 16:30:23 sidekiq.1 | terminated by SIGHUP
panoptes_1  | 16:30:23 system    | sending SIGTERM to all processes
panoptes_1  | 16:30:28 system    | sending SIGKILL to all processes
panoptes_1  | Bad file descriptor - Bad file descriptor
panoptes_1  | org/jruby/RubyIO.java:3676:in `select'
panoptes_1  | /usr/local/lib/ruby/gems/shared/gems/foreman-0.77.0/lib/foreman/engine.rb:399:in `watch_for_output'
panoptes_1  | org/jruby/RubyKernel.java:1507:in `loop'
panoptes_1  | /usr/local/lib/ruby/gems/shared/gems/foreman-0.77.0/lib/foreman/engine.rb:398:in `watch_for_output'
panoptes_panoptes_1 exited with code 0
Gracefully stopping... (press Ctrl+C again to force)
camallen commented 9 years ago

Make sure this directory path exists No such file or directory - /rails_app/tmp/pids/sidekiq.pid

I.e. pwd where you checked the code out make sure tmp/pids exists.

alianos- commented 9 years ago

Meh, noobish mistake. Can we add this folder in the folder structure?

I got a different error by the way. Something missing from aws.yml maybe?

panoptes_1  | uninitialized constant AWS
panoptes_1  | /rails_app/config/initializers/aws.rb:1:in `(root)'
panoptes_1  | /usr/local/lib/ruby/gems/shared/gems/railties-4.1.9/lib/rails/engine.rb:648:in `load_config_initializer'
panoptes_1  | /usr/local/lib/ruby/gems/shared/gems/activesupport-4.1.9/lib/active_support/notifications.rb:161:in `instrument'
panoptes_1  | /usr/local/lib/ruby/gems/shared/gems/railties-4.1.9/lib/rails/engine.rb:647:in `load_config_initializer'
panoptes_1  | /usr/local/lib/ruby/gems/shared/gems/railties-4.1.9/lib/rails/engine.rb:612:in `each'
panoptes_1  | /usr/local/lib/ruby/gems/shared/gems/railties-4.1.9/lib/rails/engine.rb:612:in `Engine'
panoptes_1  | /usr/local/lib/ruby/gems/shared/gems/railties-4.1.9/lib/rails/initializable.rb:30:in `instance_exec'
panoptes_1  | /usr/local/lib/ruby/gems/shared/gems/railties-4.1.9/lib/rails/initializable.rb:30:in `run'
panoptes_1  | /usr/local/lib/ruby/gems/shared/gems/railties-4.1.9/lib/rails/engine.rb:611:in `Engine'
panoptes_1  | /usr/local/lib/ruby/gems/shared/gems/railties-4.1.9/lib/rails/initializable.rb:55:in `run_initializers'
panoptes_1  | /usr/local/lib/ruby/1.9/tsort.rb:150:in `tsort_each'
panoptes_1  | /usr/local/lib/ruby/1.9/tsort.rb:210:in `each_strongly_connected_component_from'
panoptes_1  | /usr/local/lib/ruby/1.9/tsort.rb:219:in `each_strongly_connected_component_from'
panoptes_1  | /usr/local/lib/ruby/1.9/tsort.rb:208:in `each_strongly_connected_component_from'
panoptes_1  | /usr/local/lib/ruby/gems/shared/gems/railties-4.1.9/lib/rails/initializable.rb:44:in `each'
panoptes_1  | /usr/local/lib/ruby/gems/shared/gems/railties-4.1.9/lib/rails/initializable.rb:44:in `tsort_each_child'
panoptes_1  | /usr/local/lib/ruby/1.9/tsort.rb:203:in `each_strongly_connected_component_from'
panoptes_1  | /usr/local/lib/ruby/1.9/tsort.rb:183:in `each_strongly_connected_component'
panoptes_1  | /usr/local/lib/ruby/1.9/tsort.rb:182:in `each'
panoptes_1  | /usr/local/lib/ruby/1.9/tsort.rb:182:in `each_strongly_connected_component'
panoptes_1  | /usr/local/lib/ruby/1.9/tsort.rb:180:in `each_strongly_connected_component'
panoptes_1  | /usr/local/lib/ruby/1.9/tsort.rb:148:in `tsort_each'
panoptes_1  | /usr/local/lib/ruby/gems/shared/gems/railties-4.1.9/lib/rails/initializable.rb:54:in `run_initializers'
panoptes_1  | /usr/local/lib/ruby/gems/shared/gems/railties-4.1.9/lib/rails/application.rb:300:in `initialize!'
panoptes_1  | /rails_app/config/environment.rb:5:in `(root)'
panoptes_1  | /usr/local/lib/ruby/gems/shared/gems/sidekiq-3.3.2/lib/sidekiq/cli.rb:1:in `(root)'
panoptes_1  | /usr/local/lib/ruby/gems/shared/gems/sidekiq-3.3.2/lib/sidekiq/cli.rb:236:in `boot_system'
panoptes_1  | /usr/local/bin/sidekiq:23:in `load'
panoptes_1  | /usr/local/bin/sidekiq:23:in `(root)'
panoptes_1  | => Booting Puma
panoptes_1  | => Rails 4.1.9 application starting in development on http://0.0.0.0:80
panoptes_1  | => Run `rails server -h` for more startup options
panoptes_1  | => Notice: server is listening on all interfaces (0.0.0.0). Consider using 127.0.0.1 (--binding option)
panoptes_1  | => Ctrl-C to shutdown server
panoptes_1  | log4j:WARN No appenders could be found for logger (org.apache.zookeeper.ZooKeeper).
panoptes_1  | log4j:WARN Please initialize the log4j system properly.
panoptes_1  | Exiting
panoptes_1  | NameError: uninitialized constant AWS
panoptes_1  |                    load_missing_constant at /usr/local/lib/ruby/gems/shared/gems/activesupport-4.1.9/lib/active_support/dependencies.rb:520
panoptes_1  |                            const_missing at /usr/local/lib/ruby/gems/shared/gems/activesupport-4.1.9/lib/active_support/dependencies.rb:180
panoptes_1  |                                   (root) at /rails_app/config/initializers/aws.rb:1
panoptes_1  |                                     load at org/jruby/RubyKernel.java:1087
panoptes_1  |                                   (root) at /usr/local/lib/ruby/gems/shared/gems/activesupport-4.1.9/lib/active_support/dependencies.rb:1
panoptes_1  |                          load_dependency at /usr/local/lib/ruby/gems/shared/gems/activesupport-4.1.9/lib/active_support/dependencies.rb:232
panoptes_1  |                                     load at /usr/local/lib/ruby/gems/shared/gems/activesupport-4.1.9/lib/active_support/dependencies.rb:241
panoptes_1  |                                     load at /usr/local/lib/ruby/gems/shared/gems/activesupport-4.1.9/lib/active_support/dependencies.rb:241
panoptes_1  |                  load_config_initializer at /usr/local/lib/ruby/gems/shared/gems/railties-4.1.9/lib/rails/engine.rb:648
panoptes_1  |                               instrument at /usr/local/lib/ruby/gems/shared/gems/activesupport-4.1.9/lib/active_support/notifications.rb:161
panoptes_1  |                  load_config_initializer at /usr/local/lib/ruby/gems/shared/gems/railties-4.1.9/lib/rails/engine.rb:647
panoptes_1  |                                     each at org/jruby/RubyArray.java:1613
panoptes_1  |                                   Engine at /usr/local/lib/ruby/gems/shared/gems/railties-4.1.9/lib/rails/engine.rb:612
panoptes_1  |                            instance_exec at org/jruby/RubyBasicObject.java:1562
panoptes_1  |                                      run at /usr/local/lib/ruby/gems/shared/gems/railties-4.1.9/lib/rails/initializable.rb:30
panoptes_1  |                                   Engine at /usr/local/lib/ruby/gems/shared/gems/railties-4.1.9/lib/rails/engine.rb:611
panoptes_1  |                         run_initializers at /usr/local/lib/ruby/gems/shared/gems/railties-4.1.9/lib/rails/initializable.rb:55
panoptes_1  |                               tsort_each at /usr/local/lib/ruby/1.9/tsort.rb:150
panoptes_1  |   each_strongly_connected_component_from at /usr/local/lib/ruby/1.9/tsort.rb:210
panoptes_1  |   each_strongly_connected_component_from at /usr/local/lib/ruby/1.9/tsort.rb:219
panoptes_1  |   each_strongly_connected_component_from at /usr/local/lib/ruby/1.9/tsort.rb:208
panoptes_1  |                                     each at org/jruby/RubyArray.java:1613
panoptes_1  |                         tsort_each_child at /usr/local/lib/ruby/gems/shared/gems/railties-4.1.9/lib/rails/initializable.rb:44
panoptes_1  |   each_strongly_connected_component_from at /usr/local/lib/ruby/1.9/tsort.rb:203
panoptes_1  |        each_strongly_connected_component at /usr/local/lib/ruby/1.9/tsort.rb:183
panoptes_1  |                                     each at org/jruby/RubyArray.java:1613
panoptes_1  |        each_strongly_connected_component at /usr/local/lib/ruby/1.9/tsort.rb:182
panoptes_1  |        each_strongly_connected_component at /usr/local/lib/ruby/1.9/tsort.rb:180
panoptes_1  |                               tsort_each at /usr/local/lib/ruby/1.9/tsort.rb:148
panoptes_1  |                         run_initializers at /usr/local/lib/ruby/gems/shared/gems/railties-4.1.9/lib/rails/initializable.rb:54
panoptes_1  |                              initialize! at /usr/local/lib/ruby/gems/shared/gems/railties-4.1.9/lib/rails/application.rb:300
panoptes_1  |                                  require at org/jruby/RubyKernel.java:1071
panoptes_1  |                                  require at /usr/local/lib/ruby/gems/shared/gems/activesupport-4.1.9/lib/active_support/dependencies.rb:247
panoptes_1  |                          load_dependency at /usr/local/lib/ruby/gems/shared/gems/activesupport-4.1.9/lib/active_support/dependencies.rb:232
panoptes_1  |                                  require at /usr/local/lib/ruby/gems/shared/gems/activesupport-4.1.9/lib/active_support/dependencies.rb:247
panoptes_1  |                                   (root) at /rails_app/config/environment.rb:5
panoptes_1  |                            instance_eval at org/jruby/RubyBasicObject.java:1533
panoptes_1  |                                   (root) at /rails_app/config.ru:1
panoptes_1  |                          new_from_string at /rails_app/config.ru:3
panoptes_1  |                                     eval at org/jruby/RubyKernel.java:1107
panoptes_1  |                               initialize at /usr/local/lib/ruby/gems/shared/gems/rack-1.5.2/lib/rack/builder.rb:55
panoptes_1  |                          new_from_string at /rails_app/config.ru:0
panoptes_1  |                          new_from_string at /usr/local/lib/ruby/gems/shared/gems/rack-1.5.2/lib/rack/builder.rb:49
panoptes_1  |                               parse_file at /usr/local/lib/ruby/gems/shared/gems/rack-1.5.2/lib/rack/builder.rb:40
panoptes_1  |        build_app_and_options_from_config at /usr/local/lib/ruby/gems/shared/gems/rack-1.5.2/lib/rack/server.rb:277
panoptes_1  |                                      app at /usr/local/lib/ruby/gems/shared/gems/rack-1.5.2/lib/rack/server.rb:199
panoptes_1  |                                      app at /usr/local/lib/ruby/gems/shared/gems/railties-4.1.9/lib/rails/commands/server.rb:50
panoptes_1  |                              wrapped_app at /usr/local/lib/ruby/gems/shared/gems/rack-1.5.2/lib/rack/server.rb:314
panoptes_1  |                            log_to_stdout at /usr/local/lib/ruby/gems/shared/gems/railties-4.1.9/lib/rails/commands/server.rb:130
panoptes_1  |                                      tap at org/jruby/RubyKernel.java:1886
panoptes_1  |                                    start at /usr/local/lib/ruby/gems/shared/gems/railties-4.1.9/lib/rails/commands/server.rb:67
panoptes_1  |                                     call at org/jruby/RubyMethod.java:124
panoptes_1  |                                   server at /usr/local/lib/ruby/gems/shared/gems/railties-4.1.9/lib/rails/commands/commands_tasks.rb:81
panoptes_1  |                                   server at /usr/local/lib/ruby/gems/shared/gems/railties-4.1.9/lib/rails/commands/commands_tasks.rb:76
panoptes_1  |                                   server at /usr/local/lib/ruby/gems/shared/gems/fig_rake-0.9.2/lib/fig_rake/rails.rb:34
panoptes_1  |                                  require at org/jruby/RubyKernel.java:1071
panoptes_1  |                                   (root) at bin/rails:8
panoptes_1  | D, [2015-02-20T17:45:45.514000 #28] DEBUG -- : Terminating 103 actors...
panoptes_1  | W, [2015-02-20T17:45:45.689000 #28]  WARN -- : Terminating task: type=:finalizer, meta={:method_name=>:__shutdown__}, status=:receiving
panoptes_1  |   Celluloid::TaskFiber backtrace unavailable. Please try `Celluloid.task_class = Celluloid::TaskThread` if you need backtraces here.
panoptes_1  | 17:45:46 server.1  | terminated by SIGHUP
panoptes_1  | 17:45:46 system    | sending SIGTERM to all processes
panoptes_1  | 17:45:51 system    | sending SIGKILL to all processes
panoptes_1  | Bad file descriptor - Bad file descriptor
panoptes_1  | org/jruby/RubyIO.java:3676:in `select'
panoptes_1  | /usr/local/lib/ruby/gems/shared/gems/foreman-0.77.0/lib/foreman/engine.rb:399:in `watch_for_output'
panoptes_1  | org/jruby/RubyKernel.java:1507:in `loop'
panoptes_1  | /usr/local/lib/ruby/gems/shared/gems/foreman-0.77.0/lib/foreman/engine.rb:398:in `watch_for_output'
camallen commented 9 years ago

If it's a fresh clone on a new machine then you'll have to follow the setup again. If not then i assume it's a new gem install that you need to rebuild the docker image, try fig build and fig up.

alianos- commented 9 years ago

I have really (because there was a new gem installed so I had to anyway). Fig up produces the log I posted. Any way of re-rebuilding the docker? Because now all steps say "using cache"

Edit: I'll reset everything and try again.

alianos- commented 9 years ago

Same thing :/

Its just that instead of booting puma, I am getting a different error

panoptes_1  | => Booting Pumalog4j:WARN No appenders could be found for logger (org.apache.zookeeper.ZooKeeper).12:58:50 system    | sending SIGKILL to all processes
panoptes_1  | Bad file descriptor - Bad file descriptor
panoptes_1  | org/jruby/RubyIO.java:3676:in `select'
panoptes_1  | /usr/local/lib/ruby/gems/shared/gems/foreman-0.77.0/lib/foreman/engine.rb:399:in `watch_for_output'
panoptes_1  | org/jruby/RubyKernel.java:1507:in `loop'
panoptes_1  | /usr/local/lib/ruby/gems/shared/gems/foreman-0.77.0/lib/foreman/engine.rb:398:in `watch_for_output'
panoptes_panoptes_1 exited with code 0
camallen commented 9 years ago

Might be an issue with Log4j Bad file descriptor - Bad file descriptor. What does the Log dir look like ls -al log/? You might need to remove the existing log files there / rotate them?

If it's not a log file problem then it could be related to some JAR upgrades we ran the other day (https://github.com/edpaget/Panoptes/blob/2341572f8c0a2e3e844096197be8aa27f6277df4/Jarfile.lock). To test if it's JAR / JRuby related, you can change from JRuby to MRI ruby on L1 here:

FROM zooniverse/ruby:jruby-1.7.18

becomes

FROM zooniverse/ruby:2.1.5

If it is then you can run under MRI ruby while developing. It means you won't get true threaded server support (Puma / Sidekiq) due to the GIL in MRI ruby. This is a concern when you want to deploy to a production setup, specifically how many requests you can serve at once (i.e. concurrent users on the site).

Finally I don't think it will help but if you want to rebuild all the docker images without a cache then you can use fig build --no-cache, see here and fig help for more info.

alianos- commented 9 years ago

I am afraid neither solution helped. Changing jruby only resulted in a different problem.

I just tried installing everything in a fresh ubuntu installation, to no avail. Here is the latest attempt to fig up on a new machine, on a fresh installation

Attaching to panoptes_postgres_1, panoptes_zookeeper_1, panoptes_cellect_1, panoptes_redis_1, panoptes_kafka_1, panoptes_panoptes_1
zookeeper_1 | + '[' '' == auto ']'
cellect_1   | Puma starting in single mode...
zookeeper_1 | + '[' '!' -z '' ']'
zookeeper_1 | + '[' '!' -e /var/lib/zookeeper/myid ']'
zookeeper_1 | + exec /usr/bin/supervisord
zookeeper_1 | /usr/lib/python2.7/dist-packages/supervisor/options.py:295: UserWarning: Supervisord is running as root and it is searching for its configuration file in default locations (including its current working directory); you probably want to specify a "-c" argument specifying an absolute path to a configuration file for improved security.
zookeeper_1 |   'Supervisord is running as root and it is searching '
zookeeper_1 | 2015-02-23 12:40:30,040 CRIT Supervisor running as root (no user in config file)
zookeeper_1 | 2015-02-23 12:40:30,040 WARN Included extra file "/etc/supervisor/conf.d/zookeeper.conf" during parsing
zookeeper_1 | 2015-02-23 12:40:30,057 INFO RPC interface 'supervisor' initialized
zookeeper_1 | 2015-02-23 12:40:30,057 CRIT Server 'unix_http_server' running without any HTTP authentication checking
zookeeper_1 | 2015-02-23 12:40:30,057 INFO supervisord started with pid 1
zookeeper_1 | 2015-02-23 12:40:31,060 INFO spawned: 'zookeeper' with pid 14
zookeeper_1 | 2015-02-23 12:40:32,076 INFO success: zookeeper entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
cellect_1   | * Version 2.11.0 (ruby 2.2.0-p0), codename: Intrepid Squirrel
cellect_1   | * Min threads: 8, max threads: 16
cellect_1   | * Environment: development
cellect_1   | * Listening on tcp://0.0.0.0:80
cellect_1   | Use Ctrl-C to stop
redis_1     |                 _._                                                  
redis_1     |            _.-``__ ''-._                                             
redis_1     |       _.-``    `.  `_.  ''-._           Redis 2.8.19 (00000000/0) 64 bit
redis_1     |   .-`` .-```.  ```\/    _.,_ ''-._                                   
redis_1     |  (    '      ,       .-`  | `,    )     Running in stand alone mode
redis_1     |  |`-._`-...-` __...-.``-._|'` _.-'|     Port: 6379
redis_1     |  |    `-._   `._    /     _.-'    |     PID: 1
redis_1     |   `-._    `-._  `-./  _.-'    _.-'                                   
redis_1     |  |`-._`-._    `-.__.-'    _.-'_.-'|                                  
redis_1     |  |    `-._`-._        _.-'_.-'    |           http://redis.io        
redis_1     |   `-._    `-._`-.__.-'_.-'    _.-'                                   
redis_1     |  |`-._`-._    `-.__.-'    _.-'_.-'|                                  
redis_1     |  |    `-._`-._        _.-'_.-'    |                                  
redis_1     |   `-._    `-._`-.__.-'_.-'    _.-'                                   
redis_1     |       `-._    `-.__.-'    _.-'                                       
redis_1     |           `-._        _.-'                                           
redis_1     |               `-.__.-'                                               
redis_1     | 
redis_1     | [1] 23 Feb 12:40:31.280 # Server started, Redis version 2.8.19
redis_1     | [1] 23 Feb 12:40:31.280 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
redis_1     | [1] 23 Feb 12:40:31.281 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.
redis_1     | [1] 23 Feb 12:40:31.281 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
redis_1     | [1] 23 Feb 12:40:31.281 * The server is now ready to accept connections on port 6379
kafka_1     | [2015-02-23 12:40:32,525] INFO Verifying properties (kafka.utils.VerifiableProperties)
kafka_1     | [2015-02-23 12:40:32,547] INFO Property advertised.host.name is overridden to kafka (kafka.utils.VerifiableProperties)
kafka_1     | [2015-02-23 12:40:32,547] INFO Property advertised.port is overridden to 9092 (kafka.utils.VerifiableProperties)
kafka_1     | [2015-02-23 12:40:32,547] INFO Property broker.id is overridden to 1 (kafka.utils.VerifiableProperties)
kafka_1     | [2015-02-23 12:40:32,548] WARN Property log.cleanup.interval.mins is not valid (kafka.utils.VerifiableProperties)
kafka_1     | [2015-02-23 12:40:32,548] INFO Property log.dirs is overridden to /opt/kafka/log (kafka.utils.VerifiableProperties)
kafka_1     | [2015-02-23 12:40:32,548] INFO Property log.flush.interval.messages is overridden to 10000 (kafka.utils.VerifiableProperties)
kafka_1     | [2015-02-23 12:40:32,548] INFO Property log.flush.interval.ms is overridden to 1000 (kafka.utils.VerifiableProperties)
kafka_1     | [2015-02-23 12:40:32,549] INFO Property log.retention.hours is overridden to 168 (kafka.utils.VerifiableProperties)
kafka_1     | [2015-02-23 12:40:32,549] INFO Property log.segment.bytes is overridden to 536870912 (kafka.utils.VerifiableProperties)
kafka_1     | [2015-02-23 12:40:32,549] INFO Property num.io.threads is overridden to 2 (kafka.utils.VerifiableProperties)
kafka_1     | [2015-02-23 12:40:32,549] INFO Property num.network.threads is overridden to 2 (kafka.utils.VerifiableProperties)
kafka_1     | [2015-02-23 12:40:32,550] INFO Property num.partitions is overridden to 2 (kafka.utils.VerifiableProperties)
kafka_1     | [2015-02-23 12:40:32,550] INFO Property port is overridden to 9092 (kafka.utils.VerifiableProperties)
kafka_1     | [2015-02-23 12:40:32,550] INFO Property socket.receive.buffer.bytes is overridden to 1048576 (kafka.utils.VerifiableProperties)
kafka_1     | [2015-02-23 12:40:32,550] INFO Property socket.request.max.bytes is overridden to 104857600 (kafka.utils.VerifiableProperties)
kafka_1     | [2015-02-23 12:40:32,550] INFO Property socket.send.buffer.bytes is overridden to 1048576 (kafka.utils.VerifiableProperties)
kafka_1     | [2015-02-23 12:40:32,550] INFO Property zookeeper.connect is overridden to zk:2181 (kafka.utils.VerifiableProperties)
kafka_1     | [2015-02-23 12:40:32,580] INFO [Kafka Server 1], starting (kafka.server.KafkaServer)
kafka_1     | [2015-02-23 12:40:32,581] INFO [Kafka Server 1], Connecting to zookeeper on zk:2181 (kafka.server.KafkaServer)
kafka_1     | [2015-02-23 12:40:32,588] INFO Starting ZkClient event thread. (org.I0Itec.zkclient.ZkEventThread)
kafka_1     | [2015-02-23 12:40:32,593] INFO Client environment:zookeeper.version=3.4.6-1569965, built on 02/20/2014 09:09 GMT (org.apache.zookeeper.ZooKeeper)
kafka_1     | [2015-02-23 12:40:32,593] INFO Client environment:host.name=240274b6114e (org.apache.zookeeper.ZooKeeper)
kafka_1     | [2015-02-23 12:40:32,593] INFO Client environment:java.version=1.7.0_75 (org.apache.zookeeper.ZooKeeper)
kafka_1     | [2015-02-23 12:40:32,593] INFO Client environment:java.vendor=Oracle Corporation (org.apache.zookeeper.ZooKeeper)
kafka_1     | [2015-02-23 12:40:32,593] INFO Client environment:java.home=/usr/lib/jvm/java-7-openjdk-amd64/jre (org.apache.zookeeper.ZooKeeper)
kafka_1     | [2015-02-23 12:40:32,593] INFO Client environment:java.class.path=:/opt/kafka_2.11-0.8.2.0/bin/../core/build/dependant-libs-2.11*/*.jar:/opt/kafka_2.11-0.8.2.0/bin/../examples/build/libs//kafka-examples*.jar:/opt/kafka_2.11-0.8.2.0/bin/../contrib/hadoop-consumer/build/libs//kafka-hadoop-consumer*.jar:/opt/kafka_2.11-0.8.2.0/bin/../contrib/hadoop-producer/build/libs//kafka-hadoop-producer*.jar:/opt/kafka_2.11-0.8.2.0/bin/../clients/build/libs/kafka-clients*.jar:/opt/kafka_2.11-0.8.2.0/bin/../libs/jopt-simple-3.2.jar:/opt/kafka_2.11-0.8.2.0/bin/../libs/kafka-clients-0.8.2.0.jar:/opt/kafka_2.11-0.8.2.0/bin/../libs/kafka_2.11-0.8.2.0-javadoc.jar:/opt/kafka_2.11-0.8.2.0/bin/../libs/kafka_2.11-0.8.2.0-scaladoc.jar:/opt/kafka_2.11-0.8.2.0/bin/../libs/kafka_2.11-0.8.2.0-sources.jar:/opt/kafka_2.11-0.8.2.0/bin/../libs/kafka_2.11-0.8.2.0-test.jar:/opt/kafka_2.11-0.8.2.0/bin/../libs/kafka_2.11-0.8.2.0.jar:/opt/kafka_2.11-0.8.2.0/bin/../libs/log4j-1.2.16.jar:/opt/kafka_2.11-0.8.2.0/bin/../libs/lz4-1.2.0.jar:/opt/kafka_2.11-0.8.2.0/bin/../libs/metrics-core-2.2.0.jar:/opt/kafka_2.11-0.8.2.0/bin/../libs/scala-library-2.11.5.jar:/opt/kafka_2.11-0.8.2.0/bin/../libs/scala-parser-combinators_2.11-1.0.2.jar:/opt/kafka_2.11-0.8.2.0/bin/../libs/scala-xml_2.11-1.0.2.jar:/opt/kafka_2.11-0.8.2.0/bin/../libs/slf4j-api-1.7.6.jar:/opt/kafka_2.11-0.8.2.0/bin/../libs/slf4j-log4j12-1.6.1.jar:/opt/kafka_2.11-0.8.2.0/bin/../libs/snappy-java-1.1.1.6.jar:/opt/kafka_2.11-0.8.2.0/bin/../libs/zkclient-0.3.jar:/opt/kafka_2.11-0.8.2.0/bin/../libs/zookeeper-3.4.6.jar:/opt/kafka_2.11-0.8.2.0/bin/../core/build/libs/kafka_2.10*.jar (org.apache.zookeeper.ZooKeeper)
kafka_1     | [2015-02-23 12:40:32,593] INFO Client environment:java.library.path=/usr/java/packages/lib/amd64:/usr/lib/x86_64-linux-gnu/jni:/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:/usr/lib/jni:/lib:/usr/lib (org.apache.zookeeper.ZooKeeper)
kafka_1     | [2015-02-23 12:40:32,593] INFO Client environment:java.io.tmpdir=/tmp (org.apache.zookeeper.ZooKeeper)
kafka_1     | [2015-02-23 12:40:32,593] INFO Client environment:java.compiler=<NA> (org.apache.zookeeper.ZooKeeper)
kafka_1     | [2015-02-23 12:40:32,593] INFO Client environment:os.name=Linux (org.apache.zookeeper.ZooKeeper)
kafka_1     | [2015-02-23 12:40:32,593] INFO Client environment:os.arch=amd64 (org.apache.zookeeper.ZooKeeper)
kafka_1     | [2015-02-23 12:40:32,593] INFO Client environment:os.version=3.13.0-43-generic (org.apache.zookeeper.ZooKeeper)
kafka_1     | [2015-02-23 12:40:32,593] INFO Client environment:user.name=root (org.apache.zookeeper.ZooKeeper)
kafka_1     | [2015-02-23 12:40:32,593] INFO Client environment:user.home=/root (org.apache.zookeeper.ZooKeeper)
kafka_1     | [2015-02-23 12:40:32,593] INFO Client environment:user.dir=/ (org.apache.zookeeper.ZooKeeper)
kafka_1     | [2015-02-23 12:40:32,594] INFO Initiating client connection, connectString=zk:2181 sessionTimeout=6000 watcher=org.I0Itec.zkclient.ZkClient@37fead5c (org.apache.zookeeper.ZooKeeper)
kafka_1     | [2015-02-23 12:40:32,611] INFO Opening socket connection to server panoptes_zookeeper_1/172.17.0.13:2181. Will not attempt to authenticate using SASL (unknown error) (org.apache.zookeeper.ClientCnxn)
kafka_1     | [2015-02-23 12:40:32,622] INFO Socket connection established to panoptes_zookeeper_1/172.17.0.13:2181, initiating session (org.apache.zookeeper.ClientCnxn)
kafka_1     | [2015-02-23 12:40:32,628] INFO Session establishment complete on server panoptes_zookeeper_1/172.17.0.13:2181, sessionid = 0x14bb67404610002, negotiated timeout = 6000 (org.apache.zookeeper.ClientCnxn)
kafka_1     | [2015-02-23 12:40:32,630] INFO zookeeper state changed (SyncConnected) (org.I0Itec.zkclient.ZkClient)
kafka_1     | [2015-02-23 12:40:32,722] INFO Loading logs. (kafka.log.LogManager)
kafka_1     | [2015-02-23 12:40:32,727] INFO Logs loading complete. (kafka.log.LogManager)
kafka_1     | [2015-02-23 12:40:32,728] INFO Starting log cleanup with a period of 300000 ms. (kafka.log.LogManager)
kafka_1     | [2015-02-23 12:40:32,730] INFO Starting log flusher with a default period of 9223372036854775807 ms. (kafka.log.LogManager)
kafka_1     | [2015-02-23 12:40:32,755] INFO Awaiting socket connections on 0.0.0.0:9092. (kafka.network.Acceptor)
kafka_1     | [2015-02-23 12:40:32,756] INFO [Socket Server on Broker 1], Started (kafka.network.SocketServer)
kafka_1     | [2015-02-23 12:40:32,835] INFO Will not load MX4J, mx4j-tools.jar is not in the classpath (kafka.utils.Mx4jLoader$)
kafka_1     | [2015-02-23 12:40:32,863] INFO 1 successfully elected as leader (kafka.server.ZookeeperLeaderElector)
panoptes_1  | + cd /rails_app
panoptes_1  | + '[' -d /rails_conf/ ']'
panoptes_1  | + '[' development == development ']'
panoptes_1  | + exec foreman start
kafka_1     | [2015-02-23 12:40:32,948] INFO Registered broker 1 at path /brokers/ids/1 with address kafka:9092. (kafka.utils.ZkUtils$)
kafka_1     | [2015-02-23 12:40:32,975] INFO [Kafka Server 1], started (kafka.server.KafkaServer)
kafka_1     | [2015-02-23 12:40:33,033] INFO New leader is 1 (kafka.server.ZookeeperLeaderElector$LeaderChangeListener)
panoptes_1  | file:/usr/local/lib/jruby.jar!/jruby/kernel19/process.rb:13 warning: unsupported spawn option: err
panoptes_1  | file:/usr/local/lib/jruby.jar!/jruby/kernel19/process.rb:13 warning: unsupported spawn option: out
panoptes_1  | file:/usr/local/lib/jruby.jar!/jruby/kernel19/process.rb:13 warning: unsupported spawn option: err
panoptes_1  | file:/usr/local/lib/jruby.jar!/jruby/kernel19/process.rb:13 warning: unsupported spawn option: out
panoptes_1  | 12:40:35 server.1  | started with pid 19
panoptes_1  | 12:40:35 sidekiq.1 | started with pid 26
panoptes_1  | file:/usr/local/lib/jruby.jar!/jruby/kernel19/kernel.rb:28 warning: unsupported exec option: close_others
panoptes_1  | file:/usr/local/lib/jruby.jar!/jruby/kernel19/kernel.rb:28 warning: unsupported exec option: close_others
panoptes_1  | log4j:WARN No appenders could be found for logger (org.apache.zookeeper.ZooKeeper).
panoptes_1  | log4j:WARN Please initialize the log4j system properly.
panoptes_1  | (<unknown>): could not found expected ':' while scanning a simple key at line 4 column 3
panoptes_1  | org/jruby/ext/psych/PsychParser.java:215:in `parse'
panoptes_1  | /usr/local/lib/ruby/shared/psych.rb:205:in `parse_stream'
panoptes_1  | /usr/local/lib/ruby/shared/psych.rb:153:in `parse'
panoptes_1  | /usr/local/lib/ruby/shared/psych.rb:129:in `load'
panoptes_1  | /usr/local/lib/ruby/gems/shared/gems/aws-sdk-v1-1.61.0/lib/aws/rails.rb:108:in `load_yaml_config'
panoptes_1  | /usr/local/lib/ruby/gems/shared/gems/aws-sdk-v1-1.61.0/lib/aws/rails.rb:54:in `setup'
panoptes_1  | /usr/local/lib/ruby/gems/shared/gems/aws-sdk-v1-1.61.0/lib/aws/rails.rb:26:in `Railtie'
panoptes_1  | org/jruby/RubyBasicObject.java:1562:in `instance_exec'
panoptes_1  | /usr/local/lib/ruby/gems/shared/gems/railties-4.1.9/lib/rails/initializable.rb:30:in `run'
panoptes_1  | /usr/local/lib/ruby/gems/shared/gems/railties-4.1.9/lib/rails/initializable.rb:55:in `run_initializers'
panoptes_1  | /usr/local/lib/ruby/1.9/tsort.rb:150:in `tsort_each'
panoptes_1  | /usr/local/lib/ruby/1.9/tsort.rb:183:in `each_strongly_connected_component'
panoptes_1  | /usr/local/lib/ruby/1.9/tsort.rb:219:in `each_strongly_connected_component_from'
panoptes_1  | /usr/local/lib/ruby/1.9/tsort.rb:182:in `each_strongly_connected_component'
panoptes_1  | org/jruby/RubyArray.java:1613:in `each'
panoptes_1  | /usr/local/lib/ruby/1.9/tsort.rb:180:in `each_strongly_connected_component'
panoptes_1  | /usr/local/lib/ruby/1.9/tsort.rb:148:in `tsort_each'
panoptes_1  | /usr/local/lib/ruby/gems/shared/gems/railties-4.1.9/lib/rails/initializable.rb:54:in `run_initializers'
panoptes_1  | /usr/local/lib/ruby/gems/shared/gems/railties-4.1.9/lib/rails/application.rb:300:in `initialize!'
panoptes_1  | /rails_app/config/environment.rb:5:in `(root)'
panoptes_1  | org/jruby/RubyKernel.java:1071:in `require'
panoptes_1  | /usr/local/lib/ruby/gems/shared/gems/activesupport-4.1.9/lib/active_support/dependencies.rb:247:in `require'
panoptes_1  | /usr/local/lib/ruby/gems/shared/gems/activesupport-4.1.9/lib/active_support/dependencies.rb:232:in `load_dependency'
panoptes_1  | /usr/local/lib/ruby/gems/shared/gems/activesupport-4.1.9/lib/active_support/dependencies.rb:247:in `require'
panoptes_1  | /usr/local/lib/ruby/gems/shared/gems/sidekiq-3.2.4/lib/sidekiq/cli.rb:1:in `(root)'
panoptes_1  | /usr/local/lib/ruby/gems/shared/gems/sidekiq-3.2.4/lib/sidekiq/cli.rb:236:in `boot_system'
panoptes_1  | /usr/local/lib/ruby/gems/shared/gems/sidekiq-3.2.4/lib/sidekiq/cli.rb:49:in `run'
panoptes_1  | org/jruby/RubyKernel.java:1087:in `load'
panoptes_1  | /usr/local/bin/sidekiq:23:in `(root)'
panoptes_1  | 12:41:04 sidekiq.1 | terminated by SIGHUP
panoptes_1  | 12:41:04 system    | sending SIGTERM to all processes
panoptes_1  | => Booting Pumalog4j:WARN No appenders could be found for logger (org.apache.zookeeper.ZooKeeper).
panoptes_1  | log4j:WARN Please initialize the log4j system properly.
panoptes_1  | 12:41:10 system    | sending SIGKILL to all processes
panoptes_1  | Bad file descriptor - Bad file descriptor
panoptes_1  | org/jruby/RubyIO.java:3676:in `select'
panoptes_1  | /usr/local/lib/ruby/gems/shared/gems/foreman-0.77.0/lib/foreman/engine.rb:399:in `watch_for_output'
panoptes_1  | org/jruby/RubyKernel.java:1507:in `loop'
panoptes_1  | /usr/local/lib/ruby/gems/shared/gems/foreman-0.77.0/lib/foreman/engine.rb:398:in `watch_for_output'
panoptes_panoptes_1 exited with code 0
Gracefully stopping... (press Ctrl+C again to force)
alianos- commented 9 years ago

ps. The logs I have is sidekiq that reports creating a logfile, and development.log

** [Honeybadger] Unable to start Honeybadger -- api_key is missing or invalid. level=2 pid=57
camallen commented 9 years ago

What does your log dir look like? ls -al log/

camallen commented 9 years ago

Also the config dir ls -al config/

alianos- commented 9 years ago
ubuntu@ubuntu:/opt/panoptes$ ls -al log
total 16
drwxrwxr-x  2 ubuntu ubuntu 4096 Feb 23 04:39 .
drwxrwxr-x 15 ubuntu ubuntu 4096 Feb 23 04:48 ..
-rw-r--r--  1 root   root    282 Feb 23 04:41 development.log
-rw-rw-r--  1 ubuntu ubuntu    0 Feb 23 02:18 .keep
ubuntu@ubuntu:/opt/panoptes$ ls -al config
total 112
drwxrwxr-x  5 ubuntu ubuntu 4096 Feb 23 03:32 .
drwxrwxr-x 15 ubuntu ubuntu 4096 Feb 23 04:48 ..
-rw-rw-r--  1 ubuntu ubuntu  717 Feb 23 02:18 application.rb
-rw-rw-r--  1 ubuntu ubuntu  309 Feb 23 03:33 aws.yml
-rw-rw-r--  1 ubuntu ubuntu  237 Feb 23 02:18 aws.yml.hudson
-rw-rw-r--  1 ubuntu ubuntu  195 Feb 23 02:18 boot.rb
-rw-rw-r--  1 ubuntu ubuntu   70 Feb 23 03:32 cellect.yml
-rw-rw-r--  1 ubuntu ubuntu   70 Feb 23 02:18 cellect.yml.hudson
-rw-rw-r--  1 ubuntu ubuntu  333 Feb 23 03:32 database.yml
-rw-rw-r--  1 ubuntu ubuntu  333 Feb 23 02:18 database.yml.hudson
-rw-rw-r--  1 ubuntu ubuntu  150 Feb 23 02:18 environment.rb
drwxrwxr-x  2 ubuntu ubuntu 4096 Feb 23 02:18 environments
drwxrwxr-x  2 ubuntu ubuntu 4096 Feb 23 02:18 initializers
-rw-rw-r--  1 ubuntu ubuntu  144 Feb 23 03:32 kafka.yml
-rw-rw-r--  1 ubuntu ubuntu  144 Feb 23 02:18 kafka.yml.hudson
drwxrwxr-x  2 ubuntu ubuntu 4096 Feb 23 02:18 locales
-rw-rw-r--  1 ubuntu ubuntu  336 Feb 23 03:32 mailer.yml
-rw-rw-r--  1 ubuntu ubuntu  336 Feb 23 02:18 mailer.yml.hudson
-rw-rw-r--  1 ubuntu ubuntu   73 Feb 23 03:32 redis.yml
-rw-rw-r--  1 ubuntu ubuntu   73 Feb 23 02:18 redis.yml.hudson
-rw-rw-r--  1 ubuntu ubuntu 2104 Feb 23 02:18 routes.rb
-rw-rw-r--  1 ubuntu ubuntu  477 Feb 23 03:32 secrets.yml
-rw-rw-r--  1 ubuntu ubuntu  477 Feb 23 02:18 secrets.yml.hudson
-rw-rw-r--  1 ubuntu ubuntu  409 Feb 23 03:32 sidekiq.yml
-rw-rw-r--  1 ubuntu ubuntu  409 Feb 23 02:18 sidekiq.yml.hudson
-rw-rw-r--  1 ubuntu ubuntu  630 Feb 23 03:32 social.yml
-rw-rw-r--  1 ubuntu ubuntu  630 Feb 23 02:18 social.yml.hudson
-rw-rw-r--  1 ubuntu ubuntu   26 Feb 23 02:18 spring.rb
camallen commented 9 years ago

what does your config/aws.yml look like?

NOTE: DO NOT POST PRIVATE DETAILS - SCRUB THEM!

The default (aws.yml.hudson) looks like this but it's not valid.. i need to add fake keys to the dev setup ala the test one. The same thing when you run in production mode.

development:
  access_key_id:
  secret_access_key:
  subjects_bucket:
  bucket_path:

test:
  access_key_id: 'test_key_id'
  secret_access_key: 'secret_access_key'
  subjects_bucket: 's3_subject_bucket'
  bucket_path: 'test_bucket_path'

production:
  access_key_id:
  secret_access_key:
  subjects_bucket:
  bucket_path:

become

development:
  access_key_id: 'real_or_fake_id'
  secret_access_key: 'real_or_fake_key'
  subjects_bucket: 'real_or_fake_bucket'
  bucket_path: 'real_or_fake_bucket_path'
alianos- commented 9 years ago

Well there are no private details to post anyway. We solved this before by just copying the settings from test to development, so my file looks like this

ubuntu@ubuntu:/opt/panoptes$ cat config/aws.yml
development:
  access_key_id: 'test_key_id'
  secret_access_key:'secret_access_key'
  subjects_bucket: 's3_subject_bucket'
  bucket_path: 'test_bucket_path'

test:
  access_key_id: 'test_key_id'
  secret_access_key: 'secret_access_key'
  subjects_bucket: 's3_subject_bucket'
  bucket_path: 'test_bucket_path'

(ps. my aws.yml created by rake configure has no production settings). ps2. If I recall correctly the settings here did not create an issue until I actually tried to create new subjects.

camallen commented 9 years ago

Ok - researching this error could not found expected ':' while scanning a simple key at line 4 column 3 http://stackoverflow.com/questions/10512615/rails-rake-dbschemadump-error

Can you make sure in aws.yml that you have a space after the ':' symbol. It looks like the secret_access_key under development doesn't have a space.

development:
  access_key_id: 'test_key_id'
  secret_access_key: 'secret_access_key'
  subjects_bucket: 's3_subject_bucket'
  bucket_path: 'test_bucket_path'
alianos- commented 9 years ago

I cant believe that did the trick. That is do dumb for an error. And the error log gives no indication of where it happens, which also pretty stupid considering it gives you the line and column!

Anyhow, I do have another worry though as I feel very insecure updating something in a live environment. How am I supposed to get the latest code? I terms of updating, but without losing the existing database. Do I just overwrite the old files?

edpaget commented 9 years ago

Once we're at a stable point with the code, we will provide versioned releases, probably via docker container. So, instead of building your own docker image with fig build, you'll just be able to download a pre-built image from docker hub.

camallen commented 9 years ago

Hey @alianos-, good news that it's fixed, upgrading the pysch yaml gem probably caused the error. Some error reporting in these libraries can be pretty frustrating.

Thanks @edpaget beat me to it:

Re updating the code and the postgres DB. The pg db container has a persisted data volume so the only real issue with updating the code is updating the database schema. Because this project is under active development and hasn't matured to stable versions (yet) we are still changing the database schema. The API is stablising though.

As we aren't currently running any active projects on a deployed version but we will be soon. Once we have data in the databases we'll add data migrations to convert the data to the new schema in a lossless fashion. So when you update the code you'll get the data migrated to the new schema as well.

In the meantime to update the code, from your local code directories master branch do a git fetch origin (or whatever you called the zooniveres/panoptes remote source) then git pull --rebase origin master to get the latest changes. Having scripts to recreate your internal data structures (project / workflows / subjects, etc) via the api is probably the best bet until we formalise versioned releases with data migrations.

alianos- commented 9 years ago

That sheds more light to it. Thank you both for the responses.

alianos- commented 9 years ago

arg, new problem. When I run rails runner db/fig_dev_seed_data/fig_dev_seed_data.rb, it asks for a password, after the password confirmation I get this.

ActiveRecord::UnknownAttributeError: unknown attribute: login
  _assign_attribute at /usr/local/lib/ruby/gems/shared/gems/activerecord-4.1.9/lib/active_record/attribute_assignment.rb:50
  assign_attributes at /usr/local/lib/ruby/gems/shared/gems/activerecord-4.1.9/lib/active_record/attribute_assignment.rb:32
               each at org/jruby/RubyHash.java:1341
  assign_attributes at /usr/local/lib/ruby/gems/shared/gems/activerecord-4.1.9/lib/active_record/attribute_assignment.rb:26
    init_attributes at /usr/local/lib/ruby/gems/shared/gems/activerecord-4.1.9/lib/active_record/core.rb:452
         initialize at /usr/local/lib/ruby/gems/shared/gems/activerecord-4.1.9/lib/active_record/core.rb:195
                new at /usr/local/lib/ruby/gems/shared/gems/activerecord-4.1.9/lib/active_record/inheritance.rb:30
             create at /usr/local/lib/ruby/gems/shared/gems/activerecord-4.1.9/lib/active_record/persistence.rb:33
             (root) at /rails_app/db/fig_dev_seed_data/fig_dev_seed_data.rb:42
               load at org/jruby/RubyKernel.java:1087
             (root) at /usr/local/lib/ruby/gems/shared/gems/railties-4.1.9/lib/rails/commands/runner.rb:1
            require at org/jruby/RubyKernel.java:1071
             (root) at /usr/local/lib/ruby/gems/shared/gems/railties-4.1.9/lib/rails/commands/runner.rb:60
             (root) at /usr/local/lib/ruby/gems/shared/gems/railties-4.1.9/lib/rails/commands/commands_tasks.rb:1
               call at org/jruby/RubyMethod.java:124
   require_command! at /usr/local/lib/ruby/gems/shared/gems/railties-4.1.9/lib/rails/commands/commands_tasks.rb:128
             runner at /usr/local/lib/ruby/gems/shared/gems/railties-4.1.9/lib/rails/commands/commands_tasks.rb:95
             runner at /usr/local/lib/ruby/gems/shared/gems/fig_rake-0.9.2/lib/fig_rake/rails.rb:34
            require at org/jruby/RubyKernel.java:1071
             (root) at bin/rails:8
D, [2015-02-23T21:29:46.188000 #1] DEBUG -- : Terminating 103 actors...
W, [2015-02-23T21:29:47.078000 #1]  WARN -- : Terminating task: type=:finalizer, meta={:method_name=>:__shutdown__}, status=:receiving
    Celluloid::TaskFiber backtrace unavailable. Please try `Celluloid.task_class = Celluloid::TaskThread` if you need backtraces here.
Removing panoptes_panoptes_run_1...
edpaget commented 9 years ago

I know what's causing that problem. I'll have a fix in shortly.

alianos- commented 9 years ago

Hi guys. I am afraid last Monday we decided to develop a bespoke solution as our alpha testing has already been delayed a lot. Bad timing I guess. That been said, the decision was to revisit panoptes once it is finished and compare it with our custom backend, at which point we might decide to switch back.

Anyhow, thanks for all the effort, good luck with the project and hopefully I will see you again soon.

camallen commented 9 years ago

Hi @alianos- firstly thanks for your contributions. I understand your decision but i think it's unfortunate as we are are launching our first projects on panoptes this week (for internal use only). There are some more improvements to be made for sure but we are very close to a stable v1 release. Hopefully when you review panoptes vs your custom solution, panoptes comes out favourably.

Also do you have any api code you could contribute as a library? Long term we are looking for examples code sets that people can reference as well as libraries we can provide users. Any contributions here would be great. If you do contribute just make sure there are no secrets in the code.

alianos- commented 9 years ago

Well timing is unfortunate indeed. Initially we were hoping to launch an alpha early Feb which was then pushed to mid Feb. When we finally tried to connect our frontend to Panoptes we bumped on many bugs, followed by this version with the fixes that I could not even install. This ment we were left without a server to work with for about a week which at this stage kinda forced the managers decision :S (btw is this fixed? the conversation is left at "there will be a fix shortly" and because the thread is closed it might have been forgotten).

Anyway, we'll see what the future has for us. I have the javascript code which -even though not in a good state- can serve as an example. I will email you the files directly and do as you see fit!

camallen commented 9 years ago

Yeah the fix has been pushed through, the seed admin user code should work again. Thanks in advance for your JS code.