Installing MongoDB on Ubuntu Server 10.04

1,482 views
Skip to first unread message

Tim

unread,
Aug 6, 2012, 5:28:16 AM8/6/12
to mongod...@googlegroups.com
Hi, I want to install mongodb on a ubuntu server 10.04.4 LTS.

I used http://docs.mongodb.org/manual/tutorial/install-mongodb-on-debian-or-ubuntu-linux/

At first I executed:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10

The first error occurs:

"xy":~$ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10
Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --secret-keyring /etc/apt/secring.gpg --trustdb-name /etc/apt/trustdb.gpg --keyring /etc/apt/trusted.gpg --primary-keyring /etc/apt/trusted.gpg --keyserver keyserver.ubuntu.com --recv 7F0CEB10
gpg: requesting key 7F0CEB10 from hkp server keyserver.ubuntu.com
gpgkeys: HTTP fetch error 7: couldn't connect to host
gpg: no valid OpenPGP data found.
gpg: Total number processed: 0

After that I inserted the following record into the sources.list.

sudo bash -c "echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' >> /etc/apt/sources.list"

that kind of works.

For sure "sudo apt-get update" leads to

W: GPG error: http://downloads-distro.mongodb.org dist Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 9ECBEC467F0CEB10


Can somebody help me?^^
thanks




markh

unread,
Aug 6, 2012, 6:10:08 AM8/6/12
to mongod...@googlegroups.com
Hi Tim,

I've just checked and I'm able to import the key from the Ubuntu keyserver without any problems.

It's unlikely (but possible) that the keyserver was down at the time. What is the result of 


Thanks

Mark

Tim

unread,
Aug 7, 2012, 5:24:39 AM8/7/12
to mongod...@googlegroups.com
Hi Mark,

I tried it on three different days at different moments.

"sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10"
Is the very first step that I just wirte into the console, right?

I pinged google.com, that worked.

Best Regards,
Tim

Paul Scott

unread,
Aug 7, 2012, 5:39:40 AM8/7/12
to mongod...@googlegroups.com
On 07/08/2012 11:24, Tim wrote:
> Hi Mark,
>
> I tried it on three different days at different moments.
>
> "sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10"
> Is the very first step that I just wirte into the console, right?
>
> I pinged google.com, that worked.

Tim,

I often have trouble contacting the Ubuntu keyserver as well. It seems
to work very spuriously.

You can add the sources and manually update and install Mongo from
there, but you will get GPG "error" messages whenever you do something.
These can be ignored, and all will work as expected, but do try and
persevere to get the keyserver to add the details as you go along.

-- Paul

markh

unread,
Aug 7, 2012, 5:58:00 AM8/7/12
to mongod...@googlegroups.com
Hi Tim,

Yes, that's the correct first step.

Can you perform the requested "telnet step" please?

Pinging google.com only indicates you have Internet connectivity and your DNS works. We need to establish connectivity to the Ubuntu keyserver and the key authentication is important so we can validate the authenticity of the package.

Thanks

Mark

Tim

unread,
Aug 7, 2012, 6:20:57 PM8/7/12
to mongod...@googlegroups.com
Hi Mark,
Hi Paul,

@  Mark:

I tried "telnet keyserver.ubuntu.com 80" after several minuts it says "connection closed by foreign host".


"xy":~$ telnet keyserver.ubuntu.com 80
Trying 91.189.89.49...
Connected to keyserver.ubuntu.com.
Escape character is '^]'.
Connection closed by foreign host.

@Paul

I'm not very familiar with ubuntu etc., how would I execute such a workaround? Would you propose something like a mirrorport for downloading the package?


Best Regards,
Tim


Am Montag, 6. August 2012 11:28:16 UTC+2 schrieb Tim:

markh

unread,
Aug 8, 2012, 4:38:24 AM8/8/12
to mongod...@googlegroups.com
Hi Tim,

Thanks for your update.

The purpose of running "telnet keyserver.ubuntu.com 80" was to test connectivity to port 80 on the Ubuntu Keyserver. Your test ran successfully :)

Therefore, "sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10" should run successfully. Your previous error indicated that the was a HTTP fetch error, i.e. you couldn't connect to the using HTTP (typically over port 80) to the Keyserver.

Here are some links for setting up an offline repository - 

Thanks

Mark

Tim

unread,
Aug 8, 2012, 5:29:37 AM8/8/12
to mongod...@googlegroups.com
Hi Mark,

thank you :)

Well I just repeated the two commands (telnet keyserver.ubuntu.com 80 ; sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10)

With the same results - (telnet keyserver.ubuntu.com 80 ; [...]gpgkeys: HTTP fetch error 7: couldn't connect to host [...] )
hmm... strange :>

I guess I have to take a look at the offline repository  ;)

thanks,

Tim



Am Montag, 6. August 2012 11:28:16 UTC+2 schrieb Tim:

markh

unread,
Aug 8, 2012, 6:33:41 AM8/8/12
to mongod...@googlegroups.com
Hi Tim,

Given that you can telnet directly on port 80 to the keyserver, it doesn't make sense. 

If you're behind a proxy, it is possible that the proxy is treating the key pull different from the raw telnet request.

Please see here for instructions on configuring 'apt' to work through a proxy.

Other than that, I  think the best option is create the offline repository. I have just created another fresh Ubuntu 10.04 installation and there were no issues so still couldn't replicate your problem.

Thanks

Mark

markh

unread,
Aug 8, 2012, 7:10:19 AM8/8/12
to mongod...@googlegroups.com
Hi Tim,

As a workaround, I wrote a simple bash script to pull the file down and manually import it to the apt keychain. Feel free to use it.

######################
#!/bin/bash
keydir="/var/tmp/10gen-key"
mkdir -p $keydir
wget -O $keydir/10gen-gpg-key.asc http://docs.mongodb.org/10gen-gpg-key.asc
sudo apt-key add $keydir/10gen-gpg-key.asc 
rm -rf $keydir
######################

You will be prompted for your password so you can 'sudo' to add the key.

If you then run 

$ sudo apt-key list

You should receive the following - 
 
/etc/apt/trusted.gpg
--------------------
pub   1024D/437D05B5 2004-09-12
uid                  Ubuntu Archive Automatic Signing Key <ftpm...@ubuntu.com>
sub   2048g/79164387 2004-09-12

pub   1024D/FBB75451 2004-12-30
uid                  Ubuntu CD Image Automatic Signing Key <cdi...@ubuntu.com>

pub   2048R/7F0CEB10 2010-02-05
uid                  Richard Kreuter <ric...@10gen.com>
sub   2048R/A89B0149 2010-02-05

with the 10gen public key imported at the bottom.

I have run this on a few machines and it works ok.

You  can then move onto the next stage (in your original instructions), where you modify the sources.list file.

Thanks

Mark

Tim

unread,
Aug 8, 2012, 8:58:43 AM8/8/12
to mongod...@googlegroups.com
Hi Mark!

I executed your script and it works like you said :)
after that I run a package update and installed mongodb like it is described in http://docs.mongodb.org/manual/tutorial/install-mongodb-on-debian-or-ubuntu-linux/

thank you so much! :):):)



Am Montag, 6. August 2012 11:28:16 UTC+2 schrieb Tim:

markh

unread,
Aug 8, 2012, 9:21:12 AM8/8/12
to mongod...@googlegroups.com
No worries Tim, good to hear :)
Reply all
Reply to author
Forward
0 new messages