Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-32473

Error loading history file on first shell usage

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor - P4
    • Resolution: Fixed
    • Affects Version/s: 3.6.0
    • Fix Version/s: 3.6.3, 3.7.1
    • Component/s: Shell
    • Labels:
      None
    • Backwards Compatibility:
      Minor Change
    • Operating System:
      ALL
    • Backport Requested:
      v3.6
    • Sprint:
      Sharding 2018-01-15

      Description

      When using mongo shell for the first time the message:

      "[main] Error loading history file: FileOpenFailed: Unable to fopen() file /home/ubuntu/.dbshell: No such file or directory" is visible.
      

      Most probably that should not be displayed since it seems that everything is fine, the file is not there before starting but it is created after the session. The message is misleading and the user might think that something is wrong with his environment.

      I think this links to SERVER-26871

      Here's how it looks:

      ```ubuntu@t-ubuntu1604-64:~$ mongo
      MongoDB shell version v3.6.1
      connecting to: mongodb://127.0.0.1:27017
      MongoDB server version: 3.6.1
      Welcome to the MongoDB shell.
      For interactive help, type "help".
      For more comprehensive documentation, see
              http://docs.mongodb.org/
      Questions? Try the support group
              http://groups.google.com/group/mongodb-user
      Server has startup warnings:
      2017-12-28T15:29:37.461+0000 I STORAGE  [initandlisten]
      2017-12-28T15:29:37.461+0000 I STORAGE  [initandlisten] ** WARNING: Using the XFS filesystem is strongly recommended with the WiredTiger storage engine
      2017-12-28T15:29:37.461+0000 I STORAGE  [initandlisten] **          See http://dochub.mongodb.org/core/prodnotes-filesystem
      2017-12-28T15:29:37.471+0000 I CONTROL  [initandlisten]
      2017-12-28T15:29:37.471+0000 I CONTROL  [initandlisten] ** WARNING: Access control is not enabled for the database.
      2017-12-28T15:29:37.471+0000 I CONTROL  [initandlisten] **          Read and write access to data and configuration is unrestricted.
      2017-12-28T15:29:37.471+0000 I CONTROL  [initandlisten]
      2017-12-28T15:29:37.471+0000 I CONTROL  [initandlisten]
      2017-12-28T15:29:37.471+0000 I CONTROL  [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/enabled is 'always'.
      2017-12-28T15:29:37.471+0000 I CONTROL  [initandlisten] **        We suggest setting it to 'never'
      2017-12-28T15:29:37.471+0000 I CONTROL  [initandlisten]
      2017-12-28T15:29:37.471+0000 I CONTROL  [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/defrag is 'always'.
      2017-12-28T15:29:37.471+0000 I CONTROL  [initandlisten] **        We suggest setting it to 'never'
      2017-12-28T15:29:37.471+0000 I CONTROL  [initandlisten]
      2017-12-28T15:29:48.677+0000 E -        [main] Error loading history file: FileOpenFailed: Unable to fopen() file /home/ubuntu/.dbshell: No such file or directory```
      

      File is there after first session:

      ```ubuntu@t-ubuntu1604-64:~$ ls -alh|grep db
      -rw------- 1 ubuntu ubuntu    0 Dec 28 15:30 .dbshell```
      

      Shell re-run:

      ```ubuntu@t-ubuntu1604-64:~$ mongo
      MongoDB shell version v3.6.1
      connecting to: mongodb://127.0.0.1:27017
      MongoDB server version: 3.6.1
      Server has startup warnings:
      2017-12-28T15:29:37.461+0000 I STORAGE  [initandlisten]
      2017-12-28T15:29:37.461+0000 I STORAGE  [initandlisten] ** WARNING: Using the XFS filesystem is strongly recommended with the WiredTiger storage engine
      2017-12-28T15:29:37.461+0000 I STORAGE  [initandlisten] **          See http://dochub.mongodb.org/core/prodnotes-filesystem
      2017-12-28T15:29:37.471+0000 I CONTROL  [initandlisten]
      2017-12-28T15:29:37.471+0000 I CONTROL  [initandlisten] ** WARNING: Access control is not enabled for the database.
      2017-12-28T15:29:37.471+0000 I CONTROL  [initandlisten] **          Read and write access to data and configuration is unrestricted.
      2017-12-28T15:29:37.471+0000 I CONTROL  [initandlisten]
      2017-12-28T15:29:37.471+0000 I CONTROL  [initandlisten]
      2017-12-28T15:29:37.471+0000 I CONTROL  [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/enabled is 'always'.
      2017-12-28T15:29:37.471+0000 I CONTROL  [initandlisten] **        We suggest setting it to 'never'
      2017-12-28T15:29:37.471+0000 I CONTROL  [initandlisten]
      2017-12-28T15:29:37.471+0000 I CONTROL  [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/defrag is 'always'.
      2017-12-28T15:29:37.471+0000 I CONTROL  [initandlisten] **        We suggest setting it to 'never'
      2017-12-28T15:29:37.471+0000 I CONTROL  [initandlisten]```
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              kevin.pulo Kevin Pulo
              Reporter:
              tplavcic Tomislav Plavcic
              Participants:
              Votes:
              1 Vote for this issue
              Watchers:
              9 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: