English English French French Spanish Spanish German German
Geekflare is supported by our audience. We may earn affiliate commissions from buying links on this site.
Share on:

How to Change WebSphere JVM Listener Port?

Untitled-1200-×-385-px-45
Invicti Web Application Security Scanner – the only solution that delivers automatic verification of vulnerabilities with Proof-Based Scanning™.

As a WebSphere administrator, one of the tasks you should be aware of changing the port number for the JVM.

Changing the port in other Middleware product like Apache, Nginx is easy but when it comes to WebSphere – you have to take few additional steps.

There are multiple ways to achieve this and following you will learn probably the easiest way.

Below demonstration is done in WebSphere 9 and should be ok another version too.

Let’s look at the current port details.

Currently, I’ve one JVM called “server1” and port number is 9080 and target are to change to 9090.

This requires changes at two places; let’s get it started.

  • Login into WebSphere Administrative Console
  • Go to Servers >> Server Types >> WebSphere application servers
  • Click on JVM “server1”
  • Click “Ports” under Communications

was-ports

  • Scroll down and click on “WC_defaulthost”

was-defaulthost-list

  • Update the port from 9080 to 9090 here and click Ok

was-defaulthost

  • Review and save the configuration

Now, you need to update the virtual host. At right navigation;

  • Go to Environment >> Virtual hosts >> default_host >> Host Aliases
  • Click on entry where it says “9080”
  • Update the port 9090 and click OK

was-host-aliases

  • Review and save the configuration.

Let’s verify to ensure there is no configuration file contains an old port number. You will use grep command (assuming on Linux environment).

  • Login to WAS server
  • Go to profile path
  • Search for “9080” port; you can use the below command
grep -R 9080 * | grep -v -e logs -e templates

Above, I am excluding to ignore “logs” and “templates” as they are not concerned. Command shouldn’t result in any configuration file especially XML file.

Restart the JVM and use netstat to ensure new port 9090 listening

[root@localhost profiles]# netstat -anlp |grep 9090
tcp6       0     0 :::9090                 :::*                   LISTEN     17239/java        
[root@localhost profiles]#

So you can see “server1” JVM port is changed now. I hope the above instructions help you.

Thanks to our Sponsors
More great readings on WebSphere
Power Your Business
Some of the tools and services to help your business grow.
  • Invicti uses the Proof-Based Scanning™ to automatically verify the identified vulnerabilities and generate actionable results within just hours.
    Try Invicti
  • Web scraping, residential proxy, proxy manager, web unlocker, search engine crawler, and all you need to collect web data.
    Try Brightdata
  • Semrush is an all-in-one digital marketing solution with more than 50 tools in SEO, social media, and content marketing.
    Try Semrush
  • Intruder is an online vulnerability scanner that finds cyber security weaknesses in your infrastructure, to avoid costly data breaches.
    Try Intruder