Bug #17152
closedTechnique editor page filled with "Could not parse Technique" errors
Description
#workaround below:
While working in the 6.0.4 rudder page of technique editor, I cloned a technique.
Later on, when returning to this technique page, it got filled with pink warnings telling :
Info: Technique restored from current session.
An Error occured! Could not parse Technique 'technique'
Details: caused by : One or more metadata tags not found before the bundle agent declaration (bundle_name, bundle_args) in unknown
I can close the 7 popups then work as usual, but this situation arises each time I come back to this page.
Workraound:
To fix this issue you need to remove directory /var/rudder/configuration-repository/techniques/ncf_techniques/1.0
Updated by Bernd Wolf over 4 years ago
Nicolas Ecarnot wrote:
While working in the 6.0.4 rudder page of technique editor, I cloned a technique.
Later on, when returning to this technique page, it got filled with pink warnings telling :Info: Technique restored from current session.
An Error occured! Could not parse Technique 'technique'
Details: caused by : One or more metadata tags not found before the bundle agent declaration (bundle_name, bundle_args) in unknownI can close the 7 popups then work as usual, but this situation arises each time I come back to this page.
I have to close about 70(!) popups.
Going back a few backups ealier doesn't solve the problem.
If I can help you to identify the problem, please let me know.
This bug appears before rudder 6.0.4 and continues :-(
It seems to come from
a) cloning techniques
b) making bigger comments (or may be special characters in there?)
c) taking the next step after saving technique-changes before the automatic regeneration (watching the status-label) is ready
Updated by Vincent MEMBRÉ over 4 years ago
- Description updated (diff)
Thanks Bernd !! We discussed this issue on gitter with Nicolas, but we forgot to put the workaround here:
To fix this issue you need to remove directory /var/rudder/configuration-repository/techniques/ncf_techniques/1.0
This happened because you set by mistake the same id to the clone (by setting it to a name matching the name/id of the origin technique)
This is now prevented in 6.0.5, the ui checks that the id of the clone is not already taken
Updated by Nicolas Ecarnot over 4 years ago
Vincent MEMBRÉ wrote in #note-2:
Thanks Bernd !! We discussed this issue on gitter with Nicolas, but we forgot to put the workaround here:
Ah yes, my bad. I forgot to write it here.
Sorry.
Updated by François ARMAND over 4 years ago
- Related to Bug #17271: Cloned technique contains random resources added
Updated by Alexis Mousset over 4 years ago
- Category set to Web - Technique editor
Updated by Bernd Wolf over 4 years ago
Thanks for the workaround!
I deleted the 1.0-directory, this reduced the warning from a count of 70 to 4
(updated before from 6.0.4 to 6.0.5 using 'apt-get').
Maybe there are inconsistencies in our installation?
Is there any way to check all the references?
If I would know, where to start and whats depending on I could try to create a check-script.
Updated by Vincent MEMBRÉ over 4 years ago
Bernd Wolf wrote in #note-6:
Thanks for the workaround!
I deleted the 1.0-directory, this reduced the warning from a count of 70 to 4
(updated before from 6.0.4 to 6.0.5 using 'apt-get').Maybe there are inconsistencies in our installation?
Is there any way to check all the references?
If I would know, where to start and whats depending on I could try to create a check-script.
Ok, cool 4 is better then 70, let's remove the remaining ones.
What is exactly the error message ? you can put a screenshot of a notification if it's better to you
espccially, the 'technique' in
An Error occured! Could not parse Technique 'technique'
To explain, we parse all 'technique.cf' file in /var/rudder/configuration-repository/techniques, and it seems one of those file miss some data or have a wrong format
Also there may be some interesting logs in /var/log/rudder/apache2, in both error.log and access.log (depends on where the error occurs ...)
I'll look for a way to improve the error message, and maybe provide you a small patch if you are ok to try !
Nicolas Ecarnot wrote in #note-3:
Ah yes, my bad. I forgot to write it here.
Sorry.
No problem Nicolas, was my job to put it here !!
Updated by Bernd Wolf over 4 years ago
Thanks Vincent! We have a stage-system as a place for tests
(The hints for backup/restore helped, but especially the restore didn't work without a few modifications.
If you're interested, I'll post it ..here?).
I would be very glad to help solving some of these problems, please send me the necessary things.
The messages,
in web-gui, all the same:
"An Error occured! Could not parse Technique 'technique'
Details: caused by : One or more metadata tags not found before the bundle agent declaration (bundle_name, bundle_args) in unknown"
Apache's error.log, 4 times:
"[Wed Apr 29 10:19:34.128560 2020] [wsgi:error] [pid 6817:tid 139784007411456] [remote 127.0.0.1:56904] ERROR: Could not parse Technique 'technique'
[Wed Apr 29 10:19:34.128689 2020] [wsgi:error] [pid 6817:tid 139784007411456] [remote 127.0.0.1:56904] caused by : One or more metadata tags not found before the bundle agent declaration (bundle_name, bundle_args) in unknown
"
Apache's access.log says:
"127.0.0.1 - rudder [29/Apr/2020:10:20:23 +0000] "PUT /inventory-updates/uuid.hive HTTP/1.1" 204 2229 "-" "curl/7.61.0"
127.0.0.1 - rudder [29/Apr/2020:10:20:30 +0000] "PUT /reports/2020-04-29T10%3A20%3A22%2B00%3A00%40root.log.gz HTTP/1.1" 201 2683 "-" "curl/7.61.0"
127.0.0.1 - - [29/Apr/2020:10:20:44 +0000] "POST /rudder/lift/ajax/F864777691316CMDUPQ/ HTTP/1.1" 200 942 "https://localhost:2445/rudder/secure/configurationManager/techniqueEditor" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:75.0) Gecko/20100101 Firefox/75.0"
127.0.0.1 - - [29/Apr/2020:10:19:28 +0000] "GET /rudder/lift/comet/90871637351/F864777689207VYERKU/F864777691316CMDUPQ?F864777689218AJZZ3T=864777691319&_=1588155567756 HTTP/1.1" 200 423 "https://localhost:2445/rudder/secure/configurationManager/techniqueEditor" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:75.0) Gecko/20100101 Firefox/75.0"
127.0.0.1 - - [29/Apr/2020:10:22:00 +0000] "POST /rudder/lift/ajax/F864777691316CMDUPQ/ HTTP/1.1" 200 942 "https://localhost:2445/rudder/secure/configurationManager/techniqueEditor" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:75.0) Gecko/20100101 Firefox/75.0"
127.0.0.1 - - [29/Apr/2020:10:23:16 +0000] "POST /rudder/lift/ajax/F864777691316CMDUPQ/ HTTP/1.1" 200 942 "https://localhost:2445/rudder/secure/configurationManager/techniqueEditor" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:75.0) Gecko/20100101 Firefox/75.0"
127.0.0.1 - - [29/Apr/2020:10:21:29 +0000] "GET /rudder/lift/comet/87835215445/F864777689207VYERKU/F864777691316CMDUPQ?F864777689218AJZZ3T=864777691319&_=1588155567757 HTTP/1.1" 200 423 "https://localhost:2445/rudder/secure/configurationManager/techniqueEditor" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:75.0) Gecko/20100101 Firefox/75.0"
127.0.0.1 - - [29/Apr/2020:10:24:32 +0000] "POST /rudder/lift/ajax/F864777691316CMDUPQ/ HTTP/1.1" 200 942 "https://localhost:2445/rudder/secure/configurationManager/techniqueEditor" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:75.0) Gecko/20100101 Firefox/75.0"
127.0.0.1 - rudder [29/Apr/2020:10:25:23 +0000] "PUT /inventory-updates/uuid.hive HTTP/1.1" 204 2229 "-" "curl/7.61.0"
127.0.0.1 - - [29/Apr/2020:10:23:30 +0000] "GET /rudder/lift/comet/78604193764/F864777689207VYERKU/F864777691316CMDUPQ?F864777689218AJZZ3T=864777691319&_=1588155567758 HTTP/1.1" 200 423 "https://localhost:2445/rudder/secure/configurationManager/techniqueEditor" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:75.0) Gecko/20100101 Firefox/75.0"
127.0.0.1 - rudder [29/Apr/2020:10:25:30 +0000] "PUT /reports/2020-04-29T10%3A25%3A21%2B00%3A00%40root.log.gz HTTP/1.1" 201 2683 "-" "curl/7.61.0"
127.0.0.1 - - [29/Apr/2020:10:23:44 +0000] "GET /rudder/lift/comet/43542498582/F864777689207VYERKU/F864777691316CMDUPQ?F864777689218AJZZ3T=864777691319&_=1588155567759 HTTP/1.1" 200 935 "https://localhost:2445/rudder/secure/configurationManager/techniqueEditor" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:75.0) Gecko/20100101 Firefox/75.0"
127.0.0.1 - - [29/Apr/2020:10:25:48 +0000] "POST /rudder/lift/ajax/F864777691316CMDUPQ/ HTTP/1.1" 200 942 "https://localhost:2445/rudder/secure/configurationManager/techniqueEditor" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:75.0) Gecko/20100101 Firefox/75.0"
127.0.0.1 - - [29/Apr/2020:10:27:04 +0000] "POST /rudder/lift/ajax/F864777691316CMDUPQ/ HTTP/1.1" 200 942 "https://localhost:2445/rudder/secure/configurationManager/techniqueEditor" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:75.0) Gecko/20100101 Firefox/75.0"
"
Updated by Vincent MEMBRÉ over 4 years ago
- Status changed from New to In progress
- Assignee set to Vincent MEMBRÉ
Updated by Vincent MEMBRÉ over 4 years ago
Work in progess here: https://github.com/VinceMacBuche/ncf/commit/ff401a3ca88db82906bc661026210127b6dd5e63
Updated by Vincent MEMBRÉ over 4 years ago
Bernd,
I made a patch to improve the error message, so we know which files cause problem
You need to replace file /usr/share/ncf/tools/ncf.py by this one:
https://raw.githubusercontent.com/VinceMacBuche/ncf/ff401a3ca88db82906bc661026210127b6dd5e63/tools/ncf.py
You will also need to reload apache/httpd service
wget https://raw.githubusercontent.com/VinceMacBuche/ncf/ff401a3ca88db82906bc661026210127b6dd5e63/tools/ncf.py cp ncf.py /usr/share/ncf/tools/ncf.py service apache2 reload
The error should now be:
Could not parse Technique file '/var/rudder/configuration-repository/techniques/applications/newTech/1.0/technique.cf'
Updated by Bernd Wolf over 4 years ago
Great, getting details, THANKS!
Made a new copy from production-server to eleminate differences.
After your patch I get 4 times:
"An Error occured! Could not parse Technique file '/var/rudder/configuration-repository/techniques/ncf_techniques/Prod-Graylog Install Graylog Server/1.0/technique.cf'
Details:
caused by : One or more metadata tags not found before the bundle agent declaration (bundle_name, bundle_args) in unknown
"
Checking: /var/rudder/configuration-repository/techniques/ncf_techniques/Prod-Graylog Install Graylog Server/1.0/technique.cf
May be, regular expressions raising the problem (file_ensure_ lines/block _ present), I'll test this.
Updated by Bernd Wolf over 4 years ago
Changing methods didn't help. Thats why I tried to delete the whole technique,
this gives an error (attached to this comment).
How can I force deletion?
Maybe the name containing "/" is a problem? We had a very similar named technique (without "/"), I deleted successfully.
Both "Technique ID" where clearly different.
Updated by Vincent MEMBRÉ over 4 years ago
How did you create that "Prod-Graylog Install Graylog Server" technique ?
It's and invalid technique identifier, it should not have space, or replaced by _
In fact the error is that the the "bundle agent" line is invalid? what was it ?
What was the content of the technique.cf file ? You may not want to share the whole content, or anonymize it, or send it to me by mail if you want vincent@rudder.io
Updated by Bernd Wolf over 4 years ago
Problem not solved yet, but to avoid such problems in the future: is there a note anywhere, which characters are allowed or must not be used for technique names, comments, ... ?
Updated by Vincent MEMBRÉ over 4 years ago
- Target version changed from 6.0.6 to 6.0.7
Updated by Vincent MEMBRÉ over 4 years ago
- Target version changed from 6.0.7 to 6.0.8
Updated by François ARMAND over 4 years ago
- Severity changed from Major - prevents use of part of Rudder | no simple workaround to Minor - inconvenience | misleading | easy workaround
- User visibility set to Operational - other Techniques | Rudder settings | Plugins
- Priority changed from 0 to 32
There is a workaround and it's partially corrected in 6.0.5 and up.
Updated by Vincent MEMBRÉ over 4 years ago
- Target version changed from 6.0.8 to 6.0.9
- Priority changed from 32 to 31
Updated by Vincent MEMBRÉ over 4 years ago
- Target version changed from 6.0.9 to 6.0.10
- Priority changed from 31 to 30
Updated by Vincent MEMBRÉ about 4 years ago
- Target version changed from 6.0.10 to 798
Updated by Benoît PECCATTE over 3 years ago
- Target version changed from 798 to 6.1.14
- Priority changed from 30 to 27
Updated by Vincent MEMBRÉ over 3 years ago
- Target version changed from 6.1.14 to 6.1.15
Updated by Vincent MEMBRÉ over 3 years ago
- Target version changed from 6.1.15 to 6.1.16
Updated by Vincent MEMBRÉ over 3 years ago
- Target version changed from 6.1.16 to 6.1.17
Updated by Vincent MEMBRÉ about 3 years ago
- Target version changed from 6.1.17 to 6.1.18
Updated by Vincent MEMBRÉ about 3 years ago
- Target version changed from 6.1.18 to 6.1.19
Updated by Vincent MEMBRÉ over 2 years ago
- Target version changed from 6.1.19 to 6.1.20
Updated by Vincent MEMBRÉ over 2 years ago
- Target version changed from 6.1.20 to 6.1.21
Updated by Vincent MEMBRÉ over 2 years ago
- Target version changed from 6.1.21 to old 6.1 issues to relocate
Updated by Alexis Mousset almost 2 years ago
- Status changed from In progress to New
- Priority changed from 27 to 0
Updated by François ARMAND about 1 year ago
- Status changed from New to Rejected
- Regression set to No
This wasn't reported anymore since 6.x time, so I'm closing it.