Hello,
So I used to be able to use the built-in Jira integration, but it seems as though it’s now currently broken since Gitlab 16.9.8 after I upgraded and it still continues to not integrate with Jira anymore.
When I did gitlab-ctl tail
and took a look at the logs, I get this particular response back. Obviously I have redacted all of the sensitive information.
{
"severity": "ERROR",
"time": "2024-06-13T03:50:53.450Z",
"correlation_id": "01J07VGFW3ECN8CT2B7DMCDY28",
"meta.caller_id": "Integrations::CreateExternalCrossReferenceWorker",
"meta.remote_ip": "127.0.0.1",
"meta.feature_category": "integrations",
"meta.user": "{REDACTED_GITLAB_USER}",
"meta.user_id": 1,
"meta.project": "{REDACTED_PROJECT}",
"meta.root_namespace": "{REDACTED_PROJECT_NAMESPACE}",
"meta.client_id": "user/1",
"meta.root_caller_id": "POST /api/:version/internal/post_receive",
"integration_class": "Integrations::Jira",
"integration_id": 20,
"project_id": 16,
"project_path": "{REDACTED_PROJECT}",
"message": "Error sending message",
"client_url": "{REDACTED_JIRA_URL}",
"client_path": "/rest/api/2/issue/{REDACTED_JIRA_ISSUE}",
"client_status": "500",
"exception.class": "JIRA::HTTPError",
"exception.message": "{\"errorMessages\":[\"Internal server error\"],\"errors\":{}}",
"exception.backtrace": ["lib/gitlab/jira/http_client.rb:15:in `request'", "jira-ruby (2.3.0) lib/jira/client.rb:306:in `request'", "jira-ruby (2.3.0) lib/jira/client.rb:279:in `get'", "jira-ruby (2.3.0) lib/jira/resource/issue.rb:95:in `fetch'", "jira-ruby (2.3.0) lib/jira/base.rb:107:in `find'", "jira-ruby (2.3.0) lib/jira/base_factory.rb:31:in `block (2 levels) in delegate_to_target_class'", "app/models/integrations/jira.rb:331:in `block in find_issue'", "app/models/integrations/jira.rb:686:in `jira_request'", "app/models/integrations/jira.rb:331:in `find_issue'", "app/models/integrations/jira.rb:361:in `create_cross_reference_note'", "app/workers/integrations/create_external_cross_reference_worker.rb:21:in `perform'", "vendor/gems/sidekiq-7.1.6/lib/sidekiq/processor.rb:210:in `execute_job'", "vendor/gems/sidekiq-7.1.6/lib/sidekiq/processor.rb:180:in `block (4 levels) in process'", "vendor/gems/sidekiq-7.1.6/lib/sidekiq/middleware/chain.rb:180:in `traverse'", "vendor/gems/sidekiq-7.1.6/lib/sidekiq/middleware/chain.rb:183:in `block in traverse'", "lib/gitlab/sidekiq_middleware/skip_jobs.rb:51:in `call'", "vendor/gems/sidekiq-7.1.6/lib/sidekiq/middleware/chain.rb:182:in `traverse'", "vendor/gems/sidekiq-7.1.6/lib/sidekiq/middleware/chain.rb:183:in `block in traverse'", "lib/gitlab/database/load_balancing/sidekiq_server_middleware.rb:29:in `call'", "vendor/gems/sidekiq-7.1.6/lib/sidekiq/middleware/chain.rb:182:in `traverse'", "vendor/gems/sidekiq-7.1.6/lib/sidekiq/middleware/chain.rb:183:in `block in traverse'", "lib/gitlab/sidekiq_middleware/duplicate_jobs/strategies/until_executed.rb:17:in `perform'", "lib/gitlab/sidekiq_middleware/duplicate_jobs/duplicate_job.rb:44:in `perform'", "lib/gitlab/sidekiq_middleware/duplicate_jobs/server.rb:8:in `call'", "vendor/gems/sidekiq-7.1.6/lib/sidekiq/middleware/chain.rb:182:in `traverse'", "vendor/gems/sidekiq-7.1.6/lib/sidekiq/middleware/chain.rb:183:in `block in traverse'", "lib/gitlab/sidekiq_middleware/concurrency_limit/middleware.rb:32:in `perform'", "lib/gitlab/sidekiq_middleware/concurrency_limit/server.rb:8:in `call'", "vendor/gems/sidekiq-7.1.6/lib/sidekiq/middleware/chain.rb:182:in `traverse'", "vendor/gems/sidekiq-7.1.6/lib/sidekiq/middleware/chain.rb:183:in `block in traverse'", "lib/click_house/migration_support/sidekiq_middleware.rb:7:in `call'", "vendor/gems/sidekiq-7.1.6/lib/sidekiq/middleware/chain.rb:182:in `traverse'", "vendor/gems/sidekiq-7.1.6/lib/sidekiq/middleware/chain.rb:183:in `block in traverse'", "lib/gitlab/sidekiq_middleware/pause_control/strategies/base.rb:31:in `perform'", "lib/gitlab/sidekiq_middleware/pause_control/strategy_handler.rb:22:in `perform'", "lib/gitlab/sidekiq_middleware/pause_control/server.rb:8:in `call'", "vendor/gems/sidekiq-7.1.6/lib/sidekiq/middleware/chain.rb:182:in `traverse'", "vendor/gems/sidekiq-7.1.6/lib/sidekiq/middleware/chain.rb:183:in `block in traverse'", "lib/gitlab/sidekiq_middleware/worker_context.rb:9:in `wrap_in_optional_context'", "lib/gitlab/sidekiq_middleware/worker_context/server.rb:19:in `block in call'", "lib/gitlab/application_context.rb:133:in `block in use'", "gitlab-labkit (0.36.0) lib/labkit/context.rb:35:in `with_context'", "lib/gitlab/application_context.rb:133:in `use'", "lib/gitlab/application_context.rb:66:in `with_context'", "lib/gitlab/sidekiq_middleware/worker_context/server.rb:17:in `call'", "vendor/gems/sidekiq-7.1.6/lib/sidekiq/middleware/chain.rb:182:in `traverse'", "vendor/gems/sidekiq-7.1.6/lib/sidekiq/middleware/chain.rb:183:in `block in traverse'", "lib/gitlab/sidekiq_status/server_middleware.rb:7:in `call'", "vendor/gems/sidekiq-7.1.6/lib/sidekiq/middleware/chain.rb:182:in `traverse'", "vendor/gems/sidekiq-7.1.6/lib/sidekiq/middleware/chain.rb:183:in `block in traverse'", "lib/gitlab/sidekiq_versioning/middleware.rb:9:in `call'", "vendor/gems/sidekiq-7.1.6/lib/sidekiq/middleware/chain.rb:182:in `traverse'", "vendor/gems/sidekiq-7.1.6/lib/sidekiq/middleware/chain.rb:183:in `block in traverse'", "lib/gitlab/sidekiq_middleware/query_analyzer.rb:7:in `block in call'", "lib/gitlab/database/query_analyzer.rb:40:in `within'", "lib/gitlab/sidekiq_middleware/query_analyzer.rb:7:in `call'", "vendor/gems/sidekiq-7.1.6/lib/sidekiq/middleware/chain.rb:182:in `traverse'", "vendor/gems/sidekiq-7.1.6/lib/sidekiq/middleware/chain.rb:183:in `block in traverse'", "lib/gitlab/sidekiq_middleware/admin_mode/server.rb:14:in `call'", "vendor/gems/sidekiq-7.1.6/lib/sidekiq/middleware/chain.rb:182:in `traverse'", "vendor/gems/sidekiq-7.1.6/lib/sidekiq/middleware/chain.rb:183:in `block in traverse'", "lib/gitlab/sidekiq_middleware/instrumentation_logger.rb:9:in `call'", "vendor/gems/sidekiq-7.1.6/lib/sidekiq/middleware/chain.rb:182:in `traverse'", "vendor/gems/sidekiq-7.1.6/lib/sidekiq/middleware/chain.rb:183:in `block in traverse'", "lib/gitlab/sidekiq_middleware/batch_loader.rb:7:in `call'", "vendor/gems/sidekiq-7.1.6/lib/sidekiq/middleware/chain.rb:182:in `traverse'", "vendor/gems/sidekiq-7.1.6/lib/sidekiq/middleware/chain.rb:183:in `block in traverse'", "lib/gitlab/sidekiq_middleware/extra_done_log_metadata.rb:7:in `call'", "vendor/gems/sidekiq-7.1.6/lib/sidekiq/middleware/chain.rb:182:in `traverse'", "vendor/gems/sidekiq-7.1.6/lib/sidekiq/middleware/chain.rb:183:in `block in traverse'", "lib/gitlab/sidekiq_middleware/server_metrics.rb:111:in `block in call'", "lib/gitlab/sidekiq_middleware/server_metrics.rb:139:in `block in instrument'", "lib/gitlab/metrics/background_transaction.rb:33:in `run'", "lib/gitlab/sidekiq_middleware/server_metrics.rb:139:in `instrument'", "lib/gitlab/sidekiq_middleware/server_metrics.rb:110:in `call'", "vendor/gems/sidekiq-7.1.6/lib/sidekiq/middleware/chain.rb:182:in `traverse'", "vendor/gems/sidekiq-7.1.6/lib/sidekiq/middleware/chain.rb:183:in `block in traverse'", "lib/gitlab/sidekiq_middleware/request_store_middleware.rb:8:in `block in call'", "gems/gitlab-safe_request_store/lib/gitlab/safe_request_store.rb:66:in `enabling_request_store'", "gems/gitlab-safe_request_store/lib/gitlab/safe_request_store.rb:59:in `ensure_request_store'", "lib/gitlab/sidekiq_middleware/request_store_middleware.rb:7:in `call'", "vendor/gems/sidekiq-7.1.6/lib/sidekiq/middleware/chain.rb:182:in `traverse'", "vendor/gems/sidekiq-7.1.6/lib/sidekiq/middleware/chain.rb:183:in `block in traverse'", "gitlab-labkit (0.36.0) lib/labkit/middleware/sidekiq/server.rb:21:in `block in call'", "vendor/gems/sidekiq-7.1.6/lib/sidekiq/middleware/chain.rb:180:in `traverse'", "vendor/gems/sidekiq-7.1.6/lib/sidekiq/middleware/chain.rb:183:in `block in traverse'", "gitlab-labkit (0.36.0) lib/labkit/middleware/sidekiq/context/server.rb:16:in `block in call'", "gitlab-labkit (0.36.0) lib/labkit/context.rb:35:in `with_context'", "gitlab-labkit (0.36.0) lib/labkit/middleware/sidekiq/context/server.rb:15:in `call'", "vendor/gems/sidekiq-7.1.6/lib/sidekiq/middleware/chain.rb:182:in `traverse'", "vendor/gems/sidekiq-7.1.6/lib/sidekiq/middleware/chain.rb:173:in `invoke'", "gitlab-labkit (0.36.0) lib/labkit/middleware/sidekiq/server.rb:20:in `call'", "vendor/gems/sidekiq-7.1.6/lib/sidekiq/middleware/chain.rb:182:in `traverse'", "vendor/gems/sidekiq-7.1.6/lib/sidekiq/middleware/chain.rb:183:in `block in traverse'", "lib/gitlab/sidekiq_middleware/monitor.rb:10:in `block in call'", "lib/gitlab/sidekiq_daemon/monitor.rb:46:in `within_job'", "lib/gitlab/sidekiq_middleware/monitor.rb:9:in `call'", "vendor/gems/sidekiq-7.1.6/lib/sidekiq/middleware/chain.rb:182:in `traverse'", "vendor/gems/sidekiq-7.1.6/lib/sidekiq/middleware/chain.rb:183:in `block in traverse'", "lib/gitlab/sidekiq_middleware/shard_awareness_validator.rb:10:in `block in call'", "lib/gitlab/sidekiq_sharding/validator.rb:42:in `enabled'", "lib/gitlab/sidekiq_middleware/shard_awareness_validator.rb:9:in `call'", "vendor/gems/sidekiq-7.1.6/lib/sidekiq/middleware/chain.rb:182:in `traverse'", "vendor/gems/sidekiq-7.1.6/lib/sidekiq/middleware/chain.rb:183:in `block in traverse'", "lib/gitlab/sidekiq_middleware/size_limiter/server.rb:13:in `call'", "vendor/gems/sidekiq-7.1.6/lib/sidekiq/middleware/chain.rb:182:in `traverse'", "vendor/gems/sidekiq-7.1.6/lib/sidekiq/middleware/chain.rb:183:in `block in traverse'", "marginalia (1.11.1) lib/marginalia/sidekiq_instrumentation.rb:9:in `call'", "vendor/gems/sidekiq-7.1.6/lib/sidekiq/middleware/chain.rb:182:in `traverse'", "vendor/gems/sidekiq-7.1.6/lib/sidekiq/middleware/chain.rb:183:in `block in traverse'", "sentry-sidekiq (5.17.3) lib/sentry/sidekiq/sentry_context_middleware.rb:26:in `call'", "vendor/gems/sidekiq-7.1.6/lib/sidekiq/middleware/chain.rb:182:in `traverse'", "vendor/gems/sidekiq-7.1.6/lib/sidekiq/middleware/chain.rb:183:in `block in traverse'", "vendor/gems/sidekiq-7.1.6/lib/sidekiq/metrics/tracking.rb:26:in `track'", "vendor/gems/sidekiq-7.1.6/lib/sidekiq/metrics/tracking.rb:122:in `call'", "vendor/gems/sidekiq-7.1.6/lib/sidekiq/middleware/chain.rb:182:in `traverse'", "vendor/gems/sidekiq-7.1.6/lib/sidekiq/middleware/chain.rb:173:in `invoke'", "vendor/gems/sidekiq-7.1.6/lib/sidekiq/processor.rb:179:in `block (3 levels) in process'", "vendor/gems/sidekiq-7.1.6/lib/sidekiq/processor.rb:140:in `block (6 levels) in dispatch'", "vendor/gems/sidekiq-7.1.6/lib/sidekiq/job_retry.rb:114:in `local'", "vendor/gems/sidekiq-7.1.6/lib/sidekiq/processor.rb:139:in `block (5 levels) in dispatch'", "vendor/gems/sidekiq-7.1.6/lib/sidekiq/rails.rb:16:in `block in call'", "activesupport (7.0.8.1) lib/active_support/execution_wrapper.rb:92:in `wrap'", "activesupport (7.0.8.1) lib/active_support/reloader.rb:72:in `block in wrap'", "activesupport (7.0.8.1) lib/active_support/execution_wrapper.rb:92:in `wrap'", "activesupport (7.0.8.1) lib/active_support/reloader.rb:71:in `wrap'", "vendor/gems/sidekiq-7.1.6/lib/sidekiq/rails.rb:15:in `call'", "vendor/gems/sidekiq-7.1.6/lib/sidekiq/processor.rb:135:in `block (4 levels) in dispatch'", "vendor/gems/sidekiq-7.1.6/lib/sidekiq/processor.rb:271:in `stats'", "vendor/gems/sidekiq-7.1.6/lib/sidekiq/processor.rb:130:in `block (3 levels) in dispatch'", "lib/gitlab/sidekiq_logging/structured_logger.rb:21:in `call'", "vendor/gems/sidekiq-7.1.6/lib/sidekiq/processor.rb:129:in `block (2 levels) in dispatch'", "vendor/gems/sidekiq-7.1.6/lib/sidekiq/job_retry.rb:81:in `global'", "vendor/gems/sidekiq-7.1.6/lib/sidekiq/processor.rb:128:in `block in dispatch'", "vendor/gems/sidekiq-7.1.6/lib/sidekiq/job_logger.rb:39:in `prepare'", "vendor/gems/sidekiq-7.1.6/lib/sidekiq/processor.rb:127:in `dispatch'", "vendor/gems/sidekiq-7.1.6/lib/sidekiq/processor.rb:178:in `block (2 levels) in process'", "vendor/gems/sidekiq-7.1.6/lib/sidekiq/processor.rb:177:in `handle_interrupt'", "vendor/gems/sidekiq-7.1.6/lib/sidekiq/processor.rb:177:in `block in process'", "vendor/gems/sidekiq-7.1.6/lib/sidekiq/processor.rb:176:in `handle_interrupt'", "vendor/gems/sidekiq-7.1.6/lib/sidekiq/processor.rb:176:in `process'", "vendor/gems/sidekiq-7.1.6/lib/sidekiq/processor.rb:82:in `process_one'", "vendor/gems/sidekiq-7.1.6/lib/sidekiq/processor.rb:72:in `run'", "vendor/gems/sidekiq-7.1.6/lib/sidekiq/component.rb:10:in `watchdog'", "vendor/gems/sidekiq-7.1.6/lib/sidekiq/component.rb:19:in `block in safe_thread'"]
}
So just looking at that error message, I did do a little bit of digging since I do have a PHP script I wrote that does a cURL request against the Jira API itself. So my PHP script does a basic Jira search and it no longer was working ever since I upgraded to Jira 9.16.1 from 9.15.2. When I looked at the request it sent back, I was also seeing 500 internal server error. After I messing around with the Jira query some more, I was able to get my PHP script working with the Jira search by just adding the fields
field in my API call.
So point here is, is that also happening with the Jira integration Ruby file as well? Does it need to be updated to account for the new way that Jira is doing things? I’m not a Ruby developer so I wouldn’t know what to change. All I know is that I was able to authenticate to Jira from Gitlab prior to upgrading Gitlab to 16.9.8 and upgrading Jira to 9.16.1 and then post my commits to my Jira tickets in the comments on a Git push. I can no longer do that since I keep hitting this 500 internal server error trying to reach my Jira’s API.