Can not see events while debugging root rule chain in Thingsboard Cloud - thingsboard

I'm new to thingsboard. And currently using Thingsboard Cloud edition.
I'm learning how to debug the root rule chain but I keep on getting this error 'could not extract ResultSet; nested exception is org.hibernate.exception.GenericJDBCException: could not extract ResultSet' when I try to see the events in filter message switch or any other block in root rule chain.
Any help or pointers will be appreciated. Thanks.
here is the screenshot of the issue

Related

Move only specific exception to DLQ in Spring Cloud Stream

I am using Spring Cloud Stream with AWS SQS. I've a use case where all exception except CustomException should move to DLQ. I am unable to find any reference for it. Can someone help here?
Use a ListenerContainerCustomizer to configure a DefaultErrorHandler with a custom recoverer - one that delegates to a DeadLetterPublishingRecoverer for just your custom exception.
See Error handling in Spring Cloud Stream Kafka in Batch mode for more information.

How to access a two levels deep nested association of an OData V2 service?

I have exposed an OData V2 Service via the ABAP Service Gateway (SEGW) based on a CDS View. The view contains indirect associations to two other views (entity_1 > entity_2 > entity_3 - no direct connection between entity_1 and entity_3). My problem is that I can't access entity_3 from entity_1 via entity_2. Accessing entity_2 works just fine by using /service_name/entity_1?$expand=to_entity_2 but after that I can't dive any deeper. I tried using /service_name/entity_1?expand=to_entity_2($expand=to_entity_3) but as soon as I put a second query in parenthesis after the first one I receive an error message.
Do I use a wrong syntax or are these nested calls not supported by OData V2? And if it's not supported how do I solve my problem? The service is used in a SAPUI5 application where it should be bound against a tree table so I need (three) different levels in my service.
Apparently the syntax was wrong. It works if you use /service_name/entity_1?$expand=to_entity_2,to_entity_2/to_entity_3.

Http error code for dependent modules

I am working on plugins for a web platform.
I have one Core plugin(core library which is required to be installed and enabled) and one functional plugin.
I want when Core plugin is installed but not enabled then the functional plugin not to work. I've always check whether the Core is enabled and want to return it for all kind of requests - json, xml, html, ...
I want to return to the client response with good error code but not sure which one is the best.
I am thinking about 403 or as most people do 500.
Any suggestions?
Regards,
Boris
The returned code you should use really depends on semantics of the resource state. The answers to these questions should determine appropriate status code:
Why the Core is disabled? Is it an error state (something unexpected, that should not happen under normal conditions) or normal state?
Is the service disabled for all clients or some authorized users could perform the calls?
Should the client treat current state as temporary or permanent?
Here are some suitable error codes (under certain conditions):
403 Forbidden
You should use this code only if some of the users still could call the service successfully.
500 Internal Server Error
This generic error code is far too overloaded. Choose it only if you can't select more specific error code.
503 Service Unavailable
It's a good candidate if current state is temporary and should be fixed soon.

TF246017: team foundation server could not connect to the database

I am facing a problem with logging into TFS. I get the following error:
Exception Message: TF246017: Team Foundation Server could not connect
to the database. Verify that the server that is hosting the database
is operational, and that network problems are not blocking
communication with the server. (type SoapException)SoapException
Details:
Hi the below steps worked for me.
Select Application Tier in the TFS Administration Console.
In the Application Tier Summary which contains the Service Account details.
Click Reapply Account.
I know this is old, but here was my situation:
We have 11 collections on our instance, 2 were failing with this error, showing me it wasn't an access / connection issue. Checking Event Viewer (as #Andy Li-MSFT suggests) showed it was
A timeout occurred while waiting for memory resources to execute the query in resource pool 'default' (2). Rerun the query.
Checking task manager showed the culprit - elastic search was using well over 2GB of memory. I killed the service, the collections applied the patch quickly without issue.
Looks like I need to ask our server admins to give us a bit more memory....
Please check below thing to narrow down the issue:
Make sure you are the member of the Administration Console Users.
Otherwise you cannot access the Admin Console.
Make sure the SQL Server is stated and available, and the network
connectivity is OK.
Check the Service Account, make sure the Service Account has been added in
SQL Server.
You can also refer to the solution in below link to fix the issue:
https://www.ganshani.com/alm/tfs/visual%20studio/solved-tf246017-team-foundation-server-could-not-connect-to-the-database/
If above solution can not resolve the problem, please check the Event log. The Windows Event Log is a good candidate where to look for the potential cause.
For me I've solved the issue by changing the recovery mode Simple -> Full in the database.
Please refer to: https://www.mssqltips.com/sqlservertutorial/3/sql-server-full-recovery-model/

How to debug 'Invalid frame header' Websocket issues with Rails/websocket-rails (standalone)

I'm getting started with websocket-rails, trying to convert an old polling system for notifications (on Ruby 2.1/Rails 4.0) to something a bit more modern with WS. I'm using WebsocketRails in standalone mode, here is my configuration, basically, the default:
WebsocketRails.setup do |config|
config.standalone = true
end
I have also setup a fresh Redis running on the default port - there seems to be no communication issues here.
On the client side, I have added the websocket-rails's JS and when trying to open an connection and subscribe to a channel, with:
#dispatcher = new WebSocketRails "localhost:3001/websocket"
#channel = #dispatcher.subscribe "notifications"
I see an error in the Chrome console:
WebSocket connection to 'ws://localhost:3001/websocket' failed: Invalid frame header
In Firefox, the error is different but still an error:
The connection to ws://localhost:3001/websocket was interrupted while the page was loading.
From the websocket server logs, I can see that a connection has been initiated and then dropped, but there are no other logs, even tho log level is "debug"... There are no other errors that I can see and a cursory Google search doesn't bring up anything regarding "invalid frame header", so I'm pretty much stuck.
Any help would be appreciated!
EDIT: I ended up using NodeJS+Faye to get things moving, and it has been working so well that I'm happy to introduce this new moving part in the system. I'm sure the issue was just something temporary based on my specific setup but sometimes, you just have to get things done.
I think you are looking for the following resources:
From the question thread: debugging websocket in google chrome
Chrome developer tools now have the ability to list WebSocket frames and also inspect the data if the frames are not binary.
Process:
Launch Chrome Developer tools
Load your page and initiate the WebSocket connections
Click the Network Tab.
Select the WebSocket connection from the list on the left (it will have status of "101 Switching Protocols".
Click the Frames sub-tab. Binary frames will show up with a length and time-stamp and indicate whether they are masked. Text frames will show also include the payload content.
Theres also this (somewhat old) blog article from 2012: Inspecting WebSocket Traffic with Chrome Developer Tools
I think that there's something wrong with the format of the data being sent over the wire.
Carefully look at the format of the message. Has it been properly stringified? Do your brackets and parens, {}, [], and () all match? Did your IDE insert an extra somewhere? Try validating a message with a linter or an online validator.
Inspect the message on both the sender and receiver sides. Make sure that everything is correct.
This may not be the answer to the author's original question but I want to add a possible solution to this Invalid Frame Header error.
From my small research, Invalid Frame Header can be generated on Websocket protocol when the server sends an empty response (message with 0 length). 0 length in TCP signals that connection has been closed and therefore any data transmission after the empty message fails.
This is the link that helped me to find this solution. I hope someone in the future will find this useful and save some time.

Resources