Projects tigase _server server-core Issues #422
Websockets response errors (#422)
Todd McGuinness opened 10 years ago

In attempt to isolate some of our connection and reconnection to tigase server issues. A colleague and I came with a method of testing the connection to tigase via websockets from a machine on the command line...

The following script was run:

@var WebSocket = require('ws');

var webSocketServer = 'wss://xmpp.app.nextplus.me:443'

var success = 0;

var options = {};

options.protocol = "xmpp"

for(var i=0 ; i <= 1000 ; i++) {

var ws = new WebSocket(webSocketServer, options);

ws.on('open', function open() {

	success++;

	console.log("Success " + success);

	ws.close();

	if(i==100) {

		process.exit(code=0);

	}

}).on('error', function error(error) {

	console.log('Error ' + error);

});

}

@

Results came back with errors:

Success 696

Error Error: socket hang up

Error Error: socket hang up

Success 697

""

Success 713

Error Error: unexpected server response (500)

etc. etc.

If this test is flawed or there is another methodology I can use to test websocket connections and why we are receiving socket hang up and unexpected server response issues from both this test and our client app I would appreciate it.

Cheers,

Todd

Andrzej Wójcik (Tigase) commented 10 years ago

I suppose that you are reporting this against 5.2.x releases (as you set git/stable as applicable version), if so then I would suggest (if possible) to tests future release 7.0.0-SNAPSHOT (from @git/master@) which should be released soon and contains fixes for WebSocket implementation.

Also it would be great if you could tell us what is needed and how to run your example test, se we we could execute it and look for possible issues.

Todd McGuinness commented 10 years ago

Yes - we are working on 5.2.2 version.

We are currently running nginx as a load balancer in front of 2 servers - which handles the SSL -> handoff plain WS.

What else do you need from me other than the init.properties?

Configuration - init.properties:

c2s/processors[s]=urn:xmpp:sm:3

config-type = --gen-config-def

--admins = admin@bull.ettra.in

--virt-hosts = sms.nextplus.com,app.nextplus.me,bull.ettra.in,gogii.com,gogii.net

--user-db = mysql

--user-db-uri = jdbc:mysql://localhost/tigase?user=tigase&password=-AzJ6LFGTdQ_GrKm&autoCreateUser=true

#--auth-db = com.textplus.bullettrain.messaging.tigase.auth.TrustingAuthRepository

--auth-db=com.textplus.bullettrain.messaging.tigase.auth.CASAuthRepository

--sm-plugins = +sms,-message_history,+message,+offline_messaging,+groupchat,+message-carbons,-textplus,-amp,-message-all,-msgoffline

#--debug=offline_messaging,sms,tigase.xml,textplus

--debug=offline_messaging,sms,cluster,db,s2s

#--debug-packages = com.textplus.bullettrain.messaging.tigase.plugin,org.jasig.cas.client.validation

--cluster-mode = true

--cm-see-other-host=none

--cluster-nodes = 11cn30.lax1.gogii.net:password,12cn30.lax1.gogii.net:password,13cn30.lax1.gogii.net:password,11cn23.ams1.gogii.net:password,12cn23.ams1.gogii.net:password,14cn23.ams1.gogii.net:password

cl-comp/cluster-connections-per-node[I]=4

cl-comp/repo-remove-outdated-items[B]=false

  1. reload items once a day

cl-comp/repo-autoreload-interval[L]=86400

--net-buff-high-throughput = 256k

--net-buff-standard = 4k

--s2s-secret = 8-Nu4Rdkh2_7jco_

--monitoring = jmx:9050,http:9080

#--Logging change

basic-conf/logging/java.util.logging.FileHandler.count[S]=25

basic-conf/logging/java.util.logging.FileHandler.limit=1000000000

  1. plugin configuration options.

sess-man/plugins-conf/message_history/message-history-service-url=http://mhs.lax1.gogii.net

sess-man/plugins-conf/message_history/message-history-service-username=ums_service

sess-man/plugins-conf/message_history/message-history-service-password=51ea869af63843ca90644a69d34b8579

sess-man/plugins-conf/sms/sms-service-url=http://nsms.lax1.gogii.net

sess-man/plugins-conf/sms/matching-sms-domain=sms.nextplus.com

sess-man/plugins-conf/offline_messaging/offline-messaging-service-url=http://npush.lax1.gogii.net

1. textplus plugin

#sess-man/plugins-conf/textplus/matching-textplus-domain=gogii.com

#sess-man/plugins-conf/textplus/matching-nextplus-domain=app.nextplus.me

#sess-man/plugins-conf/textplus/service.jms.broker.url=failover://(tcp://amq.agt.lax1.gogii.net:61616)?maxReconnectDelay=200&randomize=false&maxReconnectAttempts=2&timeout=5000

#sess-man/plugins-conf/textplus/service.jms.textplus.queue=queue.gateway.textplusMessageForDelivery

  1. Error Forwarding

sess-man/error-forwarding=forward

  1. CAS Auth configuration

basic-conf/auth-repo-params/ums_url=http://ums.lax1.gogii.net

basic-conf/auth-repo-params/cas_url=http://cas.lax1.gogii.net

basic-conf/auth-repo-params/block_bad_logins=true

basic-conf/auth-repo-params/service_name=nextplus

  1. websocket configuration

ws2s/connections/ports[i]=5290,5291

ws2s/connections/5291/socket=plain

ws2s/connections/5291/type=accept

  1. External Components

--comp-class-1=com.textplus.bullettrain.messaging.tigase.component.GroupMessagingComponent

--comp-name-1=groupchat

--comp-class-2=com.textplus.bullettrain.messaging.tigase.component.MessageForwardingComponent

--comp-name-2=forwarding

  1. Various np service rest client configs

--ums-url=http://ums.lax1.gogii.net

--ums-username=ums_service

--ums-password=51ea869af63843ca90644a69d34b8579

--message-history-url=http://mhs.lax1.gogii.net

--message-history-username=ums_service

--message-history-password=51ea869af63843ca90644a69d34b8579

Andrzej Wójcik (Tigase) commented 10 years ago

Could you explain how to run your example test code?

I think this is in JavaScript and is code for Node.JS, right?

So if I try to run this code in node.js I should be able to replicate this issue?

Todd McGuinness commented 10 years ago

Yeah it's java script - node needs to be installed - and node

Artur Hefczyc commented 10 years ago

Todd, please use our forums to request help and our assistance with your installation.

Todd McGuinness commented 10 years ago

Artur,

Why is this support request being rejected? We have paid you for support...

On Jan 29, 2015 12:43 PM, support@tigase.org wrote:

Artur Hefczyc commented 10 years ago

I explained in the other ticket. If you paid for the technical support services, please submit your support request within your dedicated project area. Otherwise it is extremely difficult for us to maintain requests and provide with adequate assistance.

issue 1 of 1
Type
Bug
Priority
Critical
Assignee
RedmineID
2642
Issue Votes (0)
Watchers (0)
Reference
tigase/_server/server-core#422
Please wait...
Page is in error, reload to recover