Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Section


Column
width8%



Log Browser

Log Browser is available in Administration -> Add-ons -> IssueSYNC -> Logs Browser
 

Image Removed

There are three tabs:
  • Queue Log - shows logs corresponding to QueueIn and QueueOut in the plugin. It is good to diagnose synchronization: messages, events/triggers, HTTP results.
  • Plugin Log - it is low level log. There is information about

    Services

    execution, processing messages, etc.
  • Diagnostic File - allows to download result from QueueLog, PluginLog and QueueIn/QueueOut content. Bundled and zipped files can be sent to our support for further investigation.
  • Log Files

    JIRA has two folders with log files:

    • JIRA_HOME/log
    • JIRA_DISTRIBUTION_FOLDER/logs

    In the first one, the plugin creates intenso-synchronizer.log file with most of its logs. In case the file size will reach 20 MB intenso-synchronize.log.1 will be created. After a while old log files should be removed.

    Reading logs can be difficult because it contains error codes. For example:

    2015-09-22 11:12:24|INFO |2|syn001|(SCHEDULED)| 

    syn001 is a code that translates to "Archivization task was run!" (SCHEDULED)

    Complete codes list can be found in plugin jar (downloaded from marketplace or from your JIRA_HOME/plugins/installed_plugins directory) in file synchronizer-extended-logger.properties

    • Last log lines can be browse in Log Browser in Plugin Logs tab.
    • Log files can be bundled and downloaded in Log Browser (Diagnostic File tab). In case of problem you can sent them to our support.

    (warning) In some cases JIRA_HOME/log/atlassian-jira.log can includes some additional information that are not included in intenso-synchronizer.log. You may investigate these logs too (search over 'intenso' keyword) or send the file to our support.

    Database

    Queues can be browsed directly in database (use your favorite DB client):

    • AO_6D516B_QUEUE_IN
    • AO_6D516B_QUEUE_OUT

    There is also a log queue that contains more details about communication:

    • AO_6D516B_QUEUE_LOG

    QueueIn Statuses:

    • NEW (0)
      Message has arrived.

    • PROCESSING (1)
      Update after create scenario - waits until response with created issue id will return.
      Message is awaiting some other dependent messages. Status very rare to happen.
    • DONE (5)
    • ERROR (6)
    • RETRY (4) <- This one can be set manually (SQL Update Statement) to force resent of ERROR messages. *

    QueueOut Statuses:

    • NEW (0)
      Message has arrived.
    • SENT (2)
      Message sent to (or pulled by) the remote.
    • DONE (5)
    • ERROR (6)
    • RETRY (4) *

    Few words about the sync flow

     

    1. Everything starts when event selected in contract configuration occurs. Changes are filter by field mapping and synchronization string is created. This data are saved in database and are waiting for Outgoing Job to be send. If you want to see what data will be sent look into database table(A0_6D516B_QUEUE_OUT).
    2. Outgoing Job send synchronization data stored in A0_6D516B_QUEUE_OUT to remote JIRA instance where data are saved in databse A0_6D516B_QUEUE_IN table. 
    3. Incoming Job fetch data in status NEW / RETRY and build internal rest request to JIRA REST API. Depends on result update status and send response to JIRA which started conversation(more technically save data in A0_6D516B_QUEUE_OUT table).
    4. Outgoing Response Job fetch response related data from A0_6D516B_QUEUE_OUT  and sends response to JIRA which started synchronization.
    5. Incoming Response Job fetch data from A0_6D516B_QUEUE_IN table in database related to responses and update status of synchronization data from initial A0_6D516B_QUEUE_OUT records from point 1.

    Disabled Contract

    Contract can be disabled either one or both ways. Here are some rules that should apply

    Column
    width900px


    Info

    This chapter is for advanced users/admins.

    Diagnostic can be made on different levels. All levels are described in this chapter.


    Panel
    borderColor#0288D1
    bgColor#F7F7F7
    borderStylesolid


    Column
    width500px


    Table of Contents


    Column
    width400px





    Diagnostic Levels


    Center


    Level


    Configuration Level



    It relates to all configuration items in the plugin, such as (1) Connection, (2) Contract, Field Mapping Templates (from Adminstrator's Guide->Basic chapter).

    Pages in this section: Connection Diagnostic, Contract Diagnostic, Field Mapping Diagnostic



    Synchronization Level



    At this level you can diagnose data synchronization (issues, fields, comments, attachments).


    Infrastructure



    Infrastructure can be more difficult to diagnose because of many external factors that can interfere with synchronization.

    That level refers to SSO, HTTP accelerators, proxies, etc. Unresolved problems from other levels may lead to infrastructure.




    Architecture


    Info

    Deeper understanding of the plugin architecture may be helpful to resolve problems.

    The plugin uses two queues to handle messages (IN, OUT). Each JIRA instance has these queues.

    (warning) Please, read below all marks carefully. This is quite low level introduction which understanding may be crucial to resolve some problems.

    • Message are stored in queues.
    • Messages are flush after some period of time (see Services).
    • There are several services and each service may have several tasks in sequence. For example OutgoingService do following:
      • Process outgoing messages in NEW status (message types: Create, Update, Comment)
      • Process outgoing messages in RETRY status (message types: Create, Update, Comment)
      • Process outgoing messages in RETRY status (message types: Attachment)
      • Process outgoing messages in NEW status (message types: Attachment)
    • So you can image that single flush may not be able to process all data-synchronization at once. 
      • Each service can execute in different order each time (depending on cron and execution duration).
      • Each service has some tasks that change message statuses which need to wait for next service execution to process further.
      • Communication depends on execution from both JIRAs. Flushing local queues is not enough to make synchronization happen. They need to be flushed on remote JIRA too.
    • You can make flush faster from Synchronization web panel on issue (described below).
    • Messages (and services) have two main categories:
      • Data (fields, comments, attachments)
      • Confirmation / Response (only for acknowledge)
    • Queues are in JIRA DB. You can browse them with right tool (SQLDeveloper, Heidi, MySQL Query Browser, etc.).
    • Communication is made using HTTP protocol. You can sniff this communication with tools like HTTPNetworkSniffer.
    • Changes on issues are in 90% made using JIRA REST API. However this API is called from local JIRA (not remote).
      So this is internal HTTP communication.
    • There are different strategies to handle: create-update, comments, attachments. So HTTP messages may differ.
    • Data format is JSON.


    Preinstalled Components


    During installation plugin create one custom field:

    There is another custom field that can be setup manually:

    Under the hood there are 7 services responsible for synchronization task:

    • Outgoing Job -  it is responsible for sending changes data to remote JIRA,
    • Incoming Job -  it is responsible for handling data receipt from remote JIRA,
    • Outgoing Response Job - responsible for sending changes confirmation to JIRA which started data synchronization,
    • Incoming Response Job - deals with incoming responses (mark data as synchronized),
    • Archivization Job - move all synchronization data marked as done to archive,
    • Pull Job - when JIRA is behind firewall(connection is in passive mode) and is not able to send synchronization data to remote instance, pull job in remote JIRA fetch data and performs synchronization,
    • Pull Response Job - when JIRA is behind firewall(connection is in passive mode), this job in remote instance fetch all acknowledge information(it's similar to Outgoing Response Job, but works only when connection is in passive mode).

    You can decide how often jobs run, to do that set whatever Cron expression you like in general configuration of the synchronizer.

    See also Services

    Synchronization Level

    Synchronization
    Issue Panel 

    There is a web panel on issues that have a (2) Contract set.

    Info

    This panel can be disabled in general plugin configuration.

    Image Removed

    Panel sections:

    • General warning are shown on top (
      Status
      colourYellow
      titlewarn
      ) and they should NOT be ignored. They may provide you quick answer why synchronization is not performed.
    • Connections & Contracts
      • First line is a (1) Connection name and mode (
        Status
        colourGreen
        titleactive
        or
        Status
        colourYellow
        titlePassive
        )
      • Below is a (2) Contract name and its status (
        Status
        colourGreen
        titleEnabled
        or
        Status
        colourYellow
        titledisabled
        )
        • Additional contract configuration is listed below.
          So for example if comments are not synchronized you may see that they are not enabled or you need to use External Comments Tab.
      • There can be many Connection/Contract for one issue.
    • Message Types
      • Left group is for CREATE, UPDATE, ATTACHMENTS
        • Each message should receive RESPONSE (number of responses should match sum of messages)
        • Arrow next to CREATE informs whether issue was create in local JIRA (->) or remote (<-)
      • Right group is for COMMENTS
        • The flag icon informs that there is a message that waits for processing. You can see also that there is one response missing for comments.
    • Outgoing & Incoming
      • 1/23 means that 23 outgoing messages were processed successfully. One is still processing.
      • It is not very likely you will see NEW & PROCESSING messages in Incoming queue because they are processed instantly. However, if you see messages there for a while that may indicate a problem.

    Show Logs opens Log Browser in context of given issue (for more see Log Browser).

    Image Removed Can be used to force queues processing. It is good for evaluation to speed-up a communication a bit. You can flush after making a changes that should be synchronized. Processing incoming changes and responses. You may need few seconds to see the change on the issue. After flush you should also refresh a page (F5).

    Anchor
    logbrowserlogbrowser
    Info
    Status
    colourBlue
    titlesince v0.8.1

  • If contract is disabled in LOCAL JIRA - all events (triggers) will be ignored. No data will recorded into queues.
  • If contract is disabled in LOCAL JIRA but enabled in REMOTE - incoming messages will arrive but won't be processed.
  • If contract is enabled in LOCAL JIRA but disabled on REMOTE - events will be processed, changes will be recorded in queues and sent to REMOTE; however REMOTE won't process communication any further (no response will arrive until contract will be enabled again in REMOTE).
  • Both disabled in the same time - no communication recorded in queues, nothing is sent in context of given contracts.


    Column
    width8%