Bilal-S / iis2tomcat

AJP Connector between Internet Information Services (IIS) and Apache Tomcat
http://www.boncode.net/boncode-connector
49 stars 32 forks source link

Generic Connector Communication Error #68

Closed dmarinello closed 6 years ago

dmarinello commented 6 years ago

I continue to get the following error when accessing web pages on my Lucee Server:

Generic Connector Communication Error: Please check and adjust your setup: Ensure that Tomcat is running on given host and port. If this is a timeout error consider adjusting IIS timeout by changing executionTimeout attribute in web.config (see manual).

I’ve tried modifying server.xml settings and Boncode settings as recommended.

For awhile I've had a task that resets the lucee service every hour help the situation. Now, when the I receive the error, even resetting the services doesn’t eliminate the error. I have to restart my server.

Is there anything that I can do to correct this issue? Is there another connector that can be used? Is there an update for boncode connector that fixes this error?

Dale

Bilal-S commented 6 years ago

What version of the connector are you using? Run the connector version test on localhost: localhost/a.cfm?BonCodeConnectorVersion=true

If you are running 1.0.37 can you send me your settings. If not please upgrade and let me know if the problem still persists.

dmarinello commented 6 years ago

Bilal,

I’m sure it’s not the current version.

What’s the procedure to upgrade the BonCode and maintain the current settings and root directory for my webpages?

I ran the 1.0.35 update on a test server and when I was done, it changed the root directory for my webpages.

Thank you,

Dale

From: Bilal Soylu [mailto:notifications@github.com] Sent: Thursday, July 19, 2018 6:00 PM To: Bilal-S/iis2tomcat Cc: dmarinello; Author Subject: Re: [Bilal-S/iis2tomcat] Generic Connector Communication Error (#68)

What version of the connector are you using? Run the connector version test on localhost: localhost/a.cfm?BonCodeConnectorVersion=true

If you are running 1.0.37 can you send me your settings. If not please upgrade and let me know if the problem still persists.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Bilal-S/iis2tomcat/issues/68#issuecomment-406457619 , or mute the thread https://github.com/notifications/unsubscribe-auth/AE3NFh-6gIYo2ixnWLCy9aQcFpQtIXziks5uISuDgaJpZM4VXGhS . https://github.com/notifications/beacon/AE3NFgQ2NZ4-2XtWR0NdfN72PrkZcf8jks5uISuDgaJpZM4VXGhS.gif

Bilal-S commented 6 years ago

You are the first to report an automatic root change. This only happens when you ask the installer to change it. It is not the default. Here are instructions for upgrade: http://www.boncode.net/boncode-connector/upgrading-railo-or-lucee-connector

dmarinello commented 6 years ago

Bilal,

I ran the latest boncode update and followed your instructions taking all the defaults.

After the installation, the root directory changes from c:\inetpub\wwwroot to c:\lucee\tomcat\webapps]\root .

The websites that are off of wwwroot directory won’t come up.

Dale

From: Bilal Soylu [mailto:notifications@github.com] Sent: Friday, July 20, 2018 7:01 AM To: Bilal-S/iis2tomcat Cc: dmarinello; Author Subject: Re: [Bilal-S/iis2tomcat] Generic Connector Communication Error (#68)

You are the first to report an automatic root change. This only happens when you ask the installer to change it. It is not the default. Here are instructions for upgrade: http://www.boncode.net/boncode-connector/upgrading-railo-or-lucee-connector

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Bilal-S/iis2tomcat/issues/68#issuecomment-406609558 , or mute the thread https://github.com/notifications/unsubscribe-auth/AE3NFqb3KNgxn8IbodA0aJH0Iv0E1bQHks5uIeKzgaJpZM4VXGhS . https://github.com/notifications/beacon/AE3NFnX2qo9ntZ7TEC2jnMFU6bapD2C6ks5uIeKzgaJpZM4VXGhS.gif

Bilal-S commented 6 years ago

Dale, thanks for letting me know. I have checked the installer code. The following dialog could be presented to Tomcat 6 or 7 users:

Configure Local Tomcat
Merge Tomcat webapps and IIS wwwroot paths

Detected Apache Tomcat installed as a service. Setup can configure Tomcat to use the same directory as IIS for application delivery.
This will change the Tomcat **server.xml** file for you. It will also copy the contents of the Tomcat webapps directory to your active IIS folder [e.g. c:\inetpub\wwwroot].
This is solely a convenience feature. Do not use this if you know how to configure manually.
You will continue accessing Tomcat administration through regular tomcat port, e.g. http://localhost:8080.

The default for this is unchecked. The system does not check it. Here is the code sequence for the installer:

// code default:
pgConfigChange.Values[0] := False;

However, this does not change IIS document roots. It only changes Tomcat. So the direction of the change is something that I cannot explain. There is no code anywhere in the system to do this.

So I cannot explain why yours was done automatically. There is no precedence in 8 years of this project with many thousands of installs.

If the installer ran the process you should be able to revert it easily. To reset your system, simply copy your files back to the previous tomcat document root directory from IIS doc root, then re-use your old server.xml file (the installer would have made a backup named in this manner server_[date]_[time].xml) rename current one to something else and make the old one your current server.xml

You should be back to your previous state.

I have also sent you instructions on what you need to do to do a lucee in-place upgrade. http://www.boncode.net/boncode-connector/upgrading-railo-or-lucee-connector Were you able to follow them? What was the result?

Best,

dmarinello commented 6 years ago

Bilal,

I used the exact instructions from the website you provided.

Maybe you can give me the specific responses that I should use for each popup instead of taking the defaults.

The server is a VM, so I was able to just revert back to a snapshot.

Thank you,

Dale

From: Bilal Soylu [mailto:notifications@github.com] Sent: Tuesday, July 24, 2018 2:29 PM To: Bilal-S/iis2tomcat Cc: dmarinello; Author Subject: Re: [Bilal-S/iis2tomcat] Generic Connector Communication Error (#68)

Dale, thanks for letting me know. I have checked the installer code. The following dialog could be presented to Tomcat 6 or 7 users:

Configure Local Tomcat Merge Tomcat webapps and IIS wwwroot paths

Detected Apache Tomcat installed as a service. Setup can configure Tomcat to use the same directory as IIS for application delivery. This will change the Tomcat server.xml file for you. It will also copy the contents of the Tomcat webapps directory to your active IIS folder [e.g. c:\inetpub\wwwroot]. This is solely a convenience feature. Do not use this if you know how to configure manually. You will continue accessing Tomcat administration through regular tomcat port, e.g. http://localhost:8080.

The default for this is unchecked. The system does not check it. Here is the code sequence for the installer:

// code default: pgConfigChange.Values[0] := False;

However, this does not change IIS document roots. It only changes Tomcat. So the direction of the change is something that I cannot explain. There is no code anywhere in the system to do this.

So I cannot explain why yours was done automatically. There is no precedence in 8 years of this project with many thousands of installs.

If the installer ran the process you should be able to revert it easily. To reset your system, simply copy your files back to the previous tomcat document root directory from IIS doc root, then re-use your old server.xml file (the installer would have made a backup named in this manner server[date][time].xml) rename current one to something else and make the old one your current server.xml

You should be back to your previous state.

I have also sent you instructions on what you need to do to do a lucee in-place upgrade. http://www.boncode.net/boncode-connector/upgrading-railo-or-lucee-connector Were you able to follow them? What was the result?

Best,

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Bilal-S/iis2tomcat/issues/68#issuecomment-407558404 , or mute the thread https://github.com/notifications/unsubscribe-auth/AE3NFgerje1Ppbbfq8PEMnhOD3sLWZSjks5uJ5GugaJpZM4VXGhS . https://github.com/notifications/beacon/AE3NFsjG6Oc3lQP6po9XCqg0XdWlhatuks5uJ5GugaJpZM4VXGhS.gif

Bilal-S commented 6 years ago

Dale, this is becoming more and more puzzling. Since you can record the process can you reset and record it then send it? The instructions do not use the word default at all. I am copying them in here. You followed these correct?

http://www.boncode.net/boncode-connector/upgrading-railo-or-lucee-connector

First make a backup of the connector settings and install files. They are located in c:\windows\BonCodeAJP13.settings and [Railo/Lucee install]\AJP13 .

The actual upgrade involves removing the existing connector and then installing the new version.

a) MAKE A BACKUP: c:\windows\BonCodeAJP13.settings and [Railo/Lucee install]\AJP13 .

b) Uninstall the existing connector: Run the Uninstallation program accessible in your control panel (Program and Features). Keep IIS features when prompted.

c) Download new version package (zip file) from distribution point (http://www.boncode.net/boncode-connector)

d) Unblock zip file: (http://boncode.net/connector/webdocs/Tomcat_Connector.htm#_Toc520189772) the downloaded .zip and, then, extract files.

e) Copy the extracted files OVER the existing files in your Railo/Lucee install (e.g. [install]\AJP13 where [install] is the directory you have installed Railo\Lucee.

f) Run the connector_setup.exe program and acknowledge the warning that “ALL YOUR INPUTS WILL BE IGNORED.” If you do not see this warning do not proceed. You have not completed steps a-e correctly.

g) from your initial backup in step a) copy your original setting file back from backup overriding the one located here c:\windows\BonCodeAJP13.settings

h) Stop/Start IIS.

That’s it.
dmarinello commented 6 years ago

Bilal,

I’ve done this multiple times with the same result.

My last email included the screenshots and the selections that I made at each option.

Is it possible to do a remote session to my server?

Dale

From: Bilal Soylu [mailto:notifications@github.com] Sent: Wednesday, July 25, 2018 4:43 AM To: Bilal-S/iis2tomcat Cc: dmarinello; Author Subject: Re: [Bilal-S/iis2tomcat] Generic Connector Communication Error (#68)

Dale, this is becoming more and more puzzling. Since you can record the process can you reset and record it then send it? The instructions do not use the word default at all. I am copying them in here. You followed these correct?

http://www.boncode.net/boncode-connector/upgrading-railo-or-lucee-connector

First make a backup of the connector settings and install files. They are located in c:\windows\BonCodeAJP13.settings and [Railo/Lucee install]\AJP13 .

The actual upgrade involves removing the existing connector and then installing the new version.

a) MAKE A BACKUP: c:\windows\BonCodeAJP13.settings and [Railo/Lucee install]\AJP13 .

b) Uninstall the existing connector: Run the Uninstallation program accessible in your control panel (Program and Features). Keep IIS features when prompted.

c) Download new version package (zip file) from distribution point (http://www.boncode.net/boncode-connector)

d) Unblock zip file: (http://boncode.net/connector/webdocs/Tomcat_Connector.htm#_Toc520189772) the downloaded .zip and, then, extract files.

e) Copy the extracted files OVER the existing files in your Railo/Lucee install (e.g. [install]\AJP13 where [install] is the directory you have installed Railo\Lucee.

f) Run the connector_setup.exe program and acknowledge the warning that “ALL YOUR INPUTS WILL BE IGNORED.” If you do not see this warning do not proceed. You have not completed steps a-e correctly.

g) from your initial backup in step a) copy your original setting file back from backup overriding the one located here c:\windows\BonCodeAJP13.settings

h) Stop/Start IIS.

That’s it.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Bilal-S/iis2tomcat/issues/68#issuecomment-407725718 , or mute the thread https://github.com/notifications/unsubscribe-auth/AE3NFulhHvIiTPJg4OvyXyBPqcc03XwRks5uKFm-gaJpZM4VXGhS . https://github.com/notifications/beacon/AE3NFuppt5wmhXlUALYbCnHd2W7-PK3_ks5uKFm-gaJpZM4VXGhS.gif

Bilal-S commented 6 years ago

Dale, I have no record of video or image from you. I'd be glad to look at it if you could send it. My email is on the last page of the documentation pdf. To attach images to your response to GitHub you will need to use the GitHub site.

Best, Bilal

dmarinello commented 6 years ago

Bilal,

Please see the attached file.

Dale boncode.pdf

Bilal-S commented 6 years ago

Thanks Dale. A few things to note: a) Normally an in-place upgrade when the files are moved to the correct location and the setup is triggered should display this attached dialog. I have run this again, and doing an in-place upgrade and it did display for me.

inputignoredmodal

This is also mentioned in the upgrade instructions step f)

b) Despite all, it actually could be that the connector is installed and working. What was the port for url you used on the last screen capture (webpage)? Was that a call to port 8088 or 80? If you did not specify a port, then it would be 80.

If so , then the connector is working. A lucee error page is a perfectly valid outcome.

If not, i.e. you are using port 8088 can you do a screen recording what you are actually doing.

Thanks, Bilal

dmarinello commented 6 years ago

Bilal,

Your “All Your Inputs” screen did come up. The first several screenshots I sent were only ones where selections were required.

I’m using port 80.

I included the Error page only to show you that the default webroot had changed after the update to c:\lucee\tomcat\webapps\root instead of remaining as c:\inetpub\wwwroot .

Prior to the upgrade, if I was to call up page, you can see that Lucee was looking for the file in c:\inetpub\wwwroot.

cid:image001.png@01D4241E.786C76A0

Dale

From: Bilal Soylu [mailto:notifications@github.com] Sent: Wednesday, July 25, 2018 1:42 PM To: Bilal-S/iis2tomcat Cc: dmarinello; State change Subject: Re: [Bilal-S/iis2tomcat] Generic Connector Communication Error (#68)

Thanks Dale. A few things to note: a) Normally an in-place upgrade when the files are moved to the correct location and the setup is triggered should display this attached dialog. I have run this again, and doing an in-place upgrade and it did display for me.

https://user-images.githubusercontent.com/668901/43225941-75c70ef8-9028-11e8-8c3e-de42d7c7f8cc.PNG inputignoredmodal

This is also mentioned in the upgrade instructions step f)

b) Despite all, it actually could be that the connector is installed and working. What was the port for url you used on the last screen capture (webpage)? Was that a call to port 8088 or 80? If you did not specify a port, then it would be 80.

If so , then the connector is working. A lucee error page is a perfectly valid outcome.

If not, i.e. you are not using port 8088 can you do a screen recording what you are actually doing.

Thanks, Bilal

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/Bilal-S/iis2tomcat/issues/68#issuecomment-407888665 , or mute the thread https://github.com/notifications/unsubscribe-auth/AE3NFoa8-NpBLeSFJic1TFRKh0iGADD2ks5uKNgwgaJpZM4VXGhS . https://github.com/notifications/beacon/AE3NFmMJYkBZGegSCwVlfvdpDYK_Y7Ofks5uKNgwgaJpZM4VXGhS.gif

Bilal-S commented 6 years ago

Ok thanks. There is simply no code anywhere in the installer or connector to make such a change.

What is your IIS physical path value (basic settingn for site)? What is your tomcat server.xml webdoc root?

Simply check after install. Are they the same? Have they changed?

However, if you have a context mapping issue, i.e. Tomcat cannot identify or recognizes your site, it will fall back to the default context. Then, this is what you would see since the default context for lucee is : c:\lucee\tomcat\webapps\root You may see errors in you tomcat logs to this effect.

dmarinello commented 6 years ago

Bilal,

What is your IIS physical path value (basic setting for site)? %SystemDrive%\inetpub\wwwroot What is your tomcat server.xml webdoc root? I don’t see any setting for Webdoc root. What is the specific tag?

Dale

Bilal-S commented 6 years ago

Dale: the lucee setting for context (similar to an IIS site) is in server.xml file. It should not be commented out and is nested under the HOST tag. The physical documents are in the docBase of the Context tag.

<!-- ADD NEW HOSTS HERE -->
<Host name="[ENTER DOMAIN NAME]" appBase="webapps">
    <Context path="" docBase="[ENTER SYSTEM PATH]" />
</Host>

If you only see commented Hosts (this is the default in Lucee 5.x), then you are attempting to use a dynamic determined Context. In order for this to work you are relying another module/valve during the request processing called mod_cfml:

<Valve className="mod_cfml.core"
    sharedKey="[the security key]">

If mod_cfml cannot determine your context, you will fall back on your default context. My guess would be that this is most likely what you are experiencing. There is, of course, a completely different support group for it, but I will try to assist here.

To prove: Run the process that you do for your upgrade. Then check your IIS settings for physical path, Has it changed? Has the server.xml changed? How? When (at what step)?

This should help you narrow down the problem. If you believe that this happens after the connector install, then let me know. I need to be able to replicate it and we might need a screen share.

Best, Bilal

dmarinello commented 6 years ago

Bilal,

Everything is default in the server.xml file.

After I run the update, nothing is changed in the server.xml . It has its original date creation and modified dates.

I copy the old .settings file over the new one in in c:\windows.

I restart IIS.

At that point, my web page will come up with the root being c:\inetpub\wwwroot.

When I restart the Lucee service, then the root changes to c:\lucee\tomcat\webapps\root .

What doesn’t make sense is if everything is default before the update and the root is c:\inetpub\wwwroot and everything is default after the update and the server.xml hasn’t changed, why isn’t the root directory the same?

Dale

From: Bilal Soylu [mailto:notifications@github.com] Sent: Thursday, July 26, 2018 4:49 AM To: Bilal-S/iis2tomcat Cc: dmarinello; State change Subject: Re: [Bilal-S/iis2tomcat] Generic Connector Communication Error (#68)

Dale: the lucee setting for context (similar to an IIS site) is in server.xml file. It should not be commented out and is nested under the HOST tag. The physical documents are in the docBase of the Context tag.

If you only see commented Hosts (this is the default in Lucee 5.x), then you are attempting to use a dynamic determined Context. In order for this to work you are relying another module/valve during the request processing called mod_cfml:

<Valve className="mod_cfml.core" sharedKey="[the security key]">

If mod_cfml cannot determine your context, you will fall back on your default context. My guess would be that this is most likely what you are experiencing. There is, of course, a completely different support group for it, but I will try to assist here.

To prove: Run the process that you do for your upgrade. Then check your IIS settings for physical path, Has it changed? Has the server.xml changed? How? When (at what step)?

This should help you narrow down the problem. If you believe that this happens after the connector install, then let me know. I need to be able to replicate it and we might need a screen share.

Best, Bilal

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/Bilal-S/iis2tomcat/issues/68#issuecomment-408070702 , or mute the thread https://github.com/notifications/unsubscribe-auth/AE3NFrnMwNZvs4UJaQAjbz3gPBTuobRTks5uKaydgaJpZM4VXGhS . https://github.com/notifications/beacon/AE3NFgERY_-9Sgdk7bWVFNLCArNYktIEks5uKaydgaJpZM4VXGhS.gif

dmarinello commented 6 years ago

Bilal,

Something else I noticed with the Lucee Server Administrator.

Dale

Before Boncode Update:

After Boncode Update:

Bilal-S commented 6 years ago

Dale: reminder that attachments are not transferred to this ticket unless you upload in GitHub. Please use the Github website to upload images.

All data so far points consistently at Tomcat context resolution issues. You are being pushed to the default context since nothing is defined. The dynamic definition process though mod_cfml valve is not working.

Few questions: a) What are your BonCodeAJP13.settings? b) Do you have the following boncode settings that match your server.xml in settings after upgrade:

<EnableHeaderDataSupport>True</EnableHeaderDataSupport>
<ModCFMLSecret>[should match your mod_cfml Valve secret in server.xml]</ModCFMLSecret>

c) Are you upgrading anything else, e.g. lucee server.

d) If so, what is the issue you are trying to address with connector update?

Best, Bilal

dmarinello commented 6 years ago

Since nothing is defined before the update, why is the mod_cfml working perfectly?

Only after the update, when my Tomcat config file remains the same, does the root directory change. How else can the context change if it’s not done in the Tomcat Config file?

d1

d2

Dale

Few questions: a) What are your BonCodeAJP13.settings?

localhost 8009 True True False False 89888e6ba1994d5106bec54b59997944de95162262d4c88ed86f959c9cbca206

b) Do you have the following boncode settings that match your server.xml in settings after upgrade:

Yes, the ModCFMLSecret matches the SharedKey in the Tomcat Config file.

True [should match your mod_cfml Valve secret in server.xml]

c) Are you upgrading anything else, e.g. lucee server. No

d) If so, what is the issue you are trying to address with connector update? Eliminating the Generic Connector Timeouts that are constantly disabling my site.

dmarinello commented 6 years ago

Bilal,

The post on github eliminated the tags.

Dale

a) What are your BonCodeAJP13.settings?

localhost 8009 True True False False 89888e6ba1994d5106bec54b59997944de95162262d4c88ed86f959c9cbca206
Bilal-S commented 6 years ago

OK. The plot becomes clearer. Can you check your setting location pointer after upgrade. E.g. when you run this url that I shared with you last week: http://localhost/a.cfm?BonCodeConnectorVersion=true

What message do you get? Is this where your setting file is?

Wherever it is says the setting file should be, move a copy of your Boncode settings there and restart IIS. Let me know.

Best, Bilal

dmarinello commented 6 years ago

Bilal,  

BonCodeAJP Connector Version 1.0.37 using generated defaults. No setting file in C:\Windows\Microsoft.Net\assembly\GAC_MSIL\BonCodeAJP13\v4.0_1.0.0.0__ad590a40d40745cf\BonCodeAJP13.settings

 

That was it.

 

After I copied the settings file there, everything came up fine.

 

What caused the change from c:\windows to that directory for the settings file?

 

Thank you so much!!

 

I never would have figured that out.

 

Dale

----- Original Message -----

From: "Bilal Soylu" notifications@github.com To: "Bilal-S/iis2tomcat" iis2tomcat@noreply.github.com Cc: "dmarinello" trivalleybrewers@comcast.net, "State change" state_change@noreply.github.com Sent: Thursday, July 26, 2018 12:00:20 PM Subject: Re: [Bilal-S/iis2tomcat] Generic Connector Communication Error (#68)

OK. The plot becomes clearer. Can you check your setting location pointer after upgrade. E.g. when you run this url that I shared with you last week: http://localhost/a.cfm?BonCodeConnectorVersion=true

What message do you get? Is this where your setting file is?

Wherever it is says the setting file should be, move a copy of your Boncode settings there and restart IIS. Let me know.

Best, Bilal

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub , or mute the thread .

Bilal-S commented 6 years ago

No problem. Glad it worked out. An upgrade to .net version 4.5 made the resolving of assembly location different. We moved to .net 4.5 with 1.0.37 I have corrected for this in 1.0.38

Bilal-S commented 6 years ago

closing