2016-12-24 13 views
0

puPHPet으로 우분투 16.04를 설치하려고했습니다. 그러나 거기 mongodb에 다음과 같은 문제가 발생했습니다 : puppetlabs/mongodb 모듈을 실제 버전 0.16으로 업데이트했습니다. mongo는 기본적으로 권한이없는 소스에서 설치할 수 없으므로 설치되지 않았습니다. 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과 같은 문제가

무엇이 잘못 되었나요 것을 실현 내 config 또는 win10과 함께?

감사합니다.

+0

제공된 호스트를 사용하여 연결할 수 있는지 확인 했습니까? 확인 된 방화벽, 파일 권한, 사용자 그룹 등 ...? 그것은 mongodb가 제대로 시작되었는지 확인할 수 없기 때문에 죽어 가고 있습니다. – Spechal

+0

빌드가 실패하기 때문에 VM과 연결할 수 없습니다. 하지만 mongo는 내 VM 안에 설치해야하며 호스트가 우분투 인 경우에는 수행해야합니다. 내 호스트의 방화벽이 VM에 영향을 미치는 이유는 무엇입니까? – Dekar

답변

0

해결했습니다. 폴더 공유 때문에 문제가 발생했습니다. var/log 폴더를 호스트 컴퓨터에 매핑하면이 폴더의 권한을 변경할 수 없습니다. 그것 때문에 mongodb는 로그에 쓸 수 없습니다.