Jenkins-Docker plugin Configuration - jenkins-docker

I am trying to configure Docker-plugin in jenkins, need few details.
How to find URL ?
I verified with localhost:8080, Test connection failed with connection refused.
I am not sure what i am missing in the configuration.
Any please help with required details?

Make sure docker is running on 8080: netstat -nlp|grep 2375
Which plugin are you using? Try docker_commons_plugin. To specify the Docker Host URI use tcp://127.0.0.1:2375 (if it's localhost)

Related

Windows - jboss on docker, connection refused to local oracle database

I have Jboss running in a docker container. On jboss I have defined a connection to the xa-datasource database as the ip address of my computer and not localhost because I work in Windows 10. Despite the correct ip and port to the database (oracle) I keep getting the connection refused error. I run jboss with the command
docker run -d -p 8080:8080 -p 9990:9990 myjboss
Can anyone help me, or do I need any additional settings in my docker. I will add that I also test alpine and in the container (exec) I can ping my ip address.
Thanks a lot for all the answers. I would like to add that I tested all other solutions contained in similar questions, but unfortunately I did not get the expected results.
If you can ping your host IP, but you can’t connect to the database, granted that the DB is running and the listener is up...
I’d advise you to check the Windows Firewall settings.
Maybe try disabling it to check if you can actually connect to the database, if so, add an Inbound Rule to the firewall to allow connections on port 1521 (or whatever port your listener is running on)
I solved this problem by using not ip/localhost but host.docker.internal as described here -> https://docs.docker.com/docker-for-windows/networking/

SonarQube server not showing in browser

I have a Linux VM running with a Jenkins, Nexus and SonarQube server on it. The IP for the VM is 192.168.56.2 and I have no trouble accessing both Jenkins and Nexus on ports 8080 and 8081 respectively. However, when I try to access 192.168.56.2:9000 for SonarQube it just says 192.168.56.2 refused to connect.
When I run systemctl status sonar in the terminal it shows that SonarQube is active and running. I have opened the firewall to port 9000 and I have not changed any of the default settings. Does anyone have any idea what might be the issue?
SonarQube will only be listening on 'loopback' rather than on all inbound IP addresses. In your server's sonar.properties file, you'll need to set the Web information in order to access the server remotely, specifically the following values:
sonar.web.host: 192.168.56.2
sonar.web.port: 80 # if you want to use a port other than 9000
Also, in the web UI's Settings, under the "General" section, set the "Server base URL" value so that links and redirects issued by SonarQube target the correct location.

How to find out (or what is) the correct Docker Host Url to use in jenkins to specify Docker host?

I have docker (docker for windows server) and jenkins both running on a windows server 2019 and I am trying to add Docker Host URI in Jenkins but I ran into timeout error or connection refused error all time and cannot connect to docker host.
I tried the following urls:
tcp://:2375 (or 2376),
tcp://localhost:2375 (or 2376),
tcp://127.0.0.1:2375 (or 2376)
Do I have to configure anything else on docker or jenkins?. I cannot move forward in this issue. it would really help me if any one can provide some guidance to solve this.
I was facing similar issue. You need to expose your docker demon at port 2375. I did it via docker desktop.
Then added HOST URl as tcp://127.0.0.1:2375

How to set a proxy on bosh-cli

I'm trying to upload a bosh release into the director. I use a Virtualbox environment and I'm behind a corporate proxy.
Even when I've tried to set the proxy with
export https_proxy=http://myproxy:3128
or with
export BOSH_ALL_PROXY=http://myproxy:3128
I never manage to do any download
Does someone know how to do ?
MBP-de-Olivier:bosh-deployment olivier$ bosh -e vbox upload-release https://bosh.io/d/github.com/cloudfoundry/cf-release?v=283
Using environment '192.168.50.6' as client 'admin'
Task 13
Task 13 | 15:28:45 | Downloading remote release: Downloading remote release (00:00:05)
L Error: Failed to open TCP connection to bosh.io:443 (Address family not supported by protocol - socket(2) for "bosh.io" port 443)
Task 13 | 15:28:50 | Error: Failed to open TCP connection to bosh.io:443 (Address family not supported by protocol - socket(2) for "bosh.io" port 443)
Have you tried to download the release locally and upload to your bosh director from local host.
I think you should add the following lines:
export http_proxy=http://yourproxy:3128
export https_proxy=http://yourproxy:3128
Are you sure that 3128 is the correct port? This seems as if you are using cntlm (or another similar local proxy). If it is a local proxy: Is the service running? Can the service connect to the corporate proxy?
My guess is that the BOSH director does not know it must use a proxy. I'm under the impression you tried to configure the proxy at the bosh-cli level, but the download is performed by the director itself.
You could try to re-deploy the director with your proxy configuration. You can use this ops file in order to do so.

EC2:Connection reset by peer

Hi i am configuring ftp on amazon ec2 mincro linux instance i have suceessfully install and configure vsftpd on my instance, and also i create user for my ftp. but when i ftp my instance it will give following error
Error:
"Connection reset by by peer"
can any one help me regarding this what was im going wrong, or what im missing,
Note i have configure instance firewall as following
Custom tcp rule:
Port range : 20 - 21
source : 0.0.00/0
any hep is greatly appreciated. thanks in advance.
I'm using an instance for VPN and FTP(vsftpd) servers. Add this in the /etc/vsftpd/vsftpd.conf
pasv_addr_resolve=NO|YES
pasv_address=You Elastic IP Address|Hostname
pasv_min_port=2020
pasv_max_port=2020
Where pasv_address is your Elastic IP Address (set pasv_addr_resolve=NO) or you can use dyndns service and set pasv_addr_resolve=YES correspondingly. Then open 2020 and 21 ports in firewall. In this configuration you can use FTP server even in passive mode (Incoming connections are prohibited in you local PC).
All vsftpd config options are described here

Resources