Installing MongoDB Cpanel

Hi @chris, @Sheeri_Cabral:

I tried:

sudo yum install -y mongodb-org-4.4.2 (notice that I added the suffix “-4.4.2”)

and it was the ouput (focused on mongo):

https://repo.mongodb.org/yum/redhat/7/mongodb-org/4.4/x86_64/repodata/5e1c8230432d7955c1fd049444cd301ce2a6b38b-primary.sqlite.bz2: [Errno 14] curl#51 - “Unable to communicate securely with peer: requested domain name does not match the server’s certificate.”============================== ] 289 kB/s | 16 MB 00:00:26 ETA

It not gives only with mongo but with another packages.

Do I understand well if I affirm this error is from my end?

Maybe. I’m guessing a proxy an injected mirror or proxy at this point. Please try with the --noplugins flag.

[~]# sudo yum install -y mongodb-org-4.4.2 --noplugins
No package mongodb-org-4.4.2 available.
Error: Nothing to do

Based on this error I think there is a proxy or a security device in between you and the repo.
You could try changing the https to http in the repo file, that may work.

No, it didn’t work.

I will try by googling a solution and I will return to provide the solution that worked to be added to your doc.

Warmest regards. Thanks for your help/time.

2 Likes

Hrm, to be fair the certificate is for a different domain name -

curl --insecure -v [https://repo.mongodb.org](https://repo.mongodb.org/) 2>&1 | awk ‘BEGIN { cert=0 } /^\* Server certificate:/ { cert=1 } /^\*/ { if (cert) print }’

shows me the url is repo.mongodb.com

So it’s a .org URL with a .com certificate. However, the certificate was made to be used in this fashion without errors (there’s a SAN entry for the .org), and the mismatch isn’t universal (as many folks aren’t having the problem).

If it’s not a proxy error, I wonder if it’s something like SELinux or a similar security program is being too strict and not accepting the SAN entry?

A proxy is

2 Likes

My SELinux is really stale but I don’t think that is a policy.

It could point to an outdated crypto library or dependency of yum. In which case a yum update should resolve.

But if changing the repo uri’s from https to http does not work I think it is something else.

Hi there,
I executed yum update but it still happens the same.

I am going to investigate more about this issue.

Best regards.

Could not retrieve mirrorlist http://httpupdate.cpanel.net/ea4-c7-x86_64-mirrorlist error was
14: HTTP Error 403 - Forbidden

Hi @Abelardo_Leon_Gonzal

Really looks like an issue with your vps. You’d best follow up with them.

1 Like

I have updated my mongo-db.repo file with this content
[mongodb-org-3.2]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/3.2/x86_64/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-3.2.asc
but it still continues showing the same output:
No package mongodb-org available.

¿?

When I paste this url at my browser:
https://repo.mongodb.org/yum/redhat/7/mongodb-org/3.2/x86_64/repodata/repomd.xml

mongodb-org-3.2 | 2.5 kB 00:00:00
No package mongodb-org available.

The same for the 4.4 version.

I highlighted that part of that url:

Where is configured that variable and which values it contains?

Weird.

Mine, right now.
08:51 $ date; curl https://repo.mongodb.org/yum/redhat/7/mongodb-org/3.2/x86_64/repodata/repomd.xml
Tue 16 Mar 2021 08:51:48 AM EDT
<?xml version="1.0" encoding="UTF-8"?>
<repomd xmlns="http://linux.duke.edu/metadata/repo" xmlns:rpm="http://linux.duke.edu/metadata/rpm">
 <revision>1547831919</revision>
<data type="filelists">
  <checksum type="sha">d99bc03a70733f843a488f2dbbffb5ce0b7fc185</checksum>
  <open-checksum type="sha">30bacd03ebf3a1afcdbb1768113caefa28d7ee05</open-checksum>
  <location href="repodata/d99bc03a70733f843a488f2dbbffb5ce0b7fc185-filelists.xml.gz"/>
  <timestamp>1547831920</timestamp>
  <size>4511</size>
  <open-size>56101</open-size>
</data>
<data type="primary">
  <checksum type="sha">1218f454e38a0f0c086ab43721a1886a078a97bb</checksum>
  <open-checksum type="sha">7fab44d0811cb1b6111e96cc79b46705793f2c68</open-checksum>
  <location href="repodata/1218f454e38a0f0c086ab43721a1886a078a97bb-primary.xml.gz"/>
  <timestamp>1547831920</timestamp>
  <size>15836</size>
  <open-size>719331</open-size>
</data>
<data type="primary_db">
  <checksum type="sha">e6578937bfa85c931fa150cdd13cf40d85af2dcf</checksum>
  <open-checksum type="sha">3ca26abf0353c807cc2c76cd6074890850cce93b</open-checksum>
  <location href="repodata/e6578937bfa85c931fa150cdd13cf40d85af2dcf-primary.sqlite.bz2"/>
  <timestamp>1547831920</timestamp>
  <database_version>10</database_version>
  <size>95796</size>
  <open-size>795648</open-size>
</data>
<data type="other_db">
  <checksum type="sha">34e0e27c8a076fd6ab72aeed271657e6c9f09334</checksum>
  <open-checksum type="sha">0a18fa15fe0200fa78bf50c5ae611330620ab6c2</open-checksum>
  <location href="repodata/34e0e27c8a076fd6ab72aeed271657e6c9f09334-other.sqlite.bz2"/>
  <timestamp>1547831920</timestamp>
  <database_version>10</database_version>
  <size>9213</size>
  <open-size>49152</open-size>
</data>
<data type="other">
  <checksum type="sha">6aa72706a70d0d786600769e042ed54811e47e80</checksum>
  <open-checksum type="sha">d4646001d729393636a2a01b022cc2ab3f76ed7b</open-checksum>
  <location href="repodata/6aa72706a70d0d786600769e042ed54811e47e80-other.xml.gz"/>
  <timestamp>1547831920</timestamp>
  <size>4064</size>
  <open-size>58976</open-size>
</data>
<data type="filelists_db">
  <checksum type="sha">d98853dfe0b1a36e1b93f38a1bc2a3bad4315e2f</checksum>
  <open-checksum type="sha">497429ef4603d0b15fec4f5b8ba20d3676afd853</open-checksum>
  <location href="repodata/d98853dfe0b1a36e1b93f38a1bc2a3bad4315e2f-filelists.sqlite.bz2"/>
  <timestamp>1547831920</timestamp>
  <database_version>10</database_version>
  <size>12214</size>
  <open-size>54272</open-size>
</data>
</repomd>

I have executed the curl statement and it worked!

Could be possible that yum has a bug? ¿?

1 Like

Very unlikely as I can run it in Centos7 and Redhat 7 fine. Are you still trying this on CPanel. Have you contacted their support?

Yes, but they redirect to your documentation.

Which version of yum have you installed? They could be different.

That variable wasn’t defined. I updated that yum.conf and I have got this result:
Loaded plugins: fastestmirror, langpacks, universal-hooks
Loading mirror speeds from cached hostfile

  • EA4: 206.130.99.76
  • cpanel-addons-production-feed: 206.130.99.76
  • cpanel-plugins: 206.130.99.76
  • remi-php74: mirror.sjc02.svwh.net
  • remi-safe: mirror.sjc02.svwh.net
    EA4 | 2.9 kB 00:00:00
    cpanel-addons-production-feed | 2.9 kB 00:00:00
    cpanel-plugins | 2.9 kB 00:00:00
    base | 3.6 kB 00:00:00
    docker-ce-stable | 3.5 kB 00:00:00
    epel | 4.7 kB 00:00:00
    extras | 2.9 kB 00:00:00
    imunify360 | 2.7 kB 00:00:00
    imunify360-rollout-1 | 3.0 kB 00:00:00
    imunify360-rollout-2 | 3.0 kB 00:00:00
    imunify360-rollout-3 | 3.0 kB 00:00:00
    imunify360-rollout-4 | 3.0 kB 00:00:00
    mongodb-org-4.4 | 2.5 kB 00:00:00
    mysql-connectors-community | 2.6 kB 00:00:00
    mysql-tools-community | 2.6 kB 00:00:00
    mysql57-community | 2.6 kB 00:00:00
    remi-php74 | 3.0 kB 00:00:00
    remi-safe | 3.0 kB 00:00:00
    ul | 2.9 kB 00:00:00
    ul_ipage | 2.9 kB 00:00:00
    updates | 2.9 kB 00:00:00
    No package mongodb-org available.
    Error: Nothing to do