Mongodb with Gitlab CI

I am facing issue connecting mongodb with gitlab ci.
its shows :
5:29:49 AM - info: mongo connection opened.

After mongo connection get open, it does nothing and cant even access my link.

My configuration is as follows :
Server1 : mongodb
server2 : gitlab-ci-multi-runner

Nobody here can guess what your server.js code does and why it does not complete. You will have to add some logging to your code. Or adjust your expectations. What did you expect the command you ran to do? Did you expect it to run forever until terminated? If so, why are you running such a command from your gitlab CI? Doesn’t that seem silly to do? Did you instead mean to run it, and leave it detached, and then continue to your second command, and then later (after some integration tests maybe), shut it down?

This has nothing to do with GitlabCI, it just starts your command (in this case node ./server.js …). If you can’t figure out why your command fails, add more logging inside server.js.

It looks to me like Gitlab is terminating your command after it ran for an hour without completing. 3600 seconds is 60 minutes, or one hour. Why is your task sitting there and doing nothing for an hour? If this was me, I would be running something like this:

node ./server.js --logdevel=debug --integrationtestmode

And I would write my server so it did some self tests, and then shut down.

If I what I really wanted to was to deploy server to some machine and run it there, I wouldn’t be running it as a direct command from gitlab. Instead, I’d be learning how to deploy my node server to a staging system. Gitlab CI command contexts is not your staging server context.