Connection failure with Rest Manager - mobile app

Posted by mainroad1 on 22-Nov-2013 19:39

I've tried to create the simple mobile app described in chapter 2 of the OpenEdge Mobile Applications documentation, but when I get to the point of starting the restmgr1 OE Web Server... it starts... but I get an error in the admserv.log and I can't test the app in the emulator.  I have attempted to implement the example exactly as described.

My environment is OpenEdge 11.2 64 bit on Windows 8

I've googled about for ideas on how to fix this problem and have found 2 knowledgebase entries, but neither has helped solve the issue.  They are:

- article number 000038667 which says "The service was not being published to the web server (Tomcat).  This step was missed when setting up the OE Mobile project in Progress Developer Studio".  In my case both the MyMobileApp and MyMobileService are being published.

- article number 000039094 which says "Set webServerAuth=1 in the [REST] section of ubroker.properties.".  In my case I already have this setting.


When I start the tomcat server in Progress Developer Studio I get the following messages in the admserv.log:

[22/11/13 3:47:33 PM] [3] [AppServer REST Adapter]   Connection failure with Rest Manager at http://localhost:8980/oerm during get statistics request, exception: The http protocol connection failed: ConnectException: Connection refused: connect (9990) (16935)
[22/11/13 3:47:37 PM] [3] [TOMCAT]                Starting Tomcat Webserver


When I stop the tomcat server in Progress Developer Studio I get the following messages in the admserv.log:

[22/11/13 4:52:50 PM] [3] [TOMCAT]                Stopping Tomcat Webserver
[22/11/13 4:52:55 PM] [3] [AppServer REST Adapter]   Connection failure with Rest Manager at http://localhost:8980/oerm during get statistics request, exception: The http protocol connection failed: ConnectException: Connection refused: connect (9990) (16935)


If I put "http://localhost:8980" into a web browser I get the Apache Tomcat page.

If I put "http://localhost:8980/oerm" into a web browser I get a prompt for User Name and Password from REST Manager.

I've tried to figure out what security model is being used by the mobile app and it looks like it is configured to be anonymous.

I've also tried deleting the following
  MyMobileApp.war, MyMobileService.war, MyMobileApp, MyMobileService
from the tomcat/webapps dir and then republishing restmgr1, but this has not cleared the problem either.

I'm running short on ideas at this point.

Can anyone offer suggestions on what to try next?

Thanks,
gord.

Posted by Phillip Molly Malone on 03-Dec-2013 19:09

Whats the issue/errors you are getting on the Mobile Application side of things? The error in the log and the problem connecting to it in the Mobile AppBuilder might not be related.

Also, you could try the service by, in a web browser, going to the service. You can walk it a little like a tree.

1) As you pointed out you can go to the Tomcat server at its address,e.g. http://localhost:8980

2) Next the service "Top level" (for want of a better term). E.G. http://localhost:8980/MyMobileService (remember case is important). If successful it should return "REST Adapter"

3) if that works, you can add "/rest" to the URL to get the "Available RESTFul services". e.g. http://localhost:8980/MyMobileService/rest

4) if that works, click the URL to the _wadl file and it will show you a list of available calls/resources.

5) If you have published a service that has a "GET" method, you can try calling that be adding it to the URL. If it needs filter data, you can add that as well. e.g. http://localhost:8980/MyMobileService/rest/MyMobileService/aService?filter=<some filter data if needed>. If this works, you should a) get the data you want back b) notice that you have other issues with your code or setup of AppServers, etc.

I hope this helps. If you are still having issues, you might want to consider bumping this up to techsupport to get further assistance.

HTH

Molly

PS. Is it possible to move to 11.3, there are additions and improvements moving pretty quick in this area.

All Replies

Posted by Irfan on 22-Nov-2013 21:52

Can you look at the oerm log file, you can find it inside webapps/oerm.it might tell us if there are any errors or exceptions at the rest manager.

Posted by knavneet on 23-Nov-2013 02:07

Hi Gord,

You may try to ping http(s)://localhost/oerm/status from the browser and if that gives you a 200 response (or asks you to save a JSON output), the REST Management agent must be running fine.

If the above test passed, your Tomcat is also running fine. Otherwise, you may want to check catalina log in WRKDIR and check for any permGen space error. If you see any such error you may need to increase the -XX:MaxPermSize in Tomcat's setenv.bat.

You may try to start tomcat from proenv using protc start, and then run:

proenv> restman -i restmgr1 -q

If this runs fine, there must be something wrong with PDS OE or Adminserver. In that case, try restarting the Adminserver.

And yes, as Irfan suggested you can look at $DLC/server/tomcat/webapps/oerm/WEB-INF/oerm.data/oerm.log and see if there's any error there.

BTW, which OpenEdge version are you using?

HTH,

Navneet

Posted by mainroad1 on 23-Nov-2013 13:44

Hello isyed:

The webapps/oerm.log does show the following error:

[13/11/23@10:43:07.159-0800] P-000000 T-http-bio-8980-exec-17 1 _REST ---------------- Error occurred while updating file: oermDeployedAppList.xml

[13/11/23@10:43:07.160-0800] P-000000 T-http-bio-8980-exec-17 1 _REST ---------------- Cause:null

To give more detail here's the contents of my oermDeployedAppList.xml:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>

<Applications>

<Application Name="MyMobileService">

<Description>This is sample description about MyMobileService</Description>

<Status>ENABLED</Status>

<URI>http://localhost:8980/oerm/applications/MyMobileService</URI>

<PropFileLoc>C:\Progress11\OpenEdge\servers\tomcat\webapps\MyMobileService\WEB-INF/adapters\runtime.props</PropFileLoc>

<adapterDirLoc>C:\Progress11\OpenEdge\servers\tomcat\webapps\MyMobileService\WEB-INF/adapters</adapterDirLoc>

</Application>

<Application Name="MyMobileApp">

<Description>This is sample description about MyMobileApp</Description>

<Status>ENABLED</Status>

<URI>http://localhost:8980/oerm/applications/MyMobileApp</URI>

<PropFileLoc>C:\Progress11\OpenEdge\servers\tomcat\webapps\MyMobileApp\WEB-INF/adapters\runtime.props</PropFileLoc>

<adapterDirLoc>C:\Progress11\OpenEdge\servers\tomcat\webapps\MyMobileApp\WEB-INF/adapters</adapterDirLoc>

</Application>

</Applications>

... and here's a chunk of the oerm.log that surrounds the error:

======================================================================

[13/11/23@10:42:31.042-0800] P-000000 T-localhost-startStop-1 1 --- --- C:\Progress11\OpenEdge\servers\tomcat\webapps\oerm\WEB-INF\oerm.data\oerm.log opened.

[13/11/23@10:42:31.044-0800] P-000000 T-localhost-startStop-1 1 --- --- Logging level set to = 2

[13/11/23@10:42:31.044-0800] P-000000 T-localhost-startStop-1 1 --- --- Log entry types activated: Rest,

[13/11/23@10:42:31.063-0800] P-000000 T-localhost-startStop-1 2 _REST REST             Loading 2 applications

[13/11/23@10:42:31.074-0800] P-000000 T-localhost-startStop-1 2 _REST REST             Manager Version : v11.2.0 (17-Dec-2012)

[13/11/23@10:42:31.074-0800] P-000000 T-localhost-startStop-1 2 _REST REST             Instance Name: oerm

[13/11/23@10:42:31.074-0800] P-000000 T-localhost-startStop-1 2 _REST REST             Manager Storage Directory Set to: C:\Progress11\OpenEdge\servers\tomcat\webapps\oerm\WEB-INF\oerm.data

[13/11/23@10:42:31.074-0800] P-000000 T-localhost-startStop-1 2 _REST REST             Manager Container Type Set to: 1

[13/11/23@10:42:31.074-0800] P-000000 T-localhost-startStop-1 2 _REST REST             Manager Log File Location: C:\Progress11\OpenEdge\servers\tomcat\webapps\oerm\WEB-INF\oerm.data\oerm.log

[13/11/23@10:42:31.074-0800] P-000000 T-localhost-startStop-1 2 _REST REST             Manager Operating Mode: development

[13/11/23@10:42:31.106-0800] P-000000 T-localhost-startStop-1 2 _REST REST             Initiating the Filter Instance

[13/11/23@10:42:31.240-0800] P-000000 T-localhost-startStop-1 3 _REST REST             Loaded JSONProvider

[13/11/23@10:42:31.241-0800] P-000000 T-localhost-startStop-1 3 _REST REST             Loaded WARProvider

[13/11/23@10:42:31.242-0800] P-000000 T-localhost-startStop-1 2 _REST REST             Initialized Manager Resource Class.

[13/11/23@10:42:31.275-0800] P-000000 T-localhost-startStop-1 3 _REST REST             Initialized ApplicationManager Resource Class.

[13/11/23@10:42:31.277-0800] P-000000 T-localhost-startStop-1 3 _REST REST             Initialized ApplicationManager Resource Class.

[13/11/23@10:42:31.279-0800] P-000000 T-localhost-startStop-1 3 _REST REST             Initialized ApplicationManager Resource Class.

[13/11/23@10:42:31.281-0800] P-000000 T-localhost-startStop-1 3 _REST REST             Initialized ApplicationManager Resource Class.

[13/11/23@10:42:31.284-0800] P-000000 T-localhost-startStop-1 3 _REST REST             Initialized ApplicationManager Resource Class.

[13/11/23@10:42:31.284-0800] P-000000 T-localhost-startStop-1 2 _REST REST             Started  Manager root

[13/11/23@10:42:31.928-0800] P-000000 T-http-bio-8980-exec-1 2 _REST REST             Getting Manager Statistics

[13/11/23@10:42:31.942-0800] P-000000 T-http-bio-8980-exec-12 2 _REST REST             RemoteAgent: User-Agent

[13/11/23@10:42:31.953-0800] P-000000 T-http-bio-8980-exec-13 2 _REST REST             Fetching Application properties request

[13/11/23@10:42:31.970-0800] P-000000 T-http-bio-8980-exec-14 2 _REST REST             Fetching Application statistics request

[13/11/23@10:42:31.979-0800] P-000000 T-http-bio-8980-exec-15 2 _REST REST             Fetching Application properties request

[13/11/23@10:42:31.994-0800] P-000000 T-http-bio-8980-exec-16 2 _REST REST             Fetching Application statistics request

[13/11/23@10:42:36.993-0800] P-000000 T-http-bio-8980-exec-17 2 _REST REST             Reading WAR from InputStream.

[13/11/23@10:42:36.994-0800] P-000000 T-http-bio-8980-exec-17 2 _REST REST             RemoteAgent: PDSOE

[13/11/23@10:42:37.153-0800] P-000000 T-http-bio-8980-exec-17 2 _REST REST             Update File Start: C:\Progress11\OpenEdge\servers\tomcat\webapps\oerm\WEB-INF\oerm.data\MyMobileService.war Status: true

[13/11/23@10:42:37.153-0800] P-000000 T-http-bio-8980-exec-17 2 _REST REST             Update File Complete: C:\Progress11\OpenEdge\servers\tomcat\webapps\MyMobileService.war Status: true

[13/11/23@10:42:37.153-0800] P-000000 T-http-bio-8980-exec-17 2 _REST REST             Copying Complete for JEE-Deployable Module with name: MyMobileService

[13/11/23@10:42:37.153-0800] P-000000 T-http-bio-8980-exec-17 2 _REST REST             Context /MyMobileService is Successfully Registered with Container.

[13/11/23@10:42:37.153-0800] P-000000 T-http-bio-8980-exec-17 2 _REST REST             Application Context is Up for Context:/MyMobileService

[13/11/23@10:42:37.154-0800] P-000000 T-http-bio-8980-exec-17 2 _REST REST             Initializing Application: /MyMobileService

[13/11/23@10:42:37.154-0800] P-000000 T-http-bio-8980-exec-17 2 _REST REST             Application Bean for /MyMobileService is Successfully REGISTERED with container.

[13/11/23@10:42:37.154-0800] P-000000 T-http-bio-8980-exec-17 2 _REST REST             Application Bean for /MyMobileService is Successfully INITIALIZED with container.

[13/11/23@10:42:37.154-0800] P-000000 T-http-bio-8980-exec-17 2 _REST REST             openedge.waitAfterDeploy = 30000

[13/11/23@10:42:47.062-0800] P-000000 T-http-bio-8980-exec-24 2 _REST REST             Getting Manager Statistics

[13/11/23@10:42:47.074-0800] P-000000 T-http-bio-8980-exec-25 2 _REST REST             RemoteAgent: User-Agent

[13/11/23@10:42:47.084-0800] P-000000 T-http-bio-8980-exec-26 2 _REST REST             Fetching Application properties request

[13/11/23@10:42:47.096-0800] P-000000 T-http-bio-8980-exec-27 2 _REST REST             Fetching Application statistics request

[13/11/23@10:42:47.104-0800] P-000000 T-http-bio-8980-exec-28 2 _REST REST             Fetching Application properties request

[13/11/23@10:42:47.116-0800] P-000000 T-http-bio-8980-exec-29 2 _REST REST             Fetching Application statistics request

[13/11/23@10:43:02.173-0800] P-000000 T-http-bio-8980-exec-14 2 _REST REST             Getting Manager Statistics

[13/11/23@10:43:02.185-0800] P-000000 T-http-bio-8980-exec-21 2 _REST REST             RemoteAgent: User-Agent

[13/11/23@10:43:02.197-0800] P-000000 T-http-bio-8980-exec-2 2 _REST REST             Fetching Application properties request

[13/11/23@10:43:02.215-0800] P-000000 T-http-bio-8980-exec-12 2 _REST REST             Fetching Application statistics request

[13/11/23@10:43:02.225-0800] P-000000 T-http-bio-8980-exec-16 2 _REST REST             Fetching Application properties request

[13/11/23@10:43:02.237-0800] P-000000 T-http-bio-8980-exec-20 2 _REST REST             Fetching Application statistics request

[13/11/23@10:43:07.154-0800] P-000000 T-http-bio-8980-exec-17 2 _REST REST             Syncing up C:\Progress11\OpenEdge\servers\tomcat\webapps\MyMobileService\WEB-INF/adapters\runtime.props

[13/11/23@10:43:07.158-0800] P-000000 T-http-bio-8980-exec-17 2 _REST REST             serviceAvailable = 1

[13/11/23@10:43:07.159-0800] P-000000 T-http-bio-8980-exec-17 1 _REST ---------------- Error occurred while updating file: oermDeployedAppList.xml

[13/11/23@10:43:07.160-0800] P-000000 T-http-bio-8980-exec-17 1 _REST ---------------- Cause:null

[13/11/23@10:43:07.225-0800] P-000000 T-http-bio-8980-exec-22 2 _REST REST             RemoteAgent: User-Agent

[13/11/23@10:43:17.254-0800] P-000000 T-http-bio-8980-exec-19 2 _REST REST             Getting Manager Statistics

[13/11/23@10:43:17.261-0800] P-000000 T-http-bio-8980-exec-31 2 _REST REST             RemoteAgent: User-Agent

[13/11/23@10:43:17.268-0800] P-000000 T-http-bio-8980-exec-32 2 _REST REST             Fetching Application properties request

[13/11/23@10:43:17.278-0800] P-000000 T-http-bio-8980-exec-33 2 _REST REST             Fetching Application statistics request

[13/11/23@10:43:17.286-0800] P-000000 T-http-bio-8980-exec-34 2 _REST REST             Fetching Application properties request

[13/11/23@10:43:17.300-0800] P-000000 T-http-bio-8980-exec-37 2 _REST REST             Fetching Application statistics request

[13/11/23@10:43:18.170-0800] P-000000 T-http-bio-8980-exec-39 2 _REST REST             Reading WAR from InputStream.

[13/11/23@10:43:18.170-0800] P-000000 T-http-bio-8980-exec-39 2 _REST REST             RemoteAgent: PDSOE

[13/11/23@10:43:18.312-0800] P-000000 T-http-bio-8980-exec-39 2 _REST REST             Update File Start: C:\Progress11\OpenEdge\servers\tomcat\webapps\oerm\WEB-INF\oerm.data\MyMobileApp.war Status: true

[13/11/23@10:43:18.312-0800] P-000000 T-http-bio-8980-exec-39 2 _REST REST             Update File Complete: C:\Progress11\OpenEdge\servers\tomcat\webapps\MyMobileApp.war Status: true

[13/11/23@10:43:18.312-0800] P-000000 T-http-bio-8980-exec-39 2 _REST REST             Copying Complete for JEE-Deployable Module with name: MyMobileApp

[13/11/23@10:43:18.312-0800] P-000000 T-http-bio-8980-exec-39 2 _REST REST             Context /MyMobileApp is Successfully Registered with Container.

[13/11/23@10:43:18.312-0800] P-000000 T-http-bio-8980-exec-39 2 _REST REST             Application Context is Up for Context:/MyMobileApp

[13/11/23@10:43:18.312-0800] P-000000 T-http-bio-8980-exec-39 2 _REST REST             Initializing Application: /MyMobileApp

[13/11/23@10:43:18.312-0800] P-000000 T-http-bio-8980-exec-39 2 _REST REST             Application Bean for /MyMobileApp is Successfully REGISTERED with container.

[13/11/23@10:43:18.313-0800] P-000000 T-http-bio-8980-exec-39 2 _REST REST             Application Bean for /MyMobileApp is Successfully INITIALIZED with container.

[13/11/23@10:43:18.313-0800] P-000000 T-http-bio-8980-exec-39 2 _REST REST             openedge.waitAfterDeploy = 30000

[13/11/23@10:43:32.349-0800] P-000000 T-http-bio-8980-exec-13 2 _REST REST             Getting Manager Statistics

[13/11/23@10:43:32.361-0800] P-000000 T-http-bio-8980-exec-2 2 _REST REST             RemoteAgent: User-Agent

[13/11/23@10:43:32.372-0800] P-000000 T-http-bio-8980-exec-40 2 _REST REST             Fetching Application properties request

[13/11/23@10:43:32.390-0800] P-000000 T-http-bio-8980-exec-20 2 _REST REST             Fetching Application statistics request

[13/11/23@10:43:32.398-0800] P-000000 T-http-bio-8980-exec-41 2 _REST REST             Fetching Application properties request

[13/11/23@10:43:32.412-0800] P-000000 T-http-bio-8980-exec-42 2 _REST REST             Fetching Application statistics request

[13/11/23@10:43:47.461-0800] P-000000 T-http-bio-8980-exec-31 2 _REST REST             Getting Manager Statistics

[13/11/23@10:43:47.473-0800] P-000000 T-http-bio-8980-exec-12 2 _REST REST             RemoteAgent: User-Agent

[13/11/23@10:43:47.483-0800] P-000000 T-http-bio-8980-exec-45 2 _REST REST             Fetching Application properties request

[13/11/23@10:43:47.503-0800] P-000000 T-http-bio-8980-exec-46 2 _REST REST             Fetching Application statistics request

[13/11/23@10:43:47.512-0800] P-000000 T-http-bio-8980-exec-47 2 _REST REST             Fetching Application properties request

[13/11/23@10:43:47.531-0800] P-000000 T-http-bio-8980-exec-48 2 _REST REST             Fetching Application statistics request

[13/11/23@10:43:48.313-0800] P-000000 T-http-bio-8980-exec-39 2 _REST REST             Syncing up C:\Progress11\OpenEdge\servers\tomcat\webapps\MyMobileApp\WEB-INF/adapters\runtime.props

[13/11/23@10:43:48.317-0800] P-000000 T-http-bio-8980-exec-39 2 _REST REST             serviceAvailable = 1

[13/11/23@10:43:48.426-0800] P-000000 T-http-bio-8980-exec-50 2 _REST REST             RemoteAgent: User-Agent

[13/11/23@10:44:02.591-0800] P-000000 T-http-bio-8980-exec-56 2 _REST REST             Getting Manager Statistics

[13/11/23@10:44:02.602-0800] P-000000 T-http-bio-8980-exec-57 2 _REST REST             RemoteAgent: User-Agent

[13/11/23@10:44:02.614-0800] P-000000 T-http-bio-8980-exec-58 2 _REST REST             Fetching Application properties request

[13/11/23@10:44:02.631-0800] P-000000 T-http-bio-8980-exec-59 2 _REST REST             Fetching Application statistics request

[13/11/23@10:44:02.640-0800] P-000000 T-http-bio-8980-exec-60 2 _REST REST             Fetching Application properties request

[13/11/23@10:44:02.652-0800] P-000000 T-http-bio-8980-exec-61 2 _REST REST             Fetching Application statistics request

Posted by mainroad1 on 23-Nov-2013 14:24

Hello Navneet:

I hate to admit it, but I don't know how to do the ping you asked for.  I've tried various methods but they all refuse to even recognise http://localhost/oerm/status (or several variants on that) as a valid address.  More hand holding please ;)

My catalina.log shows no errors.

The "proenv> restman -i restmgr1 -q" gives:

Connecting to Progress AdminServer using rmi://localhost:20931/Chimera (8280)

Searching for restmgr1 (8288)

Status of OE Web Server is RUNNING

  REST Administration         : ENABLED

  REST Services               : ENABLED

  OE Web Server Operating mode : development

As for restarting the Adminserver that has already been done many times from the Services manager or simply by rebooting my computer.

My environment is OpenEdge 11.2 64 bit on Windows 8

Cheers,

gord.

Posted by mopfer on 25-Nov-2013 10:54

You mention getting prompted for a user name and password for the REST manager.  Are you passing that user name and password in the JavaScript for establishing the session?  The documentation leaves it blank, but I found that mine would only work if I used the REST manager's user name and password in the two parameters that are blank in the documention.  I had to get those from the person that configured the REST manager that I was using, and if I recall correctly there is a default user name and password out of the box so "","" isn't going to work unless someone does something at the time the REST manager is configured to make it work.  The ConnectionException:Connection refused is because it wants a valid user name and password.  The following line is the one in the documentation of the Load Event that I had to adjust.

var loginResult = pdsession.login(settings.serviceURI,"","");

Posted by knavneet on 29-Nov-2013 06:16

Hi Gord,

I am sorry I was on vacation and hence couldn't reply.

I meant to ask you to type http://localhost/oerm/status in any browser and hit go. Or use any REST client and do a GET http://localhost/oerm/status. If that returned 200 OK with a JSON in HTTP respnse body, the oerm is properly initialized. However since, restman -i restmgr1 -q worked fine, that also tells that the oerm is intialized fine. So don't bother about this step.

The log file show:

Error occurred while updating file: oermDeployedAppList.xml

which means that when you deployed a WAR, there was some error in updating the list of deployed WARs. I am not sure why that has happened.  It could be that the .xml file was corrupted somehow...

You may try to stop tomcat and delete $DLC/server/tomcat/webapps/oerm folder (not the .war) and do a publish again. If that doesn't work:

You may try to export the application from PDS OE as .WAR file (and copy in $WRKDIR as MobileApp.war and MobileSvc.war) and deploy it using:

proenv> restman -i restmgr1 -war MobileApp.war

proenv> restman -i restmgr1 -war MobileSvc.war

Does that succeed? If it does, if you type http://localhost:8980/MobileApp/rest and http://localhost:8980/MobileSvc/rest in the browser, do you get 200 OK response?

If that still gives you the same error, we need to find out what is causing the problem while updating the xml. Have you added any jar files in the Tomcat's shared lib that could be interfering with oerm's xml related jars?

I am unable to think of anything else that could be causing this.

Navneet

Posted by Phillip Molly Malone on 03-Dec-2013 19:09

Whats the issue/errors you are getting on the Mobile Application side of things? The error in the log and the problem connecting to it in the Mobile AppBuilder might not be related.

Also, you could try the service by, in a web browser, going to the service. You can walk it a little like a tree.

1) As you pointed out you can go to the Tomcat server at its address,e.g. http://localhost:8980

2) Next the service "Top level" (for want of a better term). E.G. http://localhost:8980/MyMobileService (remember case is important). If successful it should return "REST Adapter"

3) if that works, you can add "/rest" to the URL to get the "Available RESTFul services". e.g. http://localhost:8980/MyMobileService/rest

4) if that works, click the URL to the _wadl file and it will show you a list of available calls/resources.

5) If you have published a service that has a "GET" method, you can try calling that be adding it to the URL. If it needs filter data, you can add that as well. e.g. http://localhost:8980/MyMobileService/rest/MyMobileService/aService?filter=<some filter data if needed>. If this works, you should a) get the data you want back b) notice that you have other issues with your code or setup of AppServers, etc.

I hope this helps. If you are still having issues, you might want to consider bumping this up to techsupport to get further assistance.

HTH

Molly

PS. Is it possible to move to 11.3, there are additions and improvements moving pretty quick in this area.

Posted by mainroad1 on 04-Dec-2013 13:48

Hello Phillip:

1) Is successful

2) Is successful

3) Is successful and shows:

Available SOAP services:

Available RESTful services:

Endpoint address: http://localhost:8980/Tup2MobService/rest/Tup2MobService

WADL : http://localhost:8980/Tup2MobService/rest/Tup2MobService?_wadl

4) Seems to be successful.  It shows:

This XML file does not appear to have any style information associated with it. The document tree is shown below.

<application xmlns="wadl.dev.java.net/.../02" xmlns:xs="www.w3.org/.../XMLSchema">

<grammars/>

<resources base="http://localhost:8980/Tup2MobService/rest/Tup2MobService">

<resource path="/dsCustomer">

<method name="DELETE">

<response status="204"/>

</method>

<method name="GET">

<request>

<param name="filter" style="query" default="" type="xs:string"/>

</request>

<response status="204"/>

</method>

<method name="POST">

<response status="204"/>

</method>

<method name="PUT">

<response status="204"/>

</method>

</resource>

</resources>

</application>

5) Does not succeed.  If I try something like...

http://localhost:8980/Tup2MobService/rest/Tup2MobService/GET?filter="Hoops"

I get:

Oops! This link appears to be broken.

localhost 8980 Tup2MobService rest

I have put in my request for OpenEdge 11.3

Thanks for your advice.

Posted by mainroad1 on 04-Dec-2013 14:32

Hello Navneet:

Thanks for your reply and it is now my turn to apologize for being slow.

I stopped tomcat, renamed $DLC/server/tomcat/webapps/oerm, then restarted tomcat and the new oerm.log shows no errors.  I have tried stopping/restarting tomcat a second time and oerm.log remains clean.

The admserv.log continues to show:

[04/12/13 12:09:28 PM] [3] [AppServer REST Adapter]   Connection failure with Rest Manager at http://localhost:8980/oerm during get statistics request, exception: The http protocol connection failed: ConnectException: Connection refused: connect (9990) (16935)

[04/12/13 12:09:32 PM] [3] [TOMCAT]                Starting Tomcat Webserver

Originally I was working on a Windows 8/OpenEdge 11.2 laptop when I hit this problem.

Recently I have switched over to a Windows 7/OpenEdge 11.2 laptop and found the exact same bahaviour when I follow the OpenEdge Mobile documentation to create a simple mobile app.

So the problem does not seem quirky ... it reproduces easily for me... I have tried to play with it from the point of view of an athentication issue (login/pasword), but not found a solution.  I think I will have to try that angle again.

Cheers,

gord.

Posted by knavneet on 05-Dec-2013 00:23

Hi Gord,

Since oerm.log shows no errors now and you indicate affirmatively to Molly's question I think  you REST Web application is just fine.

To Molly's point 5) you mentioned you framed the URL as http://localhost:8980/Tup2MobService/rest/Tup2MobService/GET?filter="Hoops"

but looking at the WADL output I think the URL must be framed as:

http://localhost:8980/Tup2MobService/rest/Tup2MobService/dsCustomer?filter="Hoops" (NOTE GET is the verb and /dsCustomer is the relative URI).

However it looks like the Mobile AppBuilder problem isn't resolved yet. So you might as Molly suggests bump it to techsupport for further assistance.

Navneet

Posted by Phillip Molly Malone on 05-Dec-2013 18:45

Hi [mention:752d73af517b4879a49438d4ddf72e89:e9ed411860ed4f2ba0265705b8793d05] ,

As [mention:33afac4b08764db89fe50f7190b3553c:e9ed411860ed4f2ba0265705b8793d05] pointed out, calling the service should be more like:

http://localhost:8980/Tup2MobService/rest/Tup2MobService/dsCustomer?filter=Hoops

If that works, it would suggest that the setup of the mobile connection has an issue. One thing, think back now, was there was an issue at one point with the code that was in the documentation for creating the session and adding the catalog. From memory, the correct code is in the release notes for the release (I believe. I could be wrong).

Best of luck.

Posted by mainroad1 on 05-Dec-2013 19:19

I just installed OpenEdge 11.3 (SP1), went through the steps of setting up the "simple mobile app" again... and it worked!  It even worked repeatedly :)

I have received the same error in the admserv.log whenever tomcat is started or stopped:

[12/5/13 4:41:59 PM] [3] [AppServer REST Adapter]   Connection failure with Rest Manager at http://localhost:8980/oerm during get statistics request, exception: The http protocol connection failed: ConnectException: Connection refused: connect (9990) (16935)

but I guess I should just ignore that.

Many thanks to everyone for their expertise, advice, and persistence in trying to figure this out!

gord.

Posted by mainroad1 on 12-Dec-2013 14:41

Oh wow!  I think I just stumbled on why upgrading to OpenEdge 11.3 fixed the problem I was having with trying to make the simple mobile app example work in OpenEdge 11.2.

Knowledgebase article 000038840 describes how two lines of code are missing from a javascript.

If I now go into my working OpenEdge 11.3 mobile app example and remove those two lines I get exactly the problem I was fighting with in OpenEdge 11.2.

Of course at the time I was certain that there was something more complicated going wrong because of the "Connection refused" error I was seeing in the admserv.log, but that appears to be unrelated.

The only think I'm really concerned about now is that I don't get (or can't find) any warnings or error messages that suggest the javascript has a problem.  That scares me a bit for debugging future problems...

Posted by mainroad1 on 12-Dec-2013 15:15

... but this can be debugged, if you run the mobile app in a Chrome browser and

                     cntl  shift  i

  to reveal the console messages which should include any javascript warnings or errors.

This thread is closed