mongosh hangs with simple eval commands

XMLWordPrintableJSON

    • Not Needed

      I try to run some scripts via job using --eval option but the shell hangs forever. Even "Ctrl+C" does not work, I have to terminate my terminal window:

       

      $ mongosh --version
      1.3.1
      
      $ mongosh --norc --quiet 'mongodb://localhost:27017'
      [direct: mongos] test> db.getMongo()
      mongodb://localhost:27017/?directConnection=true&serverSelectionTimeoutMS=2000&appName=mongosh+1.3.1
      [direct: mongos] test> exit
      
      $ mongosh --norc --quiet 'mongodb://localhost:27017' --eval 'db.getMongo()'
      mongodb://localhost:27017/?directConnection=true&serverSelectionTimeoutMS=2000&appName=mongosh+1.3.1
      ... terminal hangs
      
      

       

       Is there any solution for it?

      Kind Regards
      Wernfried

              Assignee:
              Unassigned
              Reporter:
              Wernfried Domscheit
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: