سؤال

if Mongo server run on port 65500. Now on which port, I can access simple HTTP rest ? Let a case,

MongoDB provides a simple http interface listing information of interest to administrators. This interface may be accessed at the port with numeric value 1000 more than the configured mongod port.

if MongoDB runs on localhost with port number 65500. Then which port does Mongo rest interface run?

Port no. 66500 is not possible value for port

هل كانت مفيدة؟

المحلول

Port numbers are only 16 bits, so mongod will fail to even start on that port (greater than 65535)

> mongod --port 65555 --dbpath .
Sat Mar 29 13:00:31.488 bad --port number
Sat Mar 29 13:00:31.488 dbexit:
Sat Mar 29 13:00:31.488 shutdown: going to close listening sockets...

If you really mean an allowed port that would just make the web port go above 65536, it will wrap around to 0 (which would mean 65535+1000 would wrap to 999, or your new sample port 65500 would wrap to 964);

Sat Mar 29 13:01:53.448 [initandlisten] waiting for connections on port 65500
Sat Mar 29 13:01:53.448 [websvr] ERROR: listen(): bind() failed errno:13 
                        Permission denied for socket: 0.0.0.0:964
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top