Osgi DOTS error with HTTP task - lotus-domino

Osgi DOTS error with HTTP task
I have strange behavior with these tasks.
If the http task is running, error is displayed ArrayIndexOutOfBoundsException.
> load dots
- Domino OSGi Tasklet Container is alreadyrunning with this profile: Message Queue name already in use.
> tell dots taskinfo UpdateWidgetsTask
- HTTP JVM: java.lang.ArrayIndexOutOfBoundsException: Array index out of range: -1
- HTTP JVM: at org.openntf.domino.extmgr.events.EMEventIds.getEMEventFromId(EMEventIds.java:38)
- HTTP JVM: at org.openntf.domino.extmgr.EMBridgeMessageQueue$QueueDispatcher.run(EMBridgeMessageQueue.java:54)
- HTTP JVM: at org.openntf.domino.thread.AbstractWrappedTask.invokeWrappedTask(AbstractWrappedTask.java:217)
- HTTP JVM: at org.openntf.domino.thread.AbstractWrappedTask.callOrRun(AbstractWrappedTask.java:196)
- HTTP JVM: at org.openntf.domino.thread.DominoExecutor$DominoWrappedRunnable.run(DominoExecutor.java:58)
- HTTP JVM: at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:450)
- HTTP JVM: at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:314)
- HTTP JVM: at java.util.concurrent.FutureTask.run(FutureTask.java:149)
- HTTP JVM: at org.openntf.domino.thread.AbstractDominoExecutor$DominoFutureTask.run(AbstractDominoExecutor.java:235)
- HTTP JVM: at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
- HTTP JVM: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
- HTTP JVM: at java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:583)
- HTTP JVM: at java.security.AccessController.doPrivileged(AccessController.java:384)
- HTTP JVM: at java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:580)
- HTTP JVM: at java.lang.Thread.run(Thread.java:767)
- Admin Process: Searching Administration Requests database
If we stop http, it looks like Dots works correctly.
> tell http q
- Domino Off-Line Services HTTP extension unloaded.
- XSP Command Manager terminated
- HTTP JVM: websocket server stopped.
- HTTP Server: Shutdown
> tell dots taskinfo UpdateWidgetsTask
- [DOTS]
- [DOTS] ID: UpdateWidgetsTask
- [DOTS] Description: null
- [DOTS] Run on start: false
I have tried with http, but without websocket and the result is the same.It is also indifferent, in what order the http task is started, it always kills dots.
I do not understand why this happens ... on another identical server and with the same configuration this error does not happen.
Any help is appreciated,
regards

It's an exception in OpenNTF Domino API (ODA). Have you tried without loading ODA? Have you tried with the latest version of ODA (currently 3.2)?

Related

WildFly Swarm apps using an external ActiveMQ broker

I'm having a very hard time to get two WildFly swarm apps (based on 2017.9.5 version) communicate with each other over a standalone ActiveMQ 5.14.3 broker. All done using YAML config as I can't have a main method in my case.
after reading hundreds of outdated examples and inaccurate pages of documentation, I settled with following settings for both producer and consumer apps:
swarm:
messaging-activemq:
servers:
default:
jms-topics:
domain-events: {}
messaging:
remote:
name: remote-mq
host: localhost
port: 61616
jndi-name: java:/jms/remote-mq
remote: true
Now it seems that at least part of the setting is correct as the apps start except for following warning:
2017-09-16 14:20:04,385 WARN [org.jboss.activemq.artemis.wildfly.integration.recovery] (MSC service thread 1-2) AMQ122018: Could not start recovery discovery on XARecoveryConfig [transportConfiguration=[TransportConfiguration(name=, factory=org-apache-activemq-artemis-core-remoting-impl-netty-NettyConnectorFactory) ?port=61616&localAddress=::&host=localhost], discoveryConfiguration=null, username=null, password=****, JNDI_NAME=java:/jms/remote-mq], we will retry every recovery scan until the server is available
Also when producer tries to send messages it just times out and I get following exception (just the last part):
Caused by: javax.jms.JMSException: Failed to create session factory
at org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory.createConnectionInternal(ActiveMQConnectionFactory.java:727)
at org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory.createXAConnection(ActiveMQConnectionFactory.java:304)
at org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory.createXAConnection(ActiveMQConnectionFactory.java:300)
at org.apache.activemq.artemis.ra.ActiveMQRAManagedConnection.setup(ActiveMQRAManagedConnection.java:785)
... 127 more
Caused by: ActiveMQConnectionTimedOutException[errorType=CONNECTION_TIMEDOUT message=AMQ119013: Timed out waiting to receive cluster topology. Group:null]
at org.apache.activemq.artemis.core.client.impl.ServerLocatorImpl.createSessionFactory(ServerLocatorImpl.java:797)
at org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory.createConnectionInternal(ActiveMQConnectionFactory.java:724)
... 130 more
I suspect that the problem is ActiveMQ has security turned on, but I found no place to give username and password to swarm config.
The ActiveMQ instance is running using Docker and following compose file:
version: '2'
services:
activemq:
image: webcenter/activemq
environment:
- ACTIVEMQ_NAME=amqp-srv1
- ACTIVEMQ_REMOVE_DEFAULT_ACCOUNT=true
- ACTIVEMQ_ADMIN_LOGIN=admin
- ACTIVEMQ_ADMIN_PASSWORD=your_password
- ACTIVEMQ_WRITE_LOGIN=producer_login
- ACTIVEMQ_WRITE_PASSWORD=producer_password
- ACTIVEMQ_READ_LOGIN=consumer_login
- ACTIVEMQ_READ_PASSWORD=consumer_password
- ACTIVEMQ_JMX_LOGIN=jmx_login
- ACTIVEMQ_JMX_PASSWORD=jmx_password
- ACTIVEMQ_MIN_MEMORY=1024
- ACTIVEMQ_MAX_MEMORY=4096
- ACTIVEMQ_ENABLED_SCHEDULER=true
ports:
- "1883:1883"
- "5672:5672"
- "8161:8161"
- "61616:61616"
- "61613:61613"
- "61614:61614"
any idea what's going wrong?
I had bad times trying to get it working too. The following YML solved my problem:
swarm:
network:
socket-binding-groups:
standard-sockets:
outbound-socket-bindings:
myapp-socket-binding:
remote-host: localhost
remote-port: 61616
messaging-activemq:
servers:
default:
remote-connectors:
myapp-connector:
socket-binding: myapp-socket-binding
pooled-connection-factories:
myAppRemote:
user: username
password: password
connectors:
- myapp-connector
entries:
- 'java:/jms/remote-mq'

Getting API (deployed on IBM APIC 5.0) to invoke Loopback application (deployed on Collective Members)

I am using IBM APIC 5.0
I have setup the following.
1. IBM HTTP Server, WAS Plugin routing to MicroGateway
2. MicroGateway, running on Collectives
3. IBM HTTP Server, WAS Plugin routing to Provider Application
4. Provider Application, running on Collectives
Scenario 1 - Invoke Provider App URL directly
HTTPS request to IHS1/Plugin
Configure API to invoke the URL directly (e.g. http://:9081), without SSL
IHS1/Plugin (svr1:443) > MicroGateway (svr1:9081) > Loopback App (svr2:9081)
This works.
Scenario 2 - Invoke Provider App, indirectly via HTTP Server
HTTPS request to IHS1/Plugin
Set host header accordingly (as described in KnowledgeCenter)
Configure API to invoke the IHS URL (e.g. https://svr1:443), with SSL
IHS1/Plugin (svr1:443) > MicroGateway (svr1:9081) > IHS2/Plugin (svr2:443) > Loopback App (svr2:9081).
503 error encountered.
The ihs2/plugin trace reveals the following:
[29/Sep/2016:12:55:59.40468] 00007ea3 fdd0b700 - ODR:DEBUG: matchVHost: enter - host=apidemo-57d22263e4b0171525a5042d-1474392568657.xxx, port=443
[29/Sep/2016:12:55:59.40470] 00007ea3 fdd0b700 - ODR:DEBUG: matchLongestURI: virtual host /cell/defaultCollective/vHostGroup/-vHost-apidemo-57d22263e4b0171525a5042d-1474392568657.xxx:-1 matched host apidemo-57d22263e4b0171525a5042d-1474392568657.xxx
This shows that the configured host header matches, and it is able to find the provider application server. Means that the dynamic routing works to certain extent.
[29/Sep/2016:12:55:59.40565] 00007ea3 fdd0b700 - ODR:DEBUG: checkIfTransportIsValid: endpoint name='/cell/defaultCollective/node/,%2Fhome%2Fusers%2Fadmin%2Fwlpn/server/apidemo-57d22263e4b0171525a5042d-1474392568657-1/transport/Https', port=9081 is valid
This shows that 9081 is a valid part and Https is selected.
[29/Sep/2016:12:55:59.40971] 00007ea3 fdd0b700 - ERROR: lib_stream: openStream: Failed in r_gsk_secure_soc_init: GSK_ERROR_SOCKET_CLOSED(gsk rc = 420) PARTNER CERTIFICATE DN=No Information Available, Serial=No Information Available
[29/Sep/2016:12:55:59.40982] 00007ea3 fdd0b700 - ERROR: GSK_INVALID_HANDLE
[29/Sep/2016:12:55:59.40998] 00007ea3 fdd0b700 - ERROR: ws_common: websphereGetStream: Could not open stream
Then come the error. It's can SSL error. I suspect that currently the Provider application is not enabled with SSL.
Question on how to resolve this
1) How do I enable the loopback app with SSL. I follow this instruction, but it does not work for me because my loopback app is deployed on Collectives.
https://github.com/strongloop/loopback-example-ssl
2) How do I configure the dynamic routing to use non-SSL http traffic instead?

Glassfish Server Hell - GZip JSON - No Stacktrace Printed

I never liked these heavy weight servers like Glassfish, Weblogic etc., but I had to do some implementation by exposing some of the endpoints through http served via Glassfish. In one particular case, I have to send to the Glassfish server a Post request that takes a GZipped input, decompresses it and send a GZipped response back. Here is what I have so far:
On the Glassfish Server:
#Path("/")
class MyService extends BaseService {
#POST
#Path("/myService")
#Consumes(Array("application/json"))
#Produces(Array("application/json"))
#GZIP
def myService(#GZIP json: String): Response = {
println("Message received") // Not getting printed as well!!!
Response.status(200).header("Content-Encoding", "gzip").entity(JsonMarshall.deserialize(json)).build()
}
}
I'm using the JBoss rest easy API's to expose myService endpoint. In my client, I set the necessary headers (snippet shown below)
post.addHeader("Content-Encoding", "gzip")
post.addHeader("Accept-Encoding", "gzip, deflate")
But when I run my client, here is what I see as response:
[main] INFO ServerPingTest - Calling URL http://localhost:8080/glassfish-server/myService
[main] INFO ServerPingTest - --- RESPONSE HEADERS ---
[main] INFO ServerPingTest - X-Powered-By: Servlet/3.1 JSP/2.3 (GlassFish Server Open Source Edition 4.0 Java/Oracle Corporation/1.7)
[main] INFO ServerPingTest - Server: GlassFish Server Open Source Edition 4.0
[main] INFO ServerPingTest - Content-Language:
[main] INFO ServerPingTest - Content-Type: text/html
[main] INFO ServerPingTest - Date: Tue, 11 Mar 2014 16:39:17 GMT
[main] INFO ServerPingTest - Content-Length: 1217
[main] ERROR ServerPingTest - Error occurred when ping testing !!!!! Please see the stacktrace below!
java.util.zip.ZipException: Not in GZIP format
at java.util.zip.GZIPInputStream.readHeader(GZIPInputStream.java:164)
at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:78)
at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:90)
......
......
This is what I see on the server;
[#|2014-03-11T17:39:17.557+0100|SEVERE|glassfish 4.0||_ThreadID=21;_ThreadName=Thread-4;_TimeMillis=1394555957557;_LevelValue=1000;|
[http-listener-1(3)] WARN org.jboss.resteasy.core.SynchronousDispatcher - Failed executing POST /myService|#]
I also do not see any stack trace. Can anyone please help as to what went wrong?
Looks like I have managed to solve this. I did the following:
Used the latest version of the rest easy API (version 3.0.6.Final) against using an older version 2.2.1 (See this post http://sourceforge.net/p/resteasy/mailman/resteasy-developers/thread/BDED22DA-ACDC-47F5-9B14-30A202B52981#redhat.com/)
I added an additional header on my client (post.addHeader("Content-Type", "application/json"))
Bang it worked!

HubConnection::Start().Wait() times out if behind web proxy

Without a web proxy, Start().Wait() works fine. Connection trace:
11:31:15.0221694 - null - ChangeState(Disconnected, Connecting)
11:31:17.1749694 - 054a636a-10dc-4d39-a77b-709639ea4e5f - SSE: GET http://<removed>/signalr/connect?transport=serverSentEvents&connectionToken=TFuti92AamDL%2FsFNOE8LF1N6T10bDcosIqdkmHbLxYpPwNtW9szZNHHDkrLPR1mFa0Pu%2FUgqmU6fkA%2Fh6iuOY9tTMfjfwqwa%2F5vpZk%2B9iuESgPD5OFYZelTG%2FZn16USK&connectionData=[{"Name":"myHub"}]
11:31:17.9549694 - 054a636a-10dc-4d39-a77b-709639ea4e5f - ChangeState(Connecting, Connected)
But behind a web proxy, it times out or returns after a long time (4-5 minutes) if TransportConnectTimeout is increased. Connection trace:
05:04:05.4397657 - null - ChangeState(Disconnected, Connecting)
05:04:06.1727657 - 7d8ed176-4ca7-461b-97bb-d32b2e71d950 - SSE: GET http://<removed>/signalr/connect?transport=serverSentEvents&connectionToken=Q0FllYmOPNl0%2BQqI643N%2Bzed2zuNAEvLywMLnqkPV4H6%2BPMaiwlrEYGJsNBvrG8QMWdnEJh%2B0qf5UBDj1rpp9JNktaISXa4vhwpK6KnUo32R6d4vBEgunh9Ju%2FRZTm%2Bu&connectionData=[{"Name":"myHub"}]
05:04:11.1737657 - 7d8ed176-4ca7-461b-97bb-d32b2e71d950 - Auto: Failed to connect to using transport serverSentEvents. System.TimeoutException: Transport timed out trying to connect
05:04:11.1837657 - 7d8ed176-4ca7-461b-97bb-d32b2e71d950 - LP Connect: http://<removed>/signalr/connect
05:04:11.8147657 - 7d8ed176-4ca7-461b-97bb-d32b2e71d950 - ChangeState(Connecting, Connected)
05:04:11.8217657 - 7d8ed176-4ca7-461b-97bb-d32b2e71d950 - LP Poll: http://<removed>/signalr/poll
So if behind the web proxy, SignalR fails to connect with SSE protocol and falls back to long polling and connects in about 5 seconds, but still Start().Wait() does not return.
So, how to get it working behind a web proxy? I am using SignalR version 2.0.1.
Here's a workaround: Instead of waiting on Start(), handle the HubConnection.StateChanged event. This event is fired on time.

Getting Service Insight to connect to Management Service

My OS is a Windows 2012 Essentials.
I installed NServiceBus 4 using the installer, then installed Service Insight.
Accepted the default settings.
When I start up Service Insight, there is an error about connecting to the management service. I've tried putting in http://localhost:3333 but that errors out to a 404. I've verified that the service "particular management" is running.
EDIT
As per Hadi's instructions, I've pasted the url he listed: http://localhost:33333/api into the Connect to Management Service -> Service URL text box, but it still has a 404 not found error. When I try putting the URL into google chrome, I also get a 404 (with graphics courtesy of the oatmeal).
I've verified that a service named Particular Management is running. The description of the service is Particular Management Service for NServiceBus (Version 4.0.5).
I've ran the installer again to get to the modify/repair/remove options and verified in the modify option that the management service is installed.
Is there supposed to be a different service called Management Service? Is this maybe an issue introduced with version 4.0.5?
EDIT 2
I've appended the extra / to the end of the url, still no dice. This here is the logging information.
2013-10-11 09:15:58,488 - [INFO ] - IManagementService - HTTP GET http://localhost:33333/api//
2013-10-11 09:15:58,501 - [DEBUG] - IManagementService - HTTP Status NotFound (404) (http://localhost:33333/api//http://localhost:33333/api)
2013-10-11 09:15:58,506 - [DEBUG] - IManagementService - Response Header: Transfer-Encoding : chunked
2013-10-11 09:15:58,507 - [DEBUG] - IManagementService - Response Header: X-Particular-Version : 1.0.0-unstable122
2013-10-11 09:15:58,508 - [DEBUG] - IManagementService - Response Header: Cache-Control : private, max-age=300, must-revalidate
2013-10-11 09:15:58,509 - [DEBUG] - IManagementService - Response Header: Content-Type : text/html
2013-10-11 09:15:58,529 - [DEBUG] - IManagementService - Response Header: Date : Fri, 11 Oct 2013 14:15:58 GMT
2013-10-11 09:15:58,533 - [DEBUG] - IManagementService - Response Header: Server : Microsoft-HTTPAPI/2.0
2013-10-11 09:15:58,536 - [ERROR] - IManagementService - Error executing the request: , Status code is NotFound
You need the slash at the end:
http://localhost:33333/api/
The Url to Service Control (a.k.a Management Service) also needs /api, e.g. http://localhost:33333/api (you missed a 3?). At the end of the day, it is also a NServiceBus host process, so you need to check and make sure it is actually running (using Task Manager, or Services).