Expand my Community achievements bar.

Flex Data Management Service

Avatar

Former Community Member
I have developped a FDS application that functions well on my
development computer, and also if I deploy it on one of our
internet servers. This application reads data from a hsql database,
and displays it in an editable datagrid. The database resides under
the WEB-INF folder of my application.

I'm using Apache Tomcat as the web container, serving the
contents on port 8080 for both: the development computer and the
remote server.

I can run the application, editting data, seeing the data
updates, etc. in the following cases:

1. From different client-computers (intel, mac) if I load the
app from the internet server. E.g. two computers accessing


http://myServer.nl:8080/myApp.mxml
will be able to see the data, edit it, and see each ones changes
almost immediately. Great!!!

2. On my own local development computer, if I load the
application in two browser windows, as
http://localhost:8080/yApp.mxml.

I see data, can edit the data, and see the changes in both
browsers.

Great!!!



My dev.computer has local IP address: 192.168.0.4

In the following situation the application will start, but no
data will load:

3. My dev.computer has Tomcat running (in Flex-debug mode),
i.e. is the server at 192.168.0.4:8080

If I connect from another computer on our intranet, e.g.
192.168.0.5, using
http://192.168.0.4:8080/myApp.mxml,
I can see myApp loading, but the datagrid will not be populated! In
the Tomcat console I will see the mxml being compiled, but no
exchange in terms of command/acknowledgement packets, etc.

So I placed a crossdomain.xml file on my dev.computer:

<?xml version="1.0"?>

<!DOCTYPE cross-domain-policy SYSTEM "
http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">

<cross-domain-policy>

<allow-access-from domain="*" to-ports="*"/>

</cross-domain-policy>

But this does not help me further. I don't know exactly where
to place it, but tried many different places within the myApp
project. Besides, I am on the same domain??



My question: how can I make this work for the local intranet?

I am open for any suggestion.



PS:

A. I get the same situation when I try DMS examples from
Adobe blogs, e.g. the testdrive examples from Christophe Coenraads.
(great work done by Christophe).

B. Of course I can continue developping and testing using the
remote server. But it is much more convenient to do it locally, and
besides I would like to learn what I'm doing wrong ;-))

Rui Rosado



4 Replies

Avatar

Level 1
There are a couple of things to check here. First, make sure
that youre configuration settings for each channel are correct. If
those all look good (i.e. have the correct IP) then make sure you
are running the debug player. Set your mm.cfg file to turn on trace
logging.



[Homedrive:\Documents and settings\user\mm.cfg]

TraceOutputFileEnable=1



Add the following mxml code to your application:



<mx:TraceTarget /> // this will turn on client side
logging which defaults to show everything



Run the application and then open the flashlog.txt file and
look for any errors related to channel connect problems or possible
sandbox violations. The flashlog.txt file will be located in the
same directory as the mm.cfg unless you have specified it to reside
somewhere else within the mm.cfg file.

Avatar

Former Community Member
Thank you for the hint, jasowill. I have figured things out
on my developer PC and get a nice flashlog with lots of details. I
did a quick try on one of the PCs on the network, but I got no
flashlog.txt. I think I'll have to install the debug version of
Flashplayer. I don't know how to do that yet, but will figure that
out tomorrow. Will keep you informed.

Rui

Avatar

Former Community Member
After installing the debug version of the flashplayer on one
of the PCs on our network I got the following flashlog.txt file:



'cds-producer-userService-null' producer set destination to
'userService'.

'cds-consumer-userService-null' consumer set destination to
'userService'.

Configuration for destination='userService':



<properties>

<metadata>

<identity property="user_id"/>

</metadata>

<network>

<paging enabled="false" pageSize="10"/>

</network>

</properties>

cds-producer-userService-null New DataManager
destination='userService'

'B8DCCC0C-290C-BC96-9524-D1E6FC88A811' producer set
destination to 'userService'.

cds-producer-userService-null DataService.fill() called with
0 arguments.

(Array)#0



Client ID specified in subscribe is ignored when a session is
assigned.

'cds-consumer-userService-null' consumer subscribe.

'my-rtmp' channel endpoint set to rtmp://dev01:2038

'my-rtmp' channel settings are:

<channel id="my-rtmp"
type="mx.messaging.channels.RTMPChannel">

<endpoint uri="rtmp://{server.name}:2038"/>

<properties/>

</channel>

'cds-producer-userService-null' producer sending message
'712449D0-2749-F63C-7815-D1E6FCB0A12A'

'my-rtmp' channel got status. (Object)#0

code = "NetConnection.Connect.Failed"

level = "error"

'my-rtmp' channel polling stopped.

'my-rtmp' channel connect failed.

'cds-consumer-userService-null' consumer channel faulted with
Channel.Connect.Failed null

'cds-consumer-userService-null' consumer starting resubscribe
timer.

'cds-producer-userService-null' producer channel faulted with
Channel.Connect.Failed null

'cds-producer-userService-null' producer fault for
'712449D0-2749-F63C-7815-D1E6FCB0A12A'.

'cds-consumer-userService-null' consumer trying to
resubscribe.

'cds-consumer-userService-null' consumer trying to
resubscribe.

'cds-consumer-userService-null' consumer trying to
resubscribe.

'cds-consumer-userService-null' consumer trying to
resubscribe.

'cds-consumer-userService-null' consumer trying to
resubscribe.

'my-rtmp' channel got status. (Object)#0

code = "NetConnection.Connect.Failed"

level = "error"

'my-rtmp' channel polling stopped.

'my-rtmp' channel connect failed.



The last block is repeated a couple of times. Still I cannot
figure out why I cannot get a data-connection with the PC where the
application server is installed. The view is OK, and i can navigate
it.



Reminder: all works well when i connect to the same
application installed on an external (internet) server.
Crossdomain.xml problem? Where to install crossdomain.xml in a
Tomcat 5.5 web-container?



Any hints?



Rui

Avatar

Former Community Member
Problem solved. Thank you for the debugging tip, Jasowill.

Solution:

We had opened ports 2038,9100 and 8080 (tomcat) in our
pc-firewalls.

Apparantly RTMP is using port 2037 for the data, although it
is configured for 2038 in services-config.xml.

After opening port 2037 in the firewall everything works
fine, although this leaves me with the question why port 2037 is
used instead of 2038?



Rui