Mongo: network error while attempting to run command 'whatsmyuri' on host
<p>I have been trying to access my mongo instance from another machine, but I get this error. I could not find many references to this <code>whatsmyuri</code> error. This is what I get from the external machine:</p>
<pre><code>$ mongo &lt;IP_ADDRESS&gt;:27017/youtube_advertising -u user -p password

MongoDB shell version: 3.2.0
connecting to: &lt;IP_ADDRESS&gt;:27017/youtube_advertising
2016-02-19T17:10:02.923+0100 E QUERY    [thread1] Error: network error while attempting to run command 'whatsmyuri' on host '&lt;IP_ADDRESS&gt;:27017'  :
connect@src/mongo/shell/mongo.js:226:14
@(connect):1:6

exception: connect failed
</code></pre>
<p>I have already changed the <code>/etc/mongod.conf</code> file, opened connections through port <code>27017</code> (with <code>iptables</code>) and restarted mongo. I am able to connect via <code>ssh</code> to that machine.</p>
<p>Searching about this <code>whatsmyuri</code>, I ran this command on mongo:</p>
<pre><code>&gt; db.runCommand( { whatsmyuri: 1 } )
{ &quot;you&quot; : &quot;127.0.0.1:36990&quot;, &quot;ok&quot; : 1 }
</code></pre>
<p>I do not know if that <code>36990</code> port is right or wrong. Just in case I opened connections from there too, but still nothing.</p>
<p>Any ideas?</p>
<h3>UPDATE</h3>
<p>Checking the <code>/var/log/mongodb/mongod.log</code>, this is what I get when I try to connect from remote:</p>
<pre><code>2016-02-19T10:41:07.292-0600 I NETWORK  [initandlisten] connection accepted from &lt;EXT_IP_ADDRESS&gt;:51800 #2 (1 connection now open)
2016-02-19T10:41:07.310-0600 I QUERY    [conn2]     operation isn't supported: 2010
2016-02-19T10:41:07.310-0600 I -        [conn2] Assertion: 16141:cannot translate opcode 2010
</code></pre>