0

did somebody encounter this issue? I am running jenkins job executing one batch file...this batch file has a set of commands:

  1. start mongod.exe (I've got localhost db set up on the node)
  2. do some command to run .js updating database, e.g. "mongo C:/xxx.js" Now when I run this batch file manually on my PC/on my Jenkins node manually, everything's working fine. However once trying to run it through Jenkins, it acts like starting of mongod passed, and then when calling mongo C:/xxx.js, I'm getting
 'mongo' is not recognized as an internal or external command,
    operable program or batch file. 

EDIT: I have mongod on my PATH env variable..

I even added timeout for few seconds between mongod start and mongo command, however it did not help. I tried to investigate closely -> I've run Jenkins job, and then, while timeout was being processed, I tried to access localhost db on node - worked fine for few seconds, then it was not accessible - mongod has stopped.

VladoH
  • 27
  • 4
  • 2
    I suggest you have a [look here](https://stackoverflow.com/questions/48321639/is-not-recognized-as-an-internal-or-external-command-operable-program-or-bat) – Gerhard Oct 14 '20 at 12:53
  • I still doubt that your path is correct, after your edit. I suggest you prove it is by using the `where` command? – Gerhard Oct 14 '20 at 13:46

0 Answers0