4

I have a Bluemix app that has a MongoDB instance bound to it. The app had been running for about a year. About a week ago, my app went down and I'm unable to redeploy it. I'm seeing the following in the log:

 Instance (index 0) failed to start accepting connections
App instance exited with guid f13c5665-7753-4451-b766-b0879b3726fd payload: {"cc_partition"=>"default", "droplet"=>"f13c5665-7753-4451-b766-b0879b3726fd", "version"=>"1c5aeea8-2718-48ff-9d89-211148391cc8", "instance"=>"5673b51557b3457f8b3e365639fe7f6f", "index"=>0, "reason"=>"CRASHED", "exit_status"=>1, "exit_description"=>"failed to accept connections within health check timeout", "crash_timestamp"=>1445263465}
App instance exited with guid f13c5665-7753-4451-b766-b0879b3726fd payload: {"cc_partition"=>"default", "droplet"=>"f13c5665-7753-4451-b766-b0879b3726fd", "version"=>"1c5aeea8-2718-48ff-9d89-211148391cc8", "instance"=>"5673b51557b3457f8b3e365639fe7f6f", "index"=>0, "reason"=>"CRASHED", "exit_status"=>1, "exit_description"=>"failed to accept connections within health check timeout", "crash_timestamp"=>1445263465}
Starting app instance (index 0) with guid f13c5665-7753-4451-b766-b0879b3726fd
App instance exited with guid f13c5665-7753-4451-b766-b0879b3726fd payload: {"cc_partition"=>"default", "droplet"=>"f13c5665-7753-4451-b766-b0879b3726fd", "version"=>"1c5aeea8-2718-48ff-9d89-211148391cc8", "instance"=>"5673b51557b3457f8b3e365639fe7f6f", "index"=>0, "reason"=>"CRASHED", "exit_status"=>1, "exit_description"=>"failed to accept connections within health check timeout", "crash_timestamp"=>1445263465}
Starting app instance (index 0) with guid f13c5665-7753-4451-b766-b0879b3726fd
Traceback (most recent call last):
File "wsgi.py", line 65, in <module>
 client = pymongo.Connection(mongo_url)
File "/app/.heroku/python/lib/python2.7/site-packages/pymongo/connection.py", line 220, in __init__
max_pool_size, document_class, tz_aware, _connect, **kwargs)
File "/app/.heroku/python/lib/python2.7/site-packages/pymongo/mongo_client.py", line 369, in __init__raise ConfigurationError(str(exc))
pymongo.errors.ConfigurationError: command SON([('authenticate', 1), ('user', u'removingForPrivacy'), ('nonce', u'removingForPrivacy'), ('key', u'removingForPrivacy')]) failed: auth failed

My code is available in my project at https://hub.jazz.net/project/lhayward/Fabulous%20Price%20Finder/overview. Has the way to connect to a MongoLab instance changed? Why am I getting authentication errors?

Lauren Schaefer
  • 696
  • 4
  • 9

1 Answers1

4

I e-mailed with MongoLab support. They replied:

Our free Sandbox databases recently went through the scheduled version upgrade event described at:

http://docs.mongolab.com/20150930-maintenance-event/

We sent several notices on this planned maintenance over the past few months.

This Sandbox database is now running MongoDB 3.0.x, which includes changes to MongoDB's authentication mechanism. This new mechanism is supported by certain newer driver versions, as described at http://docs.mongodb.org/manual/release-notes/3.0-scram/#upgrade-drivers.

In order for your application to connect to this database, you will need to use one of the drivers listed at the above link.

They made the following suggestion for my app, and it fixed the problem:

You'll have to update the "mongo-python-driver-master" folder to a more recent version of the python driver. You can download the driver here: https://github.com/mongodb/mongo-python-driver/releases. I'd recommend either version 2.9 or 3.0.3.

Lauren Schaefer
  • 696
  • 4
  • 9