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.
> 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.
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:
> 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:
> > 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.
> On Feb 21, 10:36 am, Robert Stam <rob...@10gen.com> wrote:
> > 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:
> > > 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.
> On Feb 21, 10:40 am, Senor Cardgage <combolati...@gmail.com> wrote:
> > On Feb 21, 10:36 am, Robert Stam <rob...@10gen.com> wrote:
> > > 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:
> > > > 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.
> > On Feb 21, 10:40 am, Senor Cardgage <combolati...@gmail.com> wrote:
> > > On Feb 21, 10:36 am, Robert Stam <rob...@10gen.com> wrote:
> > > > 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:
> > > > > 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.
> > > On Feb 21, 10:40 am, Senor Cardgage <combolati...@gmail.com> wrote:
> > > > On Feb 21, 10:36 am, Robert Stam <rob...@10gen.com> wrote:
> > > > > 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:
> > > > > > 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.
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:
> > > > > > > Everything works properly when "--admin" is excluded from the
> > > command
> > > > > > > line and "mongodb://localhost" is used for the connection string.
> > > > > > > Everything works properly when "--admin" is excluded from the
> > > command
> > > > > > > line and "mongodb://localhost" is used for the connection string.