login issue after Updating to 2.10

47 views
Skip to first unread message

Houmanic

unread,
Feb 15, 2016, 1:30:21 PM2/15/16
to privacyidea
Hello Dear Cornelius

I updated the package to 2.10 and now I cannot login into the website. Following is the error message I get:

"Authentication failed. (ProgrammingError) (1146, "Table 'pi.smtpserver' doesn't exist") 'SELECT smtpserver.id AS smtpserver_id, smtpserver.identifier AS smtpserver_identifier, smtpserver.server AS smtpserver_server, smtpserver.port AS smtpserver_port, smtpserver.username AS smtpserver_username, smtpserver.password AS smtpserver_password, smtpserver.sender AS smtpserver_sender, smtpserver.tls AS smtpserver_tls, smtpserver.description AS smtpserver_description \nFROM smtpserver' ()"

I replaced the "config.smtp.edit.html" file with the one you put in Github last day, then removed all the email field that I configured before, however the error still exists.


Cornelius Kölbel

unread,
Feb 15, 2016, 1:51:17 PM2/15/16
to priva...@googlegroups.com
Hi Houman,

read the error message and read the update docs!

When penetrating the mailing list I expect having read the error message
and enabled the brain.
https://www.privacyidea.org/getting-help/

Getting a support contract will grant you the right to not having to
read the docs and not having to think.

Kind regards
Cornelius
> --
> Please read the blog post about getting help
> https://www.privacyidea.org/getting-help/.
>
> For professional services and consultancy regarding two factor
> authentication please visit
> https://netknights.it/en/leistungen/one-time-services/
>
> In an enterprise environment you should get a SERVICE LEVEL AGREEMENT
> which suites your needs for SECURITY, AVAILABILITY and LIABILITY:
> https://netknights.it/en/leistungen/service-level-agreements/
> ---
> You received this message because you are subscribed to the Google
> Groups "privacyidea" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to privacyidea...@googlegroups.com.
> To post to this group, send email to priva...@googlegroups.com.
> Visit this group at https://groups.google.com/group/privacyidea.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/privacyidea/68fbf351-a7cd-439f-9d8e-3bb590054c48%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

--
Cornelius Kölbel
corneliu...@netknights.it
+49 151 2960 1417

NetKnights GmbH
http://www.netknights.it
Landgraf-Karl-Str. 19, 34131 Kassel, Germany
Tel: +49 561 3166797, Fax: +49 561 3166798

Amtsgericht Kassel, HRB 16405
Geschäftsführer: Cornelius Kölbel


signature.asc

Cedric Marie-Marthe

unread,
Feb 16, 2016, 6:51:03 AM2/16/16
to privacyidea
Hi, 
Coming from version 2.7 on Centos 7 x64 
i follow the install process from https://www.privacyidea.org/two-factor-authentication-with-otp-on-centos-7/  some time ago and get a version 2.7 perfectly running

I upgrade to 2.1 and get the same issue as describe Houmanic,

What i did for the update is  : 

i install the requested package libxml2-devel and libxslt-devel using yum install.... then
cd /opt/privacyIDEA
source bin/activate
pip install --upgrade cffi
pip install --upgrade bcrypt
pip install --upgrade privacyidea
then 
i read the doc, in particular the upgrade DB schema : http://privacyidea.readthedocs.org/en/latest/installation/upgrade.html 
and run the 
pi-manage db stamp 4f32a4e1bf33 -d /opt/privacyIDEA/lib/privacyidea/migrations
pi-manage db upgrade -d /opt/privacyIDEA/lib/privacyidea/migrations

reboot the server and try to login and get the error message

What i can see is that the Schema DB upgrade does not seem to create the smtpserver table in databse
and look like it's try to update and already exiting fileds in table/db

Running online
Column already exists
(_mysql_exceptions.OperationalError) (1060, "Duplicate column name 'Type'") [SQL: u'ALTER TABLE tokeninfo ADD COLUMN `Type` VARCHAR(100)']
(_mysql_exceptions.OperationalError) (1060, "Duplicate column name 'condition'") [SQL: u'ALTER TABLE policy ADD COLUMN `condition` INTEGER NOT NULL']
(_mysql_exceptions.OperationalError) (1060, "Duplicate column name 'priority'") [SQL: u'ALTER TABLE resolverrealm ADD COLUMN priority INTEGER']
(_mysql_exceptions.OperationalError) (1060, "Duplicate column name 'adminrealm'") [SQL: u'ALTER TABLE policy ADD COLUMN adminrealm VARCHAR(256)']
(_mysql_exceptions.OperationalError) (1060, "Duplicate column name 'revoked'") [SQL: u'ALTER TABLE token ADD COLUMN revoked BOOL']
(_mysql_exceptions.OperationalError) (1060, "Duplicate column name 'locked'") [SQL: u'ALTER TABLE token ADD COLUMN locked BOOL']


the command  : pi-manage db heads -d /opt/privacyIDEA/lib/privacyidea/migrations give : 
20969b4cbf06 (head)

which let me think the upgrade did not run successfully

Cornelius Kölbel

unread,
Feb 16, 2016, 7:04:01 AM2/16/16
to priva...@googlegroups.com
Hi Cedric,

there should be an upgrade script in
/opt/privacyIDEA/lib/privacyidea/migrations/versions/
that generates the smtpserver table.
It should be this one:
https://github.com/privacyidea/privacyidea/blob/master/migrations/versions/2ac117d0a6f5_.py

Obviously you are right and it is missing in the python package!
I am sorry for this.
Just download it from here
https://raw.githubusercontent.com/privacyidea/privacyidea/master/migrations/versions/2ac117d0a6f5_.py
and put it into the
directory /opt/privacyIDEA/lib/privacyidea/migrations/versions/ and
rerun the pi-manage db upgrade command.

Kind regards
Cornelius
> --
> Please read the blog post about getting help
> https://www.privacyidea.org/getting-help/.
>
> For professional services and consultancy regarding two factor
> authentication please visit
> https://netknights.it/en/leistungen/one-time-services/
>
> In an enterprise environment you should get a SERVICE LEVEL AGREEMENT
> which suites your needs for SECURITY, AVAILABILITY and LIABILITY:
> https://netknights.it/en/leistungen/service-level-agreements/
> ---
> You received this message because you are subscribed to the Google
> Groups "privacyidea" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to privacyidea...@googlegroups.com.
> To post to this group, send email to priva...@googlegroups.com.
> Visit this group at https://groups.google.com/group/privacyidea.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/privacyidea/1bee02c4-ff9b-404a-a906-cce10a10d300%40googlegroups.com.
signature.asc

robin73

unread,
Feb 16, 2016, 8:14:37 AM2/16/16
to privacyidea
Hi Cornelius,
Thanks for the time spent to look at the issue.

I confirm that copying the file 2ac117d0a6f5_.py  in the folder and running the command : pi-manage db upgrade -d /opt/privacyIDEA/lib/privacyidea/migrations has created the smtpserver table and solve the login issue 

for me this question can be marked as SOLVED.
Thanks again.

Great Software...

Regards,

Cornelius Kölbel

unread,
Feb 16, 2016, 11:16:32 AM2/16/16
to priva...@googlegroups.com
Hello to everyone,

I pushed a new version 2.10.1 which contains the migration script and
also fixes some minor UI issues.

Kind regards
Cornelius
> https://groups.google.com/d/msgid/privacyidea/fdac93b0-a7db-4a34-b8a8-abe4f277787b%40googlegroups.com.
signature.asc
Reply all
Reply to author
Forward
0 new messages