New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using cobbler for On-Premise Ubuntu Server Repo #2431
Comments
Also tried below cobbler repo add --mirror=http://mirror.enzu.com/ubuntu/dists/bionic/ --name=bionic-all-v1 --arch=x86_64 --breed=apt task started: 2020-10-17_202908_reposync For details, see man page. Exception occured: <class 'cobbler.cexceptions.CX'> .. |
I did look at https://help.ubuntu.com/community/Debmirror ... but did not get clue how i can use this with cobbler .. |
Since
I am unable to reproduce this on Cobbler 3.1.2. It seems to be broken, so I can't do anything more than what I mentioned above. Cobbler error:
Possible cause: |
@hbokh thanks for reply & help ! that seems working, but any idea on how i will get the keys imported .. i did below
Now error is
|
Not sure, but I found this: #1900 (comment) And this as a reference: https://wiki.ordi49.fr/doku.php/en:tech:dev:debmirror |
thanks again .. i was also looking for below response in google.. seems that option is not there now or i do not how to use ie passing flag --no-check-gpg. https://serverfault.com/questions/669809/sync-ubuntu-repository-with-cobbler-server-fails You haven't added the keys to the gpg keychain. I am running a near identical configuration to yours (CentOS 6.6/trusty) and resolved this particular issue by passing the flag --no-check-gpg. A more ideal solution would be to download and manually add the keys to your keyring. |
Hi, try something like gpg --homedir /var/lib/cobbler --recv-keys 3B4FE6ACC0B21F32 prior to importing the repo. |
@dansou901 thanks i will try .. BTW i tried below but still error .. my cobbler box is CentOS 7 & i am trying this Ubuntu repo on it ... === So ran above on a Ubunto box & copied it over ... == task started: 2020-10-18_020720_reposync |
Still no luck gpg --homedir /var/lib/cobbler --recv-keys 3B4FE6ACC0B21F32 === cobbler reposync --only="bionic-all-v3" |
Ubuntu notes i see like below If the maintainer does not tell you how to add the key then you need to find the "key hash" of the repository in order to look up the key on a public key server. Once you know the key hash, the key can be retrieved using the command: gpg --keyserver [name of keyserver] --recv-keys [keyhash] gpg --keyserver subkeys.pgp.net --recv-keys CE49EC21 gpg --export --armor CE49EC21 | sudo apt-key add - |
ah sorry, homedir has to be /var/lib/cobbler/.gnupg and it seems you have to use --keyserver and specify one, just search hkp keyservers |
gpg --keyserver hkp://keyserver.ubuntu.com:80 --homedir /var/lib/cobbler/.gnupg --recv-keys 3B4FE6ACC0B21F32 |
seems my network firewall issue .. i did on other box & works , thanks @dansou901 gpg --keyserver hkp://keyserver.ubuntu.com:80 --homedir . --recv-keys 3B4FE6ACC0B21F32 i will see what i can do from here .. |
for the unsafe permissions do a chmod 700 /var/lib/cobbler/.gnupg |
and in the command before you forgot to set homedir to /var/lib/cobbler/.gnupg which is home to the keyring cobbler evaluates |
i copied the files created over to this CentOS box ... i see new error now ####################################### /var/lib/cobbler/.gnupg : # ls Also did cp trustdb.gpg trustedkeys.gpg as that file cobbler wants seems... ####################################### cobbler reposync --only="bionic-all-v3" received on stderr: rsync: failed to connect to mirror.enzu.com (23.89.0.110): No route to host (113) |
it could be purely my network firewall.. so i will have to work with firewall folks.. |
i moved this vm to new subnet .. now error is diff httpd does not appear to be running and proxying cobbler, or SELinux is in the way. Original traceback: started httpd .. but still the command seems hung |
selinux is disabled on the box already .. not sure if it needs python 3 |
I will be back in 10 odd hrs .. thanks |
FYI that mirror is not running rsync at all, only http on port 80. Try a mirror which does, for example the one in the Netherlands: http://nl.archive.ubuntu.com/ - just to see if it works. Or use option
|
Thanks for reply for now i tried below nc -zv nl.archive.ubuntu.com 80 ####################################### similar error cobbler repo add --mirror=http://nl.archive.ubuntu.com/ --name=bionic-all-v4 --arch=x86_64 --breed=apt --apt-components=main ^Chttpd does not appear to be running and proxying cobbler, or SELinux is in the way. Original traceback: ####################################### seems no luck with cobbler repo add --mirror=http://nl.archive.ubuntu.com/ --name=bionic-all-v4 --arch=x86_64 --breed=apt --apt-components=main --breed=rsync :( |
How is your cobbler set up? Do you have httpd running in front of cobbler and properly configured? Please show us your httpd config files for cobbler. |
let me get back on that on how i did the setup of cobbler with http details ####################################### both below point to received on stderr: Option dist requires an argument ####################################### root@server : Sun Oct 18 : 14:29:51 : ~ : # cobbler repo add --mirror=http://nl.archive.ubuntu.com/ubuntu/dists/bionic/ --name=bionic-all-v7 --arch=x86_64 --breed=apt --apt-components=main For details, see man page. Exception occured: <class 'cobbler.cexceptions.CX'> Exception occured: <class 'cobbler.cexceptions.CX'> reposync failed, tries left: 0 Exception occured: <class 'cobbler.cexceptions.CX'> !!! TASK FAILED !!! ####################################### root@server : Sun Oct 18 : 14:30:15 : ~ : # cobbler repo add --mirror=http://mirror.enzu.com/ubuntu/dists/bionic/ --name=bionic-all-v8 --arch=x86_64 --breed=apt --apt-components=main For details, see man page. Exception occured: <class 'cobbler.cexceptions.CX'> Exception occured: <class 'cobbler.cexceptions.CX'> reposync failed, tries left: 0 Exception occured: <class 'cobbler.cexceptions.CX'> !!! TASK FAILED !!! ####################################### |
How is your cobbler set up? Do you have httpd running in front of cobbler and properly configured? Please show us your httpd config files for cobbler. All i did is install cobbler with epel i also just checked https://ip/cobbler_web is not working |
i am planning to use it more of yum & apt repos ####################################### cobbler repo list ####################################### ####################################### then did cobbler reposync ####################################### i remember post fresh install i ran same cmd & it downloaded 30 odd gbs rpm files |
so i think, cobbler repo add , for ubuntu needs more options.. we missing something per error message |
tried sudo cobbler repo add --name=local-trusty --breed=apt --arch=x86_64 --mirror=http://hu.archive.ubuntu.com/ubuntu/ --apt-components=main,restricted,universe,multiverse --apt-dists=trusty,trusty-updates,trusty-security cobbler reposync ####################################### task started: 2020-10-18_145729_reposync received on stderr: rsync: failed to connect to hu.archive.ubuntu.com (45.67.159.244): Connection refused (111) Exception occured: <class 'cobbler.cexceptions.CX'> Exception occured: <class 'cobbler.cexceptions.CX'> reposync failed, tries left: 0 Exception occured: <class 'cobbler.cexceptions.CX'> !!! TASK FAILED !!! |
I just below per @hbokh cobbler repo add --mirror=http://mirror.enzu.com/ubuntu/ --name=bionic-all-v1 --arch=x86_64 --breed=apt --apt-dists=bionic --apt-components=main then cobbler reposync --only="bionic-all-v1" now running reposync showing no output so far .. |
reposync is done, not sure if it downloaded anything what will be client side testing i can do next ... what to update in /etc/apt/sources.list thanks |
so only change in recent time is i removed all old repos |
apparently it did not work & as i did so many things to get this working & lost track, i am going to start from scratch closing this topic Thanks for those who replied |
@Kirandp6 Please let me know if this works when you try again. I want to make Cobbler work as it did back in the days. This project was dead for a long time but I am trying my best to fix it up again because I think it is quite unique. The only thing I am lacking to fix it up completely is time to code and hardware to test at home. Thus people like you are better then any money since you are using it in the real world! |
Sure re-opening |
@SchoolGuy thanks for the kind response .. i created new issue where i gave my feedback /issues - #2437 .. if we can discuss in that will help. i am open for a zoom call if that will make it any faster .. i am in PST but is flexible on time , thanks , closing this one |
Version
Cobbler 2.8.5
source: ?, ?
build time: Tue Oct 15 01:59:43 2019
Question
I would like Using cobbler for On-Premise Ubuntu Server Repo , ie on-premise server will sync internet repo on a schedule & then it will act as a On-premise repo.
I have Centos 7 server on which cobbler is installed. Here is the error i am getting
#######################################
Commands
cobbler repo add --mirror=http://mirror.enzu.com/ubuntu/dists/bionic/ --name=bionic-all
cobbler reposync --only="bionic-all"
#######################################
Error is :
http://mirror.enzu.com/ubuntu/dists/bionic/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found
#######################################
Details
task started: 2020-10-17_202120_reposync
task started (id=Reposync, time=Sat Oct 17 20:21:20 2020)
hello, reposync
run, reposync, run!
creating: /var/www/cobbler/repo_mirror/bionic-all/config.repo
creating: /var/www/cobbler/repo_mirror/bionic-all/.origin/bionic-all.repo
running: /usr/bin/reposync -l -n -d --config=/var/www/cobbler/repo_mirror/bionic-all/.origin/bionic-all.repo --repoid=bionic-all --download_path=/var/www/cobbler/repo_mirror
received on stdout:
received on stderr: Error setting up repositories: failure: repodata/repomd.xml from bionic-all: [Errno 256] No more mirrors to try.
http://mirror.enzu.com/ubuntu/dists/bionic/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found
Exception occured: <class 'cobbler.cexceptions.CX'>
Exception value: 'cobbler reposync failed'
Exception Info:
File "/usr/lib/python2.7/site-packages/cobbler/utils.py", line 106, in die
raise CX(msg)
Exception occured: <class 'cobbler.cexceptions.CX'>
Exception value: 'cobbler reposync failed'
Exception Info:
File "/usr/lib/python2.7/site-packages/cobbler/action_reposync.py", line 120, in run
self.sync(repo)
File "/usr/lib/python2.7/site-packages/cobbler/action_reposync.py", line 164, in sync
return self.yum_sync(repo)
File "/usr/lib/python2.7/site-packages/cobbler/action_reposync.py", line 432, in yum_sync
utils.die(self.logger,"cobbler reposync failed")
File "/usr/lib/python2.7/site-packages/cobbler/utils.py", line 114, in die
raise CX(msg)
reposync failed, tries left: 0
reposync failed, retry limit reached, skipping
running: chown -R root:apache /var/www/cobbler/repo_mirror/bionic-all
received on stdout:
received on stderr:
running: chmod -R 755 /var/www/cobbler/repo_mirror/bionic-all
received on stdout:
received on stderr:
Exception occured: <class 'cobbler.cexceptions.CX'>
Exception value: 'overall reposync failed, at least one repo failed to synchronize'
Exception Info:
File "/usr/lib/python2.7/site-packages/cobbler/utils.py", line 106, in die
raise CX(msg)
Exception occured: <class 'cobbler.cexceptions.CX'>
Exception value: 'overall reposync failed, at least one repo failed to synchronize'
Exception Info:
File "/usr/lib/python2.7/site-packages/cobbler/remote.py", line 82, in run
rc = self._run(self)
File "/usr/lib/python2.7/site-packages/cobbler/remote.py", line 243, in runner
3), name=name, nofail=nofail, logger=self.logger)
File "/usr/lib/python2.7/site-packages/cobbler/api.py", line 804, in reposync
return reposync.run(name)
File "/usr/lib/python2.7/site-packages/cobbler/action_reposync.py", line 149, in run
utils.die(self.logger,"overall reposync failed, at least one repo failed to synchronize")
File "/usr/lib/python2.7/site-packages/cobbler/utils.py", line 114, in die
raise CX(msg)
!!! TASK FAILED !!!
#######################################
Any suggestion Please
Thanks
The text was updated successfully, but these errors were encountered: