[opensuse-buildservice] osc -A obs api -e /configuration ... fails with
This is on my own instance (SLE 12.1, obs 2.7.2) admin@lap:~/MyOBS> osc -A obs api -e /configuration Server returned an error: HTTP Error 422: Unprocessable Entity production log is telling: [0a9268d5-e69d-436e-aeef-80b3ee86db6e] [12668:4448.70] Started PUT "/configuration" for 192.168.101.8 at 2016-10-22 21:02:31 +0000 [0a9268d5-e69d-436e-aeef-80b3ee86db6e] [12668:4448.70] Processing by ConfigurationsController#update as XML [0a9268d5-e69d-436e-aeef-80b3ee86db6e] [12668:4448.70] Can't verify CSRF token authenticity [0a9268d5-e69d-436e-aeef-80b3ee86db6e] [12668:4448.70] Rendered status.xml.builder (0.2ms) [0a9268d5-e69d-436e-aeef-80b3ee86db6e] [12668:4448.70] Completed 401 Unauthorized in 7ms (Views: 0.8ms | ActiveRecord: 0.8ms | Backend: 0.0ms | XML: 0 .0ms) [e1616e89-3594-4d3f-b15d-0e3e702df837] [12668:4448.88] Started PUT "/configuration" for 192.168.101.8 at 2016-10-22 21:02:31 +0000 [e1616e89-3594-4d3f-b15d-0e3e702df837] [12668:4448.88] Processing by ConfigurationsController#update as XML [e1616e89-3594-4d3f-b15d-0e3e702df837] [12668:4448.88] Can't verify CSRF token authenticity [e1616e89-3594-4d3f-b15d-0e3e702df837] [12668:4448.97] Completed 422 Unprocessable Entity in 88ms (Views: 1.0ms | ActiveRecord: 75.1ms | Backend: 0.0m s | XML: 0.0ms) what can I do ? -- Christian ---------------------------------------------------- - Please do not 'CC' me on list mails. Just reply to the list :) ---------------------------------------------------- http://www.sc24.de - Sportbekleidung ---------------------------------------------------- -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
On Samstag, 22. Oktober 2016, 23:10:05 CEST wrote Christian:
This is on my own instance (SLE 12.1, obs 2.7.2)
admin@lap:~/MyOBS> osc -A obs api -e /configuration Server returned an error: HTTP Error 422: Unprocessable Entity
production log is telling: [0a9268d5-e69d-436e-aeef-80b3ee86db6e] [12668:4448.70] Started PUT "/configuration" for 192.168.101.8 at 2016-10-22 21:02:31 +0000 [0a9268d5-e69d-436e-aeef-80b3ee86db6e] [12668:4448.70] Processing by ConfigurationsController#update as XML [0a9268d5-e69d-436e-aeef-80b3ee86db6e] [12668:4448.70] Can't verify CSRF token authenticity [0a9268d5-e69d-436e-aeef-80b3ee86db6e] [12668:4448.70] Rendered status.xml.builder (0.2ms) [0a9268d5-e69d-436e-aeef-80b3ee86db6e] [12668:4448.70] Completed 401 Unauthorized in 7ms (Views: 0.8ms | ActiveRecord: 0.8ms | Backend: 0.0ms | XML: 0 .0ms) [e1616e89-3594-4d3f-b15d-0e3e702df837] [12668:4448.88] Started PUT "/configuration" for 192.168.101.8 at 2016-10-22 21:02:31 +0000 [e1616e89-3594-4d3f-b15d-0e3e702df837] [12668:4448.88] Processing by ConfigurationsController#update as XML [e1616e89-3594-4d3f-b15d-0e3e702df837] [12668:4448.88] Can't verify CSRF token authenticity [e1616e89-3594-4d3f-b15d-0e3e702df837] [12668:4448.97] Completed 422 Unprocessable Entity in 88ms (Views: 1.0ms | ActiveRecord: 75.1ms | Backend: 0.0m s | XML: 0.0ms)
what can I do ?
might be a type in your xml .... what dide you edited? You may validate your modified version with xmllint --relaxng /srv/www/obs/api/public/schema/configuration.rng $YOUR_FILE -- Adrian Schroeter email: adrian@suse.de SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg) Maxfeldstraße 5 90409 Nürnberg Germany -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
Am 24.10.2016 um 08:29 schrieb Adrian Schröter:
On Samstag, 22. Oktober 2016, 23:10:05 CEST wrote Christian:
admin@lap:~/MyOBS> osc -A obs api -e /configuration Server returned an error: HTTP Error 422: Unprocessable Entity
might be a type in your xml .... what dide you edited? I tried to change a sentence: (remove 'and') from: Here we and maintain (build) packages for customer Systems:
to: Here we maintain (build) packages for customer Systems:
You may validate your modified version with
xmllint --relaxng /srv/www/obs/api/public/schema/configuration.rng $YOUR_FILE
hmm ... on the client I can't access this schema ... even without editing it is failing: admin@lap:~/MyOBS> osc -A obs api -e /configuration Server returned an error: HTTP Error 422: Unprocessable Entity and doing an export: osc -A obs api /configuration > config.xml and scp -p config.xml obs:/srv/obs/ and obs:/srv/obs # xmllint --relaxng /srv/www/obs/api/public/schema/configuration.rng config.xml will give: config.xml validates so the config is OK, but not when using direct editing via 'osc -A obs api -e /configuration' ... no matter if I do edit or not ... it fails with the above mentiooned error ... Further ideas ? -- Christian ---------------------------------------------------- - Please do not 'CC' me on list mails. Just reply to the list :) ---------------------------------------------------- http://www.sc24.de - Sportbekleidung ---------------------------------------------------- -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
Hey, On 22.10.2016 23:10, Christian wrote:
[e1616e89-3594-4d3f-b15d-0e3e702df837] [12668:4448.88] Can't verify CSRF token authenticity
Are you posting to the right host/port with osc? This sounds like you post to the UI route, not to the API. Henne -- Henne Vogelsang http://www.opensuse.org Everybody has a plan, until they get hit. - Mike Tyson -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
On Dienstag, 25. Oktober 2016, 11:38:14 CEST wrote Henne Vogelsang:
Hey,
On 22.10.2016 23:10, Christian wrote:
[e1616e89-3594-4d3f-b15d-0e3e702df837] [12668:4448.88] Can't verify CSRF token authenticity
Are you posting to the right host/port with osc? This sounds like you post to the UI route, not to the API.
this is most likely unrelated. Henne, you see that in our logs also a lot ;) Christian, I would need more logs from api and maybe even src and rep server backend. Please run api with :debug logging. -- Adrian Schroeter email: adrian@suse.de SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg) Maxfeldstraße 5 90409 Nürnberg Germany -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
Am 25.10.2016 um 14:07 schrieb Adrian Schröter:
On Dienstag, 25. Oktober 2016, 11:38:14 CEST wrote Henne Vogelsang:
Hey,
On 22.10.2016 23:10, Christian wrote:
[e1616e89-3594-4d3f-b15d-0e3e702df837] [12668:4448.88] Can't verify CSRF token authenticity
Are you posting to the right host/port with osc? This sounds like you post to the UI route, not to the API.
this is most likely unrelated. Henne, you see that in our logs also a lot ;)
Christian, I would need more logs from api and maybe even src and rep server backend. Please run api with :debug logging.
Hi Adrian, did you get the LOG I sent several days (6.11.) ago ? -- Christian ---------------------------------------------------- - Please do not 'CC' me on list mails. Just reply to the list :) ---------------------------------------------------- http://www.sc24.de - Sportbekleidung ---------------------------------------------------- -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
Am 25.10.2016 um 14:07 schrieb Adrian Schröter:
On Dienstag, 25. Oktober 2016, 11:38:14 CEST wrote Henne Vogelsang:
Hey,
On 22.10.2016 23:10, Christian wrote:
[e1616e89-3594-4d3f-b15d-0e3e702df837] [12668:4448.88] Can't verify CSRF token authenticity
Are you posting to the right host/port with osc? This sounds like you post to the UI route, not to the API.
this is most likely unrelated. Henne, you see that in our logs also a lot ;)
Christian, I would need more logs from api and maybe even src and rep server backend. Please run api with :debug logging.
tried another time with detting debug in application.rb and production.rb [6ed44e83-6d13-45a0-b7df-5fbf85a51713] [20627:3212.80] Started GET "/configuration" for 192.168.101.8 at 2016-11-15 22:13:29 +0000 [6ed44e83-6d13-45a0-b7df-5fbf85a51713] [20627:3212.81] Processing by ConfigurationsController#show as XML [6ed44e83-6d13-45a0-b7df-5fbf85a51713] [20627:3212.82] Rendered status.xml.builder (0.2ms) [6ed44e83-6d13-45a0-b7df-5fbf85a51713] [20627:3212.82] Completed 401 Unauthorized in 7ms (Views: 4.6ms | ActiveRecord: 0.3ms | Backend: 0.0ms | XML: 0.0ms) [57a8d8d5-eeb2-44da-8877-80db0ef3d042] [20627:3213.02] Started GET "/configuration" for 192.168.101.8 at 2016-11-15 22:13:29 +0000 [57a8d8d5-eeb2-44da-8877-80db0ef3d042] [20627:3213.02] Processing by ConfigurationsController#show as XML [57a8d8d5-eeb2-44da-8877-80db0ef3d042] [20627:3213.09] Rendered models/_configuration.xml.builder (4.8ms) [57a8d8d5-eeb2-44da-8877-80db0ef3d042] [20627:3213.09] Completed 200 OK in 70ms (Views: 0.2ms | ActiveRecord: 49.3ms | Backend: 0.0ms | XML: 0.0ms) [23681:35.41] SQL (0.3ms) UPDATE `delayed_jobs` SET `delayed_jobs`.`locked_at` = '2016-11-15 22:13:29', `delayed_jobs`.`locked_by` = 'delayed_job.2 host:obs pid:23681' WHERE ((run_at <= '2016-11-15 22:13:29.755091' AND (locked_at IS NULL OR locked_at < '2016-11-15 18:13:29.755143') OR locked_by = 'delayed_job.2 host:obs pid:23681') AND failed_at IS NULL) AND `delayed_jobs`.`queue` = 'quick' ORDER BY priority ASC, run_at ASC LIMIT 1 [23668:36.80] SQL (0.3ms) UPDATE `delayed_jobs` SET `delayed_jobs`.`locked_at` = '2016-11-15 22:13:30', `delayed_jobs`.`locked_by` = 'delayed_job.0 host:obs pid:23668' WHERE ((run_at <= '2016-11-15 22:13:30.915427' AND (locked_at IS NULL OR locked_at < '2016-11-15 18:13:30.915467') OR locked_by = 'delayed_job.0 host:obs pid:23668') AND failed_at IS NULL) AND `delayed_jobs`.`queue` = 'quick' ORDER BY priority ASC, run_at ASC LIMIT 1 [23751:0.00] User Load (1.0ms) SELECT `users`.* FROM `users` WHERE `users`.`login` = 'Admin' LIMIT 1 [23725:25.03] SQL (0.3ms) UPDATE `delayed_jobs` SET `delayed_jobs`.`locked_at` = '2016-11-15 22:13:31', `delayed_jobs`.`locked_by` = 'delayed_job.1020 host:obs pid:23725' WHERE ((run_at <= '2016-11-15 22:13:31.519234' AND (locked_at IS NULL OR locked_at < '2016-11-15 18:13:31.519278') OR locked_by = 'delayed_job.1020 host:obs pid:23725') AND failed_at IS NULL) AND `delayed_jobs`.`queue` = 'mailers' ORDER BY priority ASC, run_at ASC LIMIT 1 [23712:30.04] SQL (0.4ms) UPDATE `delayed_jobs` SET `delayed_jobs`.`locked_at` = '2016-11-15 22:13:32', `delayed_jobs`.`locked_by` = 'delayed_job.1010 host:obs pid:23712' WHERE ((run_at <= '2016-11-15 22:13:32.535926' AND (locked_at IS NULL OR locked_at < '2016-11-15 18:13:32.535976') OR locked_by = 'delayed_job.1010 host:obs pid:23712') AND failed_at IS NULL) AND `delayed_jobs`.`queue` = 'issuetracking' ORDER BY priority ASC, run_at ASC LIMIT 1 [e5c86129-4363-424e-945c-ea32b564cbb2] [20627:3216.03] Started PUT "/configuration" for 192.168.101.8 at 2016-11-15 22:13:32 +0000 [e5c86129-4363-424e-945c-ea32b564cbb2] [20627:3216.04] Processing by ConfigurationsController#update as XML [e5c86129-4363-424e-945c-ea32b564cbb2] [20627:3216.04] Can't verify CSRF token authenticity [e5c86129-4363-424e-945c-ea32b564cbb2] [20627:3216.04] Rendered status.xml.builder (0.3ms) [e5c86129-4363-424e-945c-ea32b564cbb2] [20627:3216.04] Completed 401 Unauthorized in 5ms (Views: 0.8ms | ActiveRecord: 0.7ms | Backend: 0.0ms | XML: 0.0ms) [6d183822-c3d3-4738-aab6-6bf2252681ac] [20627:3216.21] Started PUT "/configuration" for 192.168.101.8 at 2016-11-15 22:13:32 +0000 [6d183822-c3d3-4738-aab6-6bf2252681ac] [20627:3216.22] Processing by ConfigurationsController#update as XML [6d183822-c3d3-4738-aab6-6bf2252681ac] [20627:3216.22] Can't verify CSRF token authenticity [6d183822-c3d3-4738-aab6-6bf2252681ac] [20627:3216.37] Completed 422 Unprocessable Entity in 154ms (Views: 1.8ms | ActiveRecord: 132.7ms | Backend: 0.0ms | XML: 0.0ms) But debug is not showing more :( -- Christian ---------------------------------------------------- - Please do not 'CC' me on list mails. Just reply to the list :) ---------------------------------------------------- http://www.sc24.de - Sportbekleidung ---------------------------------------------------- -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
participants (3)
-
Adrian Schröter
-
Christian
-
Henne Vogelsang