Lucee Websockets Extension 3.0.0.17-SNAPSHOT

I’ve done some work on the websockets extension and it’s finally running for me on Lucee 6.2.1.112-RC

Details in the ticket, plus a modified playground example to try it out (between different browsers)

I also added a new section to the lucee docs explaining about how the logging works

https://luceeserver.atlassian.net/browse/LDEV-5385?focusedCommentId=60014

Let me know how you go!

2 Likes

Will you keep the hard coded paths to the endpoints and require that websocket components be located in the lucee install folder?

Or will you allow websocket components to be located in your application directory structure and allow the application to map endpoints to their corresponding websocket components? This would be preferable.

I can confirm that the websocket extension is working now in 6.2.1 :slight_smile:

The only thing that does not seem to be working, is that it is not installing via the docker environment variables (I am able to load it via the admin or copying over the LEX files directly).

"Severity","ThreadID","Date","Time","Application","Message"
"INFO","main","04/11/2025","13:23:07","controller","No extension(s) found to add/install"
"INFO","main","04/11/2025","13:23:07","controller","Extensions to install defined in env variable or system property:3F9DFF32-B555-449D-B0EB5DB723044045;version=3.0.0.17-RC,D062D72F-F8A2-46F0-8CBC91325B2F067B;name=ORM;version=6.5.2,CED6227E-0F49-6367-A68D21AACA6B07E8"
"INFO","main","04/11/2025","13:23:10","extension","copy [D062D72F-F8A2-46F0-8CBC91325B2F067B:6.5.2] to [/opt/lucee/server/lucee-server/context/extensions/available/D062D72F-F8A2-46F0-8CBC91325B2F067B-6.5.2.lex]"
"DEBUG","main","04/11/2025","13:23:10","extension","Deploy fld [ormFunctions.fld]"
"DEBUG","main","04/11/2025","13:23:10","OSGi","add bundle:/opt/lucee/server/lucee-server/bundles/orm-extension-6.5.2.jar"
"DEBUG","main","04/11/2025","13:23:10","OSGi","Start bundle: [orm-extension:6.5.2]"
"INFO","main","04/11/2025","13:23:10","extension","Update orm engine [class:ortus.extension.orm.HibernateORMEngine;name:orm-extension;version:6.5.2;] from extension [Ortus ORM Extension:6.5.2]"
"INFO","main","04/11/2025","13:23:11","extension","copy [CED6227E-0F49-6367-A68D21AACA6B07E8:1.0.0.5] to [/opt/lucee/server/lucee-server/context/extensions/available/CED6227E-0F49-6367-A68D21AACA6B07E8-1.0.0.5.lex]"
"DEBUG","main","04/11/2025","13:23:11","extension","Update Mapping [/lucee/admin]"
"Severity","ThreadID","Date","Time","Application","Message"
"INFO","main","04/11/2025","13:23:11","application","Lucee warmup completed. Shutting down."

Any idea of where to look at for that issue? I do have the logs set to debug, but I’m not seeing any errors downloading the file. It also does not appear in the available extensions directory in the container.

Misfire on my side with the extension installing. I had the wrong package version in my ENV variable.

Websocket extension is working as designed. Thanks team for taking care of this!

you can configure the location via this websockets.json in the context folder, where you find the the .CFConfig.json

{
	"directory":"{lucee-config}/websockets/",
	"requestTimeout":50, 
	"idleTimeout":300
}

the log level was set to info, not error for that, just fixed it

https://luceeserver.atlassian.net/browse/LDEV-5495

I see, but what if you’re running multiple apps on the same server? This is especially problematic on dev environments where each app might use the same websocket endpoints but different listeners.

I’m still having trouble getting this to work. I’m using the 3.0.0.17-SNAPSHOT on Lucee 6.2.1.122

image

I’ve downloaded the Zackster’s Test.cfc from the ticket and put it in the same folder as the one under the ‘mapping’ key. But the cfc isn’t registering. I’ve restarted the Lucee server, but the ‘instances’ array is empty.

I’ve enabled the websocket.log. It’s saying something about WebSocketEndpoint being registered, but I see no instances registered when I dump WebSocketInfo()

"INFO","Thread-2","07/07/2025","08:25:35","websocket-endpoint-factory","found configuration at  [C:\WinTop_tools\Lucee\tomcat\lucee-server\context\websocket.json]"
"INFO","Thread-2","07/07/2025","08:25:35","websocket-endpoint-factory","found [directory] setting in configuration, using [{lucee-config}/websockets/]"
"INFO","Thread-2","07/07/2025","08:25:35","websocket-endpoint-factory","component path is [{lucee-config}/websockets/] resolved [C:\WinTop_tools\Lucee\tomcat\lucee-server\context\websockets\]"
"INFO","Thread-2","07/07/2025","08:25:35","websocket-endpoint-factory","init WebSocketEndpoint for web context [617afa20ae44d0cd3c17a13823779a76 - C:\WinTop_tools\Lucee\tomcat\webapps\ROOT\] mapping defined in the configuration is [{lucee-config}/websockets/], this is resolved to [C:\WinTop_tools\Lucee\tomcat\lucee-server\context\websockets]"
"INFO","Thread-2","07/07/2025","08:25:35","websocket-endpoint-factory","register web context  [617afa20ae44d0cd3c17a13823779a76 - C:\WinTop_tools\Lucee\tomcat\webapps\ROOT\] mapping defined in the configuration is [C:\WinTop_tools\Lucee\tomcat\lucee-server\context\websockets]"
"INFO","Thread-2","07/07/2025","08:25:35","websocket-endpoint-factory","register web context  [617afa20ae44d0cd3c17a13823779a76 - C:\WinTop_tools\Lucee\tomcat\webapps\ROOT\] mapping defined in the configuration is [C:\WinTop_tools\Lucee\tomcat\lucee-server\context\websockets]"
"INFO","Thread-2","07/07/2025","08:25:35","websocket-endpoint-factory","register WebSocketEndpoint with servlet container"
"INFO","Thread-2","07/07/2025","08:25:35","websocket-endpoint-factory","register WebSocketEndpoint with servlet container"
"TRACE","Thread-2","07/07/2025","08:25:35","websocket-endpoint-factory","checking for new web context to register, current interval [500ms]"
"TRACE","Thread-2","07/07/2025","08:25:35","websocket-endpoint-factory","checking for new web context to register, current interval [500ms]"
"TRACE","Thread-2","07/07/2025","08:25:36","websocket-endpoint-factory","checking for new web context to register, current interval [500ms]"
"TRACE","Thread-2","07/07/2025","08:25:36","websocket-endpoint-factory","checking for new web context to register, current interval [1000ms]"
"TRACE","Thread-2","07/07/2025","08:25:37","websocket-endpoint-factory","checking for new web context to register, current interval [1000ms]"
"TRACE","Thread-2","07/07/2025","08:25:38","websocket-endpoint-factory","checking for new web context to register, current interval [1000ms]"
"TRACE","Thread-2","07/07/2025","08:25:39","websocket-endpoint-factory","checking for new web context to register, current interval [1000ms]"
"TRACE","Thread-2","07/07/2025","08:25:40","websocket-endpoint-factory","checking for new web context to register, current interval [1000ms]"
"TRACE","Thread-2","07/07/2025","08:25:41","websocket-endpoint-factory","checking for new web context to register, current interval [1000ms]"
"TRACE","Thread-2","07/07/2025","08:25:42","websocket-endpoint-factory","checking for new web context to register, current interval [1000ms]"

Am I missing anything?