Failed to set up listener: SocketException: Address in use

Hi,

In " Lab: Creating First Application User":

user@M103# mongod -f mongod.conf 
2022-04-19T14:15:54.080+0000 I CONTROL  [main] Automatically disabling TLS 1.0, to force-enable TLS 1.0 specify --sslDisabledProtocols 'none'
2022-04-19T14:15:54.086+0000 I CONTROL  [initandlisten] MongoDB starting : pid=378 port=27000 dbpath=/var/mongodb/db 64-bit host=OpC3Re6zyO6nn5iEUq
2022-04-19T14:15:54.086+0000 I CONTROL  [initandlisten] db version v4.0.5
2022-04-19T14:15:54.086+0000 I CONTROL  [initandlisten] git version: 3739429dd92b92d1b0ab120911a23d50bf03c412
2022-04-19T14:15:54.086+0000 I CONTROL  [initandlisten] OpenSSL version: OpenSSL 1.1.1g  21 Apr 2020
2022-04-19T14:15:54.086+0000 I CONTROL  [initandlisten] allocator: system
2022-04-19T14:15:54.086+0000 I CONTROL  [initandlisten] modules: none
2022-04-19T14:15:54.086+0000 I CONTROL  [initandlisten] build environment:
2022-04-19T14:15:54.086+0000 I CONTROL  [initandlisten]     distarch: x86_64
2022-04-19T14:15:54.087+0000 I CONTROL  [initandlisten]     target_arch: x86_64
2022-04-19T14:15:54.087+0000 I CONTROL  [initandlisten] options: { config: "mongod.conf", net: { bindIp: "localhost", port: 27000 }, security: { authorization: "enabled" }, storage: { dbPath: "/var/mongodb/db" } }
2022-04-19T14:15:54.087+0000 E STORAGE  [initandlisten] Failed to set up listener: SocketException: Address in use
2022-04-19T14:15:54.087+0000 I CONTROL  [initandlisten] now exiting
2022-04-19T14:15:54.087+0000 I CONTROL  [initandlisten] shutting down with code:48

Please check your lab steps again.You should not start mongod.It is already up & running for you

3 Likes

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.