not able to save a configuration

Issue #46 closed
Stephanie Pradon created an issue

Hello Johannes,

I've got problem with saving TROCK configuration when I want to add group members.
I am not able to save, after clicking the save button, the is no message. when i refresh the page a message is display saying :

the site will refresh but config will not save.

and when i refresh the page, the config i added is not saved.

  • Jira version : jira server 8.22.4
  • Trock version 3.0.10
  • i have seen the same behaviour with Chrome 103.0.5060.134 and firefox 103.0.2
  • All administrators are impacted with the issue.
  • when i install the plugin 2 monthes ago it was working (i have 2 manager view entries)
  • here is what i found in the atlassian-jira.log :
    2022-08-10 09:20:06,338+0000 http-nio-8080-exec-4 url: /plugins/servlet/jhtimetracking/adminconfig; user: a@a.com INFO a@a.com 560x1590795x1 1bww9dv xxx.xxx.xxx.x,xxx.xxx.xxx.x /plugins/servlet/jhtimetracking/adminconfig [c.a.j.util.stats.JiraStats] [JIRA-STATS] [GROUP-DAO-STATS] snapshot stats: duration=PT5M2.073S, statsOverhead=n/a, data={"_statsName":"GROUP-DAO-STATS","_statsType":"snapshot","_time":"2022-08-10T09:20:06.337Z","_timestamp":1660123206337,"_duration":"PT5M2.073S","_invocations":5156,"_statsOverhead":"n/a","eager":true,"findByNameOrNullSkipRefreshOnNull":false,"findByNameOrNull":1715,"findByNameOrNullCacheHit":1707,"findByNameOrNullCacheMiss":8,"findByNameOrNullDBHitInMilliseconds":{"count":0,"min":0,"max":0,"sum":0,"avg":0,"distributionCounter":{"1":0,"10":0,"50":0,"100":0,"500":0,"1000":0,"5000":0,"10000":0}},"findByNameOrNullDBMissInMilliseconds":{"count":8,"min":0,"max":3,"sum":6,"avg":0,"distributionCounter":{"1":6,"10":2,"50":0,"100":0,"500":0,"1000":0,"5000":0,"10000":0}},"findGroupsGenericValueInMilliseconds":{"count":3,"min":1,"max":3,"sum":6,"avg":2,"distributionCounter":{"1":1,"10":2,"50":0,"100":0,"500":0,"1000":0,"5000":0,"10000":0}},"groupAddFailed":0,"groupAddFailedUpdateSuccessful":0,"groupAddFailedUpdateFailed":0}
    2022-08-10 09:20:06,338+0000 http-nio-8080-exec-4 url: /plugins/servlet/jhtimetracking/adminconfig; user: a@a.com INFO a@a.com 560x1590795x1 1bww9dv xxx.xxx.xxx.x,xxx.xxx.xxx.x /plugins/servlet/jhtimetracking/adminconfig [c.a.j.util.stats.JiraStats] [JIRA-STATS] [GROUP-DAO-STATS] total stats: duration=PT958H55M28.701S, statsOverhead=n/a, data={"_statsName":"GROUP-DAO-STATS","_statsType":"total","_time":"2022-08-10T09:20:06.337Z","_timestamp":1660123206337,"_duration":"PT958H55M28.701S","_invocations":19247738,"_statsOverhead":"n/a","eager":true,"findByNameOrNullSkipRefreshOnNull":false,"findByNameOrNull":6415897,"findByNameOrNullCacheHit":6415866,"findByNameOrNullCacheMiss":31,"findByNameOrNullDBHitInMilliseconds":{"count":0,"min":0,"max":0,"sum":0,"avg":0,"distributionCounter":{"1":0,"10":0,"50":0,"100":0,"500":0,"1000":0,"5000":0,"10000":0}},"findByNameOrNullDBMissInMilliseconds":{"count":31,"min":0,"max":8,"sum":33,"avg":1,"distributionCounter":{"1":20,"10":11,"50":0,"100":0,"500":0,"1000":0,"5000":0,"10000":0}},"findGroupsGenericValueInMilliseconds":{"count":14,"min":1,"max":8,"sum":31,"avg":2,"distributionCounter":{"1":5,"10":9,"50":0,"100":0,"500":0,"1000":0,"5000":0,"10000":0}},"groupAddFailed":0,"groupAddFailedUpdateSuccessful":0,"groupAddFailedUpdateFailed":0}

hope you can help us find what is our issue.

Thanks a lot

Steff

Comments (12)

  1. Johannes Heger repo owner

    Hi Steff,

    interesting case.

    • Could you play around with different groups to check if this is a general problem or if this affects specific groups. Maybe this affects groups with special characters.
    • Could you give me the name of the group(s) you put into a) "These 'manager' group members..." and b) "can see these 'user' group member's worklogs". By this I can try to reproduce this.
    • Open Jira's group management (gg group). In "Filter group > Name contains" there is a text field. Insert a fragment of one of the group you have trouble with in Trock and click the "Filter" button. Does Jira list your group?
    • Let's say Jira lists the group filtered in the previous action. Click on that group name. Does Jira open a new page with details of that group? Or does Jira display an error message with "Group does not exist > Errors > Group not found." ?
    • What system language is Jira configured with?
    • What is your personal language setting?
    • In Chrome or Firefox: Open Trock admin settings page. Open the browser's Developer Panel (press F12). The Developer Panel has the tabs Console and Network. Let's start with the Console. It logs the frontend-logs. Reproduce your error. Is there something logged in red and could be related to Trock?
    • Open the Network tab. This tab logs the communication between the frontend (the Browser) and the Jira server. It has a Filter text input filed. Insert jh. Reproduce your error. jh filters the communication of interest for our case. After submitting, an entry adminconfig should be in the list of the Network tab. If successful, the HTTP Status code is 200. But in case of an error it is 4xx or 5xx. If not 200, click on "adminconfig". A new view opens with tabs Headers, Payload,... Any suspicious in Headers and Payload? Could you send me those? You and select a tab's content with CTRL+a and copy it with CTRL-c. Assess the data for information that should be protected (as you did with the atlassian-jira.log snippet) before attaching it to the ticket.

    Thanks in advance!
    Jo

  2. Stephanie Pradon reporter

    Hi Johannes,
    thanks for your feedback!
    At first, i wanted to add tma-leaders as managers and tma-users as users then i played around with different group names, i create simple groups name like groupmanager and groupuser same result.😕

    When i search groups names in jira's group management it works perfectly with every case like search all word, search a part of the name and when i clik on the group it opens the details page with no error and if i click on edit members it works as well.
    I work with Jira english us and my personal language setting is also english us.

    i am working on a ubuntu environment, i try with window 10… same issues…

    i have no clue about this issue so Maybe i could try to update Jira to the 9.x version?

    Thanks for your help

  3. Johannes Heger repo owner

    Hello Steff,

    in the following some procedures. Hope we can find the root cause.

    A) Can you please open the Trock admin page and make a "Empty cache and hard reload".

    You can do this by

    • using Chrome
    • opening the Development Panel (F12)
    • clicking and holding on the reload-icon. After a second a dialog opens. Click the third option "Empty cache..." [1]. Reloading the page could take some seconds (the active Development Panel enables this feature).
    • Make a new Trock admin configuration and click Update.

    Does this save your new config?

    [1] https://www.filecloud.com/blog/2015/03/tech-tip-how-to-do-hard-refresh-in-browsers/#.Yv6cGi0etTY

    B) Did you install or update add-ons since Trock admin config was working properly?

    C) Can you reproduce the error in a Jira test-instance? If so:

    • Please set Jira into Save Mode. You do this by opening the Manage Apps admin page, scroll to the bottom, and click the link "Enter safe mode. This deactivates all user-installed add-ons.
    • Enable Trock add-on.
    • Go to Trock admin config and again make a "Empty cache..." reload.
    • Try to save a new config.
    • If this works now some other add-on hampers Trock (or Trock is not robust against that).

    Does Trock admin config work now?

    D) If only Trock is enabled and works now:

    • Enable one add-on after the other.
    • In between each add-on:
    • In the left vertical admin menu click "Config" beyond the section-title "TROCK". This reloads the Trock admin page without the browser's warning about losing data.
    • Click the browser's reload-button.
    • Make a configuration and click Update.
    • Enable the next add-on, and so on.
    • It could be you find the add-on hampering Trock.

    If you have found the hampering add-on, please write its name. Maybe I can reproduce the error and hardening Trock.

    E) After you find the add-on, or after all add-ons are re-enabled: Leave the Save Mode.

    Jira shows a banner with the link "Exit safe mode and restore previous configuration". Click that link (despite all add-on are enable it is recommended).

    Thank you for your patience!

  4. Stephanie Pradon reporter

    Hi Johannes,

    it seems to be a hard one…

    A/ no good news

    i made it twice (chrome and firefox) and nothing new. Save (or delete) we have the same bad behaviour. i also ask to a collegue (jira admin too)

    B/ Yes, we update quite all our plugins (scriprunner, git integration, kantego sso entreprise, xray and if i remember well the Atlassian Troubleshooting and Support Tools).

    C&D/ I made the safe mod experience. no changes… same behaviour

    First when Trock were the only active plugin, i emptied the cache, made a config, saved => same behaviour : the save banner did not display, and when i leave trock manager page, i have the same message alert : Changes you made may not be saved. and yes, my changes were not saved

    Try also to reactivate the plugin one by one. No good news...

    by the way, i have a Dev platform and it works perfectly on it. I have exactly the same plugins installed on it. The only difference is with our dev plateform we don’t use kantega SSO Entreprise plugin (but the plugin is installed),means that on dev platform we use Jira native authentification, on prod we are using SAML. However the configuration was already setted when we began to use Trock and we were able to add some configs. I have a backup account with Jira native authentification and the behaviour is identical.

    I tried to compare payload, cookies, logs but nothing pops. i am currently searching into database behaviours (wierd datas, table locked etc...) Nothing!

    i plan a Jira Update next monday night (with a restart)... 🤞

    Thanks for your help

    Steff

  5. Johannes Heger repo owner

    Thorough investigation Steff, thank you! Xporter "bugged" Trock in an other case and I'm hardening Trock currently, with success. But you disabled all add-ons, so Xporter is not the case here. Let's keep updated. I'll think about next investigations but currently I'm running low on ideas. And please let me know about the status after you update. Have a nice weekend!

  6. Johannes Heger repo owner

    Hi, some more steps… orded by your effort.

    1. Install: Download version 3.0.12-i46.1 from [1.1], install it, and check if it works. There were 2 HTML META tags missing on the admin-page. If this works we’re done.
    2. Logging: Please go to Jira Logging and add jh.atlassian.jira.timetracking.adminconfig with level DEBUG. Make a Manager View configuration and click Update. Jira will log a couple of lines containing “timetracking”. Could you send me these? Note, Jira logs a lot “timetracking” warnings about DEPRECATED stuff at the first Trock admin-config view or update after a new version has been installed. I’m not interested in these lines. The interesting lines are about 5-10 per call (view or update).
    3. The admin-config uses a cache. Version 3.0.12-i46.2 has this cache disabled. Please install and check.
    4. Check: The admin-config is stored as JSON-string in the table AO_A18366_ADMINCONFIG [2]. The Trock admin-config table-row is configured to StringLength.UNLIMITED. A typical JSON-length for an admin-config with a couple of manager/user group pairs is less than 1KB. Does this fit into the table of your database? If not I would expect an SQLException, but for sure you could check this.

    [1.1] jira-trock-3.0.12-i46.1 https://c.gmx.net/@510198484515690374/nppBGiNgTbyF9UEQlCvoiQ

    [1.2] jira-trock-3.0.12-i46.2 https://c.gmx.net/@510198484515690374/AQDXr84tQQuzHhcgP8xLWQ

    [2] Issue#44: Which tables used by the plugin TROCK Timetracking Overview And Logging can contain personal data ?
    https://bitbucket.org/jheger/jira-timetracking/issues/44/which-tables-used-by-the-plugin-trock

    Kind regards, Jo

  7. Stephanie Pradon reporter

    Hi Johannes,

    You are my hero 😌

    With the log i found what was going wrong! it says invalidGroupNames [trock-managers]. So i checked the group and i realise that the group name was trock-manager without the s.

    I check the audit log and i found that a group ( trock-manager without the s) has been created and the former group (trock-managers used in the config) has been deleted. the config was made with the former group and not updated….How did i not see it before?!!!😐

    As the group trock-managers didn't exist anymore, it was impossible to save!

    2022-08-22 07:46:44,771+0000 http-nio-8080-exec-30 url: /plugins/servlet/jhtimetracking/adminconfig; user: steff@adress DEBUG steff@adress 466x2251646x2 o0kjtq IP@Adress /plugins/servlet/jhtimetracking/adminconfig [j.a.j.timetracking.adminconfig.AdminConfigurationServlet] doPost(), parameters org.apache.catalina.util.ParameterMap@2da8e403
    2022-08-22 07:46:44,771+0000 http-nio-8080-exec-30 url: /plugins/servlet/jhtimetracking/adminconfig; user: steff@adress DEBUG steff@adress 466x2251646x2 o0kjtq IP@Adress /plugins/servlet/jhtimetracking/adminconfig [j.a.j.timetracking.adminconfig.AdminConfigServiceImpl] getAdminConfigModel(), adminConfigModel isBlockPreviousMonths false, jqlModels [[isEnabled false, isDeny true, jql , message , jqlValidationErrorMessage ]], managerViewsModel [managerGroupsId trock-manager-groups-1, managerGroups [jira-administrators], userGroupsId trock-user-groups-for-trock-manager-groups-1, userGroups [jira-software-users]],[managerGroupsId trock-manager-groups-2, managerGroups [trock-managers], userGroupsId trock-user-groups-for-trock-manager-groups-2, userGroups [DATASTORE]]
    2022-08-22 07:46:44,771+0000 http-nio-8080-exec-30 url: /plugins/servlet/jhtimetracking/adminconfig; user: steff@adress DEBUG steff@adress 466x2251646x2 o0kjtq IP@Adress /plugins/servlet/jhtimetracking/adminconfig [j.a.j.timetracking.adminconfig.AdminConfigManagerViewsModel] pair: trock-manager-groups-1 [jira-administrators], trock-user-groups-for-trock-manager-groups-1 [jira-software-users]
    2022-08-22 07:46:44,771+0000 http-nio-8080-exec-30 url: /plugins/servlet/jhtimetracking/adminconfig; user: steff@adress DEBUG steff@adress 466x2251646x2 o0kjtq IP@Adress /plugins/servlet/jhtimetracking/adminconfig [j.a.j.timetracking.adminconfig.AdminConfigManagerViewsModel] pair: trock-manager-groups-2 [trock-managers], trock-user-groups-for-trock-manager-groups-2 [DATASTORE]
    2022-08-22 07:46:44,771+0000 http-nio-8080-exec-30 url: /plugins/servlet/jhtimetracking/adminconfig; user: steff@adress DEBUG steff@adress 466x2251646x2 o0kjtq IP@Adress /plugins/servlet/jhtimetracking/adminconfig [j.a.j.timetracking.adminconfig.AdminConfigManagerViewsModel] pair: trock-manager-groups-3 [confluence-administrators], trock-user-groups-for-trock-manager-groups-3 [confluence-users]
    2022-08-22 07:46:44,774+0000 http-nio-8080-exec-30 url: /plugins/servlet/jhtimetracking/adminconfig; user: steff@adress DEBUG steff@adress 466x2251646x2 o0kjtq IP@Adress /plugins/servlet/jhtimetracking/adminconfig [j.a.j.timetracking.adminconfig.AdminConfigManagerViewsModel] isManagerGroupError true, isMissingManagerGroup false, invalidGroupNames [trock-managers], managerViewsModel [[managerGroupsId trock-manager-groups-1, managerGroups [jira-administrators], userGroupsId trock-user-groups-for-trock-manager-groups-1, userGroups [jira-software-users]], [managerGroupsId trock-manager-groups-2, managerGroups [trock-managers], userGroupsId trock-user-groups-for-trock-manager-groups-2, userGroups [DATASTORE]], [managerGroupsId trock-manager-groups-3, managerGroups [confluence-administrators], userGroupsId trock-user-groups-for-trock-manager-groups-3, userGroups [confluence-users]]]
    2022-08-22 07:46:44,774+0000 http-nio-8080-exec-30 url: /plugins/servlet/jhtimetracking/adminconfig; user: steff@adress DEBUG steff@adress 466x2251646x2 o0kjtq IP@Adress /plugins/servlet/jhtimetracking/adminconfig [j.a.j.timetracking.adminconfig.AdminConfigurationServlet] doGet, isSaved false, settings null
    

    SO i tried to reproduce the issue on my dev platform, i delete a group already used in a configuration and i found the same behaviour! that’s my bug 🙂

    Thank you so much for your Help and your time!!

    Steff

  8. Johannes Heger repo owner

    OK thank you! So this issue is solved.

    I should implement an improvement that way Trock signals invalid groups in the admin UI.

    Unfortunately I can’t reproduce your issue. If I delete a group or rename it in the database, I can proceed updating the admin-config. So there is some homework for me. But for that I’ll create a separate issue.

    Nice to meet you, kind regards, Jo

  9. Log in to comment