Sabre Error/ contacts calender not working

Hi All it seems Sabre configuration has something wrong. in my dev environment… Contacts and Calender is not working in my application… I am getting below Sabre log… can anybody help me get things right on sabre

sabre_1 | 2020/07/22 19:42:23 [error] 13#13: *1 FastCGI sent in stderr: “PHP message: PHP Fatal error: Uncaught MongoDB\Driver\Exception\ConnectionTimeoutException: No suitable servers found (serverSelectionTryOnce set): [Failed to resolve ‘mongo’] in /var/www/vendor/mongodb/mongodb/src/Collection.php:360
sabre_1 | Stack trace:
sabre_1 | #0 /var/www/vendor/mongodb/mongodb/src/Collection.php(360): MongoDB\Driver\Manager->selectServer(Object(MongoDB\Driver\ReadPreference))
sabre_1 | #1 /var/www/vendor/mongodb/mongodb/src/Collection.php(328): MongoDB\Collection->createIndexes(Array, Array)
sabre_1 | #2 /var/www/lib/CardDAV/Backend/Mongo.php(1021): MongoDB\Collection->createIndex(Array, Array)
sabre_1 | #3 /var/www/lib/CardDAV/Backend/Mongo.php(48): ESN\CardDAV\Backend\Mongo->ensureIndex()
sabre_1 | #4 /var/www/esn.php(91): ESN\CardDAV\Backend\Mongo->__construct(Object(MongoDB\Database))
sabre_1 | #5 {main}
sabre_1 | thrown in /var/www/vendor/mongodb/mongodb/src/Collection.php on line 360” while reading response header from upstream, client: 172.18.0.1, server: _, request: “GET / HTTP/1.1”, upstream: “fastcgi://unix:/var/run/php/php7.0-fpm.sock:”, host: “localhost:8001”
sabre_1 | 172.18.0.1 - - [22/Jul/2020:19:42:23 +0000] “GET / HTTP/1.1” 500 5 “-” “Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.89 Safari/537.36”
rabbitmq_1 |
rabbitmq_1 | =INFO REPORT==== 22-Jul-2020::19:42:26 ===
rabbitmq_1 | accepting AMQP connection <0.2313.0> (172.18.0.7:56302 -> 172.18.0.2:5672)
sabre_1 | 2020/07/22 19:42:26 [error] 13#13: *1 FastCGI sent in stderr: “PHP message: PHP Fatal error: Uncaught MongoDB\Driver\Exception\ConnectionTimeoutException: No suitable servers found (serverSelectionTryOnce set): [Failed to resolve ‘mongo’] in /var/www/vendor/mongodb/mongodb/src/Collection.php:360
sabre_1 | Stack trace:
sabre_1 | #0 /var/www/vendor/mongodb/mongodb/src/Collection.php(360): MongoDB\Driver\Manager->selectServer(Object(MongoDB\Driver\ReadPreference))
sabre_1 | #1 /var/www/vendor/mongodb/mongodb/src/Collection.php(328): MongoDB\Collection->createIndexes(Array, Array)
sabre_1 | #2 /var/www/lib/CardDAV/Backend/Mongo.php(1021): MongoDB\Collection->createIndex(Array, Array)
sabre_1 | #3 /var/www/lib/CardDAV/Backend/Mongo.php(48): ESN\CardDAV\Backend\Mongo->ensureIndex()
sabre_1 | #4 /var/www/esn.php(91): ESN\CardDAV\Backend\Mongo->__construct(Object(MongoDB\Database))
sabre_1 | #5 {main}
sabre_1 | thrown in /var/www/vendor/mongodb/mongodb/src/Collection.php on line 360” while reading response header from upstream, client: 172.18.0.1, server: _, request: “GET / HTTP/1.1”, upstream: “fastcgi://unix:/var/run/php/php7.0-fpm.sock:”, host: “localhost:8001”
sabre_1 | 172.18.0.1 - - [22/Jul/2020:19:42:26 +0000] “GET / HTTP/1.1” 500 5 “-” “Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.89 Safari/537.36”
rabbitmq_1 |
rabbitmq_1 | =WARNING REPORT==== 22-Jul-2020::19:42:26 ===
rabbitmq_1 | closing AMQP connection <0.2313.0> (172.18.0.7:56302 -> 172.18.0.2:5672):
rabbitmq_1 | client unexpectedly closed TCP connection

Hello Mekal,
From the log, seems the Mongo server address is incorrect. Can you check the mongo address & the configuration of Sabre in configuration file?

Hi Tuanic

Thanks for your reply, yes my mongodb was got stopped, now I m not getting mongo related error. but It seems Sabre is not able to connect to esn… I am getting below error… can you please let me know where will I find the configuration file for sabre (running as docker container)… and what should be the configuraation.

There are two things need to check:

  • ESN is running
  • The ESN_HOST is correct when running Sabre

Hi Tuanic

When I run everything along with ESN as docker then everything works fine.
I am facing this issue when I am running ESN in my localhost in development environment and sabre as docker container.
ESN is able to connect with sabre, but Sabre is not able to connect back to ESN which I am running through “node server.js” or “grunt dev”…
I think there is some configuration is missing when I run through development setup.

Thanks

My issue is resolved by setting ESN_HOST = docker.for.mac.localhost

1 Like