I am building a cookbook in Chef to create an automated service in Jenkins. I am installing the latest Jenkins LTS on CentOS, but I am constantly being denied access to the jarfile. Does anyone have a solution to override this?
Here is my output:
* remote_file[/var/lib/jenkins/plugins/jenkins-cli.jar] action create[2016-07-31T16:35:43+00:00] ERROR: Connection refused connecting to http://localhost:8080/jnlpJars/jenkins-cli.jar, retry 1/5
[2016-07-31T16:35:48+00:00] ERROR: Connection refused connecting to http://localhost:8080/jnlpJars/jenkins-cli.jar, retry 2/5
[2016-07-31T16:35:53+00:00] ERROR: Connection refused connecting to http://localhost:8080/jnlpJars/jenkins-cli.jar, retry 3/5
[2016-07-31T16:35:58+00:00] ERROR: Connection refused connecting to http://localhost:8080/jnlpJars/jenkins-cli.jar, retry 4/5
[2016-07-31T16:36:03+00:00] ERROR: Connection refused connecting to http://localhost:8080/jnlpJars/jenkins-cli.jar, retry 5/5
[2016-07-31T16:36:08+00:00] WARN: remote_file[/var/lib/jenkins/plugins/jenkins-cli.jar] cannot be downloaded from http://localhost:8080/jnlpJars/jenkins-cli.jar: Connection refused - Connection refused connecting to http://localhost:8080/jnlpJars/jenkins-cli.jar, giving up
================================================================================
Error executing action `create` on resource 'remote_file[/var/lib/jenkins/plugins/jenkins-cli.jar]'
================================================================================
Errno::ECONNREFUSED
-------------------
Connection refused - Connection refused connecting to http://localhost:8080/jnlpJars/jenkins-cli.jar, giving up
Cookbook Trace:
---------------
/tmp/kitchen/cache/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/runner.rb:41:in `run_action'
Resource Declaration:
---------------------
# In /tmp/kitchen/cache/cookbooks/fanatics_pipeline/recipes/jenkins_plugins.rb
44: remote_file "#{node['plugins_dir']}/jenkins-cli.jar" do
45: source node['cli_jar']
46: action :create
47: mode '0755'
48: notifies :restart, "service[#{node['repo']['name']}]", :delayed
49: end
50: end
Compiled Resource:
------------------
# Declared in /tmp/kitchen/cache/cookbooks/fanatics_pipeline/recipes/jenkins_plugins.rb:44:in `block in from_file'
remote_file("/var/lib/jenkins/plugins/jenkins-cli.jar") do
provider Chef::Provider::RemoteFile
action [:create]
retries 0
retry_delay 2
default_guard_interpreter :default
source ["http://localhost:8080/jnlpJars/jenkins-cli.jar"]
use_etag true
use_last_modified true
declared_type :remote_file
cookbook_name "fanatics_pipeline"
recipe_name "jenkins_plugins"
mode "0755"
atomic_update true
path "/var/lib/jenkins/plugins/jenkins-cli.jar"
end
Platform:
---------
x86_64-linux
Recipe: fanatics_pipeline::jenkins_install
* service[jenkins] action restart
- restart service service[jenkins]
* service[jenkins] action reload
- reload service service[jenkins]
Running handlers:
[2016-07-31T16:36:15+00:00] ERROR: Running exception handlers
Running handlers complete
[2016-07-31T16:36:15+00:00] ERROR: Exception handlers complete
Chef Client failed. 24 resources updated in 04 minutes 10 seconds
[2016-07-31T16:36:15+00:00] FATAL: Stacktrace dumped to /tmp/kitchen/cache/chef-stacktrace.out
[2016-07-31T16:36:15+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2016-07-31T16:36:15+00:00] ERROR: remote_file[/var/lib/jenkins/plugins/jenkins-cli.jar] (fanatics_pipeline::jenkins_plugins line 44) had an error: Errno::ECONNREFUSED: Connection refused - Connection refused connecting to http://localhost:8080/jnlpJars/jenkins-cli.jar, giving up
[2016-07-31T16:36:17+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
Assuming that Jenkins takes just a bit longer to start, you could increase the number of retries that Chef undertakes to retrieve the file:
remote_file "#{node['plugins_dir']}/jenkins-cli.jar" do
source node['cli_jar']
retries 60
action :create
mode '0755'
notifies :restart, "service[#{node['repo']['name']}]", :delayed
end
This will try for 60 times.
You need to make sure Jenkins is started before trying to download the JAR. Also make sure there isn't a firewall or something else blocking the port.
Related
[Question posted by a user on YugabyteDB Community Slack]
I tried to install postgis plugin by following the directions in the docs [Yb Version 2.14.0.0 , Ubuntu 22.04] . What am I missing?
yugabyte=# CREATE EXTENSION postgis;
WARNING: AbortSubTransaction while in DEFAULT state
WARNING: AbortSubTransaction while in ABORT state
WARNING: AbortSubTransaction while in ABORT state
WARNING: AbortSubTransaction while in ABORT state
ERROR: Illegal state: Set active sub transaction 2, when not transaction is running
ERROR: Illegal state: Rollback sub transaction 2, when not transaction is running
ERROR: Illegal state: Rollback sub transaction 2, when not transaction is running
ERROR: Illegal state: Rollback sub transaction 2, when not transaction is running
ERROR: Illegal state: Rollback sub transaction 2, when not transaction is running
PANIC: ERRORDATA_STACK_SIZE exceeded
server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
The connection to the server was lost. Attempting reset: Succeeded.
Found a relevant github issue here https://github.com/yugabyte/yugabyte-db/issues/13359
Here are the steps that were successful for another user:
(Disabled pg audit) sed -ie '/-- Check that pgaudit is disabled or
not installed/,+18d'
/home/yugabyte/postgres/share/extension/postgis--3.2.1.sql
Downgraded Ubuntu from 22.04 and 20.04 and 18 now and repeated the
step1
Now the GLIBC_2.27 with Ubuntu 18.
Rerun the postinstall.sh otherwise it's not working.
It's working now and tested with a couple of GIS data types.
Below is the snapshot of the error
presto> select * from system.runtime.nodes;
Error running command: java.net.ConnectException: Failed to connect to localhost/127.0.0.1:8080
I tried using local IP address and 10.0.2.2 yet the same error occurs.
I am fairly new to Linux (and brand new to chef) and I have ran into an issue when setting up my chef server. I am trying to create an admin user with the command
sudo chef-server-ctl user-create admin Admin Ladmin admin#example.com
examplepass -f admin.pem
but after I keep getting this error:
ERROR: Connection refused connecting...
ERROR: Connection refused connecting to https://127.0.0.1/users/, retry 5/5
ERROR: Network Error: Connection refused - Connection refused
connecting to https://..., giving up
Check your knife configuration and network settings
I also noticed that when I ran chef-server-ctl I got this output:
[2016-12-21T13:24:59-05:00] ERROR: Running exception handlers Running
handlers complete
[2016-12-21T13:24:59-05:00] ERROR: Exception
handlers complete Chef Client failed. 0 resources updated in 01 seconds
[2016-12-21T13:24:59-05:00] FATAL: Stacktrace dumped to
/var/opt/opscode/local-mode-cache/chef-stacktrace.out
[2016-12-21T13:24:59-05:00] FATAL: Please provide the contents of the
stacktrace.out file if you file a bug report
[2016-12-21T13:24:59-05:00] FATAL:
Chef::Exceptions::CannotDetermineNodeName: Unable to determine node
name: configure node_name or configure the system's hostname and fqdn
I read that this error is due to a prerequisite mistake but I'm uncertain as to what it means or how to fix it. So any input would be greatly appreciated.
Your server does not have a valid FQDN (aka full host name). You'll have to fix this before installing Chef server.
I am trying to bootstrap ec2 instance using knife on chef server hosted on azure marketplace. the chef client run fails throwing the following error.
PS C:\Users\xyz\chef-repo> knife ec2 server create -I ami-25c00c46 -f t2.micro
--region ap-southeast-1 -N ec2module
-x ubuntu -i abc.pem -r "role[ec2], role[jenkinserver]" -g sg-9f1b31fa sudo
.ap-southeast-1.compute.amazonaws.com Chef encountered an error attempting to create the client "ec2module"
.ap-southeast-1.compute.amazonaws.com Running handlers:
.ap-southeast-1.compute.amazonaws.com [2016-01-20T11:39:26+00:00] ERROR: Running exception handlers
.ap-southeast-1.compute.amazonaws.com Running handlers complete
.ap-southeast-1.compute.amazonaws.com [2016-01-20T11:39:26+00:00] ERROR: Exception handlers complete
.ap-southeast-1.compute.amazonaws.com Chef Client failed. 0 resources updated in 03 seconds
.ap-southeast-1.compute.amazonaws.com [2016-01-20T11:39:26+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
.ap-southeast-1.compute.amazonaws.com [2016-01-20T11:39:26+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
.ap-southeast-1.compute.amazonaws.com [2016-01-20T11:39:26+00:00] ERROR: undefined method `length' for nil:NilClass
.ap-southeast-1.compute.amazonaws.com [2016-01-20T11:39:26+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
There seems to be a problem with the server SSL certificate and perhaps it is related to Chef issue #4301 (read it).
Try downloading the SSL certificate from the Chef Server:
> knife ssl fetch
Then, you can check it with:
> knife ssl check
I hope this helps.
When my local pouchdb is performing an initial (i.e. long) replication from a remote couchdb, I sometimes get an Error Code 500 (Database encountered an unknown error) on my client - midway through the replication process.
If I look at the server logs I see :
[error] [<0.1304.0>] Unknown peer: {error,enotconn} for #Port<0.4817>
[error] [<0.1195.0>] Unknown peer: {error,enotconn} for #Port<0.4812>
[error] [<0.1314.0>] Unknown peer: {error,enotconn} for #Port<0.4826>
[error] [<0.1063.0>] Unknown peer: {error,enotconn} for #Port<0.4813>
Anyone seen anything like tis before ?
Restarting the client by closing the tab entirely (sometimes more than once) results in the replication completing successfully.