2016-12-24 3 views
0

puPHPetでubuntu 16.04をインストールしようとしました。しかし、そこにmongodbの次の問題に直面しました: 私はpuppetlabs/mongodbモジュールを実際のバージョン0.16に更新しましたが、mongoはインストールされませんでした。なぜなら、apt-getはデフォルトで無許可のソースからインストールできないからです。私はMongoDBの/ install.ppを変更します。puPHPet + puppet + puppetlabs/mongodb

if ! defined(Package['mongodb-org-tools']) { 
    package {'mongodb-org-tools': 
     require => Class['mongodb::client'], 
     install_options => ['--allow-unauthenticated', '-f'] 
    } 
    } 

次に、これをLinuxマシンに完全にインストールされました。 しかし、ホストOSがwin10の場合、stiilは動作しません。ここ は、ログの一部です:

Info: /Stage[main]/Mongodb::Server::Config/File[/etc/mongod.conf]: Filebucketed /etc/mongod.conf to puppet with sum 2f77cad9cf008f0d1cba3ab00e6f201b 
Notice: /Stage[main]/Mongodb::Server::Config/File[/etc/mongod.conf]/content: content changed '{md5}2f77cad9cf008f0d1cba3ab00e6f201b' to '{md5}27a1615781754ebd40a4f2afee063b10' 
Notice: /Stage[main]/Mongodb::Server::Config/File[/var/run/mongod.pid]/ensure: created 
Info: Class[Mongodb::Server::Config]: Scheduling refresh of Class[Mongodb::Server::Service] 
Info: Class[Mongodb::Server::Service]: Scheduling refresh of Service[mongodb] 
Notice: /Stage[main]/Mongodb::Server::Service/Service[mongodb]/ensure: ensure changed 'stopped' to 'running' 
Info: /Stage[main]/Mongodb::Server::Service/Service[mongodb]: Unscheduling refresh on Service[mongodb] 
    Notice: Failed to connect to mongodb within timeout window of 240 seconds; giving up. 
Info: Class[Mongodb::Server::Service]: Unscheduling all events on Class[Mongodb::Server::Service] 
Notice: /Stage[main]/Mongodb::Server/Anchor[mongodb::server::end]: Dependency Mongodb_conn_validator[mongodb] has failures: true 
Notice: /Stage[main]/Mongodb::Client/Anchor[::mongodb::client::start]: Dependency Mongodb_conn_validator[mongodb] has failures: true 
Notice: /Stage[main]/Mongodb::Client::Install/Package[mongodb_client]: Dependency Mongodb_conn_validator[mongodb] has failures: true 
Notice: /Stage[main]/Mongodb::Client/Anchor[::mongodb::client::end]: Dependency Mongodb_conn_validator[mongodb] has failures: true 
Notice: /Stage[main]/Puphpet::Mongodb::Install/Package[mongodb-org-tools]: Dependency Mongodb_conn_validator[mongodb] has failures: true 
Error: Unable to connect to mongodb server! (127.0.0.1:27017) 
Error: /Stage[main]/Mongodb::Server::Service/Mongodb_conn_validator[mongodb]/ensure: change from absent to present failed: Unable to connect to mongodb server! (127.0.0.1:27017) 
Warning: /Stage[main]/Mongodb::Server/Anchor[mongodb::server::end]: Skipping because of failed dependencies 
Warning: /Stage[main]/Mongodb::Client/Anchor[::mongodb::client::start]: Skipping because of failed dependencies 
Warning: /Stage[main]/Mongodb::Client::Install/Package[mongodb_client]: Skipping because of failed dependencies 
Warning: /Stage[main]/Mongodb::Client/Anchor[::mongodb::client::end]: Skipping because of failed dependencies 
Warning: /Stage[main]/Puphpet::Mongodb::Install/Package[mongodb-org-tools]: Skipping because of failed dependencies 
... 
The SSH command responded with a non-zero exit status. Vagrant 
assumes that this means the command failed. The output for this command 
should be in the log above. Please read the output to determine what 
went wrong. 

そして、ここでは私のconfig.yamlの平和です:

provider: 
    local: 
     box: puphpet/ubuntu1604-x64 
     box_url: puphpet/ubuntu1604-x64 
     box_version: '0' 
     chosen_virtualizer: virtualbox 

... 

mongodb: 
    install: '1' 
    settings: 
     bind_ip: ['127.0.0.1', '192.168.10.10'] 
     port: '27017' 
    globals: 
     version: '3.4.0' 

databases: { } 

ああ、今私が間違って何はpostgress

と同じ問題があること、実現しました私の設定やwin10で?

ありがとうございます。

+0

提供されているホストを使用して接続できることを確認しましたか?チェックされたファイアウォール、ファイルのアクセス許可、ユーザーグループなど...? mongodbが正常に起動したことを確認できないので、死にそうです。 – Spechal

+0

ビルが失敗したため、VMと接続することは不可能です。しかし、mongoは私のVMの中にインストールされていて、ホストがubuntuのときに動作します。なぜ私のホストのファイアウォールはVMに影響を与えるのでしょうか? – Dekar

答えて

0

私はそれを解決します。 フォルダ共有のために問題です。 var/logフォルダをホストマシンにマッピングすると、このフォルダのアクセス権を変更することはできません。 そのため、mongodbはログに書き込むことができません。

関連する問題