Closed ltutar closed 9 years ago
xldeploy is trying to reach the valid rest url .. which is http://user:password@hostname:4516/
are u sure that xldeploy is up and running when this occurs?
I am definitely sure that XL Deploy is up and running. You can reproduce it easily. Just install xl deploy with default settings and go to the URL http://admin:xebialabs@puppetagent.home:4516/deployit/deployit in your browser. 4516/deployit/deployit is not valid.
The context root for the GUI is http://<fqdn>:<port>/deployit
, the context root for the REST url is <contextroot GUI>/deployit
. The Puppet run tries to reach the REST url to check if it is up. With a checked out master
and default settings it was able to reach the REST url. Maybe it is a slow startup? Or did you change the context root?
I downloaded the master 1 hour ago. Run it again. When I type in http://192.168.234.88:4516/deployit/deployit in the browser. I see the text: Could not find resource for relative : / of full path: http://192.168.234.88:4516/deployit/deployit
or when I use wget: [root@puppetagent xl-deploy-server]# wget --user=admin --password=xebia1 http://192.168.234.88:4516/deployit/deployit --2015-04-17 22:20:35-- http://192.168.234.88:4516/deployit/deployit Connecting to 192.168.234.88:4516... connected. HTTP request sent, awaiting response... 401 Full authentication is required to access this resource Reusing existing connection to 192.168.234.88:4516. HTTP request sent, awaiting response... 500 Server Error 2015-04-17 22:20:35 ERROR 500: Server Error.
[root@puppetagent xl-deploy-server]# wget --user=admin --password=xebia1 http://192.168.234.88:4516/deployit --2015-04-17 22:20:39-- http://192.168.234.88:4516/deployit Connecting to 192.168.234.88:4516... connected. HTTP request sent, awaiting response... 302 Found Location: http://192.168.234.88:4516/deployit/ [following] --2015-04-17 22:20:39-- http://192.168.234.88:4516/deployit/ Reusing existing connection to 192.168.234.88:4516. HTTP request sent, awaiting response... 200 OK Length: 4036 (3.9K) [text/html] Saving to: “deployit.1”
100%[===============================================================================================================================================================>] 4,036 --.-K/s in 0s
2015-04-17 22:20:39 (322 MB/s) - “deployit.1” saved [4036/4036]
[root@puppetagent xl-deploy-server]#
I also use the default context-root. this is my yaml. xldeploy::server::version: '4.5.3' xldeploy::server::admin_password: 'xebia1' xldeploy::server::download_user: 'tutti' xldeploy::server::download_password: 'frutti' xldeploy::server::install_type: 'download' xldeploy::server::install_license: true xldeploy::server::custom_license_source: 'https://download-me/download/deployit-license.lic'
I think that at least 4.5.3 is not reacting to /deployit You are right about the URL as the documentation also tells: These are the public REST services exposed by the XL Deploy Server. Note that the XL Deploy REST API can be accessed via a URL of the form: http://[host]:[port]/[context-root]/deployit/[service-resource]. Example: http://localhost:4516/deployit/control
The following works: [root@puppetagent xl-deploy-server]# wget --user=admin --password=xebia1 http://192.168.234.88:4516/deployit/deployit/server/info --2015-04-17 22:24:06-- http://192.168.234.88:4516/deployit/deployit/server/info Connecting to 192.168.234.88:4516... connected. HTTP request sent, awaiting response... 401 Full authentication is required to access this resource Reusing existing connection to 192.168.234.88:4516. HTTP request sent, awaiting response... 200 OK Length: 11422 (11K) [text/xml] Saving to: “info.1”
100%[===============================================================================================================================================================>] 11,422 --.-K/s in 0s
2015-04-17 22:24:06 (554 MB/s) - “info.1” saved [11422/11422]
[root@puppetagent xl-deploy-server]#
So the server is responding to the REST context root just fine. My guess is that the server startup takes longer than the retries Puppet does. What you can do to check this for certain:
$ service xl-deploy stop
$ puppet agent -t
While you do the Puppet agent run, in another terminal, tail -f /var/log/xl-deploy/deployit.log
to check for the line:
2015-04-17 20:32:15.427 [main] {} INFO com.xebialabs.deployit.Server - XL Deploy Server has started.
You can easily track if the server is up in time while Puppet is trying to reach for it. Let me know what you get.
You are partly right. While the server is starting up, I get: otice: /Stage[main]/Xldeploy::Server::Service/Service[xl-deploy]/ensure: ensure changed 'stopped' to 'running' Info: /Stage[main]/Xldeploy::Server::Service/Service[xl-deploy]: Unscheduling refresh on Service[xl-deploy] Notice: unable to reach http://admin:xebialabs@puppetagent.home:4516/deployit/deployit Notice: unable to reach http://admin:xebialabs@puppetagent.home:4516/deployit/deployit Notice: unable to reach http://admin:xebialabs@puppetagent.home:4516/deployit/deployit Notice: unable to reach http://admin:xebialabs@puppetagent.home:4516/deployit/deployit Notice: unable to reach http://admin:xebialabs@puppetagent.home:4516/deployit/deployit Notice: unable to reach http://admin:xebialabs@puppetagent.home:4516/deployit/deployit Notice: unable to reach http://admin:xebialabs@puppetagent.home:4516/deployit/deployit Notice: unable to reach http://admin:xebialabs@puppetagent.home:4516/deployit/deployit Notice: unable to reach http://admin:xebialabs@puppetagent.home:4516/deployit/deployit Notice: unable to reach http://admin:xebialabs@puppetagent.home:4516/deployit/deployit Notice: unable to reach http://admin:xebialabs@puppetagent.home:4516/deployit/deployit Notice: unable to reach http://admin:xebialabs@puppetagent.home:4516/deployit/deployit Notice: unable to reach http://admin:xebialabs@puppetagent.home:4516/deployit/deployit Notice: unable to reach http://admin:xebialabs@puppetagent.home:4516/deployit/deployit Notice: unable to reach http://admin:xebialabs@puppetagent.home:4516/deployit/deployit Notice: unable to reach http://admin:xebialabs@puppetagent.home:4516/deployit/deployit Notice: unable to reach http://admin:xebialabs@puppetagent.home:4516/deployit/deployit Notice: unable to reach http://admin:xebialabs@puppetagent.home:4516/deployit/deployit Notice: unable to reach http://admin:xebialabs@puppetagent.home:4516/deployit/deployit Notice: unable to reach http://admin:xebialabs@puppetagent.home:4516/deployit/deployit Notice: unable to reach http://admin:xebialabs@puppetagent.home:4516/deployit/deployit Notice: Finished catalog run in 48.98 seconds [root@puppetagent xl-deploy-server]#
and it stopped when the last line in the log printed. 2015-04-17 22:38:37.390 [main] {} INFO com.xebialabs.deployit.Server - XL Deploy Server has started. 2015-04-17 22:38:37.409 [main] {} INFO com.xebialabs.deployit.Server - You can now point your browser to http://puppetagent.home:4516/deployit/
It seems that the puppet file port_check.rb is reacting to two things. 1)Errno.ECONNREFUSED which means Connection refused 2)Errno::EHOSTUNREACH which means No route to host
And not to HTTP error codes. This was my confusion. Because the REST URL that puppet uses gives 401. 1) wget gives 401 for wget http://admin:xebialabs@puppetagent.home:4516/deployit/deployit because in params.pp you have $rest_user = 'admin' $rest_password = xldeploy_credentials('admin_password', 'xebialabs') $admin_password = xldeploy_credentials('admin_password', 'xebialabs') and in my yaml, I only defined admin_password. This clashes with rest_user since it is also set to admin and the rest_password is default xebialabs.
2) And when I use the correct password, I get HTTP 500. The following gives 500, since the password is correct because I typed it in myself. [root@puppetagent log]# wget http://admin:xebia1@puppetagent.home:4516/deployit/deployit --2015-04-17 22:45:38-- http://admin:_password_@puppetagent.home:4516/deployit/deployit Resolving puppetagent.home... 127.0.0.1 Connecting to puppetagent.home|127.0.0.1|:4516... connected. HTTP request sent, awaiting response... 401 Full authentication is required to access this resource Reusing existing connection to puppetagent.home:4516. HTTP request sent, awaiting response... 500 Server Error 2015-04-17 22:45:38 ERROR 500: Server Error.
I will close this issue since an HTTP error code like 401 or 500 is also a reaction from the jetty server of XL Deploy which makes the statement Errno::ECONNREFUSED, Errno::EHOSTUNREACH false.
I have the following issue with PE 3.3.2 and PE 3.7.2. I run the xldeploy::server with the default settings.
Notice: /Stage[main]/Xldeploy::Server::Housekeeping/File[/opt/xl-deploy/xl-deploy-server/scripts/housekeeping.py]/ensure: defined content as '{md5}df1dcb2f8df705571ea1a2510419ff33' Notice: /Stage[main]/Xldeploy::Server::Housekeeping/Cron[xldeploy-housekeeping]/ensure: created Notice: unable to reach http://admin:xebialabs@puppetagent.home:4516/deployit/deployit Notice: unable to reach http://admin:xebialabs@puppetagent.home:4516/deployit/deployit Notice: unable to reach http://admin:xebialabs@puppetagent.home:4516/deployit/deployit
But the XL Deploy is running on http://admin:xebialabs@puppetagent.home:4516/deployit The URL above must be edited in order to make the link reachable.
Tue Apr 14 15:58:24 CEST 2015
admin.password={b64}rBeGnO+rWpx4xPyC+C+B6A\=\= jcr.repository.path=repository threads.min=4 ssl=false client.session.remember.enabled=true http.bind.address=0.0.0.0 http.context.root=/deployit threads.max=24 client.session.timeout.minutes=0 http.port=4516 hide.internals=false importable.packages.path=importablePackages