8 Replies Latest reply: Jan 30, 2012 2:20 PM by Avi Miller-Oracle RSS

    Local Yum repo setup script failing

    859850
      I'm trying to build a local yum repo for my lab environment. I built a Oracle Linux 5.6 server and registered it with my assigned CSI. I selected the checkbox "Yum Server" and have followed all of the steps in this document http://www.oracle.com/technetwork/topics/linux/yum-repository-setup-085606.html. When I go to run the script 167283.sh, it returns the following error:

      "This system may not be updated until it is associated with a channel"

      The system is associated with a channel, in fact, several.

      I selected a 5.6 build for this repo server because it was the latest 5.x release, but I'm wondering if maybe there is something in the script that isn't compatible with 5.6 and I should use an earlier release. Hoping someone knows the cause of the problem before I build another repo server.

      I don't know if this is related, but there's also one part of the document I don't understand. It says:

      "3.Create a yum repository base directory in /var/www/html. This directory will house the repository. Make sure that the yum repository owner has the read/write permission to this directory."

      I don't see a user that might be the "yum repository owner" in the list of users, so I don't know if the instructions are referring to me, as the one running the script, or if I should be creating a yum user first, or...?

      Thanks for any suggestions.
        • 1. Re: Local Yum repo setup script failing
          779715
          Maybe you need to re-register your box?

          As a quick check, you can just try running

          # up2date --show-channels say?                                                                                                                                                                                                                                               
          • 2. Re: Local Yum repo setup script failing
            859850
            Running up2date --show-channels, I get:

            ol5_x86_64_latest
            ol5_u6_x86_64_latest
            el5_x86_64_oracle_addons

            Here is the output of /var/log/up2date after attempting to run the script:

            [Thu May  5 13:43:39 2011] up2date updating login info
            [Thu May  5 13:43:39 2011] up2date logging into up2date server
            [Thu May  5 13:43:41 2011] up2date successfully retrieved authentication token from up2date server
            [Thu May  5 13:43:41 2011] up2date This system may not be updated until it is associated with a channel.
            [Thu May  5 13:43:41 2011] up2date File "/usr/sbin/up2date", line 1272, in ?
            sys.exit(main() or 0)
            File "/usr/sbin/up2date", line 591, in main
            rhnChannel.setChannels(tempchannels)
            File "/usr/share/rhn/up2date_client/rhnChannel.py", line 285, in setChannels
            return getChannels(label_whitelist=whitelist)
            File "/usr/share/rhn/up2date_client/rhnChannel.py", line 183, in getChannels
            raise up2dateErrors.NoChannelsError(_("This system may not be updated until it is associated with a channel."))
            • 3. Re: Local Yum repo setup script failing
              Dude!
              If you have ULN support you might want to open a support ticket with Oracle regarding this problem.
              • 4. Re: Local Yum repo setup script failing
                Tommyreynolds-Oracle
                The yum repo owner is just your login when you run the repo population script. This is usually root but it doesn't have to be. Make sure this user has privilege to read files in /etc/sysconfig/rhn as well as whatever directory you've put your local repo files into.
                • 5. Re: Local Yum repo setup script failing
                  joebyrne
                  Did you get a solution to this. Just trying to do exactly the same and getting the same error. Can't find anything on metalinks or any other web site that seems relevant.
                  • 6. Re: Local Yum repo setup script failing
                    joebyrne
                    Found the solution, thanks to another post. You have to subscribe to the EL4 add ons channel so that you can find the uln-yum-proxy package, its the install of this that fails in the script so the error is slighty misleading. Once installed the script works.
                    • 7. Re: Local Yum repo setup script failing
                      Avi Miller-Oracle
                      user5863162 wrote:
                      Found the solution, thanks to another post. You have to subscribe to the EL4 add ons channel so that you can find the uln-yum-proxy package
                      You should subscribe to the _addons channel that's appropriate for your version/architecture, so el4, el5 or ol6.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           
                      • 8. Re: Local Yum repo setup script failing
                        Avi Miller-Oracle
                        TommyReynolds wrote:
                        The yum repo owner is just your login when you run the repo population script. This is usually root but it doesn't have to be. Make sure this user has privilege to read files in /etc/sysconfig/rhn as well as whatever directory you've put your local repo files into.
                        BTW, this is not correct: the yum repo owner is not the login when you run the repo population script, it's the user that runs Apache, which is "apache" on Oracle Linux. This is so the Apache process has permission to read the files that are downloaded from ULN and can serve them via HTTP.