[SERVER-11661] Tools: --port prints stack trace on invalid port Created: 11/Nov/13  Updated: 11/Jul/16  Resolved: 28/Jan/14

Status: Closed
Project: Core Server
Component/s: Tools
Affects Version/s: None
Fix Version/s: 2.5.5

Type: Bug Priority: Minor - P4
Reporter: Phillip Quiza Assignee: Shaun Verch
Resolution: Done Votes: 0
Labels: 26qa, neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to TOOLS-145 Tools don't handle connection string ... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Participants:

 Description   

[pquiza@dannenstation ~]$ mongorestore --port hi
Mon Nov 11 14:32:49.413 Assertion: 13095:HostAndPort: bad port #
0xad6506 0xa9bd5a 0x71b211 0x71a5e4 0x6dce0b 0x6c857f 0x7fce3f6d5bc5 0x6e03c5 
 mongorestore(_ZN5mongo15printStackTraceERSo+0x26) [0xad6506]
 mongorestore(_ZN5mongo11msgassertedEiPKc+0x9a) [0xa9bd5a]
 mongorestore(_ZN5mongo11HostAndPortC1ERKSs+0x111) [0x71b211]
 mongorestore(_ZN5mongo16ConnectionString5parseERKSsRSs+0x1f4) [0x71a5e4]
 mongorestore(_ZN5mongo4Tool4mainEiPPc+0xa1b) [0x6dce0b]
 mongorestore(main+0x2f) [0x6c857f]
 /usr/lib/libc.so.6(__libc_start_main+0xf5) [0x7fce3f6d5bc5]
 mongorestore() [0x6e03c5]
terminate called after throwing an instance of 'mongo::MsgAssertionException'
  what():  HostAndPort: bad port #
Aborted (core dumped)

Affected tools:
mongodump
mongorestore
mongoexport
mongoimport
mongooplog
mongotop
mongofiles
mongostat



 Comments   
Comment by Githook User [ 28/Jan/14 ]

Author:

{u'username': u'Zarkantho', u'name': u'Shaun Verch', u'email': u'shaun.verch@10gen.com'}

Message: SERVER-11661 Validation for port command line option in tools
Branch: master
https://github.com/mongodb/mongo/commit/5ed289416778ee4c6c5f5847826bc68da593459c

Comment by Githook User [ 24/Jan/14 ]

Author:

{u'username': u'kangas', u'name': u'Matt Kangas', u'email': u'matt.kangas@mongodb.com'}

Message: Revert "SERVER-11661 Validation for port command line option in tools"

This reverts commit 4989b84929bcb9112c5a0257c5ae32db2067b80f.
Branch: master
https://github.com/mongodb/mongo/commit/ed58b0dfe564253067b4cab11ab75477b7e48388

Comment by Githook User [ 24/Jan/14 ]

Author:

{u'username': u'kangas', u'name': u'Matt Kangas', u'email': u'matt.kangas@mongodb.com'}

Message: Revert "SERVER-11661 Extract port as the same type as the option registered in tools"

This reverts commit f5049622d58df88f11369427b5e535fd79e22ef6.
Branch: master
https://github.com/mongodb/mongo/commit/d6c659c7d2d7a20ba640b4981b9e8c82d2948e02

Comment by Githook User [ 23/Jan/14 ]

Author:

{u'username': u'Zarkantho', u'name': u'Shaun Verch', u'email': u'shaun.verch@10gen.com'}

Message: SERVER-11661 Extract port as the same type as the option registered in tools
Branch: master
https://github.com/mongodb/mongo/commit/f5049622d58df88f11369427b5e535fd79e22ef6

Comment by Githook User [ 23/Jan/14 ]

Author:

{u'username': u'Zarkantho', u'name': u'Shaun Verch', u'email': u'shaun.verch@10gen.com'}

Message: SERVER-11661 Validation for port command line option in tools
Branch: master
https://github.com/mongodb/mongo/commit/4989b84929bcb9112c5a0257c5ae32db2067b80f

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