php - Can't connect to standalone mongodb: No candidate servers found -


i have debian dev server stock mongodb; php 5.4 , pecl mongodb drivers v1.4.3. tried create simple conntection using php cli , got exception:

php -r "mongolog::setlevel(mongolog::all); mongolog::setmodule(mongolog::all); new mongoclient('mongodb://127.0.0.1:27017', array());" 

the output below:

php notice:  parse   info: parsing mongodb://127.0.0.1:27017 in command line code on line 1 php notice:  parse   info: - found node: 127.0.0.1:27017 in command line code on line 1 php notice:  parse   info: - connection type: standalone in command line code on line 1 php notice:  con     info: mongo_get_read_write_connection: finding standalone connection in command line code on line 1 php notice:  con     info: connection_create: creating new connection 127.0.0.1:27017 in command line code on line 1 php notice:  con     info: stream_connect: not establishing ssl 127.0.0.1:27017 in command line code on line 1 php notice:  con     info: get_server_flags: start in command line code on line 1 php notice:  con     fine: send_packet: read header: 36 in command line code on line 1 php notice:  con     fine: send_packet: data_size: 73 in command line code on line 1 php notice:  con     fine: get_server_flags: can't find maxbsonobjectsize, defaulting 4194304 in command line code on line 1 php notice:  con     fine: get_server_flags: can't find maxmessagesizebytes, defaulting 8388608 in command line code on line 1 php notice:  con     info: get_server_flags: found server type: unknown? in command line code on line 1 php notice:  con     info: is_ping: pinging 127.0.0.1:27017;-;.;29554 in command line code on line 1 php notice:  con     fine: send_packet: read header: 36 in command line code on line 1 php notice:  con     fine: send_packet: data_size: 69 in command line code on line 1 php notice:  con     info: is_ping: last pinged @ 1376577544; time: 0ms in command line code on line 1 php notice:  replset fine: finding candidate servers in command line code on line 1 php notice:  replset fine: - servers in command line code on line 1 php notice:  replset fine: filter_connections: adding connections: in command line code on line 1 php notice:  replset fine: filter_connections: done in command line code on line 1 php notice:  replset fine: limiting seeded/discovered servers in command line code on line 1 php notice:  replset fine: limiting seeded/discovered servers: done in command line code on line 1 php notice:  replset fine: limiting credentials in command line code on line 1     php notice:  replset fine: limiting credentials: done in command line code on line 1 php fatal error:  uncaught exception 'mongoconnectionexception' message 'no candidate servers found' in command line code:1 stack trace: #0 command line code(1): mongoclient->__construct('mongodb://127.0...', array) #1 {main}   thrown in command line code on line 1 

i have found workaround - downgrade dirver version 1.3.6; not solution.

take at: http://docs.mongodb.org/manual/tutorial/install-mongodb-on-ubuntu/

i solved problem after installing 10-gen version mongodb.


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

javascript - addthis share facebook and google+ url -

ios - Show keyboard with UITextField in the input accessory view -