Tomcat 8.5.51/Tomcat 9.0.31 - HTTP/1.1 port is not updated in server.xml when changing it via the UI installation - port

I installed Tomcat 8.5.51/Tomcat 9.0.31 and during the installation, I changed the HTTP/1.1 port to 80.
but after the installation, I saw in server.xml that the port wasn't changed.
If I install Tomcat 8.5.27/Tomcat 9.0.27 it works correctly.
do you have any idea what went wrong?
Thanks!

It is a known bug in 8.5.51 and 9.0.31.
It is fixed in 8.5.52 and 9.0.32 that should be released early next week. Meanwhile just edit server.xml after install.

Related

Why does Jenkins say "This Jenkins instance appears to be offline"

I have a fresh install of Jenkins 2.32.2 on Ubuntu.
Opened a browser on the instance and get to a page titled Offline, with the message "This Jenkins instance appears to be offline" and offers options to "Configure Proxy" or "Skip Plugin Installation"
The machine clearly isn't offline as I just used the internet connection to do the installation.
I also had a previous installation, done exactly the same way, that was working.
I removed the previous installation as Pipelines wouldn't work and Google told me it was because of JDK 9. So I removed all the JDK/JRE installations as well as jenkins, fresh installed JDK 8 only, installed Jenkins, and got to here.
Jenkins has worked on this box in the past so what makes it think it is offline?
Update: Found a log file /var/lib/jenkins/logs/tasks/Download metadata.log
and it starts with a message FATAL: Connection refused (Connection refused)
I would think that indicates that the internet connection is OK, but something else is stopping it getting data?
Update: Based on other research I checked the Update Site in the Plugin Manager. This is listed as http://updates.jenkins-ci.org/update-center.json and, from the command line a wget of this file succeeds. So most definitely not a connection issue. Worked with both http and https, jenkins works with neither.
In my case, it has something to do with SSL. I manage to fix it by editing /var/lib/jenkins/hudson.model.UpdateCenter.xml and change url to use http instead of https.
Restart jenkins and reload the website, it no longer shows offline.
For macOS users:
Step -1: Edit /Users/Shared/Jenkins/Home/hudson.model.UpdateCenter.xml and change url to use http instead of https.
Step -2: Restart jenkins (for instance by going to http:localhost:8080) and reload the website
Step -3(Optional): If it asks for user and password and if you don't remember creating one; default user is admin and copy the password from
sudo cat /Users/Shared/Jenkins/Home/secrets/initialAdminPassword
credits - #Alex in this post and #Tuan Pham here and #Joe Walsh for the comment on macOS directory path
There is something wrong with the internet connection of update center.I have met the same situation with Jenkins installed on macOS.
You can try to modify the hudson.model.UpdateCenter.xml file.
Jenkins installed with .pkg package on macOS,the file path is:
/Users/Shared/Jenkins/Home/hudson.model.UpdateCenter.xml
Jenkins installed by Homebrew on macOS,the file path is:
/Users/{username}/.jenkins/hudson.model.UpdateCenter.xml
Open the file:
<?xml version='1.1' encoding='UTF-8'?>
<sites>
<site>
<id>default</id>
<url>https://updates.jenkins.io/update-center.json</url>
</site>
</sites>
You can try to change https://updates.jenkins.io/update-center.json to:
http://updates.jenkins.io/update-center.json
or
// If you are in China or near China area,https and http are both OK.
https://mirrors.tuna.tsinghua.edu.cn/jenkins/updates/current/update-center.json
And then you can restart Jenkins by:
//loading the URL to restart Jenkins.
http://localhost:8080/restart
or
// Use Homebrew command to restart Jenkins if you installed Jenkins LTS version by Homebrew.
brew services restart jenkins-lts
in my case (macOS), updating jdk to 8 and reinstall jenkins solved the problem.
The issue is that for some reason Jenkins doesn't have access to the certificates chain of the Jenkins updates service.
On Ubuntu 18.04 I had this issue and the next links and instructions helped me to start Jenkins properly without modifying the default url or using a proxy of some sort.
Installing a new JDK 8(u101+) with JAVA_HOME should do the trick like at:
https://www.digitalocean.com/community/tutorials/how-to-install-java-with-apt-on-ubuntu-18-04
is making sure that Lets Encrypt certificates are installed and available on the OS/SYSTEM.
To test it you can use the instructions at:
Does Java support Let's Encrypt certificates?
And to install manually if required the Let's encrypt root chain using the next script:
https://gist.github.com/Firefishy/109b0f1a90156f6c933a50fe40aa777e
I also faced this issue i.e. This Jenkins instance appears to be offline on windows 10.
Below are the steps I followed to solve it:
Navigate to the Jenkins Home Directory.
For me, the default home directory is: C:\Windows\System32\config\systemprofile\AppData\Local\Jenkins.jenkins
Changed the protocol from HTTPS to HTTP in the file hudson.model.UpdateCenter.xml
Restarted Jenkins (Go to C:\Program Files\Jenkins and then execute jenkins.exe stop, jenkins.exe start)
Logged in to Jenkins again (http://localhost:8080/).
The offline error got solved.
In my case i have changed https to http in URL line of /var/lib/jenkins/hudson.model.UpdateCenter.xml file
and restarted the jenkins. It started functioning.
in case you are running jenkins in a container and vi is not installed
access your container in interactive mode
docker exec -it jenkins-ci /bin/bash
use this sed command to replace https with http
sed -i 's/https/http/g' /var/jenkins_home/hudson.model.UpdateCenter.xml
This mostly happens when you are working with company issued PC Windows OS.
Fix :-
click on "Configure Proxy" ask your IT team for specific server and port values that can bypass firewall and give your windows username & password. In this way you can resolve windows firewall and offline Jenkins issue.
I researched a lot over Internet but nowhere the fix is available.
Thanks!
For Ubuntu,
go to /home/username/.Jenkins/Hudson.model.UpdateCenter.xml and
edit the file from https to http.
On MacOS 10.11.6 :
Go to /Users/<UserName>/.jenkins
Open the file hudson.model.UpdateCenter.xml
Change the value of default from https://xxx to http://xxx
Took note of the secret Administrator password path that Jenkins displays when first opening http://localhost:8080/ on a browser.
The path was: C:\Users{username}\AppData\Local\Jenkins.jenkins\secrets.
Therefore the hudson.model.UpdateCenter file was at C:\Users{username}\AppData\Local\Jenkins.jenkins\
Updated the hudson.model.UpdateCenter file in notepad to have text http instead of https as follows:
http://updates.jenkins.io/update-center.json
Reloaded the http://localhost:8080/ page but still showed the text "This Jenkins instance appears to be offline."
Then navigated to the Services App in Windows (click Windows and type 'Services App' and it should display the App in the search list)
In the services App right clicked the Jenkins service and selected Restart.
After Windows restarted the Jenkins service navigated to http://localhost:8080/
The Jenkins page wouldn't even load. Navigated to the Jenkins login page: http://localhost:8080/login?from=%2F
Then got a loading page with text:'Please wait while Jenkins is getting ready to work ...
Your browser will reload automatically when Jenkins is ready.'
Assumed that Jenkins was still restarting.
Once the Jenkins login page loaded, entered that password/secret again and clicked Continue.
This time the page with "This Jenkins instance appears to be offline." was not displayed. Jenkins displayed a Getting Started -> Customize Jenkins page with buttons to install plugins.
For Windows OS,
follow below steps:
Go to C:\Users\\*your user name*\\.jenkins
Open the file hudson.model.UpdateCenter.xml
Update the value of url from https://xxx to http://xxx
I make no claims about this, especially Java related (I personally cannot stand the language), but on my Ubuntu 18.04 L/T, I needed to stand-up a standalone Jenkins instance; So I installed both the Java on which Jenkins appears to be dependent and Jenkins itself
sudo apt install openjdk-8-jdk jenkins
Then I updated the Jenkins defaults
sudo gvim /etc/default/jenkins
... inserting the following at the top of the file - only because editing /etc/init.d/jenkins appeared to serve no purpose as it had no effect whatsoever ...
JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/jre/bin/
PATH=$JAVA_HOME:$PATH
Finally, save & quit ... then attempt Jenkins restart
sudo service jenkins restart
HTH - it certainly worked for me :-)
I'm working on a Mac, and in my case, it turned out that the version of Java Jenkins was using (1.8.0u66) wasn't up to date enough. I had both Java 11 and Java 14 installed, but the jenkins-lts script was coded to force use of Java 8. Rather than install a more up to date JDK 8 installation, I modified the script to run ${JAVA_HOME}/bin/java and set JAVA_HOME to the JDK 11 installation.
It might not always be an option but if you have a choice use different Image. I used Debian GNU/Linux 10 and it worked like a charm.
Re-installing JAVA JDK8 worked for me.
Another possibility - make sure DNS functions properly for Jenkins.
In my case, I followed Kubernetes setup instructions here to install Jenkins, and it led to this problem.
I enabled logging on CoreDNS and saw this:
│ [INFO] 10.70.116.14:45888 - 50490 "AAAA IN updates.jenkins.io.svc.cluster.local. udp 54 false 512" NXDOMAIN qr,aa,rd 147 0.0001896s │
│ [INFO] 10.70.116.14:45888 - 32566 "A IN updates.jenkins.io.svc.cluster.local. udp 54 false 512" NXDOMAIN qr,aa,rd 147 0.000169468s │
│ [INFO] 10.70.116.14:57907 - 22912 "A IN updates.jenkins.io.localdomain. udp 48 false 512" NOERROR qr,aa 110 0.000907476s │
│ [INFO] 10.70.116.14:57907 - 52100 "AAAA IN updates.jenkins.io.localdomain. udp 48 false 512" NOERROR qr,aa 110 0.001709031s
The lookups were all cluster-local.
If I edited the URL (as suggested in other answers here) to include a dot after updates.jenkins.io. then hostname lookup worked and the URL resolved. Though Jenkins' next step errors for the same reason.
In the end I discovered the problem was ClusterFirst mode of the pod's DNS. I added dnsPolicy: Default to the deployment's pod template spec (the instructions link above), and now it works.
Even I faced similar issue, then figured out that JDK that I was using is 8 instead of 11.
Check jenkins jdk combination under jenkins official site
I used JDK11 with Jenkins 2.3031 version and it worked fine - all plugins got downloaded
In my case, I use WINDOWS OS. So, jenkins was installed in my C drive.
PATH : C:\Users\Username\ .jenkins
Under "hudson.model.UpdateCenter" file change "https" to "http"
<?xml version='1.1' encoding='UTF-8'?>
<sites>
<site>
<id>default</id>
<url>http://updates.jenkins.io/update-center.json</url>
</site>
</sites>
As some others pointed out, in Windows, this could be because of firewall restrictions set by company infrastructure.
For my case, I need the recommended plugins to be present (e.g. Folders plugin)
My workaround was:
A. Install same Jenkins version into my personal laptop/VM, and be sure to install the recommended plugins the first time you browse to the Jenkins Web Page.
B. Copy the plugins folder from my personal laptop's JENKINS HOME folder (i.e. ProgramData\Jenkins...) into the Jenkins plugins folder of the company laptop.
Total size of the plugins folder was around 150MB (zipped).
Enter this before running Jenkins.
# iptalbes -F
It may be because of the firewall.
jenkins_enable="YES"
jenkins_home="/usr/local/jenkins"
jenkins_user="jenkins"
jenkins_args="--webroot=${jenkins_home}/war --httpListenAddress=*.*.*.* --httpPort=8180"
#jenkins_java_opts="-Djavax.net.ssl.trustStore=/usr/local/jenkins/cacerts -Djava.net.preferIPv6Addresses=true"
#jenkins_java_opts="-Djavax.net.ssl.trustStore=/usr/local/jenkins/cacerts -Djava.net.preferIPv4Addresses=true"

Installation of WAMP SERVER

I am trying to install WAMP SERVER on Windows 7 PC. After completing installation I typed localhost/phpmyadmin/ as suggested. But the error is "Site can't be reached". Also when I searched on it google says that green icon should appear on icon, but it is not so... What do I do? Should I try 2.5 version instead of latest 3.0.4 or any other suggestions?
check what port number you apache http.conf is trying to acquire.
Also do check if any other application is using that port.
Skype (usually does).
Also try Changing the listen port number to 8080
in httpd.conf
Listen 0.0.0.0:8080
and try
http://localhost:8080
similar link:
WAMP - Your port 80 is actually used - Error

Wildfly error: Could not start http listener

I'm new to Wildfly and I hope you guys can help me with this problem:
I'm following this tutorial on how to Install Wildfly 8 and when I'm trying to execute step 4 I get the following errors:
I've been googling for a while now and I can't find an answer. I've tryed with JDK 7 and 8, no changes, I'm using admin permissions, I've even tried to download Wildfly again and still no changes.
More experienced co-workers have seen this and don't have a clue about what's going on.
Can you help me? Thanks
The tutorial you linked to, has Wildfly configured to use the default port 8080. Most likely, you have another process or service running which is already using port 8080. Try to find out what process it is and stop it, or try configuring Wildfly to use a different port.
try restart the machine or enable IPV6 in the machine, this error will be resolved
Those having the same problem should check who else uses the port 9990 in your Windows system. TCPView is a good tool to find out the guilty of charge. One of possible common causes in this case is NVIDIA Network Service (NvNetworkService.exe).
If that's the case just find it in your Windows services list and stop/disable it. The service itself is responsible for checking for Nvidia drivers updates, so any time you want it back just turn it on manually.
In my case, I inadvertedly added an AJP socket binding while using standalone jboss_cli utility:
[standalone#localhost:9990 /] /subsystem=undertow/server=default-server/ajp-listener=ajp:add(socket-binding=ajp)
This led to an 'already in use' error that doesn't let any app to start and signaled 503 error through an Apache web server.
I deleted the binding:
/subsystem=undertow/server=default-server/ajp-listener=ajp:remove
And then everything worked normally.
I too had the same issue.After analysis it was found that the SSL port(443 in my case) was creating this issue. I just terminated the processes that were running on 443 and restarted the wildfly and everything worked fine after that.
I had faced same issue with wildfly_8.2.1
Port 8080 was also free, so that solution doesn't worked for me.
Try below procedure as it helped to resolve my issue.
add below lines to your server's /etc/sysctl.conf file
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
No restart is required for this solution.

Phusion Passenger / Apache Not Running Correctly on Mac OSX Maverick

After updating to OS X Maverick on my MacBook, my local dev environment was broken - Apache httpd.h file missing on MacOSX after Mavericks Upgrade (** Updated for Yosemite **)
Now after resolving the issues I can't seem to run my local web server on port 80 (localhost).
If I go to 'localhost' I see It works! which is the default apache page.
If I run passenger start I can view my app at localhost:3000 but that's a passenger standalone web server running, not apache.
If I run sudo passenger start -p 80 --user=martin I get the message:
The address 0.0.0.0:80 is already in use by another process,
perhaps another Phusion Passenger Standalone instance.
If you want to run this Phusion Passenger Standalone instance on another port,
use the -p option, like this:
passenger start -p 81
I can't remember what I did when I first set up Rails on my laptop, I'm sure I ran passenger start at the very beginning and didn't need to do it after that and from reading more about it online, apache should run passenger automatically by itself but apache doesn't seem to be doing anything but show the default start page and I don't know why.
I think Maverick created a new httpd.conf but I don't see much difference, I have made sure that the three extra lines running passenger-install-apache2-module returns is at the end of the config file.
The passenger gem is the latest version, Rails version is 2.3.14 and ruby is 1.8.7 so quite old but shouldn't matter I don't think as it worked perfectly on localhost before without having to add port 3000 to the url so just hoping someone with a bit more experience of using Passenger can help.
I've tried reading loads of other questions and forums and also the Phusion Apache documentation.
`
I had the same problem. I restored the previous httpd.conf file in /etc/apache2. The file had been renamed httpd.conf.pre-update. I restarted the server with apachectl restart and all was fine again.
I checked the differences between the old and new httpd.conf files, and they were very small (but crucial):
1) The line to include virtual hosts was commented out.
2) The line to include the PHP module was commented out.
I uncommented both lines and problem solved.

Can't get highcharts export server working using Java

everyone,
I followed instructions on highcharts export server. And my test environment is Ubuntu Server, tomcat 7.x, java 1.7.x, the latest highcharts export server code cloned by git. No problem occurred during mvn install and mvn clean package. And soem settings of my app-convert.properties is
port=8080 # the same port with my tomcat
exec = /home/{my user name}/phantomjs-1.9.1-linux-x86_64/bin/phantomjs
And from the logs of Tomcat, I can see that phantomjs is started and listening on port 8080. Also when I access http://{myservername}:8080/highchars-export-web/, it's loaded correctly, even when I click 'Generate Image' button, it gave me a file named 'Charts.png'. However, the image's size is 1kb, not the one as getting from http://export.highcharts.com/demo. I don't know what I am missing. I need you guys help on this.
Best wishes,
Arthur
Pick a different port other than the one your tomcat (or other service) is listening on. That port you set in the app.properties files is for the phatomjs service to listen on.

Resources