Category: errors

  • Docker pull error: Invalid registry endpoint https on Centos 7.1

    Error: docker pull does not work on insecure connection by default

    Solution for Centos 7: Add –insecure-registry option

    1. Edit /lib/systemd/system/docker.service:

    [Unit]
    Description=Docker Application Container Engine
    Documentation=https://docs.docker.com
    After=network.target docker.socket
    Requires=docker.socket

    [Service]
    EnvironmentFile=-/etc/sysconfig/docker
    Type=notify
    ExecStart=/usr/bin/docker daemon $other_args -H fd://
    MountFlags=slave
    LimitNOFILE=1048576
    LimitNPROC=1048576
    LimitCORE=infinity

    [Install]
    WantedBy=multi-user.target

    2. Edit /etc/sysconfig/docker

    other_args=”–insecure-registry registry_ip:port

    3. Restart docker daemon:

    sudo systemctl daemon-reload
    sudo service docker restart

  • MongoDB Ops Manager java.lang.OutOfMemoryError: unable to create new native thread

    When starting MongoDB Ops Manager version 1.8.2.312, we have this error:

    Migrate MMS data
    Running migrations…[  OK  ]
    Start MMS server
    Instance 0 starting……….[  OK  ]
    Start Backup HTTP Server
    Instance 0 starting…….[FAILED]
    instance: 0  – msg: unable to create new native thread

    Solution: Increase the max number of process for user mongodb-mms:

    $ sudo vi /etc/security/limits.d/90-nproc.conf

    mongodb-mms     soft    nproc     unlimited

  • MongoDB error local.oplog.rs is not empty on the initiating member. cannot initiate

    Error when initiating replica set with some old data in local database:

    rs.initiate() 
    {
    "errmsg" : "local.oplog.rs is not empty on the initiating member. cannot initiate.",
    "ok" : 0
    }

    Solution:

    use local

    db.oplog.rs.drop()

     

     

  • MongoDB replSet error loading set config (BADCONFIG)

    Error when initiate replicaset in MongoDB:

    “errmsg” : “replSet error loading set config (BADCONFIG)”, “ok” : 0 }

    Solution:

    1. Stop mongod, delete all local.* files in DBPath, start mongod or delete database local directly in mongo shell:

    use local
    db.dropDatabase()

    2. Reconfigure replica set members:

    config = {_id: “repl1”, members:[

    {_id: 0, host: ‘192.168.2.1:27017′},

    {_id: 1, host: ‘192.168.2.2:27017’}]

    }

     

    rs.reconfig(config, {force: true})

  • MongoDB failed to start Assertion failure isOk() src/mongo/db/storage/extent.h 80

    MongoDB failed to start with this error in log file:

    2015-08-28T01:24:17.062+0000 [initandlisten] build info: Linux build5.nj1.10gen. cc 2.6.32-431.3.1.el6.x86_64 #1 SMP Fri Jan 3 21:39:27 UTC 2014 x86_64 BOOST_LIB_VERSION=1_49
    2015-08-28T01:24:17.062+0000 [initandlisten] allocator: tcmalloc
    2015-08-28T01:24:17.062+0000 [initandlisten] options: { config: “/etc/mongod.conf”, net: { port: 27017 }, processManagement: { pidFilePath: “/var/run/mongodb/mongod.pid” }, security: { authorization: “disabled” }, storage: { dbPath: “/var/lib/mongo”, journal: { enabled: false } }, systemLog: { destination: “file”, logAppend: true, path: “/var/lib/mongo/mongod.log”, quiet: true } }
    2015-08-28T01:24:17.164+0000 [initandlisten] test Assertion failure isOk() src/mongo/db/storage/extent.h 80
    2015-08-28T01:24:17.170+0000 [initandlisten] test 0x1205431 0x11a7229 0x118b53e 0xf04360 0xf436a3 0x8b779f 0xaa2ca0 0xd8237f 0x8cd367 0x76c32d 0x76e247 0x76ee7b 0x76f4b5 0x76f759 0x7f96a8516d5d 0x766329
    mongod(_ZN5mongo15printStackTraceERSo+0x21) [0x1205431]
    mongod(_ZN5mongo10logContextEPKc+0x159) [0x11a7229]
    mongod(_ZN5mongo12verifyFailedEPKcS1_j+0x17e) [0x118b53e]
    mongod(_ZNK5mongo13ExtentManager9getExtentERKNS_7DiskLocEb+0x60) [0xf04360]
    mongod(_ZN5mongo12FlatIteratorC1EPKNS_10CollectionERKNS_7DiskLocERKNS_20CollectionScanParams9DirectionE+0xd3) [0xf436a3]
    mongod(_ZNK5mongo10Collection11getIteratorERKNS_7DiskLocEbRKNS_20CollectionScanParams9DirectionE+0x9f) [0x8b779f]
    mongod(_ZN5mongo14CollectionScan4workEPm+0x350) [0xaa2ca0]
    mongod(_ZN5mongo12PlanExecutor7getNextEPNS_7BSONObjEPNS_7DiskLocE+0xef) [0xd8237f]
    mongod(_ZN5mongo8Database19clearTmpCollectionsEv+0x147) [0x8cd367]
    mongod() [0x76c32d]
    mongod(_ZN5mongo14_initAndListenEi+0x637) [0x76e247]
    mongod(_ZN5mongo13initAndListenEi+0x1b) [0x76ee7b]
    mongod() [0x76f4b5]
    mongod(main+0x9) [0x76f759]
    /lib64/libc.so.6(__libc_start_main+0xfd) [0x7f96a8516d5d]
    mongod() [0x766329]
    2015-08-28T01:24:17.172+0000 [initandlisten] exception in initAndListen: 0 assertion src/mongo/db/storage/extent.h:80, terminating

    Cause: Your DB files are corrupted. Use

    mongod –repair

    command to fix:

    mongod –repair

  • tsung: line 52: 2055 Killed $ERL $ERL_OPTS $ERL_RSH -noshell $PROTO_DIST $NAMETYPE $CONTROLLER -setcookie $COOKIE

    Tsung crashes with an ambiguous error message:

    tsung: line 52: 2055 Killed
    $ERL $ERL_OPTS $ERL_RSH -noshell $PROTO_DIST $NAMETYPE $CONTROLLER -setcookie $COOKIE \
    -s tsung_controller \
    $EXTRA_LOAD_PATHS \
    -pa $TSUNGPATH -pa $CONTROLLERPATH \
    -ssl session_cb $SSL_CACHE \
    -ssl session_lifetime $SSL_SESSION_LIFETIME \
    -sasl sasl_error_logger false \
    -tsung_controller web_gui $WEB_GUI \
    -tsung_controller smp_disable $SMP_DISABLE \
    -tsung_controller debug_level $DEBUG_LEVEL \
    -tsung_controller warm_time $WARM_TIME \
    -tsung_controller exclude_tag \”$EXCLUDE_TAG_LIST\” \
    -tsung_controller config_file \”$CONF_OPT_FILE\”
    -tsung_controller $LOG_OPT
    -tsung_controller $MON_FILE

    Cause: Likely because the machine runs out of memory
    Solution: Add more memory using swap

  • ERROR: http://rubygems.org/ does not appear to be a repository Error fetching remote data: Errno::ETIMEDOUT

    Error happens when installing gem package using proxy

    $ gem install sass
    ERROR: http://rubygems.org/ does not appear to be a repository
    Error fetching remote data: Errno::ETIMEDOUT: Connection timed out – connect(2) (http://rubygems.org/yaml)
    Falling back to local-only install
    ERROR: Could not find a valid gem ‘sass’ (>= 0) in any repository

    Solution:
    On RHEL/Centos:=, the variable http_proxy should have value started with ‘http://’

    Working:
    export http_proxy=http://192.168.1.1:3128

    Not working:
    export http_proxy=192.168.1.1:3128

    Or we can add proxy option in gem install command:
    gem install –http-proxy http://192.168.1.1:3128 sass

  • MongoDB MMS com.xgen.svc.brs.svc.DaemonAssignmentSvc: ERROR Assignment failed: No Daemon found with enough free space

    When adding new backup job to Mongo DB MMS, we can have this error
    com.xgen.svc.brs.svc.DaemonAssignmentSvc: ERROR Assignment failed: No Daemon found with enough free space

    But checking the storage, the usage is just under 20%.

    Solution: MMS requires manually configure the backup daemon when you add a new backup job to an existing one. Go to MMS Admin -> Backup -> Jobs -> Set binding, click on it and forces choosing the daemon in select list.

  • MongoDB Ops Manager Insufficient oplog size: The oplog window must be at least 3 hours over the last 24 hours for all members of replica set

    When configuring MongoDB Ops Manager (MMS), MMS backup check the oplog of last 24 hours. If there is a oplog windows does not cover minimum 3 hours, Ops Manager will not allow you to continue the backup configuration:

    Insufficient oplog size: The oplog window must be at least 3 hours over the last 24 hours for all members of replica set . Please increase the oplog

    Solution: If the current oplog size is indeed insufficient for 3 normal hours operations for your application, increase its size following this guide: http://docs.mongodb.org/v3.0/tutorial/change-oplog-size/
    If it is the case that you just set up the DB and do an intensive insert, then you don’t need to increase the oplog. Wait for another 24 hours and try the backup configuration process again (https://jira.mongodb.org/browse/MMS-2374)

  • Error: EACCES, permission denied /usr/lib/node_modules/protractor/selenium with webdriver-manager start

    $ webdriver-manager start

    fs.js:654
    return binding.mkdir(pathModule._makeLong(path),
    ^
    Error: EACCES, permission denied ‘/usr/lib/node_modules/protractor/selenium’

    Solution:
    npm global install by default use this /usr/lib/ which only allow root to execute.
    Check the permission /usr/lib/ and make sure you have ‘x’ permission for other users