How to Solve Error Message Unable to Connect after Web Application Deployment in Wildfly Application Server

Posted on

Introduction

This article will show how to solve a specific error message. The error message itself is ‘Unable to Connect’ when accessing the specific URL address of a Web Application. That Web Application exist after the deployment process to the Wildfly Application Server. In order to read about how to deploy a Web Application to the Wildfly Application Server, just read several articles.

Those articles available among of them are the article with the title of ‘How to Deploy a Java Web Application to a Wildfly Application Server’ in this link. Another one exist with the title of ‘How to Deploy a Java Web Application to a Wildfly Application Server’ in this link. The other one that has similar tone exist with the title of ‘How to Create a New Web Application Project using NetBeans IDE and Deploy it to Wildfly Application Server’ in this link. Furthermore, an article with the title of ‘How to Change or to Shorten the Name of the Web Application in the Wildfly Application Server’ in this link.

Solution

Basically, the error message appear in the various forms of the following image :

How to Solve Error Message Unable to Connect after Web Application Deployment in Wildfly Application Server
How to Solve Error Message Unable to Connect after Web Application Deployment in Wildfly Application Server

Another one appear as follows :

How to Solve Error Message Unable to Connect after Web Application Deployment in Wildfly Application Server
How to Solve Error Message Unable to Connect after Web Application Deployment in Wildfly Application Server

The problem lies in the URL address of the Web Application. Both of the image above is showing the URL address of ‘0.0.0.0:8080’. Either the following path of the URL address is the changed or shorten name or the original one. It happens when executing or running Wildfly Application with the following argument or parameter :

standalone.sh -b 0.0.0.0

The above command execution will instruct Wildfly Application Server running with a broadcast address of 0.0.0.0. It means, every IP address available in the machine will be possible for further usage to access the server. When clicking the link from the Wildfly Application Server to view the deployment result, it will automatically create a new tab with the full address of the Web Application. But the address is still using ‘0.0.0.0’.

So, in order to solve it, just change it with the IP Address of the machine. Either it is ‘127.0.0.1’ or ‘localhost’ or another available IP Address in the machine. As it shows in the following image with a changed or shorten war file name :

How to Solve Error Message Unable to Connect after Web Application Deployment in Wildfly Application Server
How to Solve Error Message Unable to Connect after Web Application Deployment in Wildfly Application Server

Another one also exist as an example in the following image with the original war file name as the result of the build process using any Java Editor or Java IDE available :

How to Solve Error Message Unable to Connect after Web Application Deployment in Wildfly Application Server
How to Solve Error Message Unable to Connect after Web Application Deployment in Wildfly Application Server

 

Leave a Reply