Skip to content
This repository has been archived by the owner on Nov 28, 2022. It is now read-only.

Bug: Unable to access tWAS application in Codewind local #3104

Open
bconey opened this issue Jun 5, 2020 · 8 comments
Open

Bug: Unable to access tWAS application in Codewind local #3104

bconey opened this issue Jun 5, 2020 · 8 comments

Comments

@bconey
Copy link

bconey commented Jun 5, 2020

Codewind version: 0.12.0
OS: Ubuntu 18.04.4 LTS

Che version: N/A
IDE extension version: Codewind

0.12.0
IDE version: VSCode 1.45.1
Kubernetes cluster: N/A

Description:
After creating a tWAS (IBM WebSphere Traditional) project in Codewind using a private registry stackhub for a CP4Apps installation, I was unable to access the application inside Codewind when the Open Application icon is clicked. The browser displays "SRVE0255E: A WebGroup/Virtual Host to handle 127.0.0.1/32815 has not been defined."

image

Steps to reproduce:

  1. Updated the Codewind Image Registry Manager with an entry to enable access to the private registry repository
  2. Updated the Template Source Manager to include the Codewind URL for the CP4Apps stack hub url
  3. Created a new project using the Kabanero IBM WebSphere Traditional template
  4. After the project was in a Running state, attempted to open the application in the browser by clicking on the link next to Application Endpoint in the Project Overview (or by clicking on the Open Application icon when hovering over the project) and received the error noted.

Workaround:

vscode.log

@bconey bconey added the kind/bug label Jun 5, 2020
@jagraj
Copy link

jagraj commented Jun 5, 2020

/priority stopship
/area appsody

@jagraj
Copy link

jagraj commented Jun 5, 2020

@sghung @makandre
I also tried to reproduce this problem on my Windows VM with Codewind 0.13.0 release and I could not access tWAS sample application after it started successfully.

I also configured same Kabanero stacks repo in my Che cluster and tried same sample and it worked fine there and no issues there.

image

I did setup another local Codewind 0.13.0 install with Kabanero stacks repo in one of my Windows VM so that you can Remote Desktop and you can debug the problem. I will share that info via DM.

@makandre
Copy link
Contributor

makandre commented Jun 5, 2020

Found this: https://www.ibm.com/support/pages/how-diagnose-error-srve0255e-webgroupvirtual-host-handle-0-has-not-been-defined

The error appears to be from WAS and/or the application itself

@makandre
Copy link
Contributor

makandre commented Jun 5, 2020

The application exposes 3 ports: 9043, 9080, 9443. Outside of Codewind, port 9043 shows this error page as well.

I think we will need a tWAS expert and/or the creator of the stack to take a look, as it appears to be a tWAS configuration problem when running in Codewind. I'm not really sure what could be different in Codewind; on our side we don't do anything to configure the server or application. All appsody apps are pretty much a blackbox and Codewind will simply run it by calling appsody run.

@jagraj
Copy link

jagraj commented Jun 6, 2020

This all works fine from Appsody CLI but not from Codewind.

@makandre
Copy link
Contributor

makandre commented Jun 8, 2020

From inside the appsody container you can actually curl localhost:9080 and it returns the correct landing page

@makandre
Copy link
Contributor

makandre commented Jun 8, 2020

The virtual host settings in container are stored in:

/opt/IBM/WebSphere/AppServer/profiles/AppSrv01/config/cells/DefaultCell01/virtualhosts.xml

    <aliases xmi:id="HostAlias_1" hostname="*" port="9080"/>
    <aliases xmi:id="HostAlias_2" hostname="*"/>
    <aliases xmi:id="HostAlias_3" hostname="*" port="9443"/>
    <aliases xmi:id="HostAlias_6" hostname="*" port="5060"/>
    <aliases xmi:id="HostAlias_7" hostname="*" port="5061"/>
    <aliases xmi:id="HostAlias_8" hostname="*" port="443"/>
    <aliases xmi:id="HostAlias_9" hostname="*" port="32814"/>

The last line was added by me for the published port (to 9080) on the system. After doing that I killed the server and restarted WAS, after which the appsody landing page can be reached via port 32814

Basically, the stack's virtual host settings assumes the application will be accessed only via a predefined list of ports, which won't be true when running in Codewind (ports are exposed in the 3xxxx range)

@malincoln
Copy link

Need the stack owner to investigate further.
Barbara will work with tWAS stack owner; changing this to priority/hot for now; will cancel if fix required from another area.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants