Content
Migrating from MySQL to Postgres: Unexpected EOF
Hi,
I'm following the guide for migrating from MySQL to Postgres database and I'm at the step where I have to set the database to point to the new Postgres, so I'm using these command from the guide:
openproject config:set MYSQL_DATABASE_URL="$(openproject config:get DATABASE_URL)"
openproject config:get MYSQL_DATABASE_URL
My console then outputs:
etc/openproject/conf.d/other: line 19: unexpected EOF while looking for matching "' etc/openproject/conf.d/other: line 19: unexpected EOF while looking for matching "'
Any idea what could be causing this? I have followed the guide to the letter. Should I just go poking around the file to overcome this?
I'm running the commands as root, and I'm using Ubuntu 18.04. I just upgraded Openproject from 8.3 to the latest before beginning the migration.
Thank you for your help,
_tero
Hi Tero,
What is line 19 of the /etc/openproject/conf.d/other file? It could be that your DATABASE_URL was not set which leaves your file with something like this export MYSQL_DATABASE_URL= which will result in an error. This file is bascially an env file that gets parsed by bash and now contains a syntax error.
Could you attach the other file here while redacting all passwords from it?
Best,
Oliver
Hello Oliver,
Well thank you for the tip to look into the file. You know, I have no idea how this got there ( I must have done something silly in the console), but on line 18 there was:
Either log in as 'openproject', root, use sudo, or add sudo privileges for running openproject with your current user."
which I figured had no place in there. So I deleted it, and I have now completed the steps for the migration, and everything looks to be working great.
Thanks for your help!
Best regards,
Tero
Ciao Oliver,
I use the same thread as it is similar issue but with SMTP file which u can find copied below and the error is:
/etc/openproject/conf.d/smtp: line 9: unexpected EOF while looking for matching `"'
SMTP file.
export EMAIL_DELIVERY_METHOD="smtp"
export ADMIN_EMAIL="m.sanXXXXX@YYYYY.it"
export SMTP_AUTHENTICATION="login"
export SMTP_HOST="smtp.gmail.com"
export SMTP_PORT="587"
export SMTP_USERNAME="m.sanXXXXXX@gmail.com"
export SMTP_PASSWORD="XXXXXXXXX"
export SMTP_DOMAIN=""
export SMTP_URL="smtp://m.sanXXXXX%40gmail.com:XXXXXXX@smtp.gmail.com:587/"
Cheers