Welcome to the Linux Foundation Forum!

⛔️ server did not start in time - node validate.js

mohamedbamoh Posts: 1
edited April 2022 in LFW212 Class Forum

I keep getting ⛔️ server did not start in time when running node validate.js on ch-7.
I removed node_modules and installed packages running npm i, but the same issue persists.
Code running on mac os.
Any idea? Thanks!


  • dilipagheda
    dilipagheda Posts: 20

    Yeah. I kept on getting the same issue. I'm on windows by the way.

    I looked into into validate.js and I noticed that It is trying to start the server on a random port etc and it also tries to update model.js with a random hex string to test 500 error.

    so, in order to run validate.js tests successfully, I did below

    • comment out these lines from start() function of validate.js. and define port separately on 3000

    • run validate.js once. it will fail but dont worry. depending on what you are testing, it will insert random hex string to model.js. e.g., in del function, it inserted as below

    take a note of these string - '4e7b'

    • then, at the top of validate.js, use that sting as below

    • Now, all your tests should run fine. (ofcourse if your code is correct ;-) )

  • xdxmxc
    xdxmxc Posts: 139

    make sure you don't have any zombie processes occupying the port

  • @mohamedbamoh I had the same issue with the same lab, I did increase the timeout number at line #49 of the validate script

  • xdxmxc
    xdxmxc Posts: 139

    @vredondo increasing the time out resolved the issue?

  • xdxmxc
    xdxmxc Posts: 139

    timeouts being increased for all server validation scripts


Upcoming Training