Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
"Attempted to read past the end of the stream" when authentication enabled
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  9 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Senor Cardgage  
View profile  
 More options Feb 21 2012, 12:24 pm
From: Senor Cardgage <combolati...@gmail.com>
Date: Tue, 21 Feb 2012 09:24:29 -0800 (PST)
Local: Tues, Feb 21 2012 12:24 pm
Subject: "Attempted to read past the end of the stream" when authentication enabled
When I enable authentication, I get the error "Attempted to read past
the end of the stream"

Here is the command line I use to register the mongo service:
"C:\mongo\bin\mongod" --reinstall --auth --dbpath "c:\mongo\data\db" --
logpath "c:\mongo\logs" --profile=2

here is my connection string:

"mongodb://admin:adminpass@localhost"

Everything works properly when "--admin" is excluded from the command
line and "mongodb://localhost" is used for the connection string.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Robert Stam  
View profile  
 More options Feb 21 2012, 12:36 pm
From: Robert Stam <rob...@10gen.com>
Date: Tue, 21 Feb 2012 11:36:56 -0600
Local: Tues, Feb 21 2012 12:36 pm
Subject: Re: [mongodb-csharp] "Attempted to read past the end of the stream" when authentication enabled

Not sure where you are seeing this error. Can you provide a full stack
trace?

On Tue, Feb 21, 2012 at 11:24 AM, Senor Cardgage <combolati...@gmail.com>wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Senor Cardgage  
View profile  
 More options Feb 21 2012, 12:40 pm
From: Senor Cardgage <combolati...@gmail.com>
Date: Tue, 21 Feb 2012 09:40:28 -0800 (PST)
Local: Tues, Feb 21 2012 12:40 pm
Subject: Re: "Attempted to read past the end of the stream" when authentication enabled
   at MongoDB.Driver.Internal.DirectConnector.Connect(TimeSpan
timeout) in C:\work\10gen\mongodb\mongo-csharp-driver\Driver\Internal
\DirectConnector.cs:line 64
   at MongoDB.Driver.MongoServer.Connect(TimeSpan timeout,
ConnectWaitFor waitFor) in C:\work\10gen\mongodb\mongo-csharp-driver
\Driver\Core\MongoServer.cs:line 526
   at MongoDB.Driver.MongoServer.Connect(ConnectWaitFor waitFor) in C:
\work\10gen\mongodb\mongo-csharp-driver\Driver\Core
\MongoServer.cs:line 494
   at MongoDB.Driver.MongoServer.ChooseServerInstance(Boolean slaveOk)
in C:\work\10gen\mongodb\mongo-csharp-driver\Driver\Core
\MongoServer.cs:line 1138
   at MongoDB.Driver.MongoServer.AcquireConnection(MongoDatabase
database, Boolean slaveOk) in C:\work\10gen\mongodb\mongo-csharp-driver
\Driver\Core\MongoServer.cs:line 1051
   at MongoDB.Driver.MongoCursorEnumerator`1.AcquireConnection() in C:
\work\10gen\mongodb\mongo-csharp-driver\Driver\Core
\MongoCursorEnumerator.cs:line 184
   at MongoDB.Driver.MongoCursorEnumerator`1.GetFirst() in C:\work
\10gen\mongodb\mongo-csharp-driver\Driver\Core
\MongoCursorEnumerator.cs:line 194
   at MongoDB.Driver.MongoCursorEnumerator`1.MoveNext() in C:\work
\10gen\mongodb\mongo-csharp-driver\Driver\Core
\MongoCursorEnumerator.cs:line 126
   at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1
source)
   at MongoDB.Driver.MongoCollection.FindOneAs[TDocument](IMongoQuery
query) in C:\work\10gen\mongodb\mongo-csharp-driver\Driver\Core
\MongoCollection.cs:line 498
   at MongoDB.Driver.MongoCollection`1.FindOne(IMongoQuery query) in C:
\work\10gen\mongodb\mongo-csharp-driver\Driver\Core
\MongoCollection.cs:line 1639
   at MongoDB.Driver.MongoDatabase.RunCommandAs(Type
commandResultType, IMongoCommand command) in C:\work\10gen\mongodb
\mongo-csharp-driver\Driver\Core\MongoDatabase.cs:line 891
   at MongoDB.Driver.MongoDatabase.RunCommandAs(Type
commandResultType, String commandName) in C:\work\10gen\mongodb\mongo-
csharp-driver\Driver\Core\MongoDatabase.cs:line 920
   at MongoDB.Driver.MongoDatabase.RunCommandAs[TCommandResult](String
commandName) in C:\work\10gen\mongodb\mongo-csharp-driver\Driver\Core
\MongoDatabase.cs:line 878
   at MongoDB.Driver.MongoDatabase.RunCommand(String commandName) in C:
\work\10gen\mongodb\mongo-csharp-driver\Driver\Core
\MongoDatabase.cs:line 854
   at MongoDB.Driver.MongoServer.GetDatabaseNames() in C:\work\10gen
\mongodb\mongo-csharp-driver\Driver\Core\MongoServer.cs:line 823
   at MongoDB.Driver.MongoServer.DatabaseExists(String databaseName)
in C:\work\10gen\mongodb\mongo-csharp-driver\Driver\Core
\MongoServer.cs:line 615

On Feb 21, 10:36 am, Robert Stam <rob...@10gen.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Senor Cardgage  
View profile  
 More options Feb 21 2012, 2:06 pm
From: Senor Cardgage <combolati...@gmail.com>
Date: Tue, 21 Feb 2012 11:06:10 -0800 (PST)
Local: Tues, Feb 21 2012 2:06 pm
Subject: Re: "Attempted to read past the end of the stream" when authentication enabled
Here is a function that replicates the issue:

        private void checkCollection(string un, string pw, string
dbName, string collectionName)
        {
            string cs = string.Format("mongodb://{0}:{1}@localhost:
27017/{2}", un, pw, dbName);
            MongoServer srv = MongoServer.Create(cs);
            try
            {
                srv[dbName].CollectionExists(collectionName);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }

On Feb 21, 10:40 am, Senor Cardgage <combolati...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Senor Cardgage  
View profile  
 More options Feb 21 2012, 5:44 pm
From: Senor Cardgage <combolati...@gmail.com>
Date: Tue, 21 Feb 2012 14:44:19 -0800 (PST)
Local: Tues, Feb 21 2012 5:44 pm
Subject: Re: "Attempted to read past the end of the stream" when authentication enabled
If I use my ip address in the connection string like this, for
example:

"mongodb://admin(admin):adminp...@77.201.199.87"

the connection works properly, but if I use "localhost" or "127.0.0.1"
like this:

"mongodb://admin(admin):adminpass@localhost"

then it fails

On Feb 21, 12:06 pm, Senor Cardgage <combolati...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Robert Stam  
View profile  
 More options Feb 21 2012, 6:11 pm
From: Robert Stam <rob...@10gen.com>
Date: Tue, 21 Feb 2012 17:11:22 -0600
Local: Tues, Feb 21 2012 6:11 pm
Subject: Re: [mongodb-csharp] Re: "Attempted to read past the end of the stream" when authentication enabled

I'm about to be offline for the next 48 hours, but one of my colleagues
will take a look at this.

On Tue, Feb 21, 2012 at 4:44 PM, Senor Cardgage <combolati...@gmail.com>wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
sridhar  
View profile  
 More options Feb 21 2012, 8:29 pm
From: sridhar <srid...@10gen.com>
Date: Tue, 21 Feb 2012 17:29:21 -0800 (PST)
Local: Tues, Feb 21 2012 8:29 pm
Subject: Re: "Attempted to read past the end of the stream" when authentication enabled
What version of MongoDB and the driver you are using here?

On Feb 21, 3:11 pm, Robert Stam <rob...@10gen.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
sridhar  
View profile  
 More options Feb 21 2012, 8:54 pm
From: sridhar <srid...@10gen.com>
Date: Tue, 21 Feb 2012 17:54:19 -0800 (PST)
Local: Tues, Feb 21 2012 8:54 pm
Subject: Re: "Attempted to read past the end of the stream" when authentication enabled
Seems to be the --profile 2 which is the problem. You can reproduce
even without the service code by just running the server from the
command shell with the profile level set to 2. For now my
recommendation is not to set the profiling level on the command line
to 2. I am going to open a JIRA ticket for this.

On Feb 21, 5:29 pm, sridhar <srid...@10gen.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
sridhar  
View profile  
 More options Feb 21 2012, 9:07 pm
From: sridhar <srid...@10gen.com>
Date: Tue, 21 Feb 2012 18:07:47 -0800 (PST)
Local: Tues, Feb 21 2012 9:07 pm
Subject: Re: "Attempted to read past the end of the stream" when authentication enabled
logged SERVER-5033 for this

On Feb 21, 5:29 pm, sridhar <srid...@10gen.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »