Forum archive
Canvas LMS docker passwords do not work on first login
I'm trying to get the Turnkey docker Canvas LMS build to work, but having all kinds of problem. The host machine is Ubuntu 14.04
- The entered passwords / login information does not work. I can reset them in the console, and then login
- The admin Canvas username seems to be User, and not what I entered
- After rebuilding the canvas DB to create the admin user, the jobs do not run (and no email password resets, etc)
- Restarting the container seems to reset the instance (it seems that whenever the instance starts, it initializes the system by running the non-interactive scripts)
Where did I go astray in my configuration attempt?
I followed the instructions from: /blog/14.0-optimized-builds-pt2-proxmox-opennode-docker#docker
docker pull turnkeylinux/canvas-14.1:latest
docker run -i -t -d -p 80:80 -p 443:443 -p 12321:12321 turnkeylinux/canvas-14.1
CID=$(sudo docker run -i -t -d turnkeylinux/canvas-14.1)
CIP=$(sudo docker inspect -format='{{.NetworkSettings.IPAddress}}' $CID)
sudo docker logs $CID | grep "Random initial root password"
ssh root@$CIP
I followed the prompts and entered the information.
When I go to the Canvas login page, (https://myhost/login/canvas), the login does not work. When I try to login to Webmin, the login credentials do not work.
I can reset the root password easy enough:
docker ps
docker exec -u 0 -it 11111111 bash
passwd
At this point, I can log in to Webmin and browse the db (Servers -> PostgreSQL Databases -> canvas_production). Looking at the user tables in canvas_production, the name is User. Shouldn't this be the email address I typed?
To solve this problem, I refer back the Canvas Production guide (https://github.com/instructure/canvas-lms/wiki/Production-Start) and re-rake the DB: RAILS_ENV=production bundle exec rake db:initial_setup
At this point, I can finally log into Canvas. Looking at the canvas_production->user table, the email address that I entered is there, and I can login using my new credential.
Just when I think my problems are over, I realize that the automated jobs are not working (perhaps resetting the database killed the process?).
root@5ca1005dcdb8 www/canvas# service canvas_init status
No delayed jobs pool running
root@5ca1005dcdb8 www/canvas# service canvas_init restart
Daemonizing...
root@5ca1005dcdb8 www/canvas# service canvas_init status
No delayed jobs pool running
root@5ca1005dcdb8 www/canvas# service canvas_init stop
No delayed jobs pool running
Once I restarted the docker instance, none of the newly created logins work (and back square one)
root@5ca1005dcdb8 www/canvas# exit
exit
root@vps298645:~# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
5ca1005dcdb8 turnkeylinux/canvas-14.1 "/usr/sbin/start.sh" 57 minutes ago Up 57 minutes 0.0.0.0:80->80/tcp, 22/tcp, 0.0.0.0:443->443/tcp, 12320/tcp, 0.0.0.0:12321->12321/tcp mad_wing
root@vps298645:~# docker stop 5ca1005dcdb8
5ca1005dcdb8
root@vps298645:~# docker run -i -t -d -p 80:80 -p 443:443 -p 12321:12321 turnkeylinux/canvas-14.1
ead9b81c2dd41f6cdecf27454c6fa67c88fb3029bf97c83aafa1db49ec74c451
root@vps298645:~# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
ead9b81c2dd4 turnkeylinux/canvas-14.1 "/usr/sbin/start.sh" 26 seconds ago Up 25 seconds 0.0.0.0:80->80/tcp, 22/tcp, 0.0.0.0:443->443/tcp, 12320/tcp, 0.0.0.0:12321->12321/tcp fervent_ride
root@vps298645:~#
To be completely honest I have only used Docker builds for testing and I only explicitly tested Core and LAMP. I tested Canvas for the v14.1 release, but only the ISO and LXC containers (within Proxmox). As the Docker builds are built from the ISO (as are all our builds); in theory if Core and LAMP work in Docker then all appliances should. And if Canvas works from ISO and LXC, then all the Canvas builds should also work.
It sounds like for some reason the inithooks (our intialisation tool i.e. the console screens where you enter passwords etc) isn't functioning as it should. It should set your passwords (root & Canvas) and Canvas email(/username?) after you have entered them. The final step should disable the "FIRSTBOOT" flag so they do not run again on reboot.
Do you think that it might be possible that you didn't complete all of the initialisation steps all the way to the end? If you are not 100% sure could you please double check that.
Let me know and if you continue to have issues I will test it myself and see if I can reproduce your problem.