mapknitter icon indicating copy to clipboard operation
mapknitter copied to clipboard

Support: Installation Issues with MapKnitter

Open SidharthBansal opened this issue 6 years ago • 137 comments

Facing trouble installing Mapknitter? We are here to help you.

SidharthBansal avatar Jan 27 '19 08:01 SidharthBansal

@SidharthBansal After tackling to much issues and setting up ubuntu on vmware, today i was able to manage things. But a small error is coming as when i use curl -L https://get.rvm.io | bash -s stable it asks for a key and there i am getting timeout error which is annoying me. Need Help !

Dhiraj240 avatar Feb 02 '19 14:02 Dhiraj240

Same behaviour here. Trying to debug.

On Sat, Feb 2, 2019, 8:23 PM Dhiraj Sharma <[email protected] wrote:

@SidharthBansal https://github.com/SidharthBansal After tackling to much issues and setting up ubuntu on vmware, today i was able to manage things. But a small error is coming as when i use curl -L https://get.rvm.io | bash -s stable it asks for a key and there i am getting timeout error which is annoying me. Need Help !

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/publiclab/mapknitter/issues/307#issuecomment-459971127, or mute the thread https://github.com/notifications/unsubscribe-auth/AUACQ0DvKRWDEHxVbtqOYbv0oWmt7VFwks5vJaZbgaJpZM4aUmi0 .

SidharthBansal avatar Feb 02 '19 21:02 SidharthBansal

Alright, these errors are really annoying.

Dhiraj240 avatar Feb 03 '19 09:02 Dhiraj240

@SidharthBansal Have you found the solution @jywarren can you provide us help with this?

Dhiraj240 avatar Feb 04 '19 13:02 Dhiraj240

I think checking rvm.io will show how to install rvm the most standard way.

Working on getting it running in ruby 2.4.4 here, too! https://github.com/publiclab/mapknitter/pull/320

jywarren avatar Feb 05 '19 05:02 jywarren

Yes https://rvm.io shows how to get the keys!

jywarren avatar Feb 05 '19 05:02 jywarren

Does the docker container work properly? I'm getting an error while building it.

ERROR: Service 'web' failed to build: The command '/bin/sh -c apt-get update -qq && apt-get install -y bundler libmysqlclient-dev ruby-rmagick libfreeimage3 libfreeimage-dev ruby-dev gdal-bin python-gdal curl libcurl4-openssl-dev libssl-dev zip nodejs-legacy npm ##ALSO TRIED: ruby-pg' returned a non-zero code: 100

kaustubh-nair avatar Feb 06 '19 14:02 kaustubh-nair

oh, hmm, maybe this is a question for @icarito - but the docker container should be used in Travis, and that is building currently. Can you add more information from the error you saw, maybe a fuller log shared in gist.github.com? Thanks!

On Wed, Feb 6, 2019 at 9:43 AM Kaustubh Nair [email protected] wrote:

Does the docker container work properly? I'm getting an error while building it.

ERROR: Service 'web' failed to build: The command '/bin/sh -c apt-get update -qqe-dev ruby-dev gdal-bin python-gdal curl libcurl4-openssl-dev libssl-dev zip nod

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/publiclab/mapknitter/issues/307#issuecomment-461047491, or mute the thread https://github.com/notifications/unsubscribe-auth/AABfJ6cMS6lyDncSHxzzXHqXvLQPWCK7ks5vKun-gaJpZM4aUmi0 .

jywarren avatar Feb 06 '19 15:02 jywarren

Thanks it worked @jywarren but now when i ran bundle exec rake db:setup it asked me a root password which didn't work for mysql and it is throwing an error. I looked stack overflow and other sites but they to haven't solved the issue. May i know as how can i see or check the root password in ubuntu ? Although i will check this again in morning.

Dhiraj240 avatar Feb 06 '19 18:02 Dhiraj240

Here is a larger error log I was trying to build the container using docker compose

kaustubh-nair avatar Feb 07 '19 05:02 kaustubh-nair

Hi @Dhiraj240, you can reset the password using - https://dev.mysql.com/doc/refman/8.0/en/resetting-permissions.html

And, if you still get error - ERROR 1698 (28000): Access denied for user 'root'@'localhost'" error then, checkout this thread - https://stackoverflow.com/questions/39281594/error-1698-28000-access-denied-for-user-rootlocalhost.

I also faced some of these issues but finally able to resolve them.Thanks!

grvsachdeva avatar Feb 07 '19 23:02 grvsachdeva

@kaunair please check that you have a recent version of Docker. I found a related issue to your log at https://github.com/Shippable/support/issues/4398 and it was an old Docker version! Try it and let us know, also tell us what command did you run exactly, thanks!

icarito avatar Feb 08 '19 08:02 icarito

@Dhiraj240 about the MySQL root password if you mean from the container it can be seen in the mysql logs: docker-compose logs db on first run (scroll all the way back).

icarito avatar Feb 08 '19 08:02 icarito

after bundle install sudo service mysql start bundle exec rake db:setup gives Access denied for user 'mapknitter'@'localhost' (using password: YES). Please provide the root password for your mysql installation

'some random password' rake aborted! Mysql2::Error: Access denied for user 'root'@'localhost' (using password: YES)

(I already have set root password for mysql while installing sudo apt-get mysql-server. I also tried the stack overflow solution given by @gauravano but it didn't work for me)

niravasher avatar Feb 13 '19 17:02 niravasher

Hi, have you configured the passwords and usernames in /config/database.yml?

On Wed, Feb 13, 2019 at 11:33 AM Nirav Asher [email protected] wrote:

On entering "bundle exec rake db:setup" Getting the error "Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) rake aborted! Mysql2::Error: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/publiclab/mapknitter/issues/307#issuecomment-463268879, or mute the thread https://github.com/notifications/unsubscribe-auth/AABfJ_m5zF-3x8_qCu622YJUzbKeIfI2ks5vND5GgaJpZM4aUmi0 .

jywarren avatar Feb 13 '19 18:02 jywarren

Yes, I confirmed they are same. I atried to uninstall and reinstall mysql-server, everything went fine just the last step bundle exec passenger start gave me this "Message from application: Address already in use - listen(2) (Errno::EADDRINUSE)" I tried looking over stack overflow, but I didn't find anything in my local running on port 3000

niravasher avatar Feb 13 '19 19:02 niravasher

Hm, it may be that you are already running the server in another terminal window... but that doesn't address the mysql issue. Are you able to log in manually to mysql using mysql -u root -p PASSWORD without trouble? And can you share your database.yml (but please strip out the PASSWORD field itself!)?

On Wed, Feb 13, 2019 at 2:52 PM Nirav Asher [email protected] wrote:

Yes, I confirmed they are same. I atried to uninstall and reinstall mysql-server, everything went fine just the last step bundle exec passenger start gave me this "Message from application: Address already in use - listen(2) (Errno::EADDRINUSE)" I tried looking over stack overflow, but I didn't find anything in my local running on port 3000

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/publiclab/mapknitter/issues/307#issuecomment-463343075, or mute the thread https://github.com/notifications/unsubscribe-auth/AABfJz9WefOay2ok2YArE-v5YsqjDFk7ks5vNGz3gaJpZM4aUmi0 .

jywarren avatar Feb 13 '19 20:02 jywarren

screenshot 25 screenshot 26 _li @jywarren

niravasher avatar Feb 14 '19 12:02 niravasher

I gave different names to database in development and in testing:

database yml

grvsachdeva avatar Feb 14 '19 19:02 grvsachdeva

I faced somewhat similar errors initially, I tried resetting password too but at last I changed the mysql plugin to mysql_native_password instead of auth_socket using - https://stackoverflow.com/questions/39281594/error-1698-28000-access-denied-for-user-rootlocalhost

You can do this on non-root user but changing plugin for root user is really upto you.

grvsachdeva avatar Feb 14 '19 19:02 grvsachdeva

Now running "bundle exec passenger start" gives this error Message from application: Address already in use - listen(2) (Errno::EADDRINUSE). So by typing sudo lsof -i tcp:3000 i confirmed that there is nothing else going on port 3000 but still doesn't work

niravasher avatar Feb 19 '19 04:02 niravasher

you can run the rails server on a different port with rails s -p [port-number] . Also, it's fine to start with default server WebRick for development(when you run server with rails s, webrick is used by default) and you can go with passenger after some time.

Thanks!

grvsachdeva avatar Feb 20 '19 08:02 grvsachdeva

Hi, all, thanks to @gauravano and @sashadev-sky we are now on Ruby 2.4.4: https://github.com/publiclab/mapknitter/pull/320

jywarren avatar Feb 20 '19 22:02 jywarren

@jywarren @gauravano Now, i am getting the following error

bundle exec rake db:setup
rake aborted!
NoMethodError: undefined method `active_record' for #<Rails::Application::Configuration:0x0000556569694a78>
/home/dhiraj/.rvm/gems/ruby-2.4.4/gems/railties-3.2.22.5/lib/rails/railtie/configuration.rb:85:in `method_missing'
/home/dhiraj/mapknitter/config/application.rb:55:in `<class:Application>'
/home/dhiraj/mapknitter/config/application.rb:13:in `<module:Mapknitter>'
/home/dhiraj/mapknitter/config/application.rb:12:in `<top (required)>'
/home/dhiraj/mapknitter/Rakefile:5:in `require'
/home/dhiraj/mapknitter/Rakefile:5:in `<top (required)>'
/home/dhiraj/.rvm/gems/ruby-2.4.4/gems/rake-12.3.2/exe/rake:27:in `<top (required)>'
/home/dhiraj/.rvm/gems/ruby-2.4.4/bin/ruby_executable_hooks:24:in `eval'
/home/dhiraj/.rvm/gems/ruby-2.4.4/bin/ruby_executable_hooks:24:in `<main>'
(See full trace by running task with --trace)

I tried the database configuration given in the above screenshots.

Dhiraj240 avatar Feb 23 '19 07:02 Dhiraj240

Although i ran bundle update but this problem still persists.

Dhiraj240 avatar Feb 23 '19 07:02 Dhiraj240

Hey @Dhiraj240, which database config you used, please point to the comment?

grvsachdeva avatar Feb 23 '19 13:02 grvsachdeva

I gave different names to database in development and in testing:

database yml

@gauravano this one

Dhiraj240 avatar Feb 23 '19 13:02 Dhiraj240

Was having trouble with mysql was throwing this error ERROR 1698 (28000): Access denied for user 'root'@'localhost'" error even after following the above steps. What worked for me was removing mysql and deleting mysql user and doing a fresh installation so I can setup a password. Here are the command steps i followed

sudo -i
service mysql stop
killall -KILL mysql mysqld_safe mysqld
apt-get --yes purge mysql-server mysql-client
apt-get --yes autoremove --purge
apt-get autoclean
deluser --remove-home mysql
delgroup mysql
rm -rf /etc/apparmor.d/abstractions/mysql /etc/apparmor.d/cache/usr.sbin.mysqld /etc/mysql /var/lib/mysql /var/log/mysql* /var/log/upstart/mysql.log* /var/run/mysqld
updatedb
exit

cesswairimu avatar Mar 27 '19 21:03 cesswairimu

Thank you @cesswairimu!! Would you be interested in adding this to the MYSQL.md file? And any setup recommendations / instructions you have for your OS? Currently we only have steps there for MacOS

sashadev-sky avatar Mar 28 '19 00:03 sashadev-sky

Hey @sashadev-sky, sure will do. Thanks

cesswairimu avatar Mar 28 '19 08:03 cesswairimu