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

Autolab production setup error: undefined symbol sqlite3_column_database_name #678

Closed
magsol opened this issue Aug 14, 2016 · 10 comments
Closed
Assignees

Comments

@magsol
Copy link

magsol commented Aug 14, 2016

Hi all,

I'm in the process of setting up Autolab for a course I'm teaching this semester. I have an Ubuntu 16.04 VM up and running (desktop version, so I had to install some extra packages). I think I followed the instructions correctly, but every time I access the main page through the browser, I get the following error message (changed deployment to "development" so I could more easily diagnose the error, but this is what I was getting even when deployment was "production"):

screen shot 2016-08-13 at 12 03 08 pm

I've gone through the Autolab install, Tango, and Docker required for production deployment, as well as installing and configuring Apache 2 as the webserver. Running the test deployment via bundle exec rails s -p 3000 worked just fine. I'm using Python 2.7.12 from Anaconda.

Happy to provide any additional information.

@ymzong
Copy link
Member

ymzong commented Aug 14, 2016

Hey @magsol, this seems like an issue with loading sqlite library (version mismatch?), and I'm not exactly sure the reason why it happens (we use mysql in our production systems).

Would you be willing and able to switch the underlying database to mysql? (the database config is in config/database.yml) If not, we will try to take a further look at your issue.

Thanks!

@magsol
Copy link
Author

magsol commented Aug 15, 2016

I guess that's the weird part--here's my config/database.yml file:

development:
  adapter: mysql2
  database: username_autolab_development
  pool: 5
  username: username
  password: 'password'
  socket: /var/run/mysqld/mysqld.sock
  host: localhost

production:
  adapter: mysql2
  database: username_autolab_production
  pool: 5
  username: username
  password: 'password'
  socket: /var/run/mysqld/mysqld.sock
  host: localhost

The test flavor is the same thing. As far as I know, I'm using MySQL everywhere--not sure why sqlite is being invoked?

@ymzong
Copy link
Member

ymzong commented Aug 15, 2016

Could you try comment out gem 'sqlite3' from Gemfile, run bundle install, and try bouncing Autolab?

@magsol
Copy link
Author

magsol commented Aug 15, 2016

I assume "bouncing Autolab" means restarting Apache?

If so, got a cool new error message when I try to load the main page.

screen shot 2016-08-14 at 8 29 51 pm

@ymzong
Copy link
Member

ymzong commented Aug 15, 2016

Alright, so the issue seems to be deeper than the incompatibility of just
one library -- I'm suspecting that this has to do with Ubuntu 16.04 (the
guide was written for 14.04).

Given that 16.04.1 is out, we should definitely support it; I'll try repro
it later tonight and update you on what should be done differently. Sorry
about the troubles!

On Sunday, August 14, 2016, Shannon [email protected] wrote:

I assume "bouncing Autolab" means restarting Apache?

If so, got a cool new error message when I try to load the main page.

[image: screen shot 2016-08-14 at 8 29 51 pm]
https://cloud.githubusercontent.com/assets/135417/17653140/e785b0e4-625d-11e6-9fee-f4c10943c121.png


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#678 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AC1uyuxlQiTJL7SxJDbZh_FzoXOkg9jZks5qf7MggaJpZM4Jj-eo
.

@magsol
Copy link
Author

magsol commented Aug 15, 2016

No worries! Thanks for looking into it--if your results come back negative I can see about reformatting the VM to be 14.04 (let's call that the nuclear option).

@ymzong
Copy link
Member

ymzong commented Aug 15, 2016

@magsol I just built a clean Ubuntu 16.04.1 VM and used the auto-install script (on autolab/Autolab README), and everything works for me.

Could you give us more details on your setup of the stack? Are you installing Autolab directly on top of an Ubuntu VM, or on a Docker instance inside Ubuntu VM? The auto-install script does the former, so I will investigate more if you choose the latter.

@ymzong ymzong self-assigned this Aug 15, 2016
@ymzong
Copy link
Member

ymzong commented Aug 15, 2016

@magsol After some more digging I think the issue might be caused by unmet library dependencies. Could you try running the following lines on your Ubuntu box and then bounce Autolab?

sudo apt-get -y -qq update 
sudo apt-get -y -qq upgrade
sudo apt-get -y -qq install build-essential git libffi-dev zlib1g-dev autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev libncurses5-dev libgdbm3 libgdbm-dev libmysqlclient-dev

@magsol
Copy link
Author

magsol commented Aug 15, 2016

Well this is odd; got the same error on sudo apt-get -y -qq upgrade:

awk: symbol lookup error: /opt/conda/lib/libreadline.so.6: undefined symbol: PC

Is there something wrong with using Anaconda? I ran conda update --all and everything is up to date.

@magsol
Copy link
Author

magsol commented Aug 15, 2016

Ok! Exercised my google-fu and found this workaround for Anaconda's readline. Tried it out, seems to have fixed everything--the apt-get commands worked just fine, bounced Autolab, and now I'm seeing a login screen!

I'm sure I'll have more questions as I dive deeper into things, but for now it looks like I'm good. Thanks!

@magsol magsol closed this as completed Aug 15, 2016
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