Uploaded image for project: 'Perl Driver'
  1. Perl Driver
  2. PERL-290

Cannot connect to slave while using GridFS

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 0.702.1
    • Fix Version/s: 0.704.3.0
    • Component/s: Perl driver
    • Labels:
    • Environment:
      MongoDB v0.702.2
      mongodb server v2.4.8
    • Backwards Compatibility:
      Fully Compatible

      Description

      Here is my code:
      ...

      my $conn = MongoDB::Connection->new(
                                      host => "mongodb://slave-1:27017,slave2:27017",
                                      username => "uname",
                                      password => "passwd",
                                      db_name=>"dbname"
              ) or print "\n".$!;
      $MongoDB::Cursor::slave_okay = 1;
      my $db   = $conn->get_database("dbname");
      my $grid = $db->get_gridfs;
      my $fs = $grid->files;

      ...
      And I get:
      $ perl TestConnection.pl
      not master at /net/isilonP/public/rw/homes/fg_sym/live/app/perl-libs/lib/perl5//x86_64-linux-thread-multi/MongoDB/GridFS.pm line 92

      Without asking for GridFS data everything goes fine.

        Attachments

          Activity

            People

            • Votes:
              2 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: