Error Activating Gitlab Repository

Hi Drone team,

I’m having issues activating any repository in my gitlab account. When trying to activate any of my repos in GitLab, I get the error:

There was a problem enabling your repository.

I am trying to follow some suggestions already made in previous threads but to no avail.

  1. you do not have admin permissions to the repository which is required in order to create webhooks
  • I’m logged in to Drone via Gitlab OAuth. My user account is an admin account
  1. the drone application oauth client was not configured with the correct scopes in gitlab
  • All the scopes have been selected. None have been left unticked.
  1. the url is invalid or cannot be reached by gitlab (e.g. your drone address is localhost).
  • My drone address is a private IPV4 address in the same subnet as my gitlab account. From the gitlab server I can do a curl and a ping to the Drone server and vice versa

Here is my docker command. I am not using a docker-compose file yet as I’m following the instructions in the Drone.io site:
docker run
–volume=/var/run/docker.sock:/var/run/docker.sock
–volume=/var/lib/drone:/data
–env=DRONE_ADMIN=zac,zacsarion
–env=DRONE_GIT_ALWAYS_AUTH=false
–env=DRONE_GITLAB_SERVER=https://git.ops.mobilise.cloud
–env=DRONE_GITLAB_CLIENT_ID=c68fceff62352e282d0bb1217c331c3a29fd2766cc9f28089d0952c1102e747d \ --env=DRONE_GITLAB_CLIENT_SECRET=335ae6bf096abe8277943630d2eee21ef0bc117bcaee04f62921ec7bad17dbe6
–env=DRONE_RUNNER_CAPACITY=2
–env=DRONE_SERVER_HOST=10.200.20.160
–env=DRONE_SERVER_PROTO=http
–env=DRONE_TLS_AUTOCERT=false
–publish=80:80
–publish=443:443
–restart=always
–detach=true
–name=drone
drone/drone:1.0.0-rc.1

Any other ideas? Thanks in advance!

A few things

This environment variable is no longer valid. See DRONE_USER_CREATE if you want to create an initial administrative account in Drone.

docker run 
  –volume=/var/run/docker.sock:/var/run/docker.sock 
  –volume=/var/lib/drone:/data 
- –env=DRONE_ADMIN=zac,zacsarion 

Also just to clarify, you need to have admin access to the repository in GitLab. Being a Drone admin will not make a difference. When you try to activate the repository, Drone uses your GitLab oauth token to create a webhook, and that oauth token needs to have admin access to the repository to perform this action.

Hi @bradrydzewski! Thanks for your reply! Actually my account (using the same account name in Drone) is also admin on our private Gitlab server. I removed the - –env=DRONE_ADMIN entry from my docker run command and re-created my docker image but I’m still getting the same issue.
I’m also trying to find any logs in Gitlab or the drone instance but I am not getting any pertinent information. Not sure if I’m looking at the correct messages though…
I’m just running docker logs on the container…

{“level”:“info”,“msg”:“main: starting the local build runner”,“threads”:2,“time”:“2018-12-06T19:20:48Z”}
{“acme”:false,“host”:“10.200.20.160”,“level”:“info”,“msg”:“main: starting the http server”,“port”:":80",“proto”:“http”,“time”:“2018-12-06T19:20:48Z”,“url”:“http://10.200.20.160”}
{“interval”:1800000000000,“level”:“info”,“msg”:“main: cron schedule disabled”,“time”:“2018-12-06T19:20:48Z”}

You can enable debug logging with the DRONE_LOGS_* environment variables. That might provide you with more details. I can confirm that I am able to activate private GitLab repositories (using gitlab.com)

Hi @bradrydzewski!

Thanks! I tried setting up drone and have it point to a private repo on https://gitlab.com and that works fine as well! Have you had any success setting drone up to sync with a private gitlab server? I have my drone setup using a private gitlab server in AWS behind a load balancer. The oauth works oK with the server and I can see all my repos, but I’m still getting an error when trying to enable any of my repos…

Here’s a log of the possible issue:
The first part shows login successful
{
“fields.time”: “2018-12-10T10:51:51Z”,
“latency”: 16438,
“level”: “debug”,
“method”: “GET”,
“msg”: “”,
“remote”: “10.200.1.237:27246”,
“request”: “/”,
“request-id”: “1E9ySo0VzqFwG9Wgk9Q7MZSqFF2”,
“time”: “2018-12-10T10:51:51Z”
}
{
“level”: “debug”,
“login”: “zacsarion”,
“msg”: “attempting authentication”,
“time”: “2018-12-10T10:51:53Z”
}
{
“level”: “debug”,
“login”: “zacsarion”,
“msg”: “authentication successful”,
“time”: “2018-12-10T10:51:53Z”
}

But when I go to activate my repo drone-test:
{
“fields.time”: “2018-12-10T10:52:04Z”,
“latency”: 799431,
“level”: “debug”,
“method”: “GET”,
“msg”: “”,
“remote”: “10.200.0.47:23106”,
“request”: “/api/repos/zacsarion/drone-test/secrets”,
“request-id”: “1E9yUOUuixTP7uUheMLSWhSjbik”,
“time”: “2018-12-10T10:52:04Z”
}
{
“admin”: true,
“level”: “debug”,
“msg”: “api: access granted”,
“name”: “drone-test”,
“namespace”: “zacsarion”,
“read”: true,
“request-id”: “1E9yUPnHLvwdC4WtBtCCFk25khe”,
“time”: “2018-12-10T10:52:04Z”,
“user.login”: “zacsarion”,
“visibility”: “private”,
“write”: true
}
{
“admin”: true,
“level”: “debug”,
“msg”: “api: access granted”,
“name”: “drone-test”,
“namespace”: “zacsarion”,
“read”: true,
“request-id”: “1E9yUPnHLvwdC4WtBtCCFk25khe”,
“time”: “2018-12-10T10:52:04Z”,
“user.login”: “zacsarion”,
“visibility”: “private”,
“write”: true
}
{
“fields.time”: “2018-12-10T10:52:04Z”,
“latency”: 663184,
“level”: “debug”,
“method”: “GET”,
“msg”: “”,
“remote”: “10.200.0.47:23106”,
“request”: “/api/repos/zacsarion/drone-test/cron”,
“request-id”: “1E9yUPnHLvwdC4WtBtCCFk25khe”,
“time”: “2018-12-10T10:52:04Z”
}
{
“admin”: true,
“level”: “debug”,
“msg”: “api: access granted”,
“name”: “drone-test”,
“namespace”: “zacsarion”,
“read”: true,
“request-id”: “1E9yVEh3OAJdZWGUHwKgT9LaRhr”,
“time”: “2018-12-10T10:52:10Z”,
“user.login”: “zacsarion”,
“visibility”: “private”,
“write”: true
}
{
“admin”: true,
“level”: “debug”,
“msg”: “api: access granted”,
“name”: “drone-test”,
“namespace”: “zacsarion”,
“read”: true,
“request-id”: “1E9yVEh3OAJdZWGUHwKgT9LaRhr”,
“time”: “2018-12-10T10:52:10Z”,
“user.login”: “zacsarion”,
“visibility”: “private”,
“write”: true
}
{
“error”: “”,
“level”: “debug”,
“msg”: “api: cannot create or update hook”,
“name”: “drone-test”,
“namespace”: “zacsarion”,
“request-id”: “1E9yVEh3OAJdZWGUHwKgT9LaRhr”,
“time”: “2018-12-10T10:52:10Z”,
“user.login”: “zacsarion”
}
{
“fields.time”: “2018-12-10T10:52:10Z”,
“latency”: 53430755,
“level”: “debug”,
“method”: “POST”,
“msg”: “”,
“remote”: “10.200.0.47:23106”,
“request”: “/api/repos/zacsarion/drone-test”,
“request-id”: “1E9yVEh3OAJdZWGUHwKgT9LaRhr”,
“time”: “2018-12-10T10:52:10Z”
}

I have not personally, but we do have a number of teams using Drone with private Gitlab installations and they have not reported any issues.

These are the possible reasons creating a webhook would fail. I know you already ruled out the first, but wanted to provide all options in case anyone else comes across this thread :slight_smile:

  1. you do not have admin access to the repository in GitLab
  2. you may not be able to create a webhook if your Drone address is localhost (127.0.0.1, etc) or unreachable from your gitlab instance
  3. you gave Drone an http address to GitLab and the loadbalancer or server is auto-redirecting from http to https. GET requests will redirect without issue, but POST requests will redirect as a GET request with no body, which would cause an error.

Ok, I had the exact same problem, and it was neither of the 3 reasons, so for posterity, I’m posting here what the problem was (and in my understanding, a nasty limitation)

Gitlab allows us to create subgroups in order to organize our repos. To my knowledge, it is the only source versioning tool that offers this feature.

The repo I was trying to activate was in the third level (gitlab.com/xxxx/yyyy/zzzz/myrepo) and so Drone.io couldn’t locate .drone.yml file. When I transfered my repo to subgroup ‘xxxx’ it worked.

But we had chosen to house our repo in the third level for a reason, and not being able to keep it there is a almost a deal-breaker for us.

I’m hoping the devs will be able to find a fix for this.

There are no plans to support GitLab subgroups at this time (issue #2009). This means Drone is not suitable for organizations that heavily use subgroups. You may consider using native GitLab CI or Jenkins as an alternative.

Hi, I hope someon can help me to get past the “api: cannot create or update hook” error.
I’m working with a private gitlab (sameersbn/gitlab:11.10.4) and drone/drone:1.0.0-rc.1

1. you do not have admin access to the repository in GitLab
The logs indicate that I do have admin, and it is in the activate repo step that this error occurs.
2. you may not be able to create a webhook if your Drone address is localhost (127.0.0.1, etc) or unreachable from your gitlab instance
I have the drone-server running on 0.0.0.0:8081 which should be reachable from any process on the docker host, right? I attached the droneserver container to the same docker network that the private gitlab container is on. That resolved the error “api cannot create or update hook” message in the logs. Now I see " There was a problem enabling your repository. " in the ui, but no debug messages. It appears that the gitlab container is POST’ing to the droneserver network:

{
  "fields.time": "2019-05-19T18:15:31Z",
  "latency": 10844,
  "level": "debug",
  "method": "POST",
  "msg": "",
  "remote": "172.25.0.1:54936",
  "request": "/rpc/v1/request",
  "request-id": "1LSmAjiQps0Kyi2ZgV6M26z4Tei",
  "time": "2019-05-19T18:15:31Z"
} 

The droneserver container is on “IPv4Address”: “172.25.0.2/16”,

3. you gave Drone an http address to GitLab and the loadbalancer or server is auto-redirecting from http to https. GET requests will redirect without issue, but POST requests will redirect as a GET request with no body, which would cause an error.

Not sure how to resolve this scenario, because I’m not using a load balancer or a reverse proxy yet.

this is a very old version of Drone. You should upgrade to a stable release (1.1) since we do not provide technical support for deprecated release candidates.

having admin access in Drone does not guarantee the ability to activate a repository. What matters is having admin access in GitLab, so that your oauth2 token has the necessary permissions to create webhooks

we cannot advise without seeing the actual configuration.

Here’s my docker compose. Two days ago it was fetching the repos, and it would fail to activate because of permissions. Unfortunately now it doesn’t get past the oauth step.

version: '2'

services:
  drone-server:
    image: drone/drone:1.1
    ports:
      - 8081:80
      - 8443:443
    volumes:
      - ./:/data
      - /var/run/docker.sock:/var/run/docker.sock
    restart: always
    container_name: dronepci
    networks:
      - default
    environment:
      - DRONE_SERVER_HOST={{DRONE_SERVER_HOST}}
      - DRONE_SERVER_PROTO=http
      - DRONE_TLS_AUTOCERT=false
      - DRONE_RPC_SECRET={{DRONE_RPC_SECRET}}
      - DRONE_RUNNER_CAPACITY=2
      - DRONE_LOGS_DEBUG={{DRONE_LOGS_DEBUG}}
      - DRONE_LOGS_PRETTY=false
      - DRONE_LOGS_COLOR=true
      - DRONE_USER_CREATE={{DRONE_USER_CREATE}}
      - DRONE_GITLAB_SERVER={{DRONE_GITLAB_SERVER}}
      - DRONE_GITLAB_CLIENT_ID={{DRONE_GITLAB_CLIENT_ID}} 
      - DRONE_GITLAB_CLIENT_SECRET={{DRONE_GITLAB_CLIENT_SECRET}}
      - DRONE_GITLAB_DEBUG={{DRONE_GITLAB_DEBUG}}
      - DRONE_GITLAB_SKIP_VERIFY={{DRONE_GITLAB_SKIP_VERIFY}}
      - VIRTUAL_HOST={{VIRTUAL_HOST}}
      - VIRTUAL_PORT=8081
networks:
  default:
    driver: bridge
{"fields.time":"2019-05-21T19:00:12Z","latency":37946440,"level":"debug","method":"GET","msg":"","remote":"72.166.65.26:50182","request":"/js/chunk-vendors.f5840117.js","request-id":"1LYVqyX7gartxZkXXwXVmToTKKx","time":"2019-05-21T19:00:12Z"}
{"level":"debug","msg":"api: authentication required","request-id":"1LYVr3vy1aabNWIOQcHAyBEdMNO","time":"2019-05-21T19:00:12Z"}
{"level":"debug","msg":"api: guest access","request-id":"1LYVr3vy1aabNWIOQcHAyBEdMNO","time":"2019-05-21T19:00:12Z"}

can you be more descriptive? From my perspective, this could mean many different things.

the most common root cause for oauth2 issues is when your DRONE_SERVER_HOST and DRONE_SERVER_PROTO do not match your Gitlab oauth application redirect address. But without a better description of what you are seeing, and with most of your settings masked, this is just speculation.

Brad, thank you again for your reply.
To me, it appears that the DRONE_SERVER_HOST and DRONE_SERVER_PROTO do match your Gitlab oauth application.

In this configuration, I had gitlab with the user “root”. Root has a group, “pci”. In the pci group, there are two repos pci/drone-artifactory and pic/hello-world, both owned by root, both. The scope of the oAuth application is in the admin area with the callback url http://ec2-my-pub-ip.compute-1.amazonaws.com:8081/login
The oAuth scope is set to include all permissions (I tried many combinations of ‘trusted’ and not ‘trusted’, with api, read_user, sudo, read_repository, openid, profile, and email). I tried setting the oAuth application on the user profile for root as well. Same.

Do you think that drone/drone:1.1 should work with sameersbn/gitlab:11.10.4? Is this a gitlab v3 api issue?

version: '2'

services:
  drone-server:
    image: drone/drone:1.1
    ports:
      - 8081:80
      - 8443:443
    volumes:
      - ./:/data
      - /var/run/docker.sock:/var/run/docker.sock
    restart: always
    container_name: dronepci
    networks:
      - default
    environment:
      - DRONE_SERVER_HOST=ec2-my-pub-ip.compute-1.amazonaws.com:8081
      - DRONE_SERVER_PROTO=http
      - DRONE_TLS_AUTOCERT=false
      - DRONE_RPC_SECRET=ea2de1c9b1d6fcb051a60d1643f5f33d
      - DRONE_RUNNER_CAPACITY=2
      - DRONE_LOGS_DEBUG=true
      - DRONE_LOGS_PRETTY=false
      - DRONE_LOGS_COLOR=true
      - DRONE_USER_CREATE=username:root,machine:false,admin:true,token:ox96zRCcCUgVxzMVt_Fe
      - DRONE_GITLAB_SERVER=ec2-my-pub-ip.compute-1.amazonaws.com:10080
      - DRONE_GITLAB_CLIENT_ID=f44607a8d4048eb36981cfa9b6090528ac0bfeecf026403bbf90f851fece9294 
      - DRONE_GITLAB_CLIENT_SECRET=0dcb3fcdae6ce43064a8089fff055567deb0cafe2502d0332dffe28a672f534f
      - DRONE_GITLAB_DEBUG=true
      - DRONE_GITLAB_SKIP_VERIFY=false
      - VIRTUAL_HOST=wfpci.com
      - VIRTUAL_PORT=8081
networks:
  default:
    driver: bridge

I am not familiar with this particular image, however, I can confirm that Drone uses the v4 GitLab API and will not work with the v3 API. We have been testing Drone 1.x with all major versions of GitLab since 11.0 was released about a year ago.

I would also point out that repository activation has logging in place for all failure scenarios [1]. Have you checked your server logs, with debug logging enabled?

[1] https://github.com/drone/drone/blob/master/handler/api/repos/enable.go

Hi Brad,
It was good to speak with you today. In my latest attempt(s), my configuration no longer is getting past the oAuth steps:

docker logs dronepci
{"client":"f44607a8d4048eb36981cfa9b6090528ac0bfeecf026403bbf90f851fece9294","level":"debug","msg":"main: creating the GitLab client","server":"{{redacted}}.compute-1.amazonaws.com:10080","skip_verify":false,"time":"2019-05-23T18:59:14Z"}
{"level":"info","msg":"main: internal scheduler enabled","time":"2019-05-23T18:59:14Z"}
{"build.limit":15000,"expires":"0001-01-01T00:00:00Z","kind":"trial","level":"debug","msg":"main: license loaded","repo.limit":0,"time":"2019-05-23T18:59:14Z","user.limit":0}
{"admin":true,"level":"debug","login":"root","machine":false,"msg":"bootstrap: create account","time":"2019-05-23T18:59:14Z","token":"ox96zRCcCUgVxzMVt_Fe"}
{"admin":true,"level":"info","login":"root","machine":false,"msg":"bootstrap: account created","time":"2019-05-23T18:59:14Z","token":"ox96zRCcCUgVxzMVt_Fe"}
{"level":"info","msg":"main: starting the local build runner","threads":2,"time":"2019-05-23T18:59:14Z"}
{"acme":false,"host":"{{redacted}}.compute-1.amazonaws.com:8081","level":"info","msg":"starting the http server","port":":80","proto":"http","time":"2019-05-23T18:59:14Z","url":"http://{{redacted}}.compute-1.amazonaws.com:8081"}
{"arch":"amd64","level":"debug","machine":"4a360f119e16","msg":"runner: polling queue","os":"linux","time":"2019-05-23T18:59:14Z"}
{"arch":"amd64","kernel":"","level":"debug","msg":"manager: request queue item","os":"linux","time":"2019-05-23T18:59:14Z","variant":""}
{"interval":"30m0s","level":"info","msg":"starting the cron scheduler","time":"2019-05-23T18:59:14Z"}
{"arch":"amd64","level":"debug","machine":"4a360f119e16","msg":"runner: polling queue","os":"linux","time":"2019-05-23T18:59:14Z"}
{"arch":"amd64","kernel":"","level":"debug","msg":"manager: request queue item","os":"linux","time":"2019-05-23T18:59:14Z","variant":""}
{"fields.time":"2019-05-23T19:00:05Z","latency":166032,"level":"debug","method":"GET","msg":"","remote":"72.166.65.26:55583","request":"/","request-id":"1LeA5SEQu3vQyZmBQLYOGeP4dP4","time":"2019-05-23T19:00:05Z"}
{"fields.time":"2019-05-23T19:00:05Z","latency":10447173,"level":"debug","method":"GET","msg":"","remote":"72.166.65.26:55583","request":"/js/chunk-vendors.f5840117.js","request-id":"1LeA5TfDDeAUlrMDm89bUGzr1GV","time":"2019-05-23T19:00:05Z"}
{"level":"debug","msg":"api: authentication required","request-id":"1LeA5RmSKNsUz6Dn8YItzsMW1p8","time":"2019-05-23T19:00:05Z"}
{"level":"debug","msg":"api: guest access","request-id":"1LeA5RmSKNsUz6Dn8YItzsMW1p8","time":"2019-05-23T19:00:05Z"}
{"fields.time":"2019-05-23T19:00:05Z","latency":140729,"level":"debug","method":"GET","msg":"","remote":"72.166.65.26:55586","request":"/api/user","request-id":"1LeA5RmSKNsUz6Dn8YItzsMW1p8","time":"2019-05-23T19:00:05Z"}
{"fields.time":"2019-05-23T19:00:05Z","latency":57434,"level":"debug","method":"GET","msg":"","remote":"72.166.65.26:55586","request":"/login","request-id":"1LeA5PR3kggVe902X7Zr9T8Uvi4","time":"2019-05-23T19:00:05Z"}
{"level":"debug","msg":"events: stream opened","request-id":"1LeA5SpZnwKItghhp6iU3JhHSkc","time":"2019-05-23T19:00:05Z"}

I am now getting “api: authentication required” and “api: guest access”

In my recent debugging steps to determine the permission issues on the repos in the gitlab server I created an oAuth application for drone at the gitlab server level signed in as root, I created an oAuth application for the root user, and as a separate user login with admin privileges to all of the repositories in GitLab. Unfortunately for me, it appears that my drone server cannot get past the initial oAuth dialog.

Good day.

Don’t want to create separate ticket but I’m also having issues deploying basic server against self hosted gitlab with private repositories.
Here is my docker config:

docker run \
  --volume=/var/run/docker.sock:/var/run/docker.sock \
  --volume=/var/lib/drone:/data \
  --env=DRONE_GIT_ALWAYS_AUTH=false \
  --env=DRONE_GITLAB_SERVER=https://git.mesouug.com \
  --env=DRONE_GITLAB_CLIENT_ID=af3801e69692a804811 \
  --env=DRONE_GITLAB_CLIENT_SECRET=8057520b59c736d \
  --env=DRONE_RUNNER_CAPACITY=2 \
  --env=DRONE_SERVER_HOST=drone.local \
  --env=DRONE_SERVER_PROTO=http \
  --env=DRONE_TLS_AUTOCERT=false \
  --env=DRONE_LOGS_COLOR=true \
  --env=DRONE_LOGS_DEBUG=true \
  --env=DRONE_LOGS_PRETTY=true \
  --publish=80:80 \
  --publish=443:443 \
  --restart=always \
  --detach=true \
  --name=drone \
  drone/drone:1


OAUTH part works good but I’m constantly getting error: 404: Record not found
I’ve tried multiple various configurations (started with kubernetes helm chart and ended basic docker on localhost) but always getting this error when trying to activate private repo.

==> /var/log/gitlab/gitlab-rails/production_json.log <==
{"method":"GET","path":"/-/metrics","format":"html","controller":"MetricsController","action":"index","status":200,"duration":5.96,"view":0.7,"db":0.0,"time":"2019-05-23T19:50:53.685Z","params":[],"remote_ip":null,"user_id":null,"username":null,"ua":null,"queue_duration":null,"correlation_id":"a5333fdd-32b6-4324-87e0-cc30d12c1e4b"}

==> /var/log/gitlab/gitlab-rails/production.log <==
Started GET "/-/metrics" for 127.0.0.1 at 2019-05-23 22:50:53 +0300
Processing by MetricsController#index as HTML
Completed 200 OK in 2ms (Views: 0.7ms | ActiveRecord: 0.0ms)

==> /var/log/gitlab/gitlab-rails/api_json.log <==
{"time":"2019-05-23T19:51:00.412Z","severity":"INFO","duration":0.74,"db":0,"view":0.74,"status":404,"method":"GET","path":"/api/v4/projects/mshevtsov/hello_hapi","params":[],"host":"git.mesouug.com","ip":"37.112.232.235, 192.168.1.211, 37.112.232.235","ua":"Go-http-client/1.1","route":"/api/:version/*path","queue_duration":11.49,"gitaly_calls":0,"gitaly_duration":0,"correlation_id":"dMHHmMS2Wz4"}
{"time":"2019-05-23T19:51:00.415Z","severity":"INFO","duration":0.69,"db":0,"view":0.69,"status":404,"method":"GET","path":"/api/v4/projects/mshevtsov/hello_hapi","params":[],"host":"git.mesouug.com","ip":"37.112.232.235, 192.168.1.211, 37.112.232.235","ua":"Go-http-client/1.1","route":"/api/:version/*path","queue_duration":10.45,"gitaly_calls":0,"gitaly_duration":0,"correlation_id":"WfqtuoOQ354"}
{"time":"2019-05-23T19:51:00.433Z","severity":"INFO","duration":0.68,"db":0,"view":0.68,"status":404,"method":"GET","path":"/api/v4/projects/mshevtsov/hello_hapi","params":[],"host":"git.mesouug.com","ip":"37.112.232.235, 192.168.1.211, 37.112.232.235","ua":"Go-http-client/1.1","route":"/api/:version/*path","queue_duration":4.88,"gitaly_calls":0,"gitaly_duration":0,"correlation_id":"8lMzgiLW4p3"}

==> /var/log/gitlab/gitlab-rails/production.log <==
Started GET "/api/v4/projects/mshevtsov/hello_hapi" for 37.112.232.235 at 2019-05-23 22:51:00 +0300
Started GET "/api/v4/projects/mshevtsov/hello_hapi" for 37.112.232.235 at 2019-05-23 22:51:00 +0300
Started GET "/api/v4/projects/mshevtsov/hello_hapi" for 37.112.232.235 at 2019-05-23 22:51:00 +0300

==> /var/log/gitlab/gitlab-rails/sidekiq_exporter.log <==
[2019-05-23 22:51:00] 127.0.0.1 - - [23/May/2019:22:51:00 MSK] "GET /metrics HTTP/1.1" 200 25 "-" "Prometheus/1.8.2"

==> /var/log/gitlab/nginx/gitlab_access.log <==
192.168.1.211 - - [23/May/2019:22:51:00 +0300] "GET /api/v4/projects/mshevtsov/hello_hapi HTTP/1.0" 404 25 "" "Go-http-client/1.1"
192.168.1.211 - - [23/May/2019:22:51:00 +0300] "GET /api/v4/projects/mshevtsov/hello_hapi HTTP/1.0" 404 25 "" "Go-http-client/1.1"
192.168.1.211 - - [23/May/2019:22:51:00 +0300] "GET /api/v4/projects/mshevtsov/hello_hapi HTTP/1.0" 404 25 "" "Go-http-client/1.1"

Any hint will be appreciated.

Thanks,
Mikhail.

but I’m constantly getting error: 404: Record not found

@mesouug the corresponding Drone server logs would be required to assist further. Also can you clarify steps to reproduce the above error message? This is a very generic error, and I need help narrowing this down to advise further. Specifically, what isn’t working that should be that is causing this error? Accessing a repository? Activating a repository? etc

Activating any repository gives this error. Drone logs shows this error message: "api: cannot sync repository permissions" https://github.com/drone/drone/blob/master/handler/api/acl/repo.go#L115

@mesouug can you please provide the full log entry? This includes metadata that is vital to debugging. Also can you confirm you have administrative access to the repository in GitLab?