Right... it proxies through apache as you say.

However, if apache is not listening on 127.0.0.1:80, then the replication will 
fail with connection refused, due to the line of code I referenced in 
/usr/lib/python2.6/site-packages/cobbler/action_replicate.py ...
self.local = xmlrpclib.Server("http://127.0.0.1/cobbler_api";)
In order to make this work for me, I had to make apache listen on 127.0.0.1:80 
... which for whatever reason, might not be desirable for everyone.  It would 
be better to make this variable in the replication portion of the framework, 
rather than hard-coding it to localhost.

Andy


From: [email protected] 
[mailto:[email protected]] On Behalf Of Jörgen Maas
Sent: Wednesday, February 05, 2014 1:30 PM
To: cobbler mailing list
Subject: Re: [cobbler] Replication fails with "connection refused"

Well no, XMLRPC binds to localhost on port 25151 by default. For remote access, 
we proxy through Apache at http://server/cobbler_api

Probably the issue is in the apache configuration, on EL check 
/etc/httpd/conf.d/cobbler.conf

On Wed, Feb 5, 2014 at 5:03 PM, Speagle , Andy 
<[email protected]<mailto:[email protected]>> wrote:
Ok, well that wasn't the issue... I've finally pulled my head out and figured 
this out.  The offending issue is that on line 357 of 
/usr/lib/python2.6/site-packages/cobbler/action_replicate.py we see this:

self.local = xmlrpclib.Server("http://127.0.0.1/cobbler_api";)

Which implies that we're configured to listen on localhost:80 ... which I was 
not.  I had apache configured to listen ONLY on my external IP.

I'm thinking that this should be changed... perhaps moved into a configuration 
directive and not hard-coded to localhost.

Thoughts?

Andy

From: 
[email protected]<mailto:[email protected]>
 
[mailto:[email protected]<mailto:[email protected]>]
 On Behalf Of Jörgen Maas
Sent: Wednesday, February 05, 2014 9:42 AM
To: cobbler mailing list
Subject: Re: [cobbler] Replication fails with "connection refused"

Hi there! It seems the server (or a device in the network path) is sending an 
tcp rst (reset) to the client. Can you please verify this by using a tool like 
telnet/netcat?




On Wed, Feb 5, 2014 at 3:07 PM, Speagle , Andy 
<[email protected]<mailto:[email protected]>> wrote:
Hi Folks,

I'm having some trouble getting replication going under the latest 2.5 dev 
release.  I suspect there's something up with my configuration, but I can't 
seem to find what it is.  I cloned my master cobbler server to a remote site, 
change the relevant hostname pieces and the new slave server seems to work in 
itself locally.  But when I attempt to replicate from the master, I get the 
following.

Can anyone clue me in as to what might be happening?

(servernames replaced to protect the innocent)

Andy Speagle


[root@<slave> ~]# cobbler replicate --master=<master> --sync-all
task started: 2014-02-05_080305_replicate
task started (id=Replicate, time=Wed Feb  5 08:03:05 2014)
cobbler_master      = <master>
distro_patterns     = []
profile_patterns    = []
system_patterns     = []
repo_patterns       = []
image_patterns      = []
mgmtclass_patterns  = []
package_patterns    = []
file_patterns       = []
omit_data           = False
sync_all            = True
use_ssl             = False
XMLRPC endpoint: http://<master>/cobbler_api<http://%3cmaster%3e/cobbler_api>
test ALPHA
test BETA
Exception occured: <class 'socket.error'>
Exception value: [Errno 111] Connection refused
Exception Info:
  File "/usr/lib/python2.6/site-packages/cobbler/remote.py", line 87, in run
    rc = self._run(self)
   File "/usr/lib/python2.6/site-packages/cobbler/remote.py", line 216, in 
runner
    self.logger
   File "/usr/lib/python2.6/site-packages/cobbler/api.py", line 1061, in 
replicate
    use_ssl              = use_ssl
   File "/usr/lib/python2.6/site-packages/cobbler/action_replicate.py", line 
358, in run
    self.local.ping()
   File "/usr/lib64/python2.6/xmlrpclib.py", line 1199, in __call__
    return self.__send(self.__name, args)
   File "/usr/lib64/python2.6/xmlrpclib.py", line 1489, in __request
    verbose=self.__verbose
   File "/usr/lib64/python2.6/xmlrpclib.py", line 1235, in request
    self.send_content(h, request_body)
   File "/usr/lib64/python2.6/xmlrpclib.py", line 1349, in send_content
    connection.endheaders()
   File "/usr/lib64/python2.6/httplib.py", line 908, in endheaders
    self._send_output()
   File "/usr/lib64/python2.6/httplib.py", line 780, in _send_output
    self.send(msg)
   File "/usr/lib64/python2.6/httplib.py", line 739, in send
    self.connect()
   File "/usr/lib64/python2.6/httplib.py", line 720, in connect
    self.timeout)
   File "/usr/lib64/python2.6/socket.py", line 567, in create_connection
    raise error, msg

!!! TASK FAILED !!!

_______________________________________________
cobbler mailing list
[email protected]<mailto:[email protected]>
https://lists.fedorahosted.org/mailman/listinfo/cobbler



--
Grtz,
Jörgen Maas

_______________________________________________
cobbler mailing list
[email protected]<mailto:[email protected]>
https://lists.fedorahosted.org/mailman/listinfo/cobbler



--
Grtz,
Jörgen Maas
_______________________________________________
cobbler mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/cobbler

Reply via email to