Comments (2)
+1
from tsung.
With the latest code, this still seems to be a problem. When trying to use Jabber over websockets, Tsung will send (unterminated) <stream
elements as the websocket data, instead of the open
and close
elements.
I have verified that with simple string substitution (performed 'in-flight'), Tsung can successfully interact with an XMPP server over websockets. These are the substitutions required:
if (stanza.startsWith("<?xml version='1.0'?><stream:stream ")) {
stanza = stanza.replace("<?xml version='1.0'?><stream:stream ", "<open ");
stanza = stanza.replace("jabber:client", "urn:ietf:params:xml:ns:xmpp-framing");
stanza += "</open>";
}
if (stanza.startsWith("</stream:stream>")) {
stanza = stanza.replace("</stream:stream>", "<close xmlns='urn:ietf:params:xml:ns:xmpp-framing' />");
}
For completeness, this is the Tsung configuration that I'm using, with Tsung as build based on code of version 1.7 (development):
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE tsung SYSTEM "/usr/share/tsung/tsung-1.0.dtd">
<tsung loglevel="notice" version="1.0" dumptraffic="true">
<clients>
<client host="localhost" use_controller_vm="true" />
</clients>
<servers>
<server host="172.17.0.1" port="7070" type="websocket" />
</servers>
<load>
<arrivalphase phase="1" duration="1" unit="second">
<users interarrival="1" unit="second" />
</arrivalphase>
</load>
<options>
<option type="ts_jabber" name="global_number" value="1000" />
<option type="ts_jabber" name="userid_max" value="10000" />
<option type="ts_jabber" name="domain" value="example.org" />
<option name="websocket_path" value="/ws" />
<option name="websocket_frame" value="text" />
<option name="websocket_subprotocols" value="xmpp" />
</options>
<sessions>
<session bidi="true" probability="100" name="xmpp-over-websockets" type="ts_jabber">
<request>
<!-- This seems to send '<stream' where '<open' is needed. -->
<jabber type="connect" ack="local"/>
</request>
<transaction name="authenticate">
<request>
<jabber type="auth_sasl_anonymous" ack="local"></jabber>
</request>
<request>
<jabber type="connect" ack="local"></jabber>
</request>
<request>
<jabber type="auth_sasl_bind" ack="local"></jabber>
</request>
<request>
<jabber type="auth_sasl_session" ack="local"></jabber>
</request>
</transaction>
<request>
<jabber type="presence:initial" ack="local"/>
</request>
<request>
<jabber type="close" ack="local" />
</request>
</session>
</sessions>
</tsung>
from tsung.
Related Issues (20)
- Incorrect freemem report in docker containers
- Many too error_unknown and error_connect_* in log
- Don't reset session on change_type
- Mean value is empty and count is 0 in the generated report
- The load is not generated from mulitple client instances as expected in distributed environment HOT 1
- Cannot do "contents_from_file" and '<request subst="true">' at the same time HOT 1
- datestr_test failed with erlang 21 HOT 1
- Error using tsung view after running load test
- Tsung 1.7.0 crashes on start HOT 3
- Getting config error while start a demo mqtt.xml.in script
- Are there any methods for getting only 400s or 500s error in tsung protocol dump file?
- Can I test TCP in tsung but using SSL? HOT 1
- Unable to view graphs on webui HOT 1
- Massive CPU usage after a certain point
- Tsung doen't respond with PONG
- Monitoring with snmp does not work
- Will start 0 users? Do I config error? HOT 1
- How can I test TCP and check recv package?
- How can i send all XMPP messages to a specific user? HOT 1
- Erlang OTP 26 ssl defaults HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tsung.