Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Mongo check failed: MongoDB ping failed when mage start deploy by source code. #2726

Closed
FGadvancer opened this issue Oct 16, 2024 · 1 comment
Labels
bug Categorizes issue or PR as related to a bug. deployment

Comments

@FGadvancer
Copy link
Member

OpenIM Server Version

3.8.1

Operating System and CPU Architecture

Linux (AMD)

Deployment Method

Source Code Deployment

Bug Description and Steps to Reproduce

Mongo check failed: MongoDB ping failed, URI=mongodb://openIM:openIM123@localhost:37017/openim_v3?maxPoolSize=100, Database=openim_v3, MaxPoolSize=100: connection() error occurred during connection handshake: auth error: sasl conversation error: unable to authenticate using mechanism "SCRAM-SHA-1": (AuthenticationFailed) Authentication failed.
Mongo check failed: MongoDB ping failed, URI=mongodb://openIM:openIM123@localhost:37017/openim_v3?maxPoolSize=100, Database=openim_v3, MaxPoolSize=100: connection() error occurred during connection handshake: auth error: sasl conversation error: unable to authenticate using mechanism "SCRAM-SHA-1": (AuthenticationFailed) Authentication failed.
Kafka check failed: topic not exist, topic=toMongo
Mongo check failed: MongoDB ping failed, URI=mongodb://openIM:openIM123@localhost:37017/openim_v3?maxPoolSize=100, Database=openim_v3, MaxPoolSize=100: connection() error occurred during connection handshake: auth error: sasl conversation error: unable to authenticate using mechanism "SCRAM-SHA-1": (AuthenticationFailed) Authentication failed.
Kafka check failed: topic not exist, topic=toMongo
Mongo check failed: MongoDB ping failed, URI=mongodb://openIM:openIM123@localhost:37017/openim_v3?maxPoolSize=100, Database=openim_v3, MaxPoolSize=100: connection() error occurred during connection handshake: auth error: sasl conversation error: unable to authenticate using mechanism "SCRAM-SHA-1": (AuthenticationFailed) Authentication failed.
Kafka check failed: topic not exist, topic=toMongo
Mongo check failed: MongoDB ping failed, URI=mongodb://openIM:openIM123@localhost:37017/openim_v3?maxPoolSize=100, Database=openim_v3, MaxPoolSize=100: connection() error occurred during connection handshake: auth error: sasl conversation error: unable to authenticate using mechanism "SCRAM-SHA-1": (AuthenticationFailed) Authentication failed.
Kafka check failed: topic not exist, topic=toMongo
Mongo check failed: MongoDB ping failed, URI=mongodb://openIM:openIM123@localhost:37017/openim_v3?maxPoolSize=100, Database=openim_v3, MaxPoolSize=100: connection() error occurred during connection handshake: auth error: sasl conversation error: unable to authenticate using mechanism "SCRAM-SHA-1": (AuthenticationFailed) Authentication failed.
Kafka check failed: topic not exist, topic=toMongo
Kafka check failed: topic not exist, topic=toMongo
Mongo check failed: MongoDB ping failed, URI=mongodb://openIM:openIM123@localhost:37017/openim_v3?maxPoolSize=100, Database=openim_v3, MaxPoolSize=100: connection() error occurred during connection handshake: auth error: sasl conversation error: unable to authenticate using mechanism "SCRAM-SHA-1": (AuthenticationFailed) Authentication failed.
Mongo check failed: MongoDB ping failed, URI=mongodb://openIM:openIM123@localhost:37017/openim_v3?maxPoolSize=100, Database=openim_v3, MaxPoolSize=100: connection() error occurred during connection handshake: auth error: sasl conversation error: unable to authenticate using mechanism "SCRAM-SHA-1": (AuthenticationFailed) Authentication failed.
Kafka check failed: topic not exist, topic=toMongo
Mongo check failed: MongoDB ping failed, URI=mongodb://openIM:openIM123@localhost:37017/openim_v3?maxPoolSize=100, Database=openim_v3, MaxPoolSize=100: connection() error occurred during connection handshake: auth error: sasl conversation error: unable to authenticate using mechanism "SCRAM-SHA-1": (AuthenticationFailed) Authentication failed.
Kafka check failed: topic not exist, topic=toMongo
Kafka check failed: topic not exist, topic=toMongo
Mongo check failed: MongoDB ping failed, URI=mongodb://openIM:openIM123@localhost:37017/openim_v3?maxPoolSize=100, Database=openim_v3, MaxPoolSize=100: connection() error occurred during connection handshake: auth error: sasl conversation error: unable to authenticate using mechanism "SCRAM-SHA-1": (AuthenticationFailed) Authentication failed.
Kafka check failed: topic not exist, topic=toMongo
Mongo check failed: MongoDB ping failed, URI=mongodb://openIM:openIM123@localhost:37017/openim_v3?maxPoolSize=100, Database=openim_v3, MaxPoolSize=100: connection() error occurred during connection handshake: auth error: sasl conversation error: unable to authenticate using mechanism "SCRAM-SHA-1": (AuthenticationFailed) Authentication failed.
Mongo check failed: MongoDB ping failed, URI=mongodb://openIM:openIM123@localhost:37017/openim_v3?maxPoolSize=100, Database=openim_v3, MaxPoolSize=100: connection() error occurred during connection handshake: auth error: sasl conversation error: unable to authenticate using mechanism "SCRAM-SHA-1": (AuthenticationFailed) Authentication failed.
Kafka check failed: topic not exist, topic=toMongo
Mongo check failed: MongoDB ping failed, URI=mongodb://openIM:openIM123@localhost:37017/openim_v3?maxPoolSize=100, Database=openim_v3, MaxPoolSize=100: connection() error occurred during connection handshake: auth error: sasl conversation error: unable to authenticate using mechanism "SCRAM-SHA-1": (AuthenticationFailed) Authentication failed.
Kafka check failed: topic not exist, topic=toMongo
Mongo check failed: MongoDB ping failed, URI=mongodb://openIM:openIM123@localhost:37017/openim_v3?maxPoolSize=100, Database=openim_v3, MaxPoolSize=100: connection() error occurred during connection handshake: auth error: sasl conversation error: unable to authenticate using mechanism "SCRAM-SHA-1": (AuthenticationFailed) Authentication failed.
Kafka check failed: topic not exist, topic=toMongo
Mongo check failed: MongoDB ping failed, URI=mongodb://openIM:openIM123@localhost:37017/openim_v3?maxPoolSize=100, Database=openim_v3, MaxPoolSize=100: connection() error occurred during connection handshake: auth error: sasl conversation error: unable to authenticate using mechanism "SCRAM-SHA-1": (AuthenticationFailed) Authentication failed.
Kafka check failed: topic not exist, topic=toMongo
Mongo check failed: MongoDB ping failed, URI=mongodb://openIM:openIM123@localhost:37017/openim_v3?maxPoolSize=100, Database=openim_v3, MaxPoolSize=100: connection() error occurred during connection handshake: auth error: sasl conversation error: unable to authenticate using mechanism "SCRAM-SHA-1": (AuthenticationFailed) Authentication failed.
Kafka check failed: topic not exist, topic=toMongo
Mongo check failed: MongoDB ping failed, URI=mongodb://openIM:openIM123@localhost:37017/openim_v3?maxPoolSize=100, Database=openim_v3, MaxPoolSize=100: connection() error occurred during connection handshake: auth error: sasl conversation error: unable to authenticate using mechanism "SCRAM-SHA-1": (AuthenticationFailed) Authentication failed.
Kafka check failed: topic not exist, topic=toMongo
Mongo check failed: MongoDB ping failed, URI=mongodb://openIM:openIM123@localhost:37017/openim_v3?maxPoolSize=100, Database=openim_v3, MaxPoolSize=100: connection() error occurred during connection handshake: auth error: sasl conversation error: unable to authenticate using mechanism "SCRAM-SHA-1": (AuthenticationFailed) Authentication failed.
Kafka check failed: topic not exist, topic=toMongo
Mongo check failed: MongoDB ping failed, URI=mongodb://openIM:openIM123@localhost:37017/openim_v3?maxPoolSize=100, Database=openim_v3, MaxPoolSize=100: connection() error occurred during connection handshake: auth error: sasl conversation error: unable to authenticate using mechanism "SCRAM-SHA-1": (AuthenticationFailed) Authentication failed.
Kafka check failed: topic not exist, topic=toMongo
Mongo check failed: MongoDB ping failed, URI=mongodb://openIM:openIM123@localhost:37017/openim_v3?maxPoolSize=100, Database=openim_v3, MaxPoolSize=100: connection() error occurred during connection handshake: auth error: sasl conversation error: unable to authenticate using mechanism "SCRAM-SHA-1": (AuthenticationFailed) Authentication failed.
Kafka check failed: topic not exist, topic=toMongo
Mongo check failed: MongoDB ping failed, URI=mongodb://openIM:openIM123@localhost:37017/openim_v3?maxPoolSize=100, Database=openim_v3, MaxPoolSize=100: connection() error occurred during connection handshake: auth error: sasl conversation error: unable to authenticate using mechanism "SCRAM-SHA-1": (AuthenticationFailed) Authentication failed.
Kafka check failed: topic not exist, topic=toMongo
Mongo check failed: MongoDB ping failed, URI=mongodb://openIM:openIM123@localhost:37017/openim_v3?maxPoolSize=100, Database=openim_v3, MaxPoolSize=100: connection() error occurred during connection handshake: auth error: sasl conversation error: unable to authenticate using mechanism "SCRAM-SHA-1": (AuthenticationFailed) Authentication failed.
Kafka check failed: topic not exist, topic=toMongo
Mongo check failed: MongoDB ping failed, URI=mongodb://openIM:openIM123@localhost:37017/openim_v3?maxPoolSize=100, Database=openim_v3, MaxPoolSize=100: connection() error occurred during connection handshake: auth error: sasl conversation error: unable to authenticate using mechanism "SCRAM-SHA-1": (AuthenticationFailed) Authentication failed.
Kafka check failed: topic not exist, topic=toMongo
Mongo check failed: MongoDB ping failed, URI=mongodb://openIM:openIM123@localhost:37017/openim_v3?maxPoolSize=100, Database=openim_v3, MaxPoolSize=100: connection() error occurred during connection handshake: auth error: sasl conversation error: unable to authenticate using mechanism "SCRAM-SHA-1": (AuthenticationFailed) Authentication failed.
Kafka check failed: topic not exist, topic=toMongo
Mongo check failed: MongoDB ping failed, URI=mongodb://openIM:openIM123@localhost:37017/openim_v3?maxPoolSize=100, Database=openim_v3, MaxPoolSize=100: connection() error occurred during connection handshake: auth error: sasl conversation error: unable to authenticate using mechanism "SCRAM-SHA-1": (AuthenticationFailed) Authentication failed.
Kafka check failed: topic not exist, topic=toMongo
Mongo check failed: MongoDB ping failed, URI=mongodb://openIM:openIM123@localhost:37017/openim_v3?maxPoolSize=100, Database=openim_v3, MaxPoolSize=100: connection() error occurred during connection handshake: auth error: sasl conversation error: unable to authenticate using mechanism "SCRAM-SHA-1": (AuthenticationFailed) Authentication failed.
Kafka check failed: topic not exist, topic=toMongo
Mongo check failed: MongoDB ping failed, URI=mongodb://openIM:openIM123@localhost:37017/openim_v3?maxPoolSize=100, Database=openim_v3, MaxPoolSize=100: connection() error occurred during connection handshake: auth error: sasl conversation error: unable to authenticate using mechanism "SCRAM-SHA-1": (AuthenticationFailed) Authentication failed.
Kafka check failed: topic not exist, topic=toMongo
Mongo check failed: MongoDB ping failed, URI=mongodb://openIM:openIM123@localhost:37017/openim_v3?maxPoolSize=100, Database=openim_v3, MaxPoolSize=100: connection() error occurred during connection handshake: auth error: sasl conversation error: unable to authenticate using mechanism "SCRAM-SHA-1": (AuthenticationFailed) Authentication failed.
Kafka check failed: topic not exist, topic=toMongo
Kafka check failed: topic not exist, topic=toMongo
Mongo check failed: MongoDB ping failed, URI=mongodb://openIM:openIM123@localhost:37017/openim_v3?maxPoolSize=100, Database=openim_v3, MaxPoolSize=100: connection() error occurred during connection handshake: auth error: sasl conversation error: unable to authenticate using mechanism "SCRAM-SHA-1": (AuthenticationFailed) Authentication failed.
Mongo check failed: MongoDB ping failed, URI=mongodb://openIM:openIM123@localhost:37017/openim_v3?maxPoolSize=100, Database=openim_v3, MaxPoolSize=100: connection() error occurred during connection handshake: auth error: sasl conversation error: unable to authenticate using mechanism "SCRAM-SHA-1": (AuthenticationFailed) Authentication failed.
Kafka check failed: topic not exist, topic=toMongo
Mongo check failed: MongoDB ping failed, URI=mongodb://openIM:openIM123@localhost:37017/openim_v3?maxPoolSize=100, Database=openim_v3, MaxPoolSize=100: connection() error occurred during connection handshake: auth error: sasl conversation error: unable to authenticate using mechanism "SCRAM-SHA-1": (AuthenticationFailed) Authentication failed.
Kafka check failed: topic not exist, topic=toMongo
Mongo check failed: MongoDB ping failed, URI=mongodb://openIM:openIM123@localhost:37017/openim_v3?maxPoolSize=100, Database=openim_v3, MaxPoolSize=100: connection() error occurred during connection handshake: auth error: sasl conversation error: unable to authenticate using mechanism "SCRAM-SHA-1": (AuthenticationFailed) Authentication failed.
Kafka check failed: topic not exist, topic=toMongo
Kafka check failed: topic not exist, topic=toMongo

Screenshots Link

image

@FGadvancer FGadvancer added the bug Categorizes issue or PR as related to a bug. label Oct 16, 2024
@FGadvancer
Copy link
Member Author

When this issue occurs, it is likely due to permission issues with the mapped script files in the Docker environment, causing create-topic.sh (for Kafka) and mongo-init.sh (for Mongo) scripts to not execute properly. Here’s how to resolve this:

  1. Start all Docker services:
    Run docker compose up -d to ensure all images are started.

  2. From the project root directory, use docker cp to copy Mongo’s initialization script:

    # Use docker cp to copy mongo-init.sh to a temporary directory within the container
    docker cp ./scripts/mongo-init.sh mongo:/tmp/mongo-init.sh
    
    # Directly execute the script inside the container to create the database and user
    docker exec -it mongo /bin/bash -c "bash /tmp/mongo-init.sh"
  3. From the project root directory, use docker cp to copy Kafka’s initialization script:

    # Use docker cp to copy create-topic.sh to a temporary directory within the container
    docker cp ./scripts/create-topic.sh kafka:/tmp/create-topic.sh
    
    # Directly execute the script inside the container to create the topic
    docker exec -it kafka /bin/bash -c "bash /tmp/create-topic.sh"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Categorizes issue or PR as related to a bug. deployment
Projects
None yet
Development

No branches or pull requests

1 participant