I am testing model driven development features these days and encountered a problem:
When I used RTMP channel to retrieve data from the server, everything works fine, however when I tried to use RTMPS channel, I got following error:
Could not initialize DataService.
Missing or invalid configuration for destinations: ["CodeModel.Code"]
the CodeModel is the model I created by using the modler under Flash Builder4, and it simply include one table called Code. I can retrieve data, update and delete data with this model over RTMP channel, but not over RTMPS channel.
I set up my RTMPS channel by creating a self-signed certificate and installed it in the trusted area of the browser, then I referenced the keystore file in the service-config.xml, here is the snap of my configuration:
<channel-definition id="my-rtmps" class="mx.messaging.channels.SecureRTMPChannel">
<endpoint url="rtmps://{server.name}:2099"
class="flex.messaging.endpoints.SecureRTMPEndpoint"/>
<properties>
<idle-timeout-minutes>30</idle-timeout-minutes>
<keystore-file>D:/tomcat.store</keystore-file>
<keystore-password>password</keystore-password>
</properties>
</channel-definition>
following is the server side log when I tried to retrieve data from server over RTMPS channel:
[LCDS]Deserializing AMF/RTMP request
Version: 0 "connect"
1.0
(Command method=connect (2) trxId=1.0)
(Object #0)
app = ""
flashVer = "WIN 10,0,45,2"
swfUrl = "http://localhost:8080/lcds/CodeDemo-debug/CodeDemo.swf"
tcUrl = "rtmps://localhost:2099"
fpad = false
capabilities = 15.0
audioCodecs = 3191.0
videoCodecs = 252.0
videoFunction = 1.0
pageUrl = "http://localhost:8080/lcds/CodeDemo-debug/CodeDemo.html"
objectEncoding = 3.0
true
"nil"
""
(Typed Object #1 'flex.messaging.messages.CommandMessage')
operation = 5.0
correlationId = ""
clientId = null
body = (Object #2)
headers = (Object #3)
DSMessagingVersion = 1.0
DSNeedsConfig = true
DSId = "my-rtmps"
messageId = "12B87B6D-9372-71E2-3D63-8C680CBEA8EE"
timestamp = 0.0
timeToLive = 0.0
destination = ""
[LCDS]Received command: TCCommand [ Cmd: 2, MethodName: connect, TrxID: 1.0]
[LCDS]FlexSession created with id 'FECA09F0-F71A-F8ED-9E68-30B9D6609791' for a direct RTMP connection. Id value was server generated.
[LCDS]Returning service description for endpoint: my-rtmps config: {default-channels={channel={ref=my-rtmp}}, channels={channel=[{id=my-rtmps, type=mx.messaging.channels.SecureRTMPChannel, endpoint={uri=rtmps://{server.name}:2099}, properties={serialization={enable-small-messages=true}}}, {id=my-rtmp, type=mx.messaging.channels.RTMPChannel, endpoint={uri=rtmp://{server.name}:2039}, properties={serialization={enable-small-messages=true}}}]}}
[LCDS]Serializing AMF/RTMP response
Version: 0
(Command method=_result (0) trxId=1)
(Object #0)
id = "FECA09F0-F729-8037-075D-EDD727DDE50E"
objectEncoding = 3.0
level = "status"
serverConfig = (Typed Object #1 'flex.messaging.config.ConfigMap')
default-channels = (Typed Object #2 'flex.messaging.config.ConfigMap')
channel = (Typed Object #3 'flex.messaging.config.ConfigMap')
ref = "my-rtmp"
channels = (Typed Object #4 'flex.messaging.config.ConfigMap')
channel = (Typed Object #5 'flex.messaging.io.ArrayCollection')
source = (Array #6)
[0] = (Typed Object #7 'flex.messaging.config.ConfigMap')
id = "my-rtmps"
type = "mx.messaging.channels.SecureRTMPChannel"
endpoint = (Typed Object #8 'flex.messaging.config.ConfigMap')
uri = "rtmps://{server.name}:2099"
properties = (Typed Object #9 'flex.messaging.config.ConfigMap')
serialization = (Typed Object #10 'flex.messaging.config.ConfigMap')
enable-small-messages = "true"
[1] = (Typed Object #11 'flex.messaging.config.ConfigMap')
id = "my-rtmp"
type = "mx.messaging.channels.RTMPChannel"
endpoint = (Typed Object #12 'flex.messaging.config.ConfigMap')
uri = "rtmp://{server.name}:2039"
properties = (Typed Object #13 'flex.messaging.config.ConfigMap')
serialization = (Typed Object #14 'flex.messaging.config.ConfigMap')
enable-small-messages = "true"
details = null
description = "Connection succeeded."
DSMessagingVersion = 1.0
code = "NetConnection.Connect.Success"
DSrtmpId = "FECA09F0-F71A-F8ED-9E68-30B9D6609791"
[LCDS]Thread[my-rtmps-SocketServer-WorkerThread-2,5,main] registering write interest for Connection '26991461'.
The server side log did not show any exceptions, I am wondering is there any other settings that I need to pre-config in order to make my app run over the RTMPS channel?
Any help will be appreciated!
Views
Replies
Total Likes
The problem is solved. The error message is due to the default channel was set to RTMP in my data-management-config.xml file. That's why modifing the application level default channel does not work. After I changed it to RTMPS, it worked.
One more thing to make sure though, if I want to use both of the RTMP channel and RTMPS channel in my app (not for fail over) , I have to create at least two models right? Also do I need to change the default channel in data-management-config.xml if the model I am about to deploy expects different channel than previous models?
Views
Replies
Total Likes