• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

CF2021 -wsconfig NullPointerException

Community Beginner ,
Nov 21, 2020 Nov 21, 2020

Copy link to clipboard

Copied

When using the Web Server Configuration tool I'm receiving the following error. I don't want to attempt installing this on a server if I can't get it running locally.

 

java.lang.NullPointerException
at com.adobe.coldfusion.connector.connectorinstaller.ParserUtils.parseXMLDocument(ParserUtils.java:103)
at com.adobe.coldfusion.connector.connectorinstaller.ConfigParser.getRootNode(ConfigParser.java:52)
at com.adobe.coldfusion.connector.connectorinstaller.ConfigParser.getTreeNode(ConfigParser.java:37)
at com.adobe.coldfusion.connector.connectorinstaller.ConfigParser.getConnectorHeartbeatPath(ConfigParser.java:200)
at com.adobe.coldfusion.connector.connectorinstaller.WebServerInstaller.writeConnectorPropertiesFile(WebServerInstaller.java:988)
at com.adobe.coldfusion.connector.connectorinstaller.IISInstaller.installConnector(IISInstaller.java:337)
at com.adobe.coldfusion.connector.connectorinstaller.gui.AddConfigDialog$AddConfigThread.run(AddConfigDialog.java:1189)

 

It looks like the wsconfig tool gets about half way though setting up. It adds the isapi handlers but doesn't connnfigure the wscoonfig/1 settings for the isapi_redirect.ppropperties or the woorker.pproperties. 

 

I've tried adding tthese manually and I haven't gotten that to work either. 

Anyonne else runninng g into this?

 

OS Name: Microsoft Windows 10 Enterprise
Version 10.0.17763 Build 17763

TOPICS
Connector

Views

5.3K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Mar 07, 2021 Mar 07, 2021

As yet another update on this issue (and perhaps the final one needed), Adobe is now offering a fix for this nullpointer problem with an updated CF web server connector for CF2021, in the form of an updated wsconfig.jar (which is called when you run the wsconfig.exe tool). It will be included in the first update to CF2021, whnever that arrives.

 

But those suffering these problems don't need to wait until then: instead, see the tracker ticket CF-4210996 where in a comment on Feb 19, Piyush from

...

Votes

Translate

Translate
Community Expert ,
Nov 21, 2020 Nov 21, 2020

Copy link to clipboard

Copied

Are you running this as administrator? That's necessary for it to work in many cases, if I recall correctly. Also, if you have previously installed connectors you might want to remove them first if possible.

 

Dave Watts, Eidolon LLC

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 21, 2020 Nov 21, 2020

Copy link to clipboard

Copied

Hi, guys. What Dave says is indeed true, but in this case the problem is something else, at least as it seems I have been able to replicate the error exactly. (I used info in Casey's offered error message/stack trace, to guess at and recreated the problem.)

 

TLDR; it seems to be caused if you have a malformed XML entry in a specific file, and I will show two quick steps you can check to confirm and perhaps resolve things, in a moment. I share some other related info, and I move that out to a blog post and then edit this post to point to that, to keep it shorter.

 

First, though, to address your concern it's not some bug in the connector (from my observation), and as for your fear about proceeding to production, you would NOT likely have the same error on another server, unless somehow it had the same malformed xml--and I've not heard of anyone else reporting this, and I can confirm the connector DOES work as expected in CF2021, when things are normal.

 

Here are those two steps to check things. More details will follow, explaining how I came to these conclusions (based on what you shared, and some experimentation) and sharing related things, if they may help others.

 

So, Casey:

  1. look for the web.xml in your CF wwwroot/WEB-INF. In a typical install it might be:

    C:\ColdFusion2021\cfusion\wwwroot\WEB-INF\web.xml

  2. In that file, there should be (in CF2021) a section that looks like this:

 

    <servlet-mapping>
        <servlet-name>Connector</servlet-name>
        <url-pattern>/__cf_connector_heartbeat__</url-pattern>
    </servlet-mapping>
 

In my testing, if that is somehow malformed XML, you will get the error you see. If the section IS there and correctly formed, the wsconfig tool will put a line (new in 2021) in the workers.properties file it creates (in the connector folder, like config/wsconfig/1) as:

 

worker.cfusion.heartbeat_servlet_path=/__cf_connector_heartbeat__
 
That's what's NOT happening for you, and in my testing the exact error you show WILL happen, if that web.xml has that section but is somehow malformed (in that section).  More on if the section is "not there at all", below.
 
Let us know what you see and can report, Casey.
 
Longer explanation follows, for those interested:

 

Notice how one of the lines refers to com.adobe.coldfusion.connector.connectorinstaller.ConfigParser.getConnectorHeartbeatPath. That's related to something added first in CF2018, and changed slightly in CF2021.

 

The "heartbeat" is a mechanism built into the connector, whereby CF gathers info (via a given Adobe-created URL), tracking the "health" of the connector (between the web server and CF).

 

In CF2018, the value was a hard-coded /connector URL, but in CF2021 they have changed it to be not only a different value by default (that /__cf_connector_heartbeat__ , and that is indeed 2 dashes as I list above), but it's also now set also as a value in that web.xml file. Indeed, it's that CF uses that web.xml value to control what it puts in the workers.properties file--and the two of course need to match, so one could technically change the value if they are very careful, but it's now a unique enough value that no one should need to.)  

 

FWIW, this heartbeat URL was a concern for those who found it showing up in their web server access logs, or in a monitor like FusionReactor. And the /connector was non-descript enough that it let many to be quite confused by it. At least now the new value might connect the docs a bit better for many.

 

(And note that you won't see any such heartbeat requests showing up until a request is made for a CF page via the web server, when the connector will then be loaded and the heartbeat requests will THEN start appearing, per the

heartbeat_interval line also set in that workers.properties file. The default is 30 seconds, and there will be one for each running web site, every 30 seconds once a first CF request comes to that site--so that can be a lot of these heartbeat url's appearing, in what may seem random intervals!)
 
Finally, FWIW, one can STOP the generation of these heartbeat requests entirely, by setting that heartbeat_interval to 0 (and restarting your web server). Some have done that when they felt that these heartbeat requests were causing trouble. It's rare that they do, but there you have it, if you're interested.

 

So again, back to Casey's original problem, when the wsconfig tool runs it now (in 2021) looks in that web.xml file to find that value, in that section. And it would put that value into the workers.properties. But if something is malformed about that section, then the process will fail, with that exact error and stack trace (down to the line numbers, for the current version of the connector, at least). When I say malformed,  I mean like if a closing bracket was missing or something. So again, Casey, compare yours to what I offer above.
 
And FWIW, the error will NOT happen if this specific new section of the web.xml file does not exist, such as if it were somehow looking at a version of that file from CF2018 or earlier. Instead, there would be no error at all, and that line in the workers.properties wouldn't be written at all. (I also tested if the malformation in the XML was in some other part of the web.xml, and the wsconfig didn't trip over that. It was only if this one new section was malformed.)
 
I tested all these things this morning, after seeing Casey's post here this morning. It struck me as a very interesting challenge to understand. I hope that what I've shared here will not only help him get past his problem somehow, but may also help others who go searching for info on the heartbeat and especially this new URL.
 
That new URL is not documented anywhere that I found, but I did discover it during research for my Hidden Gems talk at CF Summit, where I mentioned it. I have just tweaked that mention to add where it's found also in these two files.
 
But Casey, as for how your web,xml would be malformed in this section, that's certainly interesting, so I'll look forward to what you may find and report, or if something new for us to consider. 

/Charlie (troubleshooter, carehart.org)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Nov 22, 2020 Nov 22, 2020

Copy link to clipboard

Copied

Thanks @Dave Watts  and @Charlie Arehart  for you notes. 

 

Charlie, I had looked into that web.xml as you suggested and everything looks correct there. I continued to pull out the rest of my hair until I decided to try the adapter with different settings.

 

Under Web Server Properties, I selected "High" for Website Load and it worked. The connector setup correctly and I was able to load pages. 

 

I removed the connector and made sure IIS had removed the ISAPI handler mappings and tried again with Website Load set to "Meduim" which is the default and it broke again. 

 

I didn't try the "Low" setting but it's working again under "High" so I'll just leave it at that.

 

Thank you.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 22, 2020 Nov 22, 2020

Copy link to clipboard

Copied

Something else to try:

  1. Revert to the starting point, as you did before.
  2. Open the Command Prompt as Administrator.
  3. Using the cd command, navigate to the directory containing the ColdFusion tool wsconfig.exe.
  4. Run wsconfig.exe on the command line.

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Nov 22, 2020 Nov 22, 2020

Copy link to clipboard

Copied

Okay, I was able to get this to work once, not since. I've tried new CF instances and this was after a complete reinstall of IIS and CF2021 then CF2018 again so that I could get sites up and running. Something is up with the wscondig tool, maybe it's that I need to use "BeyondTrust Privilege Management" to gain Admin access but this works just fine under CF2018. Strange...

 

 

 

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Dec 17, 2020 Dec 17, 2020

Copy link to clipboard

Copied

We're having the same issue, too - the same Java NullPointerException, even down to the line numbers.

- using Run As Administrator everywhere

- checked web.xml and it appears fine, and validates as XML, both with and without the sections Charlie refers to. Errors are the same with or without the cf-heartbeat-connector sections.

- tried Website Load = High and Medium

- tried wsconfig.exe on the command line

 

The oddest thing is that CF2021 doesn't seem to know IIS 8.5 is there - during install it doesn't find IIS, and offers only the internal web server for connecting. (Win 2012 R2 Standard, IIS 8.5)

The install log say no errors, and the three times IIS is reported are all "SUCCESSFULL"

 

The Web Server Config tool just makes the new numbered folder, puts isapi_redirect.dll in the folder, and that's all. The wsconfig.log has little extra information:

 

12/17 17:06:40 info Tomcat Connector
12/17 17:18:25 info Tomcat Connector
12/17 17:18:26 debug command line: -ws IIS -site AccessdataCF2021 -v
12/17 17:18:26 debug Created file F:\CF2021\config\wsconfig\5\isapi_redirect.dll
12/17 17:18:49 error java.lang.NullPointerException
java.lang.NullPointerException
at com.adobe.coldfusion.connector.connectorinstaller.ConfigParser.getConnectorHeartbeatPath(ConfigParser.java:201)
at com.adobe.coldfusion.connector.connectorinstaller.WebServerInstaller.writeConnectorPropertiesFile(WebServerInstaller.java:988)
at com.adobe.coldfusion.connector.connectorinstaller.IISInstaller.installConnector(IISInstaller.java:337)
at com.adobe.coldfusion.connector.connectorinstaller.ConnectorInstaller.installConnector(ConnectorInstaller.java:464)
at com.adobe.coldfusion.connector.connectorinstaller.ConnectorInstaller.doIt(ConnectorInstaller.java:389)
at com.adobe.coldfusion.connector.connectorinstaller.ConnectorInstaller.main(ConnectorInstaller.java:1004)

 

We'll keep digging. If anybody has any further ideas, we'd love to hear them!

 

thanks

Chris

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 18, 2020 Dec 18, 2020

Copy link to clipboard

Copied

Chris, to clarify, neither cf2021 nor 2018 (and perhaps 2016) offer to connect cf to iis or apache at the end of the installer. I don't know why Adobe did that, but it's not new to 2021.

 

As for the rest of the problem for you and others here, I'll say first it's not a universal problem. The tool DOES work for iis 8.5 for me, and others.  Clearly something is unique for you guys.

 

Second and most important, you may not get any help from Adobe here. Sometimes yes, most times no. 

 

So instead, you and others should email cfinstal@adobe.com and present the problem--and point them here. It would be great if they or you guys would update us as you make any new findings. 


/Charlie (troubleshooter, carehart.org)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Dec 18, 2020 Dec 18, 2020

Copy link to clipboard

Copied

Sorry nothing to add but I am also seeing the exact same behavior.  I had been installing to a test server that I migrated from CF11 to CF2018 then on to CF2021 with these connector errors on the CF2021 install.  I reverted to the CF11 snapshot and tried to go directly to CF2021 and still get the same error.

 

Again apologies for no helpful steps to take just a sort of misery loves company situation.  Good Luck!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 18, 2020 Dec 18, 2020

Copy link to clipboard

Copied

Well, both you and Casey mention this being on a machine that had cf2018 installed. Had you both removed the cf2018 connectors (with the cf2018 wsconfig tool) before trying to add a cf2021 connector? Perhaps that's where it's failing (it should just report an error that the site or sites are already configured).

 

Again, I'm just trying to help think through why it's happening to some and not all (and again, not me).

 

Finally, to any of you, if you want more direct help to look at the issue, I can do that on a consulting basis. If you did not value the time we spend (likely less than a half hour), you'd not pay for it. I realize you may think it's Adobe's responsibility but I don't work for them. I just try to help, here for free a lot, but then via direct consulting when that's most expedient. See carehart.org/consulting for more, and cf411.com/cftrouble for still other folks. 

 


/Charlie (troubleshooter, carehart.org)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Dec 18, 2020 Dec 18, 2020

Copy link to clipboard

Copied

Thanks Charlie, 

 

Appricate all of the great content you put out for the community.    

 

We have a support contact but I myself don't have access so I was just asking in the community channel to see if others had a quick fix before I track down the team in my company who manages that access. 

 

The connector did randmly add itself to a new empty IIS site. I have't this with my existing sites as I'd need to remove the Cf2018 connector again so I'll eventually try that again but for now I'm tied up on other splunk dashboard projects so I'll get back to it eventually...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Dec 19, 2020 Dec 19, 2020

Copy link to clipboard

Copied

Found the problem, the wsconfig tool doesn't work while connected to the corporate VPN. not sure what it's trying to connect to outside the network when it's running but if I turn off VPN and proxy settings within my OS the WSConfig tool worked multiple times, when turning on VPN and Corporate proxy config it throws the java.lang.NullPointerException.

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Dec 21, 2020 Dec 21, 2020

Copy link to clipboard

Copied

This is enlightening for me I think.  I often have issues with proxys and firewall settings when installing things on my companies network.  I am wondering if this wsconfig issue could have something to do with the package manager aspect that has been talked about with 2021 (admittedly I do not know very much about it.  Honestly I have just started gettting into things like npm and node and such).  This issue showing itself on VPN but not off VPN could certainly be pointing to the connector app possibly trying to check in with the package management site.  Pure speculation but just wanted to say that this VPN finding mightt just be the issue I could be having.  Thanks.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 22, 2020 Dec 22, 2020

Copy link to clipboard

Copied

After troubleshooting this with Adobe Support, who spun up a matching Windows box and tried this on network and off, they verified that an issue with nullPointerException occurs when you are on a corporate VPN, or in my case, on a gapped box with no internet access. (Could be other reasons) They asked me to create a bug report: CF-4210996. I will update back here as information is found. Bummer. BTW, they found this post which lead them to the cause.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 22, 2020 Dec 22, 2020

Copy link to clipboard

Copied

This is a long shot, but a lot of these wacky network problems (VPN, no internet access, etc) can be solved by installing the Microsoft Loopback Adapter.

 

https://kb.vmware.com/s/article/1004779

 

Dave Watts, Eidolon LLC

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jan 26, 2021 Jan 26, 2021

Copy link to clipboard

Copied

Hi everybody,

I get exactly the same issue on a new machine running w2k16 Server, IIS 10 after installing CF2021.0.0.323925

The web.xml file is fine, none of the tricks I can read here worked. The machine is a regular VM in a corporate network having access to internet, so it is unlikely to be a VPN issue. Somehow I'm out of ideas, maybe anybody else can help?

Many thanks in advance!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 26, 2021 Jan 26, 2021

Copy link to clipboard

Copied

Maybe you've already done this, but you need to explicitly run the wsconfig tool as admin, even if you're already logged in as an administrator. This is an easy mistake to make.

 

Otherwise, it is possible to set up connectors manually.

https://helpx.adobe.com/coldfusion/kb/coldfusion-iis-manual-connector-configuration.html

 

Dave Watts, Eidolon LLC

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jan 27, 2021 Jan 27, 2021

Copy link to clipboard

Copied

Thank you Dave. 

It's not been an issue with permissions. - But in the meantime I managed to solve it.

Yesterday late I contacted cfinstal@adobe.com and they provided me with a patched version of wsconfig.jar. After replacing it I've been able to configure the connector in the same way as in the good old days of CF2018 🙂

So it seems to be a bug and I hope the fix will soon be included in the installer (I had used ColdFusion_2021_GUI_WWEJ_win64.exe  file version 2021.0.0.2)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 04, 2021 Feb 04, 2021

Copy link to clipboard

Copied

As an update on this issue, it seems the solution (at least for some problems related to this) is in an updated CF web server connector for CF2021. See the comment here from pkulla, who noted that they were given that fix from Adobe.

 

It would seem we could expect that fix to come out with whatever first update to CF 2021 is offered, but until then it would be great if Adobe could offer that fix for us here. Or I have asked that also at the tracker ticket where such a fix for a similar problem is mentioned. For those reading this, you'll want to keep an eye there, as ask Adobe for it via cfinstal@adobe.com, referring to that ticket, CF-4210996

 

But if you are seeing this in the future, do check first if  CF2021 update 1 has come out and indicates that it includes the fix.


/Charlie (troubleshooter, carehart.org)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 07, 2021 Mar 07, 2021

Copy link to clipboard

Copied

As yet another update on this issue (and perhaps the final one needed), Adobe is now offering a fix for this nullpointer problem with an updated CF web server connector for CF2021, in the form of an updated wsconfig.jar (which is called when you run the wsconfig.exe tool). It will be included in the first update to CF2021, whnever that arrives.

 

But those suffering these problems don't need to wait until then: instead, see the tracker ticket CF-4210996 where in a comment on Feb 19, Piyush from Adobe offers a link to get an early version of the updated wsconfig jar now, as well as steps on how to implement it. Note also the steps he offers to clear out vestiges of connector config that may have been put there by the broken version (and which steps I add to, with a next comment there). This "special" version would be overwritten when update 1 of CF2021 comes out.

 

Thanks to Piyush and Adobe for offering the updated wsconfig tool before CF2021 update 1 has been released. And thanks also to the folks here who pressed the case, first Casey (who created this post in Nov), then Anthony who (as NLICLLC) commented in Dec that he'd created the tracker ticket, then Pkulla who first indicated in late Jan about having gotten a fix directly from Adobe, before Piyush then offered it Feb 19 directly via the ticket.

 

I'm intentionally not offering the link to the jar here, as it may be temporary. Indeed, if you are seeing this post in March 2021 and beyond, just check first if  CF2021 Update 1 has come out, in which case just get that update, to get the fix to the wsconfig tool which would be included with that update (and later ones). You would NO longer want to use this "special fix" version, as the final one may solve still more problems. But if update 1 has NOT come out, go get the update from the tracker ticket above...and again, heed those steps offered for cleaning things up before proceeding to run the new one.


/Charlie (troubleshooter, carehart.org)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 15, 2021 Jun 15, 2021

Copy link to clipboard

Copied

LATEST

As another update on things, this updated wsconfig.jar did NOT make it into CF2021 update 1 as had been hoped, so instead you need to get the updated jar and implement it manually. See the discussion of all this in that tracker ticket referred to previously. It is now indicated to be included in update 2.


/Charlie (troubleshooter, carehart.org)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation