kaazing / gateway Goto Github PK
View Code? Open in Web Editor NEWKaazing Gateway
License: Apache License 2.0
Kaazing Gateway
License: Apache License 2.0
If two services have the same accept and connect options for Enterprise Shield, but different transport URIs over the SOCKS layer, the +1 connection never gets established. For example, if one service is using pipe:// and the other ws://, both over SOCKS.
This should be release noted until it's fixed.
From @vjwang on March 31, 2015 18:36
In r_conf_service.md, the last sentence in this paragraph should be removed:
The maximum interval the Gateway waits before retrying if an attempt to connect to the SOCKS proxy fails. The Gateway initially retries after waiting for 500ms; the subsequent wait intervals are as follows: 1s, 2s, 4s, and so on up to the value of socks.retry.maximum.interval. After the maximum interval is reached, the Gateway continues to reconnect to the SOCKS proxy at the maximum interval. See sock.retry.maximum.interval.
New test ConnectorControlIT which executes wse specification test "server.send.ping/response" demonstrates the issue. The test fails because WsebConnector does not set the Content-Type header in the upstream request, as mandated in the wse specification.
In order to extend the accept-options and connect-options in the base XSD, the types should be "sequence." This does enforce an order in the XSD, so to avoid unnecessary restrictions an XSLT will first be applied to the configuration file to reorder elements, and then XSD validation will occur.
Perhaps this crosses the line of being pedantic, but git is also required for this project, and one would have to fork/clone the repo first before executing mvn clean install. I suggest adding git to the requirements and then updating the steps to build with first cloning
git clone https://github.com/kaazing/gateway.distribution.git
Build 60 failed on oracle and open jdk with the following test failing in mina.netty:
Running org.apache.mina.transport.socket.nio.NioDatagramConnectorExIT
Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.468 sec <<< FAILURE! - in org.apache.mina.transport.socket.nio.NioDatagramConnectorExIT
shouldConnect(org.apache.mina.transport.socket.nio.NioDatagramConnectorExIT) Time elapsed: 0.426 sec <<< FAILURE!
java.lang.AssertionError: not all expectations were satisfied
expectations:
expected once, already invoked 1 time: ioHandler.sessionCreated(instance of org.kaazing.mina.core.session.IoSessionEx)
expected once, already invoked 1 time: ioHandler.sessionOpened(instance of org.kaazing.mina.core.session.IoSessionEx)
! expected once, never invoked: ioHandler.sessionClosed(instance of org.kaazing.mina.core.session.IoSessionEx)
what happened before this:
ioHandler.sessionCreated(<(0x00000001: nio datagram, client, /127.0.0.1:52995 => /127.0.0.1:2101)>)
ioHandler.sessionOpened(<(0x00000001: nio datagram, client, /127.0.0.1:52995 => /127.0.0.1:2101)>)
at org.jmock.lib.AssertionErrorTranslator.translate(AssertionErrorTranslator.java:20)
at org.jmock.Mockery.assertIsSatisfied(Mockery.java:199)
at org.apache.mina.transport.socket.nio.NioDatagramConnectorExIT.after(NioDatagramConnectorExIT.java:63)
The README instructions state that npm is required to build gateway.distribution. However, npm is no longer required and the instructions should be updated.
In order to enhance the proxy service there should be an extension mechanism where by additional behavior for the service can be loaded / injected.
3 IT's are failing in service.http.directory on Windows 7
This is the page that is shown when you open http://localhost:8000 after starting the gateway.
Client Technology K3PO
Browser with Version n/a
Client O/S with Version n/a
Gateway with version 5.3.0.1-SNAPSHOT (current develop branch of Gateway)
Gateway Java version 1.8.0_31
Server OS with version: Ubuntu 14.04
Back-End System with version n/a
Can the bug be reproduced in a Kaazing demo out-of-the-box?
Does the bug reproduce with all emulated or native combinations? emulated (it's a WSE robot test)
Is this a regression from previous released version? no
Steps to reproduce: Run the robot test https://github.com/kaazing/gateway/blob/develop/gateway.transport.wseb/src/test/java/org/kaazing/gateway/transport/wseb/WsebTransportIT.java, specifically shouldPropagateQueryParametersFromCreateToUpstreamAndDownstream() with some modifications (detailed in a later comment) to the rupert script
Observed behavior: test fails due to query parameters not propogated to upstream/downstream URLs
Expected behavior: the test should succeed because query parameters are correctly observed on upstream/downstream URLs
This appears to be an issue where the query string is not correctly reported to WSEB from the HTTP layer. When just a path is used for the GET request, the test works as expected. When the absolute URL is used as indicated in the client code the test does not work.
Use the new get/setSubject added to mina.netty instead of session attributes to ensure the authenticated Subject gets correctly propagated up the different transport layers.
Decoder gets stuck in READ_CONTENT decoding state when the HTTP response doesn't have Content-Length header or Transfer-Encoding header.
Gateway with version:
Can the bug be reproduced in a Kaazing demo out-of-the-box?
Steps to reproduce: mvn clean install
Observed behavior:
Failed tests:
WsebTransportIT.testEchoAlignedDownstream Specified behavior did not match expected:<...t WRITE_COMPLETE_B
[read [0x80 0x11]
read "Hello, WebSocket!"
close]d
# upstream reques...> but was:<...t WRITE_COMPLETE_B
[unboun]d
# upstream reques...>
Tests run: 14, Failures: 1, Errors: 0, Skipped: 2
Actual k3po execution from debugging in K3po
#
# Copyright (c) 2007-2014 Kaazing Corporation. All rights reserved.
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
# create request
connect tcp://localhost:8000
connected
write "GET /echo/;e/ct HTTP/1.1\r\n"
write "Accept: */*\r\n"
write "Accept-Encoding: gzip,deflate,sdch\r\n"
write "Accept-Language: en-US,en;q=0.8\r\n"
write "Connection: keep-alive\r\n"
write "Host: localhost:8000\r\n"
write "Referer: http://localhost:8000/?.kr=xs\r\n"
write "User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.65 Safari/537.36\r\n"
write "X-Origin: http://localhost:8000\r\n"
write "X-WebSocket-Version: wseb-1.0\r\n"
write "\r\n"
write notify CREATE_REQUESTED
read await CREATE_REQUESTED
read "HTTP/1.1 200 OK\r\n"
read "Content-Length: 196\r\n"
read "Content-Type: text/plain;charset=UTF-8\r\n"
read "Date: " /.*/ "\r\n"
read "Server: Kaazing Gateway\r\n"
read "\r\n"
read "HTTP/1.1 201 Created\r\n"
read "Content-Type: text/plain;charset=UTF-8\r\n"
read "\r\n"
read "http://localhost:8000" /(?<up>.*)/ "\n"
read "http://localhost:8000" /(?<down>.*)/ "\n"
read notify CREATED
close
closed
# downstream request (may not be thread aligned - different TCP connection)
connect tcp://localhost:8000
connected
write await CREATED
write "POST "
write ${down}
write " HTTP/1.1\r\n"
write "Accept: */*\r\n"
write "Accept-Encoding: gzip,deflate,sdch\r\n"
write "Accept-Language: en-US,en;q=0.8\r\n"
write "Connection: keep-alive\r\n"
write "Content-Length: 3\r\n"
write "Host: localhost:8000\r\n"
write "Referer: http://localhost:8000/?.kr=xs\r\n"
write "User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.65 Safari/537.36\r\n"
write "X-Origin: http://localhost:8000\r\n"
write "\r\n"
# payload sent by Flash client runtime to prevent the POST converting to GET and stripping the headers off the request (!)
write ">|<"
read "HTTP/1.1 200 OK\r\n"
read "Cache-Control: no-cache\r\n"
read "Connection: close\r\n"
read "Content-Type: text/plain;charset=windows-1252\r\n"
read "Date: "
read /.*/ "\r\n"
read "Server: Kaazing Gateway\r\n"
read "X-Content-Type-Options: nosniff\r\n"
read "\r\n"
read "HTTP/1.1 200 OK\r\n"
read "Content-Type: text/plain; charset=windows-1252\r\n"
read "X-Idle-Timeout: 60\r\n"
read "\r\n"
read [0x01 0x30 0x30 0xff]
read await WRITE_COMPLETE_A
read [0x80 0x11]
read "Hello, WebSocket!"
read await WRITE_COMPLETE_B
unbound
# upstream request (may not be thread aligned - different TCP connection)
connect tcp://localhost:8000
connected
write await CREATED
write "POST "
write ${up}
write " HTTP/1.1\r\n"
write "Accept: */*\r\n"
write "Accept-Encoding: gzip,deflate,sdch\r\n"
write "Accept-Language: en-US,en;q=0.8\r\n"
write "Connection: keep-alive\r\n"
write "Content-Length: 25\r\n"
write "Content-Type: text/plain; charset=UTF-8\r\n"
write "Host: localhost:8000\r\n"
write "Origin: http://localhost:8000\r\n"
write "Referer: http://localhost:8000/?.kr=xs\r\n"
write "User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.65 Safari/537.36\r\n"
write "X-Origin: http://localhost:8000\r\n"
write "\r\n"
write [0xc2 0x80 0x11]
write "Hello, WebSocket!"
write [0x01 0x30 0x31 0xc3 0xbf] # wse.reconnect
read "HTTP/1.1 200 OK\r\n"
read "Content-Length: 19\r\n"
read "Content-Type: text/plain;charset=UTF-8\r\n"
read "Date: "
read /.*/ "\r\n"
read "Server: Kaazing Gateway\r\n"
read "\r\n"
read "HTTP/1.1 200 OK\r\n"
read "\r\n"
read notify WRITE_COMPLETE_A
write "POST "
write ${up}
write " HTTP/1.1\r\n"
write "Accept: */*\r\n"
write "Accept-Encoding: gzip,deflate,sdch\r\n"
write "Accept-Language: en-US,en;q=0.8\r\n"
write "Connection: keep-alive\r\n"
write "Content-Length: 30\r\n"
write "Content-Type: text/plain; charset=UTF-8\r\n"
write "Host: localhost:8000\r\n"
write "Origin: http://localhost:8000\r\n"
write "Referer: http://localhost:8000/?.kr=xs\r\n"
write "User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.65 Safari/537.36\r\n"
write "X-Origin: http://localhost:8000\r\n"
write "\r\n"
write [0xc2 0x80 0x11]
write "Hello, WebSocket!"
write [0x01 0x30 0x32 0xc3 0xbf] # wse.close
write [0x01 0x30 0x31 0xc3 0xbf] # wse.reconnect
read "HTTP/1.1 200 OK\r\n"
read "Content-Length: 19\r\n"
read "Content-Type: text/plain;charset=UTF-8\r\n"
read "Date: "
read /.*/ "\r\n"
read "Server: Kaazing Gateway\r\n"
read "\r\n"
read "HTTP/1.1 200 OK\r\n"
read "\r\n"
read notify WRITE_COMPLETE_B
close
closed
Expected behavior:
Expected k3po execution from debugging in K3po
#
# Copyright (c) 2007-2014 Kaazing Corporation. All rights reserved.
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
# create request
connect tcp://localhost:8000
connected
write "GET /echo/;e/ct HTTP/1.1\r\n"
write "Accept: */*\r\n"
write "Accept-Encoding: gzip,deflate,sdch\r\n"
write "Accept-Language: en-US,en;q=0.8\r\n"
write "Connection: keep-alive\r\n"
write "Host: localhost:8000\r\n"
write "Referer: http://localhost:8000/?.kr=xs\r\n"
write "User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.65 Safari/537.36\r\n"
write "X-Origin: http://localhost:8000\r\n"
write "X-WebSocket-Version: wseb-1.0\r\n"
write "\r\n"
write notify CREATE_REQUESTED
read await CREATE_REQUESTED
read "HTTP/1.1 200 OK\r\n"
read "Content-Length: 196\r\n"
read "Content-Type: text/plain;charset=UTF-8\r\n"
read "Date: " /.*/ "\r\n"
read "Server: Kaazing Gateway\r\n"
read "\r\n"
read "HTTP/1.1 201 Created\r\n"
read "Content-Type: text/plain;charset=UTF-8\r\n"
read "\r\n"
read "http://localhost:8000" /(?<up>.*)/ "\n"
read "http://localhost:8000" /(?<down>.*)/ "\n"
read notify CREATED
close
closed
# downstream request (may not be thread aligned - different TCP connection)
connect tcp://localhost:8000
connected
write await CREATED
write "POST "
write ${down}
write " HTTP/1.1\r\n"
write "Accept: */*\r\n"
write "Accept-Encoding: gzip,deflate,sdch\r\n"
write "Accept-Language: en-US,en;q=0.8\r\n"
write "Connection: keep-alive\r\n"
write "Content-Length: 3\r\n"
write "Host: localhost:8000\r\n"
write "Referer: http://localhost:8000/?.kr=xs\r\n"
write "User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.65 Safari/537.36\r\n"
write "X-Origin: http://localhost:8000\r\n"
write "\r\n"
# payload sent by Flash client runtime to prevent the POST converting to GET and stripping the headers off the request (!)
write ">|<"
read "HTTP/1.1 200 OK\r\n"
read "Cache-Control: no-cache\r\n"
read "Connection: close\r\n"
read "Content-Type: text/plain;charset=windows-1252\r\n"
read "Date: "
read /.*/ "\r\n"
read "Server: Kaazing Gateway\r\n"
read "X-Content-Type-Options: nosniff\r\n"
read "\r\n"
read "HTTP/1.1 200 OK\r\n"
read "Content-Type: text/plain; charset=windows-1252\r\n"
read "X-Idle-Timeout: 60\r\n"
read "\r\n"
read [0x01 0x30 0x30 0xff]
read await WRITE_COMPLETE_A
read [0x80 0x11]
read "Hello, WebSocket!"
read await WRITE_COMPLETE_B
read [0x80 0x11]
read "Hello, WebSocket!"
closed
# upstream request (may not be thread aligned - different TCP connection)
connect tcp://localhost:8000
connected
write await CREATED
write "POST "
write ${up}
write " HTTP/1.1\r\n"
write "Accept: */*\r\n"
write "Accept-Encoding: gzip,deflate,sdch\r\n"
write "Accept-Language: en-US,en;q=0.8\r\n"
write "Connection: keep-alive\r\n"
write "Content-Length: 25\r\n"
write "Content-Type: text/plain; charset=UTF-8\r\n"
write "Host: localhost:8000\r\n"
write "Origin: http://localhost:8000\r\n"
write "Referer: http://localhost:8000/?.kr=xs\r\n"
write "User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.65 Safari/537.36\r\n"
write "X-Origin: http://localhost:8000\r\n"
write "\r\n"
write [0xc2 0x80 0x11]
write "Hello, WebSocket!"
write [0x01 0x30 0x31 0xc3 0xbf] # wse.reconnect
read "HTTP/1.1 200 OK\r\n"
read "Content-Length: 19\r\n"
read "Content-Type: text/plain;charset=UTF-8\r\n"
read "Date: "
read /.*/ "\r\n"
read "Server: Kaazing Gateway\r\n"
read "\r\n"
read "HTTP/1.1 200 OK\r\n"
read "\r\n"
read notify WRITE_COMPLETE_A
write "POST "
write ${up}
write " HTTP/1.1\r\n"
write "Accept: */*\r\n"
write "Accept-Encoding: gzip,deflate,sdch\r\n"
write "Accept-Language: en-US,en;q=0.8\r\n"
write "Connection: keep-alive\r\n"
write "Content-Length: 30\r\n"
write "Content-Type: text/plain; charset=UTF-8\r\n"
write "Host: localhost:8000\r\n"
write "Origin: http://localhost:8000\r\n"
write "Referer: http://localhost:8000/?.kr=xs\r\n"
write "User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.65 Safari/537.36\r\n"
write "X-Origin: http://localhost:8000\r\n"
write "\r\n"
write [0xc2 0x80 0x11]
write "Hello, WebSocket!"
write [0x01 0x30 0x32 0xc3 0xbf] # wse.close
write [0x01 0x30 0x31 0xc3 0xbf] # wse.reconnect
read "HTTP/1.1 200 OK\r\n"
read "Content-Length: 19\r\n"
read "Content-Type: text/plain;charset=UTF-8\r\n"
read "Date: "
read /.*/ "\r\n"
read "Server: Kaazing Gateway\r\n"
read "\r\n"
read "HTTP/1.1 200 OK\r\n"
read "\r\n"
read notify WRITE_COMPLETE_B
close
closed
Gateway Java version Java 8
Server OS with version:
Back-End System with version
Client Technology:
Browser with Version:
Client O/S with Version: {{field10}}
Does the bug reproduce with all emulated or native combinations? {{field11}}
Is this a regression from previous released version? {{field12}}
Does this reproduce in a later released version? {{field 13}}
Gateway config, if applicable: {{field14}}
In https://github.com/kaazing/gateway.distribution/blob/develop/base/src/main/gateway/README.md:
Change the title to "Welcome to KAAZING Gateway 5.0". I think it's better to leave the word "release" out, plus it's more compact.
Both lines which say "http://kaazing.org" and "http://localhost:8000/" are indented, causing markdown to interpret them as code. See the Code Blocks section of the markdown syntax.
They should be links instead of a code block.
When I built the gateway distribution on Mac OSX 10.9, I received the following error:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:2.5.1:attached (default) on project gateway.distribution.base: Execution default of goal org.apache.maven.plugins:maven-assembly-plugin:2.5.1:attached failed: group id '2119906183' is too big ( > 2097151 ) -> [Help 1]
After some research it is a known issue with maven assembly plugin 2.5+, and resolved via configuration change in http://jira.codehaus.org/browse/MASSEMBLY-728
JDK's URI class is strict about chars like '|' in query string (I think most of the browsers allow it). The following request from browser to jira fails in http transport.
Caused by: java.net.URISyntaxException: Illegal character in query at index 37: /logout?atl_token=BBWF-YPLZ-8CC3-XLLR|a17b2ee0a53d92ac67bade03d640b8745a8ff157|lin
at java.net.URI$Parser.fail(URI.java:2829)
at java.net.URI$Parser.checkChars(URI.java:3002)
at java.net.URI$Parser.parseHierarchical(URI.java:3092)
at java.net.URI$Parser.parse(URI.java:3044)
at java.net.URI.<init>(URI.java:595)
at org.kaazing.gateway.transport.http.bridge.filter.HttpRequestLineDecodingState$4.finishDecode(HttpRequestLineDecodingState.java:140)
at org.kaazing.mina.filter.codec.statemachine.ConsumeToDynamicTerminatorDecodingState.decode(ConsumeToDynamicTerminatorDecodingState.java:111)
at org.kaazing.gateway.transport.DecodingStateMachine.decode(DecodingStateMachine.java:91)
at org.kaazing.gateway.transport.DecodingStateMachine.decode(DecodingStateMachine.java:91)
at org.kaazing.gateway.transport.DecodingStateMachine.decode(DecodingStateMachine.java:91)
at org.kaazing.gateway.transport.http.bridge.filter.HttpRequestDecodingState.decode(HttpRequestDecodingState.java:340)
at org.kaazing.gateway.transport.http.bridge.filter.HttpMessageDecoder.decode(HttpMessageDecoder.java:39)
at org.kaazing.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:240)
... 23 more
In order to extend the accept-options and connect-options in the base XSD, the types are being changed to "sequence." See issue#69. As this enforces an order in the XML configuration file an XSLT will first be applied to the configuration file to reorder elements to ensure the correct order. Then XSD validation can be performed.
This work should include a set of unit tests to validate that out-of-order config files can be re-ordered and pass validation.
Happened in build 44 of pull request #57 on openjdk although the pull request makes no related changes so I suspect it's a general sporadic failure. This is confirmed: same failure happened in build 33 on oraclejdk, see log.
Running org.kaazing.gateway.transport.wsn.DuplicateBindTest
log4j:WARN No appenders could be found for logger (org.kaazing.gateway.server.context.resolve.DefaultSecurityContext).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 2.13 sec <<< FAILURE!
connectingOnService1ShouldNotGetAccessToService2(org.kaazing.gateway.transport.wsn.DuplicateBindTest) Time elapsed: 2.011 sec <<< ERROR!
org.junit.runners.model.TestTimedOutException: test timed out after 2000 milliseconds
at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
at java.net.InetAddress$1.lookupAllHostAddr(InetAddress.java:901)
at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1295)
at java.net.InetAddress.getAllByName0(InetAddress.java:1248)
at java.net.InetAddress.getAllByName(InetAddress.java:1164)
at java.net.InetAddress.getAllByName(InetAddress.java:1098)
at org.kaazing.gateway.resource.address.ResourceAddress$ResolverOption$1.getAllByName(ResourceAddress.java:504)
at org.kaazing.gateway.resource.address.tcp.TcpResourceAddressFactorySpi.newResourceAddresses0(TcpResourceAddressFactorySpi.java:151)
at org.kaazing.gateway.resource.address.ResourceAddressFactorySpi.newResourceAddress(ResourceAddressFactorySpi.java:131)
at org.kaazing.gateway.resource.address.ResourceAddressFactory.newResourceAddress(ResourceAddressFactory.java:168)
at org.kaazing.gateway.resource.address.ResourceAddressFactorySpi.parseNamedOptions(ResourceAddressFactorySpi.java:400)
at org.kaazing.gateway.resource.address.ResourceAddressFactorySpi.newResourceAddress(ResourceAddressFactorySpi.java:128)
at org.kaazing.gateway.resource.address.ResourceAddressFactory.newResourceAddress(ResourceAddressFactory.java:168)
at org.kaazing.gateway.resource.address.ResourceAddressFactorySpi.parseNamedOptions(ResourceAddressFactorySpi.java:400)
at org.kaazing.gateway.resource.address.ResourceAddressFactorySpi.newResourceAddress(ResourceAddressFactorySpi.java:128)
at org.kaazing.gateway.resource.address.ResourceAddressFactory.newResourceAddress(ResourceAddressFactory.java:168)
at org.kaazing.gateway.resource.address.ResourceAddressFactorySpi.parseNamedOptions(ResourceAddressFactorySpi.java:400)
at org.kaazing.gateway.resource.address.ResourceAddressFactorySpi.newResourceAddress(ResourceAddressFactorySpi.java:128)
at org.kaazing.gateway.resource.address.ResourceAddressFactory.newResourceAddress(ResourceAddressFactory.java:168)
at org.kaazing.gateway.resource.address.ResourceAddressFactorySpi.parseNamedOptions(ResourceAddressFactorySpi.java:400)
at org.kaazing.gateway.resource.address.ResourceAddressFactorySpi.newResourceAddress(ResourceAddressFactorySpi.java:128)
at org.kaazing.gateway.resource.address.ResourceAddressFactory.newResourceAddress(ResourceAddressFactory.java:160)
at org.kaazing.gateway.resource.address.ResourceAddressFactorySpi.newResourceAddressWithAlternate(ResourceAddressFactorySpi.java:416)
at org.kaazing.gateway.resource.address.ws.WsResourceAddressFactorySpi.setAlternateOption(WsResourceAddressFactorySpi.java:173)
at org.kaazing.gateway.resource.address.ResourceAddressFactorySpi.newResourceAddress(ResourceAddressFactorySpi.java:107)
at org.kaazing.gateway.resource.address.ResourceAddressFactory.newResourceAddress(ResourceAddressFactory.java:160)
at org.kaazing.gateway.server.context.resolve.DefaultServiceContext.bind(DefaultServiceContext.java:528)
at org.kaazing.gateway.server.context.resolve.DefaultServiceContext.bind(DefaultServiceContext.java:441)
at org.kaazing.gateway.service.echo.EchoService.start(EchoService.java:64)
at org.kaazing.gateway.server.context.resolve.DefaultServiceContext.start(DefaultServiceContext.java:1007)
at org.kaazing.gateway.server.Launcher.initInternal(Launcher.java:84)
at org.kaazing.gateway.server.Launcher.init(Launcher.java:54)
at org.kaazing.gateway.server.test.Gateway.start(Gateway.java:103)
at org.kaazing.gateway.transport.wsn.DuplicateBindTest.connectingOnService1ShouldNotGetAccessToService2(DuplicateBindTest.java:44)
The README.md refers to kaazing-community-edition-gateway-5.0.0-windows-base.zip when it should be kaazing-gateway-community-5.0.0-windows.zip
There are 4 references to incorrect paths like this one.
Add navigation to the topic admin-reference/p_config_multicast.md
Currently the GatewayContextResolver will try to "resolveSchemes" to ensure there is a ResourceAddressFactory for each scheme present in the Gateway configuration file. This should be done in a dynamic manner such that new schemes can be plugged in and discovered at runtime that are then correctly resolved.
As part of fixing up GatewayContextResolver, the accept-options and connect-options must be stored in a loosely typed manner. For now the DefaultAcceptOptionsContext and DefaultConnectOptionsContext have member variables for each element in the schema, but an extension might need to add elements. Storing the values in a map but providing strongly typed getters/setters is one possible way to solve the problem
I'm occasionally seeing the following warnings when running the gateway (when I run with openJDK but not Oracle JDK)
SLF4J: This version of SLF4J requires log4j version 1.2.12 or later. See also http://www.slf4j.org/codes.html#log4j_version
This might be because there are 2 log4j jars in the lib: log4j.jar and log4j-1.2.17.jar
From @dpwspoon on April 9, 2015 17:32
Maximum age is allowed under the cross-site-constraints
from xsd
<element maxOccurs="1" minOccurs="0" name="maximum-age"
type="nonNegativeInteger"/>
This will set the Access-Control-Max-Age header on CORS
If the value is blank the header will not be sent, meaning the maximum age is at the discretion of the client.
Copied from original issue: kaazing-private/amqp.doc#28
The following test failed on Travis from a seemingly unrelated pull request:
Failed tests:
NioSocketIT.readIdleShouldNotFireWhenNotIdle:617->sessionIdleShouldNotFireWhenNotIdle:733 Failing test due to the following failure messages from the filter: [TEST FAILED: sessionIdle(reader idle) was called (353 ms after calling setIdleTimeInMillis(80))]
See https://travis-ci.org/kaazing/gateway/jobs/59644128
The code changes were in the management layer which should not have affected the mina.netty layer, so this is an unexpected failure.
Example:
Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-javadoc-plugin:2.8.1:jar (execution: attach-javadocs, phase: process-resources)
The doc/troubleshooting/ts_security.md doc contains the following snippet:
2012-02-29 10:03:56,305 INFO session.revalidate -
The "sh-session" code descriptor isn't recognizable by Jekyll. But "bash" is. I believe this is also recognizable by GitHub. From https://help.github.com/articles/github-flavored-markdown/:
You can find out which keywords are valid by perusing the languages YAML file.
The following service, showing an Enterprise Shield configuration for an internal gateway, includes two WebSocket layers in the transport stack:
<service>
<name>Enterprise CustomerA App1</name>
<accept>ws://gateway.example.com:7080/customera/app1</accept>
<connect>tcp://127.0.0.1:3101</connect>
<type>proxy</type>
<accept-options>
<http.transport>socks://gateway.example.dmz.net:1080</http.transport>
<socks.mode>reverse</socks.mode>
<socks.retry.maximum.interval>1 second</socks.retry.maximum.interval>
<socks.transport>wsn://gateway.example.dmz.net:1080/shield</socks.transport>
<ws.inactivity.timeout>60 seconds</ws.inactivity.timeout>
</accept-options>
<cross-site-constraint>
<allow-origin>*</allow-origin>
</cross-site-constraint>
</service>
When the enterprise and DMZ gateways are started, a +1 connection is established, as expected. However, even though no clients have yet connected, I can see that inactivity timeout pings and pongs are occurring.
The expected behavior is that the <ws.inactivity.timeout>
setting should apply to the top WebSocket layer, which won't come into existence until a client connects. Therefore, there shouldn't be any ping/pongs until a client has connected.
Once this bug has been fixed, though, there will be no way to specify inactivity.timeout
on the lower WebSocket layer, we'll need a socks.ws.inactivity.timeout
or ws.ws.inactivity.timeout
configuration setting. At least until kaazing/roadmap#193 is implemented, where the inactivity timeout can be configured on the SOCKS layer directly.
Pasting the relevant log from https://s3.amazonaws.com/archive.travis-ci.org/jobs/55579443/log.txt
2448 [Time-limited test] DEBUG transport.tcp.accept - TCP acceptor: worker count = 32
2639 [Time-limited test] INFO org.kaazing.gateway.transport.nio.AbstractNioAcceptor - Bound to resource: tcp://127.0.0.1:9557
2641 [Time-limited test] INFO org.kaazing.gateway.transport.nio.AbstractNioAcceptor - Bound to resource: tcp://[0:0:0:0:0:0:0:1]:9557
2824 [Time-limited test] INFO org.kaazing.gateway.transport.nio.AbstractNioAcceptor - Bound to resource: tcp://127.0.0.1:9558
2826 [Time-limited test] INFO org.kaazing.gateway.transport.nio.AbstractNioAcceptor - Bound to resource: tcp://[0:0:0:0:0:0:0:1]:9558
2826 [Time-limited test] INFO org.kaazing.gateway.server.Gateway - Starting server
2826 [Time-limited test] INFO org.kaazing.gateway.server.Gateway - Starting services
2827 [Time-limited test] INFO org.kaazing.gateway.server.Gateway - ssl://localhost:9558
2827 [Time-limited test] INFO org.kaazing.gateway.server.Gateway - tcp://localhost:9557
2827 [Time-limited test] INFO org.kaazing.gateway.server.Gateway - Started services
2845 [Time-limited test] INFO org.kaazing.gateway.server.Gateway - Started server successfully in 2.765 secs at 2015-03-24 15:34:07
2850 [New I/O server boss #33] DEBUG transport.tcp.accept - nextWorker: returning worker #1 of 32
2947 [New I/O worker #1] DEBUG org.kaazing.gateway.service.proxy.AbstractProxyHandler - [1] session created ((#1: kaazing niosocketchannel, server, /127.0.0.1:53681 => /127.0.0.1:9557))
2949 [New I/O worker #1] DEBUG transport.tcp.accept - [tcp#1] OPENED: (#1: kaazing niosocketchannel, server, /127.0.0.1:53681 => /127.0.0.1:9557)
2999 [New I/O worker #1] DEBUG transport.tcp.connect - TCP connector: worker count = 32
3037 [New I/O server boss #33] DEBUG transport.tcp.accept - nextWorker: returning worker #2 of 32
3092 [New I/O worker #1] DEBUG transport.tcp.connect - [tcp#3] OPENED: (#3: kaazing niosocketchannel, client, /127.0.0.1:41603 => /127.0.0.1:9558)
3109 [New I/O worker #2] DEBUG transport.ssl.accept - [ssl#2] OPENED: (#2: kaazing niosocketchannel, server, /127.0.0.1:41603 => /127.0.0.1:9558)
3109 [New I/O worker #2] DEBUG transport.tcp.accept - [tcp#2] OPENED: (#2: kaazing niosocketchannel, server, /127.0.0.1:41603 => /127.0.0.1:9558)
3344 [New I/O worker #2] DEBUG org.kaazing.mina.filter.codec.ProtocolCodecFilter - Processing a MESSAGE_RECEIVED for session 2
3455 [New I/O worker #2] DEBUG performance.tcp - AbstractNioWorker.process(Selector) took 118 ms: 1 reads, 0 writes
3608 [New I/O worker #1] DEBUG performance.tcp - AbstractNioWorker.process(Selector) took 152 ms: 1 reads, 0 writes
3708 [New I/O worker #2] DEBUG performance.tcp - AbstractNioWorker.process(Selector) took 100 ms: 1 reads, 0 writes
3713 [New I/O worker #2] DEBUG transport.ssl.accept - SSL session ID [B@61beb1cd on transport session #2 (#2: kaazing niosocketchannel, server, /127.0.0.1:41603 => /127.0.0.1:9558): cipher TLS_RSA_WITH_AES_256_CBC_SHA256, app buffer size 16916, packet buffer size 16921
3714 [New I/O worker #2] DEBUG transport.ssl.accept - SSL session ID [B@2e8b3bdd on transport session #2 (#2: kaazing niosocketchannel, server, /127.0.0.1:41603 => /127.0.0.1:9558): cipher TLS_RSA_WITH_AES_256_CBC_SHA256, app buffer size 16916, packet buffer size 16921
3718 [New I/O worker #1] DEBUG transport.ssl.connect - SSL session ID [B@3d80babf on transport session #3 (#3: kaazing niosocketchannel, client, /127.0.0.1:41603 => /127.0.0.1:9558): cipher TLS_RSA_WITH_AES_256_CBC_SHA256, app buffer size 16916, packet buffer size 16921
3986 [Time-limited test] DEBUG org.kaazing.gateway.transport.ssl.cert.VirtualHostKeySelector - Found certificate for one.example.test (alias: one.example.test)
3986 [Time-limited test] DEBUG org.kaazing.gateway.transport.ssl.cert.VirtualHostKeySelector - Found certificate for www.one.example.test (alias: one.example.test)
3987 [Time-limited test] DEBUG org.kaazing.gateway.transport.ssl.cert.VirtualHostKeySelector - Found certificate for two.example.test (alias: two.example.test)
3987 [Time-limited test] DEBUG org.kaazing.gateway.transport.ssl.cert.VirtualHostKeySelector - Found certificate for www.two.example.test (alias: two.example.test)
3987 [Time-limited test] DEBUG org.kaazing.gateway.transport.ssl.cert.VirtualHostKeySelector - Found certificate for one.kaazing.test (alias: one.kaazing.test)
3987 [Time-limited test] DEBUG org.kaazing.gateway.transport.ssl.cert.VirtualHostKeySelector - Found certificate for www.one.kaazing.test (alias: one.kaazing.test)
3988 [Time-limited test] DEBUG org.kaazing.gateway.transport.ssl.cert.VirtualHostKeySelector - Found certificate for two.kaazing.test (alias: two.kaazing.test)
3988 [Time-limited test] DEBUG org.kaazing.gateway.transport.ssl.cert.VirtualHostKeySelector - Found certificate for www.two.kaazing.test (alias: two.kaazing.test)
3988 [Time-limited test] DEBUG org.kaazing.gateway.transport.ssl.cert.VirtualHostKeySelector - Found certificate for *.kaazing.test (alias: .kaazing.test)
3988 [Time-limited test] DEBUG org.kaazing.gateway.transport.ssl.cert.VirtualHostKeySelector - Found certificate for kaazing.test (alias: .kaazing.test)
3989 [Time-limited test] DEBUG org.kaazing.gateway.transport.ssl.cert.VirtualHostKeySelector - Found certificate for localhost (alias: localhost)
3989 [Time-limited test] DEBUG org.kaazing.gateway.transport.ssl.cert.VirtualHostKeySelector - Found certificate for www.localhost (alias: localhost)
3991 [Time-limited test] DEBUG org.kaazing.gateway.transport.ssl.cert.VirtualHostKeySelector - Found certificate for one.example.test (alias: one.example.test)
3991 [Time-limited test] DEBUG org.kaazing.gateway.transport.ssl.cert.VirtualHostKeySelector - Found certificate for www.one.example.test (alias: one.example.test)
3991 [Time-limited test] DEBUG org.kaazing.gateway.transport.ssl.cert.VirtualHostKeySelector - Found certificate for two.example.test (alias: two.example.test)
3992 [Time-limited test] DEBUG org.kaazing.gateway.transport.ssl.cert.VirtualHostKeySelector - Found certificate for www.two.example.test (alias: two.example.test)
3992 [Time-limited test] DEBUG org.kaazing.gateway.transport.ssl.cert.VirtualHostKeySelector - Found certificate for one.kaazing.test (alias: one.kaazing.test)
3992 [Time-limited test] DEBUG org.kaazing.gateway.transport.ssl.cert.VirtualHostKeySelector - Found certificate for www.one.kaazing.test (alias: one.kaazing.test)
3992 [Time-limited test] DEBUG org.kaazing.gateway.transport.ssl.cert.VirtualHostKeySelector - Found certificate for two.kaazing.test (alias: two.kaazing.test)
3993 [Time-limited test] DEBUG org.kaazing.gateway.transport.ssl.cert.VirtualHostKeySelector - Found certificate for www.two.kaazing.test (alias: two.kaazing.test)
3993 [Time-limited test] DEBUG org.kaazing.gateway.transport.ssl.cert.VirtualHostKeySelector - Found certificate for *.kaazing.test (alias: .kaazing.test)
3993 [Time-limited test] DEBUG org.kaazing.gateway.transport.ssl.cert.VirtualHostKeySelector - Found certificate for kaazing.test (alias: .kaazing.test)
3993 [Time-limited test] DEBUG org.kaazing.gateway.transport.ssl.cert.VirtualHostKeySelector - Found certificate for localhost (alias: localhost)
3994 [Time-limited test] DEBUG org.kaazing.gateway.transport.ssl.cert.VirtualHostKeySelector - Found certificate for www.localhost (alias: localhost)
4061 [Time-limited test] DEBUG transport.tcp.accept - TCP acceptor: worker count = 32
4082 [Time-limited test] INFO org.kaazing.gateway.transport.nio.AbstractNioAcceptor - Bound to resource: tcp://127.0.0.1:8555
4083 [Time-limited test] INFO org.kaazing.gateway.transport.nio.AbstractNioAcceptor - Bound to resource: tcp://[0:0:0:0:0:0:0:1]:8555
4083 [Time-limited test] INFO org.kaazing.gateway.server.Gateway - Starting server
4083 [Time-limited test] INFO org.kaazing.gateway.server.Gateway - Starting services
4084 [Time-limited test] INFO org.kaazing.gateway.server.Gateway - ssl://localhost:8555
4084 [Time-limited test] INFO org.kaazing.gateway.server.Gateway - Started services
4084 [Time-limited test] INFO org.kaazing.gateway.server.Gateway - Started server successfully in 0.085 secs at 2015-03-24 15:34:11
4098 [New I/O server boss #67] DEBUG transport.tcp.accept - nextWorker: returning worker #1 of 32
4113 [New I/O worker #35] DEBUG transport.ssl.accept - [ssl#4] OPENED: (#4: kaazing niosocketchannel, server, /127.0.0.1:43120 => /127.0.0.1:8555)
4114 [New I/O worker #35] DEBUG transport.tcp.accept - [tcp#4] OPENED: (#4: kaazing niosocketchannel, server, /127.0.0.1:43120 => /127.0.0.1:8555)
4116 [New I/O worker #35] DEBUG org.kaazing.mina.filter.codec.ProtocolCodecFilter - Processing a MESSAGE_RECEIVED for session 4
4160 [New I/O worker #35] DEBUG transport.ssl.accept - [ssl#4] EXCEPTION: (#4: kaazing niosocketchannel, server, /127.0.0.1:43120 => /127.0.0.1:8555): javax.net.ssl.SSLHandshakeException: SSL handshake failed.
4160 [New I/O worker #35] DEBUG transport.tcp.accept - [tcp#4] EXCEPTION: (#4: kaazing niosocketchannel, server, /127.0.0.1:43120 => /127.0.0.1:8555): javax.net.ssl.SSLHandshakeException: SSL handshake failed.
4160 [New I/O worker #35] DEBUG transport.ssl.accept - Error on SSL connection, closing connection: javax.net.ssl.SSLHandshakeException: SSL handshake failed.
4359 [New I/O worker #35] DEBUG transport.ssl.accept - [ssl#4] CLOSED: (#4: kaazing niosocketchannel, server, /127.0.0.1:43120 => /127.0.0.1:8555)
4360 [New I/O worker #35] DEBUG transport.tcp.accept - [tcp#4] CLOSED: (#4: kaazing niosocketchannel, server, /127.0.0.1:43120 => /127.0.0.1:8555)
4361 [New I/O worker #1] DEBUG org.kaazing.gateway.service.proxy.AbstractProxyHandler - [5] session created ((#5: kzg ssl, client, ssl://localhost:9558 => ssl://localhost:9558))
4361 [New I/O worker #2] DEBUG performance.tcp - AbstractNioWorker.process(Selector) took 651 ms: 1 reads, 0 writes
4361 [New I/O worker #1] DEBUG org.kaazing.gateway.service.proxy.AbstractProxyHandler - [1->5] attaching sessions
4363 [New I/O worker #35] DEBUG transport.ssl.accept - Error on SSL connection, closing connection: java.nio.channels.ClosedChannelException
4364 [New I/O worker #35] DEBUG performance.tcp - AbstractNioWorker.process(Selector) took 247 ms: 1 reads, 0 writes
4368 [New I/O worker #1] DEBUG performance.tcp - AbstractNioWorker.process(Selector) took 651 ms: 1 reads, 0 writes
4373 [New I/O worker #1] DEBUG transport.tcp.accept - [tcp#1] CLOSED: (#1: kaazing niosocketchannel, server, /127.0.0.1:53681 => /127.0.0.1:9557)
4373 [New I/O worker #1] DEBUG org.kaazing.gateway.service.proxy.AbstractProxyHandler - [1] session closed
4374 [New I/O worker #1] DEBUG org.kaazing.gateway.service.proxy.AbstractProxyHandler - [1->5] detaching sessions
4376 [New I/O worker #1] DEBUG org.kaazing.gateway.service.proxy.AbstractProxyHandler - [5] session closed
4380 [Time-limited test] WARN org.apache.mina.util.DefaultExceptionMonitor - Unexpected exception.
java.lang.InterruptedException
at org.jboss.netty.channel.group.DefaultChannelGroupFuture.await(DefaultChannelGroupFuture.java:202)
at org.kaazing.mina.netty.ChannelIoAcceptor.dispose0(ChannelIoAcceptor.java:243)
at org.kaazing.mina.core.service.AbstractIoService.dispose(AbstractIoService.java:308)
at org.kaazing.gateway.transport.nio.AbstractNioAcceptor.dispose(AbstractNioAcceptor.java:460)
at org.kaazing.gateway.transport.nio.NioSocketAcceptor.dispose(NioSocketAcceptor.java:138)
at org.kaazing.gateway.server.context.resolve.DefaultTransportContext.dispose(DefaultTransportContext.java:106)
at org.kaazing.gateway.server.context.resolve.DefaultGatewayContext.dispose(DefaultGatewayContext.java:124)
at org.kaazing.gateway.server.Launcher.destroy(Launcher.java:138)
at org.kaazing.gateway.server.test.Gateway.stop(Gateway.java:298)
at org.kaazing.gateway.transport.ssl.Sslv3Test.connectSucceedsWithoutSslv3(Sslv3Test.java:280)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:298)
at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:292)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.lang.Thread.run(Thread.java:745)
4387 [Time-limited test] INFO org.kaazing.gateway.server.Gateway - Stopping server
4388 [Time-limited test] INFO org.kaazing.gateway.server.Gateway - Stopping services
4380 [New I/O worker #1] DEBUG transport.ssl.connect - [ssl#3] CLOSED: (#3: kaazing niosocketchannel, client, /127.0.0.1:41603 => /127.0.0.1:9558)
4380 [New I/O worker #2] DEBUG transport.ssl.accept - [ssl#2] CLOSED: (#2: kaazing niosocketchannel, server, /127.0.0.1:41603 => /127.0.0.1:9558)
4388 [Time-limited test] INFO org.kaazing.gateway.server.Gateway - ssl://localhost:8555
4388 [Time-limited test] INFO org.kaazing.gateway.server.Gateway - Stopped services
4388 [New I/O worker #2] DEBUG transport.tcp.accept - [tcp#2] CLOSED: (#2: kaazing niosocketchannel, server, /127.0.0.1:41603 => /127.0.0.1:9558)
4389 [Time-limited test] INFO org.kaazing.gateway.server.Gateway - Stopped server successfully in 0.028 secs at 2015-03-24 15:34:11
4388 [New I/O worker #1] DEBUG transport.tcp.connect - [tcp#3] CLOSED: (#3: kaazing niosocketchannel, client, /127.0.0.1:41603 => /127.0.0.1:9558)
4392 [Time-limited test] INFO org.kaazing.gateway.server.Gateway - Stopping server
4392 [Time-limited test] INFO org.kaazing.gateway.server.Gateway - Stopping services
4392 [Time-limited test] INFO org.kaazing.gateway.server.Gateway - ssl://localhost:9558
4392 [Time-limited test] INFO org.kaazing.gateway.server.Gateway - tcp://localhost:9557
4392 [Time-limited test] INFO org.kaazing.gateway.server.Gateway - Stopped services
4393 [Time-limited test] INFO org.kaazing.gateway.server.Gateway - Stopped server successfully in 0.020 secs at 2015-03-24 15:34:11
On a fresh CentOS instance (installed maven 3.2.3, openjdk 1.7.0_71) the IdleTimeoutExtensionPongsIT.shouldGetPongsFromidleTimeoutExtensionWhenWriterIdle fails intermittently. I built the test 4 times and received 3 failures.
-------------------------------------------------------------------------------
Test set: org.kaazing.gateway.transport.wsn.extensions.idletimeout.IdleTimeoutExtensionPongsIT
-------------------------------------------------------------------------------
Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 3.273 sec <<< FAILURE!
shouldGetPongsFromidleTimeoutExtensionWhenWriterIdle(org.kaazing.gateway.transport.wsn.extensions.idletimeout.IdleTimeoutExtensionPongsIT) Time elapsed: 3.268 sec <<< FAILURE!
org.junit.ComparisonFailure: Robotic behavior did not match expected expected:<... (frequent enough)
[write await SLEEP_ONE
write [0x81 0x83 0x01 0x01 0x01 0x01 0x30 0x33 0x32]
write await SLEEP_TWO
write [0x81 0x83 0x01 0x01 0x01 0x01 0x30 0x33 0x32]
write await SLEEP_THREE
write [0x81 0x83 0x01 0x01 0x01 0x01 0x30 0x33 0x32]
write await SLEEP_FOUR
write [0x81 0x83 0x01 0x01 0x01 0x01 0x30 0x33 0x32]
write await SLEEP_FIVE
write [0x81 0x83 0x01 0x01 0x01 0x01 0x30 0x33 0x32]
write await SLEEP_SIX
write [0x81 0x83 0x01 0x01 0x01 0x01 0x30 0x33 0x32]
write await SLEEP_SEVEN
write [0x81 0x83 0x01 0x01 0x01 0x01 0x30 0x33 0x32]
write await SLEEP_EIGHT
write [0x81 0x83 0x01 0x01 0x01 0x01 0x30 0x33 0x32]
# Expect (extension) PONG
read [0x81 0x06 0x01 0x01 0x01 0x02 0x0a 0x00]
# Do clean close
write [0x88 0x00]
read [0x88 0x00]
close
closed
# Connection from back end of proxy service
# =========================================
accept tcp://127.0.0.1:8002
accepted
connected
# read 8 "abc" frames
read [0x31 0x32 0x33]
read [0x31 0x32 0x33]
read [0x31 0x32 0x33]
read [0x31 0x32 0x33]
read [0x31 0x32 0x33]
read [0x31 0x32 0x33]
read [0x31 0x32 0x33]
read [0x31 0x32 0x33]
closed
# Connect to ServerSocket in test method to read period data to simulate SLEEP
# ============================================================================
connect tcp://localhost:61234
connected
read "WakeUp1"
read notify SLEEP_ONE
read "WakeUp2"
read notify SLEEP_TWO
read "WakeUp3"
read notify SLEEP_THREE
read "WakeUp4"
read notify SLEEP_FOUR
read "WakeUp5"
read notify SLEEP_FIVE
read "WakeUp6"
read notify SLEEP_SIX
read "WakeUp7"
read notify SLEEP_SEVEN
read "WakeUp8"
read notify SLEEP_EIGHT
close
closed]
> but was:<... (frequent enough)
[[id: 0xff0937ae, /127.0.0.1:60170 => /127.0.0.1:8001] RECEIVED: BigEndianHeapChannelBuffer(ridx=0, widx=8, cap=8)
+-------------------------------------------------+
| 0 1 2 3 4 5 6 7 8 9 a b c d e f |
+--------+-------------------------------------------------+----------------+
|00000000| 81 06 01 01 01 02 09 00 |........ |
+--------+-------------------------------------------------+----------------+
# Connection from back end of proxy service
# =========================================
accept tcp://127.0.0.1:8002
accepted
connected
# read 8 "abc" frames
[id: 0x7a23f384, /127.0.0.1:37075 :> /127.0.0.1:8002] DISCONNECTED
# Connect to ServerSocket in test method to read period data to simulate SLEEP
# ============================================================================
connect tcp://localhost:61234
[id: 0xb2327577] CLOSED]
>
at org.junit.Assert.assertEquals(Assert.java:115)
at org.kaazing.robot.junit.rules.RoboticStatement.evaluate(RoboticStatement.java:115)
at org.junit.rules.Verifier$1.evaluate(Verifier.java:35)
at org.junit.rules.RunRules.evaluate(RunRules.java:20)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:53)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:123)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:104)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:164)
at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:110)
at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:172)
at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcessWhenForked(SurefireStarter.java:104)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:70)
Tests run: 3, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.27 sec <<< FAILURE! - in org.kaazing.gateway.transport.sse.SseSameOriginIT
sseIe8HttpxeConnectAndGetData(org.kaazing.gateway.transport.sse.SseSameOriginIT) Time elapsed: 0.143 sec <<< FAILURE!
org.junit.ComparisonFailure: Specified behavior did not match expected:<...ad "\n"
read /:.*/ "[\n"
read "\n"
read "data:Kobe is greater than Griffen\n"
read "\n"
close
closed]
> but was:<...ad "\n"
read /:.*/ "[ "]
>
This test seems to hang every now and again. Was running Java 8 at the time
Downstream request and the overlapping long-polling request which gets dispatched 5 seconds later could be end up arriving out of order in the gateway. This could lead to client and server being out of sync during data transfer.
To address issue, client requests are expected to include X-Sequence-No header and gateway can detect out of order requests and take an appropriate action.
It's possible there is a forwards proxy configured in the JVM (see java.net.Proxy and java.net.ProxySelector). Allow a proxy transport to be injected into the NioSocketConnector to possibly handle these cases.
Connect-Options are supported in Service Defaults and needs to be added to the admin. doc.
I want to specify a <connect-options>
in <service-defaults>
for Enterprise Shield. The gateway won't start saying the configuration is invalid, yet it works for <accept-options>
.
Here is an example that fails:
<service-defaults>
<connect-options>
<http.transport>socks://gateway.example.dmz.net:1080</http.transport>
<socks.mode>reverse</socks.mode>
<socks.timeout>2 seconds</socks.timeout>
<socks.transport>wsn://gateway.example.dmz.net:1080/shield</socks.transport>
<ws.inactivity.timeout>60 minutes</ws.inactivity.timeout>
</connect-options>
</service-defaults>
Here is an example that succeeds:
<service-defaults>
<accept-options>
<http.transport>socks://gateway.example.dmz.net:1080</http.transport>
<socks.mode>reverse</socks.mode>
<socks.retry.maximum.interval>1 second</socks.retry.maximum.interval>
<socks.transport>wsn://gateway.example.dmz.net:1080/shield</socks.transport>
<ws.inactivity.timeout>60 minutes</ws.inactivity.timeout>
</accept-options>
</service-defaults>
BindingsTest. shouldBeAbleToBindAndUnBindDistinctAddressesAndHaveReferenceCountsCorrect
Instead of two distributions (linux.tar.gz and windows.zip), we should have a single distribution which combines the scripts necessary for Linux and Windows.
For example, the bin
directory could contain both gateway.start
and gateway.start.bat
scripts.
While we're at it: Shouldn't the scripts be start-gateway.sh
and start-gateway.bat
...?
The following markdown happens to render correctly in GitHub, but it isn't "standard" and isn't portable.
(This markdown snippet was taken from gateway/doc/about/about.md):
This topic contains the following sections:
There needs to be a blank line before the first line item:
This topic contains the following sections:
While the original snippet will work in GitHub, it does not work in Jekyll, which is converting the markdown to HTML for the website.
I believe any lists in the documentation will need to be updated to have a blank line inserted before the first list item.
on my Windows 7 box.
Running org.kaazing.gateway.transport.sse.SseSameOriginIT
Tests run: 3, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.19 sec <<< FAILURE! - in org.kaazing.gateway.transport.sse.SseSameOriginIT
sseIe8HttpxeConnectAndGetData(org.kaazing.gateway.transport.sse.SseSameOriginIT) Time elapsed: 0.08 sec <<< FAILURE!
org.junit.ComparisonFailure: Specified behavior did not match expected:<...ad "\n"
read /:.*/ "[\n"
read "\n"
read "data:Kobe is greater than Griffen\n"
read "\n"
close
closed]
but was:<...ad "\n"
read /:.*/ "[ "]at org.junit.Assert.assertEquals(Assert.java:115) at org.kaazing.k3po.junit.rules.SpecificationStatement.evaluate(SpecificationStatement.java:132) at org.junit.rules.Verifier$1.evaluate(Verifier.java:35) at org.junit.rules.RunRules.evaluate(RunRules.java:20) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) at org.junit.runners.ParentRunner.run(ParentRunner.java:363) at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:283) at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:173) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:128) at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:203) at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:155) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
The Gateway README.md says to use http://localhost:8001/ when it should be http://localhost:8000/
Happened in build 44 of pull request #57 on openjdk although the pull request makes no related changes so I suspect it's a general sporadic failure.
Running org.kaazing.gateway.transport.wsn.UnresolvableHostnameIT
Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.201 sec <<< FAILURE! - in org.kaazing.gateway.transport.wsn.UnresolvableHostnameIT
connectingOnService1ShouldNotGetAccessToService2(org.kaazing.gateway.transport.wsn.UnresolvableHostnameIT) Time elapsed: 0.198 sec <<< FAILURE!
org.junit.ComparisonFailure: Specified behavior did not match expected:<...ndGatewayStartsUp)
[connect tcp://127.0.0.1:51111
connected
close
closed]
but was:<...ndGatewayStartsUp)
[]
at org.junit.Assert.assertEquals(Assert.java:115) at org.kaazing.k3po.junit.rules.SpecificationStatement.evaluate(SpecificationStatement.java:103) at org.junit.rules.Verifier$1.evaluate(Verifier.java:35) at org.junit.rules.RunRules.evaluate(RunRules.java:20) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.junit.runners.ParentRunner.run(ParentRunner.java:363) at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:283) at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:173) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:128) at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:203) at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:155) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
Caused by: java.lang.RuntimeException: Error binding to ws://unresolvable.kaazing.me:8000/: Unable to bind resource: tcp://127.0.0.1:51111 cause: Unable to bind address: /127.0.0.1:51111
at org.kaazing.gateway.server.context.resolve.DefaultServiceContext.bindInternal(DefaultServiceContext.java:807)
at org.kaazing.gateway.server.context.resolve.DefaultServiceContext.bind(DefaultServiceContext.java:530)
at org.kaazing.gateway.server.context.resolve.DefaultServiceContext.bind(DefaultServiceContext.java:441)
at org.kaazing.gateway.service.echo.EchoService.start(EchoService.java:64)
Attempting to start the Gateway using Azul zing (e.g. version 5.10 .1.0) results in error
Unsupported JDK version, Please install Java SE 7.0 patch 21 or later and relaunch Kaazing WebSocket Gateway
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.