cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

./luaScriptResource hangs on thingworx.handler: Creating a new handler.

Re: ./luaScriptResource hangs on thingworx.handler: Creating a new handler.

This is a known bug in the some of the EMS's logging functionality that is reversing the IP address when printing to the log.  It will be fixed in a future release.

Re: ./luaScriptResource hangs on thingworx.handler: Creating a new handler.

Thanks Al . But the problem for many people is not solved. EMS is getting stuck at receiving a reuest from Lua Resource Script. Any solution for that? This thread has all the details

Re: ./luaScriptResource hangs on thingworx.handler: Creating a new handler.

I think what's happening here is the Lua Script Resource is unable to bind on it's default HTTP server port, which is 8001, because there is something else already bound on that address.  You can see that error in the logs here:

 

[ERROR] 2018-02-28 21:59:38,495 httpserver: Server socket error: Address already in use [127.0.0.1:8001]
[ERROR] 2018-02-28 21:59:38,495 httpServer: unable to bind http server to port=8001, trying next port.
[ERROR] 2018-02-28 21:59:38,495 httpServer: unable to bind http server to any port from 8001 to 8001.

If the LSR can't start it's http server, it will never be able to respond to requests from the EMS and would make sense that it would seem stuck (although I haven't confirmed this myself).  Have you tried customizing the 'script_resource_port` value in config.lua?

Re: ./luaScriptResource hangs on thingworx.handler: Creating a new handler.

Alex - I request you to set up a quick 30 min with me tomorrow so that I can show you what is happening. I have done all combinations of IP and ports and the problem lies somewhere else. I have compared the log with a working one as well. I have the system running and I can show you over WebEx. Pls suggest

Re: ./luaScriptResource hangs on thingworx.handler: Creating a new handler.

From reading the original log, it sounds like a port conflict.  Try customizing your Lua Script Resource's config.lua to use a different port.  If you don't customize a port, it will try to use 8001 by default.  I've included a snippet from the docs that describes what values you can set in config.lua for the LSR and EMS's HTTP Server settings.  You need to make sure the `rap` settings match how your EMS is configured.

 

--
-- Connection parameters that reflect EMS configuration settings
--
scripts.rap_host = "127.0.0.1"  
scripts.rap_port = "8000"
scripts.rap_ssl = true
scripts.rap_server_authenticate = true
scripts.rap_cert_file = "pki/ca.pem"
scripts.rap_deny_selfsigned = true
scripts.rap_validate = true

--
-- Lua Script Resource HTTP Server Configuration Parameters
--
scripts.script_resource_host = "127.0.0.1"
scripts.script_resource_port = "8001"
scripts.script_resource_ssl = "true"
scripts.script_resource_certificate_chain = "pki/LSR_HTTP_Server.crt"
scripts.script_resource_private_key = "pki/LSR_HTTP_Server.pem"
scripts.script_resource_passphrase = "password"
scripts.script_resource_authenticate = false
scripts.script_resource_use_default_certificate = false

 

 

Re: ./luaScriptResource hangs on thingworx.handler: Creating a new handler.

Re: ./luaScriptResource hangs on thingworx.handler: Creating a new handler.

Hi pbatwal,

 

I'm sorry you're encountering this issue.  Can you please open a case with support and provide them with the details you shared here, including logs, config files and environment details.  I'm not able to hop on a call but if you open a case I can make sure someone on my team takes a look into your issue.

 

Thanks,

-- Alex

Re: ./luaScriptResource hangs on thingworx.handler: Creating a new handler.

Hi Al - I have already opened the issue and it was with Craig Arko. The issue did not get resolved as concluded  that the EMS guide needs revision for TW8.2. But even after guide update nothing has changed.

Can you pls open a case or let me know how to open a case? 

Re: ./luaScriptResource hangs on thingworx.handler: Creating a new handler.

Hi, pbatwal.

 

Now handling  this as case 14063213.

 

Thanks,

 

-- Craig A.

Re: ./luaScriptResource hangs on thingworx.handler: Creating a new handler.

Hello,

I struggled a lot with this issue and realised that a problem in the Microserver 5.4 or in the LRS inside the package can cause these recurring disconnections. I fixed by installing the Microserver 5.3.4. There are still some network glitches but now I can always see the Thing connected. Let me know if you are successful as well.

Replaced 

MED-61060-CD-054_F000_Microserver-Linux-arm-hwfpu-openssl-5-4-0-114.zip

With

MED-61060-CD-053_SP5_Microserver-5-3-4-2383-Linux-ARM-HWFPU.zip