freediameter - No remaining suitable candidate to route the message - free-diameter

Well, I've started a simple project with freediameter library. what I need to achieve in my project is to create a client diameter application that could send some CCR request to a diameter server.
for this matter, I tried to create a new extension for freediameter daemon.
So, the first thing I did was to setup the peer diameter server in config file:
ConnectPeer = "vm-pc.my.domain" { No_TLS; ConnectTo = "192.168.56.2"; Port=3868; };
and then initialize a request message in ta_entry function, in message body i specified the Destination-Host and Destination-Realm but still I receive this error:
01/10/17,01:55:24.980611 ERROR Routing error: 'No remaining suitable candidate to route the message to' for the following message:
01/10/17,01:55:24.980620 ERROR 'Credit-Control-Request'
01/10/17,01:55:24.980628 ERROR Version: 0x01
01/10/17,01:55:24.980635 ERROR Length: 20
01/10/17,01:55:24.980642 ERROR Flags: 0xC0 (RP--)
01/10/17,01:55:24.980649 ERROR Command Code: 272
01/10/17,01:55:24.980656 ERROR ApplicationId: 4
01/10/17,01:55:24.980664 ERROR Hop-by-Hop Identifier: 0x00000000
01/10/17,01:55:24.980671 ERROR End-to-End Identifier: 0xDCA05EF4
01/10/17,01:55:24.980678 ERROR {internal data}: src:(nil)(0) rwb:0x0 rt:0 cb:0x80523df30,0x0(0x803397da0) qry:0x0 asso:0 sess:0x0
01/10/17,01:55:24.981562 ERROR AVP: 'Session-Id'(263) l=8 f=-M val="hadi-pc.my.domain;1484000714;6"
01/10/17,01:55:24.981569 ERROR AVP: 'Origin-Host'(264) l=8 f=-M val="hadi-pc.my.domain"
01/10/17,01:55:24.981577 ERROR AVP: 'Origin-Realm'(296) l=8 f=-M val="my.domain"
01/10/17,01:55:24.981584 ERROR AVP: 'Destination-Host'(293) l=8 f=-M val="vm-pc.my.domain"
01/10/17,01:55:24.981591 ERROR AVP: 'Destination-Realm'(283) l=8 f=-M val="my.domain"
01/10/17,01:55:24.981599 ERROR AVP: 'Auth-Application-Id'(258) l=12 f=-M val=4 (0x4)
01/10/17,01:55:24.981606 ERROR AVP: 'CC-Request-Type'(416) l=12 f=-M val='EVENT_REQUEST' (4 (0x4))
01/10/17,01:55:24.981613 ERROR AVP: 'CC-Request-Number'(415) l=12 f=-M val=2 (0x2)
Can anybody help me on this ?
ps: as I see in the logs the CER/CEA are normal.

What Origin-Realm was signaled in the Capability-Exchange-Answer message when the connection was established?
The Diameter request routing process (as described in https://www.rfc-editor.org/rfc/rfc6733#section-6.1) relies on the realm, so if the Origin-Realm returned by the peer is not "my.domain", freeDiameter will not route to this peer, even if the Origin-Host matches.

Related

Domain=NSURLErrorDomain Code=-1005 "The network connection was lost in swift5

I am using swift5 & Xcode Version 13.0 (13A233). I am using cocapod
pod 'Alamofire' , '~> 4.9.1'
I just connect using IP, it is working fine.But when I connect to domain like https://www.example.net it shows
Error Domain=NSURLErrorDomain Code=-1005 "The network connection was lost." UserInfo={_kCFStreamErrorCodeKey=-4, NSUnderlyingError=0x600002af2b50 {Error Domain=kCFErrorDomainCFNetwork Code=-1005 "(null)" UserInfo={NSErrorPeerAddressKey=<CFData 0x6000007c8230 [0x1056ddaf0]>{length = 16, capacity = 16, bytes = 0x100201bb772858170000000000000000}, _kCFStreamErrorCodeKey=-4, _kCFStreamErrorDomainKey=4}}, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <A49E8D5B-1DE3-487C-B4F7-50376AF188AE>.<3>, _NSURLErrorRelatedURLSessionTaskErrorKey=(
"LocalDataTask <A49E8D5B-1DE3-487C-B4F7-50376AF188AE>.<3>"
), NSLocalizedDescription=The network connection was lost., NSErrorFailingURLStringKey=https://www.example.net/api/second-api, NSErrorFailingURLKey=https://www.example.net/api/second-api, _kCFStreamErrorDomainKey=4}
I have also add App Transport Security Settings like bellow & here is the image
Here is the code I have used..
API One:
func firstApi() {
Alamofire.request("https://www.example.net/api/first-api", method: .post, parameters: [
"param1":"",
"param2":"",
],headers: headers).responseJSON{ [self](responseData) -> Void in
secondApi()
}
}
API Two:
func secondApi() {
Alamofire.request("https://www.example.net/api/second-api", method: .post, parameters: [
"param1":"",
"param2":"",
"param3":"",
],headers: headers).responseJSON{ [self](responseData) -> Void in
}
}
In the above code, I have called Second API from first API. First API is responding nicely. But in second API which I call from first API response shows above error..
But Only single API called but when I call another API from single API shows error
I don't know what is reason. Please help me to solve the problem..

WebRTC Error - Session error description: Data channel type mismatch. Expected RTP, got SCTP

I am new to WebRTC and triyng to create my first app. I have found this article https://www.tutorialspoint.com/webrtc/webrtc_quick_guide.htm and did as it was said there. The resulted app works fine if I test it in the Chrome. But when I try to test this app in 2 browser (Chrome and Mozilla) it gives me this error:
Uncaught (in promise) DOMException: Failed to execute
'setRemoteDescription' on 'RTCPeerConnection': Session error code:
ERROR_CONTENT. Session error description: Data channel type mismatch.
Expected RTP, got SCTP..
This happens when I send an offer from Mozilla client and Chrome client tries to give an answer to this offer in this part of code:
myConnection.setRemoteDescription(new RTCSessionDescription(offer));
myConnection.createAnswer(function (answer) {
myConnection.setLocalDescription(answer);
send({
type: "answer",
answer: answer
});
}, function (error) {
alert("oops...error"); //<-- this alert fires all the time
});
I have googled this and all I have found is set new RTCPeerConnection(configuration, { optional: [{RtpDataChannels: false}] }) but if I do so then when I try to send a message it says that dataChannel.readyState is not openned.
What do I do wrong? Any help appriciated!
Thanks!
Remove optional: [{RtpDataChannels: true}] and then wait for the datachannel.onopen event to fire before attempting to send messages.

SNI : SSLHandshakeException unrecognized_name

I have the following error when trying to contact some website :
10:29:32.228 [ForkJoinPool-1-worker-1] ERROR com.intuit.karate - javax.net.ssl.SSLHandshakeException: Received fatal alert: unrecognized_name, http call failed after 35 milliseconds for URL: https://{redacted}
10:29:32.229 [ForkJoinPool-1-worker-1] ERROR com.intuit.karate - http request failed: javax.net.ssl.SSLHandshakeException: Received fatal alert: unrecognized_name
I have found the following answer : https://stackoverflow.com/a/14884941/10791639
I edited karate-apache/src/main/java/com/intuit/karate/http/apache/ApacheHttpClient.java L125, removing the comment from this line :
System.setProperty("jsse.enableSNIExtension", "false");
But I still have the same problem as before. I haven't found a public website that is requiring strict Server Name Indication to reproduce my problem.
We found a solution by changing something in karate-apache/src/main/java/com/intuit/karate/http/apache/ApacheHttpClient.java :
SSLConnectionSocketFactory socketFactory = new LenientSslConnectionSocketFactory(sslContext, new NoopHostnameVerifier());
becomes
SSLConnectionSocketFactory socketFactory = new SslConnectionSocketFactory(sslContext, new NoopHostnameVerifier());
#Peter, do you think a parameter to use strict or lenient SSL connection can be a possibility?

tokbox : Subscriber time out error on Safari

Using opentok.js v2,  the video channel works fine with Chrome and Firefox . The opentok version used is from this link: https://static.opentok.com/v2/js/opentok.min.js
But it doesn't work with safari 11.0.3.
On session's stream created event, it generates following error message "The stream was unable to connect due to a network error. Make sure your connection isnt blocked by a firewall"
The publisher is published successfully i.e session.publish(..) works fine.
The code below is used to make a video call:
this.session=OT.initSession(this.apiKey, this.sessionId);
this.session.on({
streamCreated: (event) => {
 
this.session.subscribe(event.stream, 'subscriber');
},
streamDestroyed: (event) => {
console.log(`Stream ${event.stream.name} ended because ${event.reason}`);
}
});
this.session.connect(this.token, () => {
this.publisher=OT.initPublisher('publisher');
this.session.publish(this.publisher);
});
}
 
Other exceptions in console generated by opentok.js are as follows: 
[Error] OT.exception :: title: undefined (1554) msg: OT.Subscriber PeerConnection Error: OT.Subscriber failed to subscribe to a stream in a reasonable amount of time
error
_exceptionHandler (vendor.js:150924)
handleJsException (vendor.js:151002)
onPeerConnectionFailure (vendor.js:162673)
(anonymous function) (vendor.js:162414)
onInvokeTask (vendor.js:4239)
runTask (polyfills.js:3:10225)
invokeTask (polyfills.js:3:16182)
n (polyfills.js:2:31400)
[Error] OT_ICE_WORKFLOW_FAILED: ICEWorkflow: Subscriber PeerConnection with connection (not found) failed: OT.Subscriber failed to subscribe to a stream in a reasonable amount of time
error
dispatchOTError (vendor.js:159161)
(anonymous function) (vendor.js:160080)
handleThisOnce (vendor.js:137437)
(anonymous function) (vendor.js:137675)
onInvokeTask (vendor.js:4239)
runTask (polyfills.js:3:10225)
invokeTask (polyfills.js:3:16182)
n (polyfills.js:2:31400)
[Error] OT.exception :: title: undefined (1554) msg: ICEWorkflow: Subscriber PeerConnection with connection (not found) failed: OT.Subscriber failed to subscribe to a stream in a reasonable amount of time
error
_exceptionHandler (vendor.js:150924)
handleJsException (vendor.js:151002)
dispatchOTError (vendor.js:159163)
(anonymous function) (vendor.js:160080)
handleThisOnce (vendor.js:137437)
(anonymous function) (vendor.js:137675)
onInvokeTask (vendor.js:4239)
runTask (polyfills.js:3:10225)
invokeTask (polyfills.js:3:16182)
n (polyfills.js:2:31400)
 
 
All the above errors  are generated only on Safari browser. 
You need to make sure you have created a Safari Project in your OpenTok Account Portal. More details at https://tokbox.com/developer/sdks/js/safari/
It looks like you're using a polyfills.js file. If that is the polyfill from Angular that includes zone.js then you will need to include the fix for RTCPeerConnections 'zone.js/dist/webapis-rtc-peer-connection' in your polyfills.js file.
import 'zone.js/dist/webapis-rtc-peer-connection';
You will also probably want to include the polyfill for getUserMedia. More details at https://github.com/angular/zone.js/issues/948#issuecomment-357558384

Get PDF files from Worklight Server to the client

Based on the following reference:- Worklight Adapter getting pdf file from rest service, i got the PDF file from tomcat server through the worklight adapter. The server side code is:-
var input = {
method : 'get',
returnedContentType : 'plain',
path : '/PDF/example-abstract.pdf'
};
return WL.Server.invokeHttp(input);
When i invoke the invoke the procedure i am able to successfully retrieve the result. When i invoke the same procedure from client side like below:-
var invocationData = {
adapter: 'PdfReader',
procedure: 'readPDF',
parameters: []
};
I am unable to receive the response in the success handler. In logcat it showing the following error:-
07-03 13:07:05.330: E/pdf(4214): [http://Path-to-pdf:10080/pdf/apps/services/api/pdf/android/query] exception. SyntaxError: Unexpected token ILLEGAL
07-03 13:07:05.377: D/dalvikvm(4214): GC_FOR_ALLOC freed 347K, 10% free 8082K/8967K, paused 19ms
07-03 13:07:05.424: D/dalvikvm(4214): GC_CONCURRENT freed 155K, 7% free 8390K/8967K, paused 2ms+3ms
07-03 13:07:05.424: D/pdf(4214): response [http://Path-to-pdf:10080/pdf/apps/services/api/pdf/android/query] success: {"responseID":"2","statusCode":200,"text":"%PDF-1.4\n%????\n3 0 obj <<\n\/Length 2445 \n\/Filter \/FlateDecode\n>>\nstream\nx?X[??\n~?_?#?YQ?O?dw??M??3?4'\u000f0 \\Shorted
07-03 13:07:05.424: W/PluginManager(4214): THREAD WARNING: exec() call to Logger.DEBUG blocked the main thread for 45ms. Plugin should use CordovaInterface.getThreadPool().
07-03 13:07:05.455: E/pdf(4214): [http://Path-to-pdf:10080/pdf/apps/services/api/pdf/android/query] exception. TypeError: Cannot read property 'isSuccessful' of undefined
07-03 13:07:05.455: D/CordovaLog(4214): file:///data/data/com.pdf/files/www/default/worklight/worklight.js: Line 3320 : Uncaught SyntaxError: Unexpected token ILLEGAL
07-03 13:07:05.455: E/Web Console(4214): Uncaught SyntaxError: Unexpected token ILLEGAL at file:///data/data/com.pdf/files/www/default/worklight/worklight.js:3320
07-03 13:07:05.463: D/CordovaLog(4214): file:///data/data/com.pdf/files/www/default/worklight/worklight.js: Line 3320 : Uncaught TypeError: Cannot read property 'isSuccessful' of undefined
07-03 13:07:05.471: E/Web Console(4214): Uncaught TypeError: Cannot read property 'isSuccessful' of undefined at file:///data/data/com.pdf/files/www/default/worklight/worklight.js:3320
I need to know, how to make it reachable in the successHandler. Thanks in advance.
The problem is with parsing the JSON data, based on the following answer, I have converted the Json data to string using JSON.stringify(), so that the string can successfully reach the successHandler inside the handler i am using JSON.parse() to convert the string to JSON for use.