Open busla opened 9 years ago
Ok, got a little bit further after fixing the policy-rc.d error by adding the following to the Dockerfile:
# Avoid ERROR: invoke-rc.d: policy-rc.d denied execution of start.
RUN echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d
Now I get this error close to the end of the build:
npm WARN cannot run in wd windshaft-cartodb@2.14.2 make pre-install (wd=/Windshaft-cartodb)
> hiredis@0.1.17 install /Windshaft-cartodb/node_modules/redis-mpool/node_modules/hiredis
> node-gyp rebuild
make: Entering directory `/Windshaft-cartodb/node_modules/redis-mpool/node_modules/hiredis/build'
CC(target) Release/obj.target/hiredis/deps/hiredis/hiredis.o
CC(target) Release/obj.target/hiredis/deps/hiredis/net.o
CC(target) Release/obj.target/hiredis/deps/hiredis/sds.o
CC(target) Release/obj.target/hiredis/deps/hiredis/async.o
AR(target) Release/obj.target/deps/hiredis.a
COPY Release/hiredis.a
CXX(target) Release/obj.target/hiredis/src/hiredis.o
CXX(target) Release/obj.target/hiredis/src/reader.o
SOLINK_MODULE(target) Release/obj.target/hiredis.node
SOLINK_MODULE(target) Release/obj.target/hiredis.node: Finished
COPY Release/hiredis.node
make: Leaving directory `/Windshaft-cartodb/node_modules/redis-mpool/node_modules/hiredis/build'
npm WARN engine cryptiles@2.0.5: wanted: {"node":">=0.10.40"} (current: {"node":"0.10.37","npm":"1.4.28"})
npm WARN engine boom@2.9.0: wanted: {"node":">=0.10.40"} (current: {"node":"0.10.37","npm":"1.4.28"})
npm WARN engine hoek@2.16.3: wanted: {"node":">=0.10.40"} (current: {"node":"0.10.37","npm":"1.4.28"})
And then further down:
[srs] Success: "/Windshaft-cartodb/node_modules/windshaft/node_modules/grainstore/node_modules/millstone/node_modules/srs/lib/binding/node-v11-linux-x64/srs.node" is installed via remote
npm ERR! cb() never called!
npm ERR! not ok code 0
The command '/bin/sh -c git clone git://github.com/CartoDB/Windshaft-cartodb.git && cd Windshaft-cartodb && ./configure && npm install && mkdir logs' returned a non-zero code: 1
Looks like a package conflict or missing dependency. What do yo think?
In the Dockerfile, node is installed from apt: https://github.com/jbuonagurio/docker-cartodb/blob/master/Dockerfile#L19
Should we perhaps build it from source, as suggested here: http://stackoverflow.com/questions/18136746/npm-install-failed-with-cannot-run-in-wd
Re-running the installer got me passed the WD error. The build now fails with:
gpg: directory `/root/.gnupg' created
gpg: new configuration file `/root/.gnupg/gpg.conf' created
gpg: WARNING: options in `/root/.gnupg/gpg.conf' are not yet active during this run
gpg: keyring `/root/.gnupg/secring.gpg' created
gpg: keyring `/root/.gnupg/pubring.gpg' created
gpg: requesting key D39DC0E3 from hkp server keys.gnupg.net
gpgkeys: key D39DC0E3 not found on keyserver
gpg: no valid OpenPGP data found.
gpg: Total number processed: 0
The command '/bin/sh -c gpg --keyserver hkp://keys.gnupg.net --recv-keys D39DC0E3' returned a non-zero code: 2
Fixed this by downloading the signature manually. Added this to the Dockerfile right before https://github.com/jbuonagurio/docker-cartodb/blob/master/Dockerfile#L74
curl -#LO https://rvm.io/mpapis.asc
gpg --import mpapis.asc
Suggestion made by rvm maintainer here: https://github.com/rvm/rvm/issues/3110#issuecomment-61963954
Now I get this error:
** Execute cartodb:db:setup
rake aborted!
PG::Error: ERROR: extension "cartodb" has no update path from version "unpackaged" to version "0.11.0"
CONTEXT: SQL statement "CREATE EXTENSION cartodb VERSION '0.11.0' FROM unpackaged"
PL/pgSQL function inline_code_block line 10 at SQL statement
/usr/local/rvm/gems/ruby-1.9.3-p547/gems/sequel-3.42.0/lib/sequel/adapters/postgres.rb:145:in `async_exec'
/usr/local/rvm/gems/ruby-1.9.3-p547/gems/sequel-3.42.0/lib/sequel/adapters/postgres.rb:145:in `block in execute_query'
/usr/local/rvm/gems/ruby-1.9.3-p547/gems/sequel-3.42.0/lib/sequel/database/logging.rb:37:in `log_yield'
/usr/local/rvm/gems/ruby-1.9.3-p547/gems/sequel-3.42.0/lib/sequel/adapters/postgres.rb:145:in `execute_query'
/usr/local/rvm/gems/ruby-1.9.3-p547/gems/sequel-3.42.0/lib/sequel/adapters/postgres.rb:132:in `block in execute'
/usr/local/rvm/gems/ruby-1.9.3-p547/gems/sequel-3.42.0/lib/sequel/adapters/postgres.rb:111:in `check_disconnect_errors'
/usr/local/rvm/gems/ruby-1.9.3-p547/gems/sequel-3.42.0/lib/sequel/adapters/postgres.rb:132:in `execute'
/usr/local/rvm/gems/ruby-1.9.3-p547/gems/sequel-3.42.0/lib/sequel/adapters/postgres.rb:411:in `_execute'
/usr/local/rvm/gems/ruby-1.9.3-p547/gems/sequel-3.42.0/lib/sequel/adapters/postgres.rb:242:in `block (2 levels) in execute'
/usr/local/rvm/gems/ruby-1.9.3-p547/gems/sequel-3.42.0/lib/sequel/adapters/postgres.rb:423:in `check_database_errors'
/usr/local/rvm/gems/ruby-1.9.3-p547/gems/sequel-3.42.0/lib/sequel/adapters/postgres.rb:242:in `block in execute'
/usr/local/rvm/gems/ruby-1.9.3-p547/gems/sequel-3.42.0/lib/sequel/database/connecting.rb:236:in `block in synchronize'
/usr/local/rvm/gems/ruby-1.9.3-p547/gems/sequel-3.42.0/lib/sequel/connection_pool/threaded.rb:91:in `hold'
/usr/local/rvm/gems/ruby-1.9.3-p547/gems/sequel-3.42.0/lib/sequel/database/connecting.rb:236:in `synchronize'
/usr/local/rvm/gems/ruby-1.9.3-p547/gems/sequel-3.42.0/lib/sequel/adapters/postgres.rb:242:in `execute'
/usr/local/rvm/gems/ruby-1.9.3-p547/gems/sequel-3.42.0/lib/sequel/database/query.rb:79:in `execute_dui'
/usr/local/rvm/gems/ruby-1.9.3-p547/gems/sequel-3.42.0/lib/sequel/database/query.rb:72:in `execute_ddl'
/usr/local/rvm/gems/ruby-1.9.3-p547/gems/sequel-3.42.0/lib/sequel/database/query.rb:135:in `run'
/cartodb/app/models/user.rb:2169:in `block (2 levels) in upgrade_cartodb_postgres_extension'
/usr/local/rvm/gems/ruby-1.9.3-p547/gems/sequel-3.42.0/lib/sequel/database/query.rb:323:in `_transaction'
/usr/local/rvm/gems/ruby-1.9.3-p547/gems/sequel-3.42.0/lib/sequel/database/query.rb:285:in `block in transaction'
/usr/local/rvm/gems/ruby-1.9.3-p547/gems/sequel-3.42.0/lib/sequel/database/connecting.rb:236:in `block in synchronize'
/usr/local/rvm/gems/ruby-1.9.3-p547/gems/sequel-3.42.0/lib/sequel/connection_pool/threaded.rb:104:in `hold'
/usr/local/rvm/gems/ruby-1.9.3-p547/gems/sequel-3.42.0/lib/sequel/database/connecting.rb:236:in `synchronize'
/usr/local/rvm/gems/ruby-1.9.3-p547/gems/sequel-3.42.0/lib/sequel/database/query.rb:278:in `transaction'
/cartodb/app/models/user.rb:2162:in `block in upgrade_cartodb_postgres_extension'
/cartodb/app/models/user.rb:647:in `in_database'
/cartodb/app/models/user.rb:2161:in `upgrade_cartodb_postgres_extension'
/cartodb/app/models/user.rb:2144:in `load_cartodb_functions'
/cartodb/app/models/user.rb:1593:in `setup_new_user'
/cartodb/app/models/user.rb:1850:in `setup_user'
/cartodb/app/models/user.rb:184:in `after_create'
/usr/local/rvm/gems/ruby-1.9.3-p547/gems/sequel-3.42.0/lib/sequel/model/base.rb:1585:in `block (2 levels) in _save'
/usr/local/rvm/gems/ruby-1.9.3-p547/gems/sequel-3.42.0/lib/sequel/model/base.rb:867:in `around_create'
/usr/local/rvm/gems/ruby-1.9.3-p547/gems/sequel-3.42.0/lib/sequel/model/base.rb:1578:in `block in _save'
/usr/local/rvm/gems/ruby-1.9.3-p547/gems/sequel-3.42.0/lib/sequel/model/base.rb:867:in `around_save'
/usr/local/rvm/gems/ruby-1.9.3-p547/gems/sequel-3.42.0/lib/sequel/model/base.rb:1573:in `_save'
/usr/local/rvm/gems/ruby-1.9.3-p547/gems/sequel-3.42.0/lib/sequel/model/base.rb:1254:in `block (2 levels) in save'
/usr/local/rvm/gems/ruby-1.9.3-p547/gems/sequel-3.42.0/lib/sequel/model/base.rb:1722:in `block in checked_transaction'
/usr/local/rvm/gems/ruby-1.9.3-p547/gems/sequel-3.42.0/lib/sequel/database/query.rb:323:in `_transaction'
/usr/local/rvm/gems/ruby-1.9.3-p547/gems/sequel-3.42.0/lib/sequel/database/query.rb:285:in `block in transaction'
/usr/local/rvm/gems/ruby-1.9.3-p547/gems/sequel-3.42.0/lib/sequel/database/connecting.rb:236:in `block in synchronize'
/usr/local/rvm/gems/ruby-1.9.3-p547/gems/sequel-3.42.0/lib/sequel/connection_pool/threaded.rb:104:in `hold'
/usr/local/rvm/gems/ruby-1.9.3-p547/gems/sequel-3.42.0/lib/sequel/database/connecting.rb:236:in `synchronize'
/usr/local/rvm/gems/ruby-1.9.3-p547/gems/sequel-3.42.0/lib/sequel/database/query.rb:278:in `transaction'
/usr/local/rvm/gems/ruby-1.9.3-p547/gems/sequel-3.42.0/lib/sequel/model/base.rb:1722:in `checked_transaction'
/usr/local/rvm/gems/ruby-1.9.3-p547/gems/sequel-3.42.0/lib/sequel/model/base.rb:1254:in `block in save'
/usr/local/rvm/gems/ruby-1.9.3-p547/gems/sequel-3.42.0/lib/sequel/model/base.rb:1713:in `checked_save_failure'
/usr/local/rvm/gems/ruby-1.9.3-p547/gems/sequel-3.42.0/lib/sequel/model/base.rb:1254:in `save'
/cartodb/lib/tasks/setup.rake:37:in `block (3 levels) in <top (required)>'
/usr/local/rvm/rubies/ruby-1.9.3-p547/lib/ruby/1.9.1/rake/task.rb:205:in `call'
/usr/local/rvm/rubies/ruby-1.9.3-p547/lib/ruby/1.9.1/rake/task.rb:205:in `block in execute'
/usr/local/rvm/rubies/ruby-1.9.3-p547/lib/ruby/1.9.1/rake/task.rb:200:in `each'
/usr/local/rvm/rubies/ruby-1.9.3-p547/lib/ruby/1.9.1/rake/task.rb:200:in `execute'
/usr/local/rvm/rubies/ruby-1.9.3-p547/lib/ruby/1.9.1/rake/task.rb:158:in `block in invoke_with_call_chain'
/usr/local/rvm/rubies/ruby-1.9.3-p547/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/usr/local/rvm/rubies/ruby-1.9.3-p547/lib/ruby/1.9.1/rake/task.rb:151:in `invoke_with_call_chain'
/usr/local/rvm/rubies/ruby-1.9.3-p547/lib/ruby/1.9.1/rake/task.rb:144:in `invoke'
/usr/local/rvm/rubies/ruby-1.9.3-p547/lib/ruby/1.9.1/rake/application.rb:116:in `invoke_task'
/usr/local/rvm/rubies/ruby-1.9.3-p547/lib/ruby/1.9.1/rake/application.rb:94:in `block (2 levels) in top_level'
/usr/local/rvm/rubies/ruby-1.9.3-p547/lib/ruby/1.9.1/rake/application.rb:94:in `each'
/usr/local/rvm/rubies/ruby-1.9.3-p547/lib/ruby/1.9.1/rake/application.rb:94:in `block in top_level'
/usr/local/rvm/rubies/ruby-1.9.3-p547/lib/ruby/1.9.1/rake/application.rb:133:in `standard_exception_handling'
/usr/local/rvm/rubies/ruby-1.9.3-p547/lib/ruby/1.9.1/rake/application.rb:88:in `top_level'
/usr/local/rvm/rubies/ruby-1.9.3-p547/lib/ruby/1.9.1/rake/application.rb:66:in `block in run'
/usr/local/rvm/rubies/ruby-1.9.3-p547/lib/ruby/1.9.1/rake/application.rb:133:in `standard_exception_handling'
/usr/local/rvm/rubies/ruby-1.9.3-p547/lib/ruby/1.9.1/rake/application.rb:63:in `run'
/usr/local/rvm/rubies/ruby-1.9.3-p547/bin/rake:32:in `<main>'
Tasks: TOP => cartodb:db:setup
The command '/bin/sh -c service postgresql start && service redis-server start && bash -l -c "cd /cartodb && bash script/create_dev_user" && service postgresql stop && service redis-server stop' returned a non-zero code: 1
Solving it by fixing the repo to the latest branch. Replaced https://github.com/jbuonagurio/docker-cartodb/blob/master/Dockerfile#L54 with:
RUN git clone --branch 0.11.1 https://github.com/CartoDB/cartodb-postgresql && \
Not solving the original issue, but I can continue the build atleast.
_EDIT1_ That did not solve the issue.
_EDIT2_ I´m an idiot. It was expecting 0.11.0 so pinning the branch to that version worked.
What still needs to be solved is https://github.com/jbuonagurio/docker-cartodb/issues/6#issuecomment-146153967. I need to re-run the installer so the build can continue.
Updated Dockerfile here: https://github.com/busla/docker-cartodb/blob/master/Dockerfile
Getting this error on launch:
/Windshaft-cartodb/lib/cartodb/server.js:105
if (global.environment.enabledFeatures.onTileErrorStrategy !== false) {
^
TypeError: Cannot read property 'onTileErrorStrategy' of undefined
at module.exports (/Windshaft-cartodb/lib/cartodb/server.js:105:43)
at Object.<anonymous> (/Windshaft-cartodb/app.js:84:14)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:935:3
The build is not setting the global env onTileErrorStrategy.
Hi mate. Thanks for contributing :-)
I get the following error at the very end of the installation.
The command '/bin/sh -c service postgresql start && service redis-server start && bash -l -c "cd /cartodb && bash script/create_dev_user" && service postgresql stop && service redis-server stop' returned a non-zero code: 1
Note that I´m installing on a VPS that is setup for Dokku, if that matters.
Would be great if you could glance over the log and hopefully spot anything to put me on the right track to solve this.
Here is my full log: