I’m trying to install CKAN from source on a Debian 9.5 server with official doc. I ran an issue on this command line:
virtualenv --no-site-packages /usr/lib/ckan/default
It’s difficult to help without more information. Are there any more error messages besides that?
The “OSError” made me suspect of a permissions / ownership issue, that’s why I asked if you did remember to take the step to change the owner of the directory by running chown.
May I also suggest you install CKAN using Docker. It’s really simple and easy and you can get CKAN up and running in a few minutes (basically just the download and build time).
But does it run easily with database(s) located on a remote windows server, and Solr on an another one?
Actually we choose the Ubuntu way. We are facing an issue when tryng to connect from CKAn server to remote Postgres server (network firewall issue I suppose, investigating…)
I believe so. You just have to edit the docker-compose.yml file and change the parameters CKAN_SQLALCHEMY_URL and CKAN_SOLR_URL to point to your remote servers. And disable the local db and solr containers since you won’t need them.
Unfortunately, Docker is not yet in current use here…
After struggling with corporate network issues, I can now connect to remote Postgresql server with psql.
But when I run sudo ckan db init, I got :
sqlalchemy.exc.ProgrammingError: (psycopg2.ProgrammingError) ERREUR: la colonne user.password n’existe pas
LINE 1: SELECT "user".password AS user_password, "user".id AS user_i…
^
[SQL: ‘SELECT "user".password AS user_password, "user".id AS user_id, "user".name AS user_name, "user".fullname AS user_fullname, "user".email AS user_email, "user".apikey AS user_apikey, "user".created AS user_created, "user".reset_key AS user_reset_key, "user".about AS user_about, "user".activity_streams_email_notifications AS user_activity_streams_email_notifications, "user".sysadmin AS user_sysadmin, "user".state AS user_state \nFROM "user" \nWHERE "user".name = %(name_1)s OR "user".id = %(id_1)s ORDER BY "user".name \n LIMIT %(param_1)s’] [parameters: {‘name_1’: ‘default’, ‘param_1’: 1, ‘id_1’: ‘default’}]
Sorry for so many post:
Table “user” exists but without password column.
I suppose db isn’t really init. What I have to do? Delete all tables an run db init once?
The username and password of your choice must be present in the configuration.
If you are installing from source, follow steps 3 and 4 of setting up the database in CKAN documentation. The password you put into the .ini file (sqlalchemy.url line) must match the one you chose when creating the user in Postgres.
If you are using Docker instead, configure the variable POSTGRES_PASSWORD in the .env file.
sudo ckan db init
Creates migration tables instead of main ckan tables. I don’t understand why…
It’s a fresh install from package. Is there a way to force main tables creation?
I think you mentioned that you were using an existing database. Perhaps the script detected the existing tables on that database and tried to migrate because of that? Or did you try to create a new database in Postgres?
If the ckan_default database has a faulty schema, you should try creating a new one with the db init command instead of fixing that one. You can check which database CKAN is configured to by looking at the sqlalchemy url line inside the development.ini file. The init command will always read the db configuration from there.
Also note that the command for initializing the database is not sudo ckan db init, as you mentioned. According to section 7. Create database tables in the documentation:
Now that you have a configuration file that has the correct settings for your database, you can create the database tables:
cd /usr/lib/ckan/default/src/ckan paster
db init -c /etc/ckan/default/development.ini
You should see Initialising DB: SUCCESS .
By the way, which version of CKAN are you trying to install?
By the way, something else you might want to try is Easy CKAN. It’s a tool for streamlining the install and setup process. It’s not really necessary, but it might be worth a shot since you’re having trouble following the official CKAN documentation.
Hi… I used the CD command to change to the folder where ckan.exe is located. I then used “mono ckan.exe”
CKAN started and works fine now. Didn’t knew that I had to use cd or even how to use it properly but I just learned.
Is it possible to program ckan.exe to open with mono just by double clicking ckan.exe.
It’s not the greatest of issues on the globe but I would like it if Ubuntu did this automatically without using the terminal everytime.
You mention Ubuntu, but you also mention an .exe file which is a Windows thing. This thread is about using CKAN on Debian. If you are trying to use CKAN on another operating system and have a question, may I suggest you open a new thread about it.