Gitlab docker when added load balancer Jenkinsfile and jenkins named files are not seen in GUI

Sushmitha p kumar

Feb 21, 02:47 EST

I have hosted Gitlab docker container on a aws instance ubuntu with the following command
sudo docker run --restart=always -d -p 4567:4567 -p 8081:80 --network=docker-platform_docker-platform-network --name gitlab private-registry/gitlab:v1.0.Once the gitlab container is up ,environment variables which are enabled are external_url ‘http://###ELB###/gitlab/’
gitlab_rails[‘lfs_enabled’] = true
gitlab_rails[‘ldap_enabled’] = true
registry_nginx[‘enable’] = true
gitlab_rails[‘registry_path’] = “/mnt/docker_registry”
registry[‘enable’] = true
registry_external_url ‘http://localhost:4567
nginx[‘listen_port’] = 8081

LDAP Configuration

gitlab_rails[‘ldap_enabled’] = true
gitlab_rails[‘ldap_servers’] = YAML.load <<-‘EOS’
main:
label: ‘LDAP’
host: ‘ldap’
port: 389
uid: ‘uid’
method: ‘plain’
bind_dn: ‘cn=admin,dc=ldap,dc=example,dc=com’
password: ###LDAP_PASSWORD###
active_directory: true
allow_username_or_email_login: false
block_auto_created_users: false
base: ‘ou=people,dc=ldap,dc=example,dc=com’
signin_enabled: false
EOS
Now the ELB is created and attached to the private instance with HTTP 80 port added as listeners.Created a gitlab project using curl -k -H “Content-Type:application/json” http://private-ip of the instance:8081/gitlab/api/v4/projects?private_token=$auth-token -d “{ “name”: “new”, “visibility”: “public”}” or logged in using root admin and created a project added a project with many different extensions files but file with name Jenkins (Jenkinsfile ,jenkins.groovy or any jenkins named related files) gives http 404 jetty NOT FOUND error. Have attached two images gitlab-jenkins.png is the the one with http 4044 error not found when clicked on Jenkinsfile,second one is the gitlab-create-project-json.png having parameters enabled when creating a project in gitlab using CUrl APIs.
Although, I’m able to see jenkinsfile without the loadbalancer but with LB it gives 404 error NOT FOUND.when cloned the project with LB able to view the contents of Jenkinsfile able to push it unable to view it in GUI.

There might be some dependency from jenkins as I bring down Jenkins container ,when clicked on jenkinfile in gitlab gives 502 error .when Jenkins is up it says file not found.nginx logs says “no route to host connecting upstream client gitlab”