[SERVER-3877] Solaris 1.8.2 mongo Doesn't Parse Username and Password Options Correctly Created: 15/Sep/11  Updated: 11/Jul/16  Resolved: 09/Jun/12

Status: Closed
Project: Core Server
Component/s: Shell
Affects Version/s: 1.8.2
Fix Version/s: 2.1.2

Type: Bug Priority: Minor - P4
Reporter: Walker Traylor Assignee: Gregor Macadam
Resolution: Done Votes: 2
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Solaris


Issue Links:
Depends
depends on SERVER-5633 'mongo' on Solaris aborts on startup Closed
Operating System: Solaris
Participants:

 Description   

I cannot connect to a mongo server using the Solaris build of the mongo shell client with username and password supplied on the command line.

There is a similar bug affecting Windows:
https://jira.mongodb.org/browse/SERVER-3239

Seems to be the same problem.

Just as with that bug, I can work around by using db.auth() after connecting.

I cannot authenticate on the command line to a Solaris mongod server using a Solaris mongo shell client:

[09/15/11 18:53 madmin@m16.mongolab.com] $ mongo m16.mongolab.com:27267/admin -u USER -p PASS
MongoDB shell version: 1.8.2
Enter password: %

I can authenticate on the command line to a Solaris mongod server using a linux mongo shell client successfully:

[09/15/11 11:52 madmin@m9.mongolab.com] $ mongo m16.mongolab.com:27267/admin -u USER -p PASS
MongoDB shell version: 1.8.2
connecting to: m16.mongolab.com:27267/admin
>



 Comments   
Comment by Gregor Macadam [ 09/Jun/12 ]

If you work around SERVER-5633 and get the shell to work, then the parsing error is fixed in 2.1.2-pre

Comment by Gregor Macadam [ 25/May/12 ]

I checked the Solaris nightly and the issue persists.

bash-3.2$ ./bin/mongo localhost:27017/admin -u USER -p PASS
MongoDB shell version: 2.0.6-rc1-pre-
Enter password:

I can connect from a shell on my mac
$ ./bin/mongo xx.xx.xx.xx/admin -u USER -p PASS
MongoDB shell version: 2.0.6-rc1-pre-
connecting to: xx.xx.xx.xx/admin

Comment by T. Dampier [ 12/Mar/12 ]

Thanks for the suggestion ... Idownloaded the nightly solaris 64 binaries, and gave it a spin. It is different!

[03/12/12 11:38 madmin@h000210.mongolab.com] $ ./mongodb-sunos5-x86_64-2012-03-12/bin/mongo localhost:31597/admin -u USER -p PASS 
terminate called after throwing an instance of 'int'
zsh: IOT instruction (core dumped)  ./mongodb-sunos5-x86_64-2012-03-12/bin/mongo localhost:31597/admin -u  -p 

First thought was nutty dynamic link problems; but the dependencies look the same as the 2.0.3 client, which runs fine on this host:

[03/12/12 11:42 madmin@h000210.mongolab.com] $ ldd `which mongo`
        libsocket.so.1 =>        /lib/64/libsocket.so.1
        libresolv.so.2 =>        /lib/64/libresolv.so.2
        libstdc++.so.6 =>        /opt/local/lib/amd64/libstdc++.so.6
        libnsl.so.1 =>   /lib/64/libnsl.so.1
        libm.so.2 =>     /lib/64/libm.so.2
        libgcc_s.so.1 =>         /opt/local/lib/amd64/libgcc_s.so.1
        libpthread.so.1 =>       /lib/64/libpthread.so.1
        libc.so.1 =>     /lib/64/libc.so.1
        libmd.so.1 =>    /lib/64/libmd.so.1
        libmp.so.2 =>    /lib/64/libmp.so.2
[03/12/12 11:42 madmin@h000210.mongolab.com] $ ldd deploy/lib/src/mongodb-sunos5-x86_64-2012-03-12/bin/mongo
      libsocket.so.1 =>        /lib/64/libsocket.so.1
        libresolv.so.2 =>        /lib/64/libresolv.so.2
        libstdc++.so.6 =>        /opt/local/lib/amd64/libstdc++.so.6
        librt.so.1 =>    /lib/64/librt.so.1
        libnsl.so.1 =>   /lib/64/libnsl.so.1
        libm.so.2 =>     /lib/64/libm.so.2
        libgcc_s.so.1 =>         /opt/local/lib/amd64/libgcc_s.so.1
        libpthread.so.1 =>       /lib/64/libpthread.so.1
        libc.so.1 =>     /lib/64/libc.so.1
        libmd.so.1 =>    /lib/64/libmd.so.1
        libmp.so.2 =>    /lib/64/libmp.so.2
[03/12/12 11:43 madmin@h000210.mongolab.com] $ mongo -version
MongoDB shell version: 2.0.3
[03/12/12 11:44 madmin@h000210.mongolab.com] $ ./deploy/lib/src/mongodb-sunos5-x86_64-2012-03-12/bin/mongo -version
terminate called after throwing an instance of 'int'
zsh: IOT instruction (core dumped)  ./deploy/lib/src/mongodb-sunos5-x86_64-2012-03-12/bin/mongo -version

Nonetheless maybe I'm doing something silly ... or else an unrelated bug crept into the nightlies.

Comment by Eliot Horowitz (Inactive) [ 12/Mar/12 ]

Can you try the 2.2 nightly?

I think its a boost version issue.

Comment by T. Dampier [ 12/Mar/12 ]

Problem persists with mongo shell v. 2.0.2 :

[03/12/12 11:05 madmin@m30.mongolab.com] $ deploy/lib/mongodb-2.0.2/bin/mongo localhost:27267 -u USER -p PASS
MongoDB shell version: 2.0.2
[03/12/12 11:06 madmin@m30.mongolab.com] $ deploy/lib/mongodb-2.0.2/bin/mongo -version
MongoDB shell version: 2.0.2

Comment by Walker Traylor [ 15/Sep/11 ]

This was found on a Joyent SmartMachine and has not been tested on other Solaris platforms.

Generated at Thu Feb 08 03:04:19 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.