[2.11 alpha] no login, internal error
Dear OBS Maintainers, I have recently updated the packages of my self hosted OBS instance. Before that I was running 2.11 alpha from 13.07.2020 just fine. However after the update, the webui and api are broken, because they respond to login with an error 500. I haven't found a smoking gun, but I have found this log message: ``` [...] W, [2021-01-12T11:57:44.260928 #246] WARN -- : [246:0.00] Creating scope :type_image. Overwriting existing method Kiwi::PackageGroup.type_image. W, [2021-01-12T11:57:44.262566 #246] WARN -- : [246:0.00] Creating scope :system. Overwriting existing method Kiwi::Description.system. I, [2021-01-12T11:58:11.889188 #305] INFO -- : [d4ca49a2-e299-4220-b545-9d2dbdd7c269] [305:0.00] method=GET path=/ format=html controller=Webui::MainController action=index status=200 duration=778.10 view=163.97 db=231.24 params={} host=10.20.2.130 time=23825.70 backend=245.66 user=_nobody_ I, [2021-01-12T11:58:12.241802 #305] INFO -- : [31100c3c-f265-4e7e-abd2-d04147cc874f] [305:0.35] method=GET path=/ format=html controller=Webui::MainController action=index status=200 duration=30.96 view=22.47 db=2.64 params={} host=10.10.1.12 time=23826.80 backend=0 user=_nobody_ I, [2021-01-12T11:58:22.224528 #305] INFO -- : [217b004b-fe02-4d47-8731-107e1af5655e] [305:10.34] method=GET path=/ format=html controller=Webui::MainController action=index status=200 duration=41.07 view=32.12 db=2.78 params={} host=10.10.1.14 time=23836.77 backend=0 user=_nobody_ I, [2021-01-12T11:58:28.871440 #305] INFO -- : [d5a6713f-4c7c-431d-8e2d-f70f091c3676] [305:16.98] method=POST path=/session format=html controller=Webui::SessionController action=create status=500 error='NoMethodError: undefined method `biography' for #User:0x000056236e0fc4d0' duration=446.31 view=0.00 db=2.03 params={"authenticity_token"=>"XXXXXX", "username"=>"XXXXXX", "password"=>"[FILTERED]", "login"=>"Log In"} host=10.20.2.130 time=23843.01 backend=0 user=_nobody_ F, [2021-01-12T11:58:28.875109 #305] FATAL -- : [d5a6713f-4c7c-431d-8e2d-f70f091c3676] [305:16.99] [d5a6713f-4c7c-431d-8e2d-f70f091c3676] NoMethodError (undefined method `biography' for #User:0x000056236e0fc4d0): [d5a6713f-4c7c-431d-8e2d-f70f091c3676] [d5a6713f-4c7c-431d-8e2d-f70f091c3676] app/models/user.rb:871:in `mark_login!' [d5a6713f-4c7c-431d-8e2d-f70f091c3676] app/models/user.rb:282:in `authenticate_via_password' [d5a6713f-4c7c-431d-8e2d-f70f091c3676] app/models/user.rb:180:in `find_with_credentials' [d5a6713f-4c7c-431d-8e2d-f70f091c3676] app/services/session_controller_service/session_creator.rb:17:in `exist?' [d5a6713f-4c7c-431d-8e2d-f70f091c3676] app/controllers/webui/session_controller.rb:40:in `authenticate' [d5a6713f-4c7c-431d-8e2d-f70f091c3676] config/initializers/wrap_parameters.rb:38:in `call' [...] ``` (username and authenticity token redacted) This happens with all users, including Admin on both WebUI and commanline API usage. The corresponding output from osc for example is: ``` $ osc -A https://obs.corp.quobyte.com ls Server returned an error: HTTP Error 500: Internal Server Error Request: https://obs.corp.quobyte.com/source Headers: status: 500 Internal Server Error x-request-id: b9d699ba-b207-4543-9fcc-e2c34a084a7a x-powered-by: Phusion Passenger 6.0.7 connection: close content-length: 131 server: Apache x-runtime: 0.447938 cache-control: public date: Tue, 12 Jan 2021 12:14:07 GMT content-type: application/xml; charset=utf-8 ``` Are there any steps I should be taking in debugging my environment? Is this a bug perhaps? Do I need to migrate the database? Best regards, Moritz Röhrich -- Quobyte GmbH, Berlin, AG Charlottenburg HRB 149012 B, Felix Hupfeld, Bjoern Kolbeck -- Quobyte GmbH, Berlin, AG Charlottenburg HRB 149012 B, Felix Hupfeld, Bjoern Kolbeck
On Jan 12 2021, Moritz Röhrich wrote:
I, [2021-01-12T11:58:28.871440 #305] INFO -- : [d5a6713f-4c7c-431d-8e2d-f70f091c3676] [305:16.98] method=POST path=/session format=html controller=Webui::SessionController action=create status=500 error='NoMethodError: undefined method `biography' for #User:0x000056236e0fc4d0' duration=446.31 view=0.00 db=2.03 params={"authenticity_token"=>"XXXXXX", "username"=>"XXXXXX", "password"=>"[FILTERED]", "login"=>"Log In"} host=10.20.2.130 time=23843.01 backend=0 user=_nobody_
Did you run the migration scripts? Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different."
Thanks for the tip. In fact I did not.
That solved the problem. One more question: Are the migration scripts
idempotent or should they only be run when a schema update is actually
necessary?
Best regards, Moritz Röhrich
On Tue, Jan 12, 2021 at 1:30 PM Andreas Schwab
On Jan 12 2021, Moritz Röhrich wrote:
I, [2021-01-12T11:58:28.871440 #305] INFO -- : [d5a6713f-4c7c-431d-8e2d-f70f091c3676] [305:16.98] method=POST path=/session format=html controller=Webui::SessionController action=create status=500 error='NoMethodError: undefined method `biography' for #User:0x000056236e0fc4d0' duration=446.31 view=0.00 db=2.03 params={"authenticity_token"=>"XXXXXX", "username"=>"XXXXXX", "password"=>"[FILTERED]", "login"=>"Log In"} host=10.20.2.130 time=23843.01 backend=0 user=_nobody_
Did you run the migration scripts?
Andreas.
-- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different."
-- Quobyte GmbH, Berlin, AG Charlottenburg HRB 149012 B, Felix Hupfeld, Bjoern Kolbeck -- Quobyte GmbH, Berlin, AG Charlottenburg HRB 149012 B, Felix Hupfeld, Bjoern Kolbeck
On Dienstag, 12. Januar 2021, 14:07:17 CET Moritz Röhrich wrote:
Thanks for the tip. In fact I did not. That solved the problem. One more question: Are the migration scripts idempotent or should they only be run when a schema update is actually necessary?
You should run them after each package update of the unstable version.
Best regards, Moritz Röhrich
On Tue, Jan 12, 2021 at 1:30 PM Andreas Schwab
wrote: On Jan 12 2021, Moritz Röhrich wrote:
I, [2021-01-12T11:58:28.871440 #305] INFO -- : [d5a6713f-4c7c-431d-8e2d-f70f091c3676] [305:16.98] method=POST path=/session format=html controller=Webui::SessionController action=create status=500 error='NoMethodError: undefined method `biography' for #User:0x000056236e0fc4d0' duration=446.31 view=0.00 db=2.03 params={"authenticity_token"=>"XXXXXX", "username"=>"XXXXXX", "password"=>"[FILTERED]", "login"=>"Log In"} host=10.20.2.130 time=23843.01 backend=0 user=_nobody_
Did you run the migration scripts?
Andreas.
-- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different."
--
Adrian Schroeter
participants (3)
-
Adrian Schröter
-
Andreas Schwab
-
Moritz Röhrich