Error when integrating grafana with grafana-oncall using official helm charts

Hi!
I am integrating an instance of grafana with grafana-oncall, using the official helm charts.
The versions I use are:
Helm chart grafana/grafana:6.52.4
Helm chart grafana/oncall:1.2.1
Docker image: grafana/grafana:9.4.7
Docker image: grafana/oncall:v1.1.41

The error appears when I configure the grafana-oncall plugin, with any url I use, oncall-engine gives the following error:

2023-03-23 19:24:02 source=engine:app google_trace_id=none logger=root inbound latency=0.000884 status=200 method=GET path=/ready/ content-length=0 slow=0 
2023-03-23 19:24:02 source=engine:app google_trace_id=none logger=root inbound latency=0.001178 status=200 method=GET path=/health/ content-length=0 slow=0 
2023-03-23 19:24:02 source=engine:uwsgi status=200 method=GET path=/ready/ latency=0.001994 google_trace_id=- protocol=HTTP/1.1 resp_size=180 req_body_size=0
2023-03-23 19:24:02 source=engine:uwsgi status=200 method=GET path=/health/ latency=0.002480 google_trace_id=- protocol=HTTP/1.1 resp_size=180 req_body_size=0
2023-03-23 19:25:02 source=engine:app google_trace_id=none logger=root inbound latency=0.000811 status=200 method=GET path=/ready/ content-length=0 slow=0 
2023-03-23 19:25:02 source=engine:uwsgi status=200 method=GET path=/ready/ latency=0.001850 google_trace_id=- protocol=HTTP/1.1 resp_size=180 req_body_size=0
2023-03-23 19:25:02 source=engine:app google_trace_id=none logger=root inbound latency=0.001325 status=200 method=GET path=/health/ content-length=0 slow=0 
2023-03-23 19:25:02 source=engine:uwsgi status=200 method=GET path=/health/ latency=0.002797 google_trace_id=- protocol=HTTP/1.1 resp_size=180 req_body_size=0
2023-03-23 19:25:37 source=engine:app google_trace_id=none logger=root outbound latency=0.0005512980000048628 status=503 method=HEAD url=api/org slow=0 
2023-03-23 19:25:37 source=engine:app google_trace_id=none logger=django.request Internal Server Error: /api/internal/v1/plugin/self-hosted/install
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/django/core/handlers/exception.py", line 47, in inner
    response = get_response(request)
  File "/usr/local/lib/python3.9/site-packages/django/core/handlers/base.py", line 181, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/usr/local/lib/python3.9/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view
    return view_func(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/django/views/generic/base.py", line 70, in view
    return self.dispatch(request, *args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/rest_framework/views.py", line 509, in dispatch
    response = self.handle_exception(exc)
  File "/usr/local/lib/python3.9/site-packages/rest_framework/views.py", line 469, in handle_exception
    self.raise_uncaught_exception(exc)
  File "/usr/local/lib/python3.9/site-packages/rest_framework/views.py", line 480, in raise_uncaught_exception
    raise exc
  File "/usr/local/lib/python3.9/site-packages/rest_framework/views.py", line 506, in dispatch
    response = handler(request, *args, **kwargs)
  File "/etc/app/apps/grafana_plugin/views/self_hosted_install.py", line 33, in post
    _, client_status = grafana_api_client.check_token()
  File "/etc/app/apps/grafana_plugin/helpers/client.py", line 122, in check_token
    return self.api_head("api/org")
  File "/etc/app/apps/grafana_plugin/helpers/client.py", line 59, in api_head
    return self.call_api(endpoint, requests.head, body, **kwargs)
  File "/etc/app/apps/grafana_plugin/helpers/client.py", line 76, in call_api
    response = http_method(call_status["url"], json=body, headers=self.request_headers, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/requests/api.py", line 100, in head
    return request("head", url, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/requests/api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/requests/sessions.py", line 573, in request
    prep = self.prepare_request(req)
  File "/usr/local/lib/python3.9/site-packages/requests/sessions.py", line 484, in prepare_request
    p.prepare(
  File "/usr/local/lib/python3.9/site-packages/requests/models.py", line 368, in prepare
    self.prepare_url(url, params)
  File "/usr/local/lib/python3.9/site-packages/requests/models.py", line 439, in prepare_url
    raise MissingSchema(
requests.exceptions.MissingSchema: Invalid URL 'api/org': No scheme supplied. Perhaps you meant https://api/org?
2023-03-23 19:25:37 source=engine:app google_trace_id=none logger=root inbound latency=0.033358 status=500 method=POST path=/api/internal/v1/plugin/self-hosted/install content-length=0 slow=0 
2023-03-23 19:25:37 source=engine:uwsgi status=500 method=POST path=/api/internal/v1/plugin/self-hosted/install latency=0.035812 google_trace_id=- protocol=HTTP/1.1 resp_size=329 req_body_size=0

Has this happened to anyone?
In a docker compose I could make it work perfectly, but in kubernetes I always get the same error.

Hi @germantejero,

Welcome to the :grafana: community support forums !!

We are excited that you joined our OSS community. Please read about some of the FAQs in the community :slight_smile:

This does sound like a bug if there are no modifications done on the helm-chats yaml file and then give these errors.

We would appreciate it if you can open a bug report about this in our official GitHub repository using this link.

Provide all the information (you can simply copy/paste your data + screenshot from here to there).

Lastly, paste the link to your GitHub issue here in this post so that all other community users can also track it. I will also add more additional information to it :+1:

Ok, thank you very much!

Hello @germantejero

I’m having the same issue. I installed Grafana OnCall with the Helm chart and modifications like an external Grafana instance and configuring the base URL and ingress object to my need.

Did you create a Github issue or got it working?

Never mind. The reply URL was wrong. Instead of using the public URL of the external Grafana instance I had to use the internal service name in K8s.