Category: errors

  • MongoDB Exceeded memory limit for $group, but didn’t allow external sort

    When running MongoDB aggregation on big collection, we have this error:

    Exceeded memory limit for $group, but didn’t allow external sort

    Solution:

    Add option:

    { allowDiskUse: true }

     db.getCollection('orders').aggregate( [ { $sort : { created : 1} } ], { allowDiskUse: true } )

  • MongoError: Path collision at activity

    MongoDB 4.4 error:

    {
      message: 'Path collision at activity',
      stack: 'MongoError: Path collision at activity\n' +
        '    at Connection.<anonymous> (/project/node_modules/mongoose/node_modules/mongodb-core/lib/connection/pool.js:443:61)\n' +
        '    at Connection.emit (events.js:315:20)\n' +
        '    at Connection.EventEmitter.emit (domain.js:483:12)\n' +
        '    at processMessage (/project/node_modules/mongoose/node_modules/mongodb-core/lib/connection/connection.js:364:10)\n' +
        '    at Socket.<anonymous> (/project/node_modules/mongoose/node_modules/mongodb-core/lib/connection/connection.js:533:15)\n' +
        '    at Socket.emit (events.js:315:20)\n' +
        '    at Socket.EventEmitter.emit (domain.js:483:12)\n' +
        '    at addChunk (_stream_readable.js:295:12)\n' +
        '    at readableAddChunk (_stream_readable.js:271:9)\n' +
        '    at Socket.Readable.push (_stream_readable.js:212:10)\n' +
        '    at TCP.onStreamRead (internal/stream_base_commons.js:186:23)',
      operationTime: Timestamp { _bsontype: 'Timestamp', low_: 2, high_: 1600849377 },
      ok: 0,
      errmsg: 'Path collision at activity',
      code: 31250,
      codeName: 'Location31250',
      '$clusterTime': {
        clusterTime: Timestamp { _bsontype: 'Timestamp', low_: 2, high_: 1600849377 },
        signature: {
          hash: Binary {
            _bsontype: 'Binary',
            sub_type: 0,
            position: 20,
            buffer: <Buffer d2 34 b7 ac bc a7 3f ea 38 d1 5c e3 26 58 39 43 d8 11 6c 83>
          },
          keyId: Long { _bsontype: 'Long', low_: 4, high_: 1596659428 }
        }
      },
      name: 'MongoError',
      level: 'info',
      timestamp: '2020-09-23 08:22:57',
      [Symbol(mongoErrorContextSymbol)]: {}
    }

    From version 4.4, MongoDB does not allow this projection of embedded document and a field of the same embedded document:

    db.inventory.find( {}, { size: 1, “size.uom”: 1 } )

    Solution:
    Update the query to have either:

    db.inventory.find( {}, { “size.uom”: 1 } )

    or

    db.inventory.find( {}, { size: 1,} )

  • aws-cdk: SyntaxError: Unexpected token ‘?’

    When running cdk synth command, this error happens:

    /usr/local/lib/node_modules/aws-cdk/lib/index.js:12322
    return process.env.CDK_HOME ? path.resolve(process.env.CDK_HOME) : path.join((os.userInfo().homedir ?? os.homedir()).trim() \|\| "/", ".cdk");
    
    SyntaxError: Unexpected token '?'
    

    aws-cdk@2.28.0
    Node version 12

    Solution: Upgrade node to version 14+

  • Error occurred (InvalidArgument) when calling the PutBucketNotificationConfiguration operation

    Error when adding AWS S3 event trigger:

    An error occurred (InvalidArgument) when calling the PutBucketNotificationConfiguration operation: Unable to validate the following destination configurations

    Solutions:

    To avoid an error, you must create resources in the following order:

    1. Make sure SNS topic exists, because the S3 bucket references the SNS topic.

    2. Make sure the S3 bucket exists, because the SNS topic policy references both the S3 bucket and the SNS topic.

    Before subscribing an SNS topic to S3 event notifications, you must specify a topic policy (AWS::SNS::TopicPolicy) with the appropriate permissions. That topic policy must exist before you create the subscription.

    { “Sid”: “Statement-id”, “Effect”: “Allow”, “Principal”: { “AWS”: “*” }, “Action”: “sns:Publish”, “Resource”: { “Ref”: “SNSTopic” }, “Condition”: { “ArnLike”: { “aws:SourceArn”: { “Fn::Join”: [ “”, [ “arn:aws:s3:::”, { “Ref”: “S3Bucket” } ] ] } } } }

    Finally check if the subscription to S3 event already exists.

     

     

  • Yum update updateinfo.xml.bz2: 2 [Errno 14] HTTP Error 404 – Not Found

    Error when doing yum update command:

    updateinfo.xml.bz2: 2 [Errno 14] HTTP Error 404 – Not Found

    Trying other mirror.
    To address this issue please refer to the below knowledge base article

    https://access.redhat.com/articles/1320623 3

    Solution:

    rm -rf /var/cache/yum

  • Godaddy Server unable to read htaccess file denying access to be safe

    When setting up a website on Godaddy hosting, we have this error:

    Forbidden

    You don’t have permission to access / on this server. Server unable to read htaccess file, denying access to be safe

    The issue is about the permission on the web folder /

    Changing it to 755 will fix the permission issue.

  • Task was canceled – ‘Default Repository’ of type com.atlassian.bamboo.plugins.vcs:task.vcs.checkout.

    Error on atlassian bamboo when proceeding checkout task:

    Task was canceled - 'Default Repository' of type com.atlassian.bamboo.plugins.vcs:task.vcs.checkout.

    Solution:

    Check if git does exist on bamboo agent

    Upgrade bamboo remote agent atlassian-bamboo-agent-installer-x.x.x.x.jar to latest version

  • docker server gave HTTP response to HTTPS client

    Add /etc/docker/daemon.json with this 192.168.1.1:5000 (registry IP and port), and restart docker

    {
    “insecure-registries”: [“192.168.1.1:5000”]
    }

  • postalias: fatal: parameter inet_interfaces: no local interface found for ::1

    When I tried to start postfix today, I got the following message:

    fatal: parameter inet_interfaces: no local interface found for ::1
    

    Solution is straightforward:

    1. open /etc/postfix/main.cf
    2. comment out inet_interfaces: all
    3. add inet_protocol: ipv4
  • configure: error: Unable to detect ICU prefix or no failed. Please verify ICU install prefix and make sure icu-config works.

    Solution:

    On RedHat/CentOS:

    # yum install libicu-devel

    On Debian/Ubuntu:

    # apt-get install libicu-dev