Pipeline starts but fails to run

I have a self- hosted Gitlab that is running in a docker container. The version I am using is Community Edition 16.0.5.

I am having difficulty starting a pipeline.

I created a runner and registered it with my Gitlab server. I have a project that I wanted to create a CI/CD Pipeline for. I created the .gitlab-ci.yml file using the CI/CD->Editor item. The file is pretty standard for a maven build, test, and deployment. Its contents are below. The runner’s tag is “mavenrun”:

variables:
  MAVEN_OPTS: -Dmaven.repo.local=.m2/repository

image: maven:latest

stages:
    - build
    - test
    - package
    - deploy


cache:
  paths:
    - .m2/repository
    - target

build_job:
  stage: build
  tags:
    - mavenrun 

  script: 
    - echo "Maven compile started"
    - "mvn compile"


test_job:
  stage: test
  tags:
    - mavenrun 

  script: 
    - echo "Maven test started"
    - "mvn test"

package_job:
  stage: package
  tags:
    - mavenrun

  script: 
    - echo "Maven packaging started"
    - "mvn package"


Deploy_job:
  stage: deploy
  tags:
    - mavenrun 

  script: 
    - echo "Maven deploy started"


(Note that at the moment the depoy just prints out a message. I want to get the pipeline working before I put in anything to deploy my application).

In any event, when I submitted this file to be run, Gitlab displays a spinning circle with the following message:

Checking pipeline status

This appears to run perpetually. In other words, it appears to hang when checking the status.

I did try starting the pipeline manually. This seems to create the pipeline, but the pipeline will not run. Apparently, something is supposed to “trigger” the pipeline but there is no indication of what that trigger would be.

I do not know why the pipeline is not running. Apparently, when I start it manually the jobs get created but while the pipeline shows that it is “in progress”, nothing happens.

Can someone give some insight as to why this is happening? How can I get this pipeline to run properly?