NIS error following attempted websocket subscription

I set up a node using the recommended docker build to troubleshoot websocket subscriptions, and have noted the following error in my NIS logs:

org.springframework.web.socket.sockjs.SockJsException: Uncaught failure in SockJS request, uri=http://165.227.217.87:7778/w/messages/814/db1bbcmk/eventsource; nested exception is org.springframework.web.socket.sockjs.SockJsTransportFailureException: Failed to open session; nested exception is java.lang.IllegalArgumentException: Async support must be enabled on a servlet and for all filters involved in async request processing. This is done in Java code using the Servlet API or by adding "<async-supported>true</async-supported>" to servlet and filter declarations in web.xml. Also you must use a Servlet 3.0+ container at org.springframework.web.socket.sockjs.support.SockJsHttpRequestHandler.handleRequest(SockJsHttpRequestHandler.java:93) at org.springframework.web.servlet.mvc.HttpRequestHandlerAdapter.handle(HttpRequestHandlerAdapter.java:51) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:959) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:966) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:857) at javax.servlet.http.HttpServlet.service(HttpServlet.java:687) at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:842) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
…etc.

Any ideas how to address this? I’m just using the standard nem-sdk in nodejs to subscribe to block height, unconfirmed and confirmed transactions. Thanks.

could you try nemlibrary.com ?

check this guide https://nemlibrary.com/guide/listener/

1 Like

Thanks Aleix, shall take a look. I should say, it doesn’t happen all the time, but even when it’s not giving me the error, I can still only receive the block height push from the server.

Is there a way to see socket pushes in the logs? In the same way that you can see the ‘entering…’ and ‘exiting…’ for the endpoint requests?

Using the nem library seems to work nicely. :slight_smile: Though as the transaction objects are different, I’ll have to spend a while rewriting the app to handle the different structures.

Cool! :slight_smile:

I suggest you to, if you can, use nem-library in your project. When Catapult will be on main net you will need to use nem2-sdk, and it’s simple to nem-library. So, it will help you in the future

Shall do! Will take a little while, but I’ll work on moving my apps over. It’ll be a good chance to get to grips with the library.

which is your application? maybe it’s worth to start using Catapult instead

NEMp3 and Wishing Wall. Would I have to apply for access?

apply here http://mijin.io/en/catapult.

if you want to run the node in localhost use docker-compose → https://github.com/tech-bureau/catapult-service-bootstrap

but the beta it’s more complete, check it out!

1 Like

Just an update, Aleix. I applied about 10 days ago, but haven’t heard anything back yet. Do you know how long it typically takes to greenlight a new applicant? Thanks.

check the slack invitation link at the bottom of docs here https://nemtech.github.io/

and if you want to run catapult in local use this https://github.com/tech-bureau/catapult-service-bootstrap

1 Like

Thanks!