Hexagon Geospatial
MENU

Developer Discussions

Discuss topics with other Hexagon Geospatial Power Portfolio developers and experts to get the most out of our products.
Showing results for 
Search instead for 
Do you mean 
Reply
Super Contributor
Posts: 301
Registered: ‎02-10-2016

GMSC 2018u3, plugin has a websocket server gets connection closed before receiving a handshake error

HI team,

 

We migrate a java plugin from GMSC 16.5  to 2018 u3. The java plugin contains a web socket server created by java jetty lightweight version https://www.eclipse.org/jetty/. The plugin works in GMSC 16.5 and 2018 u3 pre-release version, but in the official version of 2018 u3 (16.5.320.2), when GMSC launches, the plugin starts and server is created, a javascript client tries to connect to the server, we get straight the error "Connection closed before receiving a handshake response".

 

 

ttt.png

 

I still have no idea why I get the error, the environment was deployed with the pre-release version and it worked fine. I also tested the jetty server independently without GMSC and it works, connects ok with the client.

 

Appreciate all suggestions, ideas on the issue   

 

Kind regards,

Super Contributor
Posts: 301
Registered: ‎02-10-2016

Re: GMSC 2018u3, plugin has a websocket server gets connection closed before receiving a handshake e

Hi team,

 

Just some update on the issue. I now have the GMSC version 16.5.308.1 (the last GMSC update 3 pre-release version) and my websocket server is working just fine. In addition, we use port 7020 for communicating; however, before starting the server we have a function to check to make sure we grab the free port (starting from 7020).

 

So, it looks to me that some changes in the core GMSC from the latest pre-release version to the official version that block my server. 

 

Appreciate all suggestions and insights,

 

Kind regards,

Technical Evangelist
Posts: 148
Registered: ‎10-20-2015

Re: GMSC 2018u3, plugin has a websocket server gets connection closed before receiving a handshake e

Hi Bob,

I compared the dependency list of both versions and your issue is related to a version conflict. 

 

The integrated commons-logging version of 16.5.320.2 defines the servlet-api 2.3 as required (see https://issues.apache.org/jira/browse/LOGGING-113) but Jetty needs a newer version of that.

 

That's a common issue which is well kown under the term "JAR Hell". To avoid such cases it would be important that you as a plugin developer ensure that your plugin only use dependencies which are compatible with the existing GMSC dependencies. 

 

In case of the servlet-api is that very hard to achieve because the servlet-api 2.3 is a very old and even Jetty 6 (from 2010) uses a newer version.

 

Therefore I checked the commons-logging release notes and I'm confident that we can force an upgrade to a commons-logging version which fixes this issue.

 

 

Please open a new Support Ticket and we provide you a new GMSC setup which uses commons-logging 1.2.

 

In the meanwhile, just delete the following and try if this solves your issue

  • GeoMedia SmartClient\Program\jars\logkit-1.0.1.jar
  • GeoMedia SmartClient\Program\jars\servlet-api-2.3.jar
  • GeoMedia SmartClient\Program\jars\avalon-framework-4.1.3.jar

 

Best Regards,

Steve

 

 

Frequent Contributor
Posts: 120
Registered: ‎11-17-2015

Re: GMSC 2018u3, plugin has a websocket server gets connection closed before receiving a handshake e

Hello Steve,

 

Removing the 3 jar solves the problem.

Is there any side effect by doing this?

 

Thank you!

best regards,

Yohann.

Technical Evangelist
Posts: 148
Registered: ‎10-20-2015

Re: GMSC 2018u3, plugin has a websocket server gets connection closed before receiving a handshake e

The better way would be the request of a new GMSC setup but in the end there should be no side effect if you repair your installation before the next upgrade.

 

The commons-logging developers just used the wrong property at the pom.xml:

https://github.com/apache/commons-logging/commit/531990ff9adef44de20545e1bbd1cc73dc8b84ea#diff-60037...

Highlighted
Frequent Contributor
Posts: 120
Registered: ‎11-17-2015

Re: GMSC 2018u3, plugin has a websocket server gets connection closed before receiving a handshake e

OK. 

We have to provide GMSC 2018 u3 to our customer this Friday.

We will give them a procedure to delete the 3 jars (to make the plugin works).

When the next release will comes we will give them the procedure where they have to repair the installation prior to install the new release.

 

Yohann. 

Technical Evangelist
Posts: 148
Registered: ‎10-20-2015

Re: GMSC 2018u3, plugin has a websocket server gets connection closed before receiving a handshake e

Okay perfect.

Do you need immediate support?
Please submit a Ticket through our
Development Ticket Portal.