Admin user can't login after reboot
Hi,
I've correctly installed caravel on my laptop following the tutorial on
Caravel installation and initialization
During the installation I created a user admin with password admin and I can log in at localhost:8088. Just rebooting the pc and restarting the application with
caravel runserver -d
and the user admin can't log in more. I have to perform all the steps of installation to login again.
I've try this almost 4 time with the same behaviour; am I missing something?
Thanks in advance. Regards
I think your SQLite database is in the /tmp folder. In the tutorial you linked you can see that the caravel_config.py file given as an example sets the SQLALCHEMY_DATABASE_URI = 'sqlite:////tmp/caravel.db'. Set it to a file that is not in /tmp. Also make sure the caravel_config.py file is in your python path.
Hi IljaKroonen,
thanks for your answer. I've not used the caravel_config.py file in my installation, I suppose that the default position of the SQLite database is /tmp folder too.
I'll try to specify a different location in that field. Regards
I am facing the same issue. Could you solve it? I tried changing the caravel.db location from /tmp to somewhere else as well, but with no luck. If I have caravel.db inside /tmp and if the config file it pointing to that file, I don't see an issue why it should not work. And why was it working when I first installed it and stopped working after the reboot.
I could solve the issue by changing the location of caravel.db and changing config.py's SQLALCHEMY_DATABASE_URI to point to my new caravel.db location. When browsing the sqlite database, I could see that there was no user there. So I used "fabmanager create-admin --app caravel" again to create admin user. I was able to successfully log in after that, however dashboard and slices would not load as the tables were not present there. So I ran "caravel db upgrade" again and everything is running as expected after that.
Probably you are on Azure. Instance clean /tmp after restart. I have replaced sqlite with mysql backend for storing internal Caravel data. Create /usr/local/etc/caravel_config.py: ROW_LIMIT = 50000 CARAVEL_WORKERS = 16 CARAVEL_WEBSERVER_ADDRESS = '0.0.0.0' CARAVEL_WEBSERVER_PORT = 8088 CARAVEL_WEBSERVER_TIMEOUT = 60 CUSTOM_SECURITY_MANAGER = None SECRET_KEY = '\2\1changethis\1\2\e\y\y\h' SQLALCHEMY_DATABASE_URI = 'mysql://root:changethis@localhost/caravel' AUTH_USER_REGISTRATION = False CACHE_CONFIG = {'CACHE_TYPE': 'RedisCache'}
Then export PYTHONPATH: export PYTHONPATH=/usr/local/etc
Then run all setup steps again.