Uploaded image for project: 'MongoDB Shell'
  1. MongoDB Shell
  2. MONGOSH-1184

mongosh hangs with simple eval commands

    • 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 Unassigned
            Reporter:
            wernfried.domscheit@sunrise.net Wernfried Domscheit
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: