Questions tagged [sockjs]
SockJS is a browser JavaScript library that provides a WebSocket-like object that gives you a coherent, cross-browser, Javascript API which creates a low latency, full duplex, cross-domain communication channel between the browser and the web server.
633
questions
0
votes
0
answers
23
views
Error: Initial SockJS "Info" request to server failed, url=wss://.../ws org.springframework.web.client.HttpClientErrorException$NotFound: 404 null
Here is my implementation of websocket client over wss like below:
public class WebSocketUtils {
private static final Logger LOGGER = LoggerFactory.getLogger(SimpleFrameHandler.class);
...
0
votes
0
answers
26
views
Spring boot with Stomp gives HttpMessageNotWritableException
I have been using spring boot with stomp server for websocket with sockjs as frontend library. Intermittently I get the following message in the logs.
11:10:15.017 [37] [http-nio-8080-exec-7] WARN ...
0
votes
0
answers
35
views
Springboot Handshake failed due to invalid Upgrade header: null occurs intermitently
I have been using stomp with springboot and tomcat as server. From frontend sockJS is used. Everything works perfectly fine. But sometimes the server logs gets following error.
org.springframework.web....
0
votes
0
answers
67
views
Spring Stomp: Memory leak in websocket
I have been working with springboot and stomp with sockjs for frontend.The broker used with stomp server is ActiveMQ Artemis. My application is having memory leak and an analysis of heap dump shows ...
0
votes
0
answers
45
views
Vert.x event bus consumer called twitce
i wrote a simple code for communicate between a java server in vert.x and a browser client with the event bus library. The client send a message to the server through the event bus and the server call ...
0
votes
0
answers
19
views
I am getting 'ws://localhost:8080/socket/926/dau1j54e/websocket' failed while implementing spring websocket in jhipster
I am trying to implement spring socket in jhipster and when I am trying to connect, it's throwing error in console as shown in the picture below.
Image of the error being thrown in the console
Backend ...
0
votes
0
answers
66
views
Stomp gives TCP connection failure and disconnection error
I have been using STOMP and sockjs for some time now, but the error below happens at times.
12:57:30.976 [48] [tcp-client-loop-nio-4] INFO org.springframework.messaging.simp.stomp....
0
votes
0
answers
38
views
Websocket connection works in IE and doesnt work in Edge
I am using default stomp.js file for creating websocket connections. Connection works fine in edge but it doesn't work in edge. It gives the following error.
error: [$rootScope:inprog] http://errors....
0
votes
1
answer
36
views
SockJS connections will be closed when multiple connections open
If only one SockJS (polling XHR) connection is open, then the app works fine. As soon as I additionally open it in a new window, then the connections will periodically be closed. The client is SockJS ...
0
votes
1
answer
66
views
Is there limit in websockets?
I'm new to websockets and tried to use websockets for pushing notification to user, when function is finished generating exam.
How it is working:
User pressing button to choose subjects of exam.
...
0
votes
1
answer
276
views
Spring Boot STOMP lost connection after a few minutes
I am using ActiveMQ Artemis, SockJS, StompJS, Spring Boot STOMP.
When establishing the connection the client sends heart-beat info:
<<< CONNECTED
version:1.1
session:1913360c
server:ActiveMQ-...
0
votes
1
answer
916
views
Cannot deserialize value of type
I try to create interactive apllication and working with sockets.
I send data by postman in socket, but SpringBoot cannot deserialize it. Pleasr, help)
My dto
public class Event {
@JsonProperty(&...
0
votes
0
answers
67
views
How to connect Spring Boot STOMP with SockJS
Server:
// SocketBrokerConfig.java
@Configuration
@EnableWebSocketMessageBroker
class SocketBrokerConfig : WebSocketMessageBrokerConfigurer {
override fun configureMessageBroker(registry: ...
0
votes
0
answers
59
views
RabbitMQ - WebSocket Connection Overflow Issue
We implemented Web Sockete in our Spring MVC application using STOMP and RabbitMQ cluster. We are facing an issue that virtual host in RabbitMQ is getting deleted (noticed 3 times in 2 days) and then ...
1
vote
0
answers
114
views
Equivalent of Stomp.over in server side code
Is there a backend (nodejs, java, etc) equivalent of Stomp.over? I want to mimic the client side code like below:
var socket = null;
var stompClient = null;
var connectCallback = function() {
...
0
votes
0
answers
100
views
Is there a way to close an "inactive" websocket connection from server?
I am attempting to create an application where a user can define what "room" they would like to connect to and then start chatting with other users. I have been working with websockets to ...
0
votes
0
answers
187
views
How to close Stomp websocket connection gracefully
I have been working with stomp websocket. All the data is recieved well and correctly when using stomp websocket. But there are at times I believe the websocket connection is not closed gracefully. ...
1
vote
0
answers
42
views
Connection to the Web Socket
I try to connect to web socket from angular to spring boot with SockJS:
I have errors after connection to the server's sockets :
Spring Boot configuration:
@Override
public void ...
0
votes
1
answer
373
views
Angular module not found
I was working on a chat for my project using sockJS and STOMP, after various difficulties with installing the 2 libraries I thought I did that (I tried doing that from index.html, npm install and even ...
0
votes
0
answers
28
views
How to connect to secured web socket endpoint in spring boot test
I am trying to connect with secured endpoint in websocket in spring boot test and getting error Intitial sockjs info request to server failed.
certificate is self signed and running code with below ...
0
votes
0
answers
238
views
Spring Boot Websocket - send data periodically with @Scheduled
I am currently working on a project, that needs a websocket connection and continuous data retrieval.
In order to accomplish such a task, I wrote a method, annotated with @Scheduled(fixedRate = 5000). ...
0
votes
0
answers
85
views
Getting multiple 401 errors in console when connecting to websocket using sockjs in spring boot application
We have websocket microservice running in dev server behind gateway. Here is the code piece that am using to connect to it using sockjs.
function connect() {
var socket = new SockJS('https:...
0
votes
2
answers
318
views
CORS error with Spring boot, javascript and web socket
I'm working on a little test project with a simple html page (using javascript) as Frontend and a Spring Boot application for my apis as Backend. I use websocket with stomp and sockJS to keep alive my ...
1
vote
0
answers
56
views
Unable to establish websocket connection on Weblogic 12.1.3 and 12.2.1.3. It fails with 404 not found error
I could debug and find that TyrusWebsocketEngine is not upgrading the websocket request and Upgrade status is "NOT_AVAILABLE". I have used sock.js on client side and spring stomp on server ...
1
vote
0
answers
21
views
What is the difference between session Id obtained from _generateSessionId() and the one obtained by parsing sockjs._transport._url?
There are two types of session Id visible in sockjs
One obtained by calling the function _generateSessionId directly on SockJs object returned here
const sockJs = new SockJs('http://example.com/ws/api'...
0
votes
0
answers
127
views
Spring's websocket api vs sockJs vs stockJs + STOMP when using kafka and spring-cloud-binder? Need guidance
I am researching this topic for a week but i need some more guidance.
What is the best way to integrate Spring boot's websockets with Kafka and Angular?
There is plain old Websocket API which I wanted ...
0
votes
0
answers
25
views
Socket connection failing numerous times before finally getting connected
I was successful in establishing a socket connection between an Angular app and a Spring Boot app. The socket connects in one go when served locally but when deployed on the QA server, it fails ...
0
votes
1
answer
171
views
Cannot send message after handshake in SockJsClient (React)
I am using Spring Boot-React JS and trying to send message through WebSocket. Handshake is fine, i can subscribe with no problem. When i try to send data to a topic, does not work. onMessage did not ...
5
votes
1
answer
1k
views
Spring boot Websockets Handshake failed due to invalid Upgrade header: null
I am using spring boot 2.1.6 RELEASE, trying to use Stomp websockets for push notifications. I have taken reference from here : https://github.com/netgloo/spring-boot-samples/tree/master/spring-boot-...
0
votes
1
answer
77
views
Spring Boot Stomp-Transaction Sockjs: ERROR message=[Bad transaction] Invalid transaction identifier
I implemented a RelayMessageBroker to Rabbitmq with Spring Boot and its working as intended. I use a JavaScript-Client via SockJS to subscribe to queues and to receive/send messages.
I only run into ...
0
votes
1
answer
444
views
Close the Websocket connection when tab closes
I have an Angular with ng2-stompjs and socksjs client and Spring boot Websocket server.
What I want to do, is disconnect from Websocket when a current browser tab is closed.
@Component({
selector: '...
1
vote
0
answers
123
views
Retrive data from local json-server in VUE
I am trying to fetch some data from a local server in a project done with VUE JS. The problem is that I receive a XHR response and I don't know why.
Here is the code:
async fetchTasks() {
const res =...
1
vote
1
answer
59
views
MeteorJS high response time on Heroku
I am running a Meteor app on Heroku and the Heroku response time chart is constantly filled with high response time queries hitting 30 seconds limit
The router logs shows that all the 30 seconds ...
0
votes
0
answers
102
views
The user for the session does not match the user for the request
I'm trying to copy from a working example, However, my Websocket almost connects, but fails due to "The user for the session does not match the user for the request". The error in the ...
0
votes
0
answers
51
views
SpringBoot SockJS not declaring /info path
My SpringBoot program is being contacted via WebSocket by a StompJS over SockJS socket. Or at least I'm attempting to have that happen. Previously, I had a CORS error; now client reports a 404. I ...
0
votes
0
answers
48
views
Websocket - Why can't I send messages to a specific user?
Question:
Why am I being able to send messages to all users but not to a specific user? Am I missing something obvious here?
Problem:
My POC uses the following resources:
The official Spring Boot ...
0
votes
1
answer
152
views
Is there a way to persist the last message received on a web socket disconnection in Spring?
I have a web socket connection established between a browser client and a Spring Boot backend using STOMP and sock js. Every second, a payload is sent to the server from the client containing data ...
0
votes
0
answers
60
views
SockJS connection fails or closes before connecting
I have a Vue project and I'm trying to connect from client side to the SockJS endpoint using STOMP. Our backend is not on the same localhost, so I am proxying the calls. I have tried writing my proxy ...
0
votes
2
answers
431
views
What port use stomp protocol?
Spring Boot app is hosted on default port server.port=8080 and when I connect to the server, JS client's code calls the same port new SockJS('http://localhost:8080/api/streams'); but port use after ...
0
votes
0
answers
31
views
Ensure clients receive server responses in order of publication
I'm using setPreservePublishOrder(true) to make sure responses from the server reach clients in the order that the server sent them. This is to ensure that clients always receive the most recent ...
1
vote
1
answer
477
views
Connect to ActiveMQ broker using STOMP from Ionic App
I have been given an Ionic + Capacitor app which will mainly be compiled to run on the Android platform. I've been tasked with integrating communication with a remote ActiveMQ broker into the app. I ...
2
votes
1
answer
166
views
SockJS increase pool size
I am using SocketJS and Stomp to send files over a backend api for being process.
My problem is that the upload function get stuck if more than two upload are done at the same time.
Ex:
User 1 -> ...
0
votes
0
answers
95
views
How can i enable connection to websocket via Apache2?
I'm stack since 4 days in an issue with Apache2 websocket.
I have deployed a sockjs websocket on Apache Tomcat 10 that connects to a Spring boot application .
Here is the code of sockJs deployed on ...
0
votes
0
answers
60
views
When connecting to a web socket using SockJS, failed connection attempt shows. What is that
When I'm trying to establish a web socket connection with spring boot backend from an angular client it shows this in the console. The connection won't open. 589 and the next part is random,
WebSocket ...
0
votes
0
answers
53
views
Springboot Websocket packets sent but dropped before browser. Workaround?
I have a Spring Boot application sending regular updates to a client (SockJS, Angular) to display stuff. However, some packets are sent by Spring Boot according to logs, but never received on the ...
0
votes
1
answer
57
views
How can I know which of my dependencies is using a dependency that is causing a warning?
In my browser console I am getting
index.js:126 [WDS] Warnings while compiling.
warnings @ index.js:126
(anonymous) @ socket.js:47
sock.onmessage @ SockJSClient.js:67
EventTarget....
9
votes
3
answers
3k
views
Spring boot Websocket without SockJS
I have been struggling with this for at least two weeks now. I'm pretty new to websockets. I have good experience with rest endpoints.
My use case is simple. Client initiates a websocket connection ...
0
votes
0
answers
19
views
About alb and spring boot sockjs
I'm currently writing an application on multiple servers and AWS ALB.
The server is implementing SockJs in version 2 of Spring boot and is trying to realize WebSocket communication.
Client → ALB → ...
0
votes
1
answer
452
views
RxJS websocket (UI) & Stomp using Spring-websocket (backend) can work fine?
I followed spring tutorial and using Stomp, sockJS (sub-protocol build on top of websocket).
I have very limited knowledge of front end and front end architect is not fine with stomp and socksJS, as ...
0
votes
0
answers
94
views
TS7005: Variable 'SockJS' implicitly has an 'any' type. Angular
im trying to use the websocket ( sockjs and stomp ) in my angular project , when i declare them in the service.ts like this :
declare var SockJS;
declare var Stomp;
, my IDE shows this error:
...