localhost refused to connect when trying to access jenkins on windows - jenkins

I installed jenkins on my windows PC and it was installed successfully. I put the installation on port 8085 and was able to access jenkins by visiting localhost:8085, then I shut down my PC. However, the next day when I opened my PC again it gave localhost refused to connect!
I did not give a user while installing and it was running locally.
How do I resolve this?

I guess Jenkins was installed as windows service, so after restarting your PC Jenkins service on your machine was stopped.
For automatically starting your Jenkins service after failures, you should check properties of service --> recovery settings.

Related

Connection Error in Guacamole: The remote desktop server is currently unavailable. If the problem persists, please notify your system administrator

I am trying to setup up guacamole in a Digital Ocean Droplet (Ubuntu 18.04). I followed the steps provided in https://computingforgeeks.com/install-and-use-guacamole-on-ubuntu/ to setup guacamole and used Postgresql to authenticate guacamole by following the instructions provided in https://guacamole.apache.org/doc/gug/jdbc-auth.html#idm46227496294336.
The installation got over and I am able to access the webpage at http://droplet-ip:8080/guacamole, but when I try to connect to a remote machine over RDP I get a connection error stating 'The remote desktop server is currently unavailable. If the problem persists, please notify your system administrator, or check your system logs.'
I have checked the login credentials of the remote device, it's hostip and RDP port number, everything is correct. I am able to login to the machine through Remote Desktop Connection in Windows. I can also login to the same remote machine with same credentials in a perfectly working guacamole setup in another digitalocean droplet.
I have also tried this by installing guacamole using docker by following instructions provided in https://wiki.networksecuritytoolkit.org/index.php/HowTo_Setup_Guacamole, but still face the same problem. What am I doing wrong? I would be happy if someone could help me solve this problem
I was finally able to figure out why I was not able to connect to a remote device in Guacamole.
My Digital Ocean Linux droplets had freeRDP already installed. But Guacamole Server 1.3.0 works on freeRDP2. I had to make Guacamole send requests through freeRDP2.
I have enabled SFTP in the connection settings. But somehow the OpenSSH was corrupted in the remote machine resulting in connection error. So, I disabled SFTP. I think guacamole tries to establish RDP and SFTP connection in the very beginning, so even if one of the protocols fail, connection cannot be established. I am not proficient with guacamole so not sure with this point.
After resolving these problems, guacamole was able to send connection request to the remote machine. I checked the status using netstat and the status was SYN_SENT, but there was no response from the remote server. The problem was Firewall.
I allowed the ports for RDP in windows firewall, but the remote machine was in a network which had external firewall. I added the Guacamole Server IP in allowed list for NAT forwarding in the firewall device and finally I was able to establish a connection with the remote machine.

TFS Agent lost communication with the server

I have TFS agent runnig on Windows 10.
While trying to run build on hosted agent I get below error:
The agent: Agent-ABC lost communication with the server. Verify the machine is running and has a healthy network connection. For more information, see: https://go.microsoft.com/fwlink/?linkid=846610
This is really frustrating since the machine is runnig fine with no network issues.
How do i resolve this?
Thanks

Jenkins : Unable to access jenkins in local machine

I'm trying to create a Test automation Pipeline to run my selenium scripts, I installed Jenkins in windows Remote Server 2012. Used following cmd($ java -jar jenkins.war) to start jenkins. It is working fine in Remote server with url:http://localhost:8080/
But when I'm trying to access it outside Remote server(my local machine) it is not working. am getting error message "This site can’t be reached"
My local laptop and Remote server is under the same proxy org network.
Can someone help how to resolve this issue , so that other folks can access it and run jobs when required from their laptops
Thanks in advance
Access Windows Firewall.
Add an inbound rule to allow port 8080 and
try accessing the url from any machine in the network.
you could allow/restrict access to all IPs, range of IPs or allow all. But to nullify the issue and confirm if its an issue with whitelisting IPs, I'd first allow access from all IPs with the wildcard *
for Debugging if its a port whitelisting issue, you could also telnet from the machine that you are trying to access this machine -
try
telnet remote machines IP Port
note: do not use a colon for port input just use a space

Why can't I set up a jenkins agent on the same machine as the master (WIndows 10), Jenkins on localhost?

Can't set up an agent on the same machine as the master node in Jenkins. The Jenkins instance is on localhost as is the agent. The main problem I'm getting is:
at
yah de yah.....
at java.lang.Thread.run(Unknown Source)
Caused by: java.net.UnknownHostException: http://192.168.0.1:8080/
Here's what I tried:
1 - Configure agent launched via ssh, Host is http://192.168.0.1:8080/ (also tried 127.0.0.1 and localhost here but the URL in Jenkins config is as shown) with Jenkins admin password. Used 'Known host file Verification Strategy' Advanced setting uses port 22. Tried Jenkins Global Security settings with fixed port 22, 50000 and random port setting.
Also toggled Windows OpenSSH for client and server with the above combinations.
Configure agent by Connecting it to the master; other options as default. Got 'Agent is offline because Jenkins failed to launch the agent process' and got the 'Launch' button for webstart. Clicked on that; nothing happened (that I saw) but the file did appear in my downloads folder.
Copied the file to another directory, opened a command window in that directory and entered the 'headless' command shown in the window with the webstart button. Got:
Error: Unable to access jarfile agent.jar
Seems no matter what I try I can't connect to http://192.168.0.1:8080/
Is this some sort of tunneling issue where I need to expose localhost even though I'm not going over the Internet? I needed to do that to get my localhost Jenkins install to talk to GitHub.
Been reading numerous articles,watched videos - seems most of the material out there is for a 'real' use of creating agents on separate machines.
Any advice would be MOST appreciated.

How to access / share Jenkins from another computer?

I installed jenkins (localhost:8080) on RHEL and I am able to build code successfully
Now, I want to setup master / slave agent.
My laptop will act as 'Master Jenkins' and my colleague's will be 'Slave'
However, my colleague could not connect to 'Master Jenkins' and we both are on SAME LAN and able to ping each other
I tried the following but nothing worked
(a) Changed --httpListenAddress=0.0.0.0
(b) Changed --httpListenAddress=<my laptop ip>
(c) Changed --httpListenAddress=<my colleague's laptop ip>
and my colleague tried 'telnet <my laptop ip> 8080' from his laptop and did not work
Please help me to resolve this issue and I am new to Jenkins
Jenkins should host it's own service, so that is probably not the problem. Is your firewall open on port 8080?
Issue has been resolved by adding the port no '8080' in firewall
Goto 'Computer --> More Applications (or) Control Center --> Firewall --> Other Ports --> Add'
For all Mac Users. None of the above worked for me I installed Jenkins using HomeBrew.
go to
~/Library/LaunchAgents/homebrew.mxcl.jenkins.plist
and Change the httpListenAddress value from 127.0.0.1 to 0.0.0.0.
Since this homebrew.mxcl.jenkins.plist file in placed in LaunchAgents you need to restart your machine to make this effective.
Open the POrt 8080 via firewall and then change the URL of jenkins from "Manage Jenkins>Config Sys>Jenkins Location>" to "http://yourIP:8080" and then access it from other machine on same network domain.
I found that, after upgrading the local Java instance, Jenkins was no longer accessible over the domain. The fix was to update the path to the new java.exe, in the Programs and Services tab, in the Properties of the Jenkins rule, in Windows Firewall Advanced settings. You may also use the "All programs that meet the specified conditions" setting, but I do not know the impact that choice would have on the security of the server.

Resources