>>
APLDN Home

>>
Events

>>
Trainings

>>
APL Books

>>
APLDN Links

>>
Discussion Groups

>>
Downloads

>>
Articles

>>
Library

>>
Learning Tools

>>
APLDN User IO

>>
APL2000.com




Bug Reports

Author Thread: aplwebservices initially fails to receive requests
Owen.Shelksohn
aplwebservices initially fails to receive requests
Posted: Thursday, May 20, 2004 7:34 PM (EST)

Has anyone else experienced this problem?

After installing and first running APLWebservices, sometimes it appears to start properly but no requests seem to reach it. The port is being listened on, the activeX workspace for the webserver appears, and I verify that both the general WebServer and the the particular webserver are both started and running through the configuration window.

Looking at netstat results I can see that incoming requests seem to immediately go to the CLOSE_WAIT state.

Using a browser I get server not found, using the new webtransfer object I get - error: System.Net.WebException: The underlying connection was closed: Unable to connect to the remote server.

It's like the requests never get there.

Usually I can get webservices out of this state by 'playing' with it, ie one or more of the following: un/reinstalling it, rebooting the machine, changing and then reverting the specified workspace path so that the activex ws shuts down and restarts, and stopping then restarting the app itself.

We've seen this issue on all recent versions including the one we're trying to use now (desktop version 1.0.1509.45903 from 04/28/2004). However, I am unable to get webservices going at all today on a particular machine. I don't think it is to do with that particular machine b/c I've seen this behavior on other machines as well. Also I am able to un/reinstall the service version (1.0.1437.24776 from 12/08/2003) of webservices and get it going without a problem on that same machine.

Thanks in advance.


Comments:

Author Thread:
brent.hildebrand
aplwebservices initially fails to receive requests
Posted: Thursday, May 20, 2004 7:57 PM (EST)

It would be interesting to see the XML definition of your webserver. 

 

My first question would be, have you tried to modifying the value of the access-directory parameter of a "real" directory.  If so, my experience is that WebServices will no longer access that directory, no matter what you do.  To "fix" this, export the configuration using the Action menu.  Then edit the XML and remove any reference to a realpath.  Example:

 

<realpath access-directory="1">/Agent</realpath>

 

Then import the XML.  Note: to successfully import the XML definition, you need to delete each server and workspace referenced in the XML. Importing will not overwrite the current definition.  I wish it would.

 

From my limited experience, the access-directory paramter does nothing but block access to a real directory if you have ever modified the parameter in the Web Services Configuration GUI, never to let you access it again unless you do the above, or delete a webserver, and start over. 

     

Jairo.Lopez
aplwebservices initially fails to receive requests
Posted: Friday, May 21, 2004 10:01 AM (EST)

Do you have more than one web server?

If you do, is every server unreachable?

 

Have you check the log? Even if you enable logging the log files are only written to disk when the log info is about 64K, however you can force it by using the "Flush Log" option under the Action menu.

 

Have you tried the Beta 2.1 of the desktop version? This version creates an "application log" in the folder where the APL+WebServices is located. This log contains the same information the Event Viewer has for the NT service version, like messages from the start up process of web servers and workspaces. Using this log will provide better information to track down the reason why the web server cannot be started in the ip address and port you are selecting.

 

     

Owen.Shelksohn
aplwebservices initially fails to receive requests
Posted: Friday, May 21, 2004 12:22 PM (EST)

Brent, thanks for your thoughts.

But no, we haven't modified the access directory parameter, nor do we have any realpaths. I double checked the xml config file to be sure.

I've tried before to delete any of the settings and start fresh with a single fake function just to get a request processed, but that hasn't worked in the past. I also tried to get it to serve up a static page, and that didn't work either.

     

fred.waid
aplwebservices initially fails to receive requests
Posted: Friday, May 21, 2004 12:31 PM (EST)
We have not seen this problem before.  Could you post the config file so that we could give it a try?

     

Owen.Shelksohn
aplwebservices initially fails to receive requests
Posted: Friday, May 21, 2004 12:33 PM (EST)

No, just one webserver.

Once webservices is working properly, when i hit just the ip and port through the browser, without a path, I get a 404 page from the server. (presumably since I haven't defined a default path or action). When it is in this unresponsive state, I get a server not found page from IE.

LOL I finally figured out the other day what the Flush Logs was for, I had always wondered why sometimes it would log and sometimes it wouldn't. 

I tried flushing the logs but it doesn't create the log file.

No, haven't yet tried 2.1.

I was hoping that someone else would recognize this behavior but it doesn't sound like you guys have experienced it.

     

Jairo.Lopez
aplwebservices without home directory
Posted: Friday, May 21, 2004 2:23 PM (EST)
If the home directory is missing or points to a non existing or invalid path the APL+WebServices do not reply to requests made to that web server.

     

Owen.Shelksohn
aplwebservices without home directory
Posted: Friday, May 21, 2004 5:44 PM (EST)

Jairo, the home directory is specified and definitely there. I am importing the same config file between versions and it works for the service version and not for the desktop versions I am trying (including Beta 2.1).

I've noticed one error from the logging 2.1 does:

Listener failed accepting socket: System.IO.IOException: The file exists.

   at System.IO.__Error.WinIOError(Int32 errorCode, String str)
   at System.IO.Path.GetTempFileName()
   at aplserver.HttpProcessor..ctor(String docRoot, Socket sn, Object[] serverinfo)
   at aplserver.HttpServer.StartListening()

 

but I don't know exactly when that error is occuring. It doesn't seem to correspond directly to anything; ie it doesn't happen on each request I send, and it doesn't appear in the log right away when I start the server.

     

Owen.Shelksohn
aplwebservices initially fails to receive requests
Posted: Friday, May 21, 2004 5:46 PM (EST)

This is a simplified version of the config file. The only differences are that I've changed the IP addr for this post and reduced it to single virtual path.

 

<?xml version="1.0"?>
<config>
  <servers>
    <server id="rat">
      <host>127.0.0.1</host>
      <port>8801</port>
      <publichttpdir>c:\monitor</publichttpdir>
      <defaultfile />
      <state>started</state>
      <enable-default-file>True</enable-default-file>
      <connection-timeout>900</connection-timeout>
      <http-keep-alives>False</http-keep-alives>
      <enable-logging>False</enable-logging>
      <logfile-directory>C:\monitor</logfile-directory>
      <enable-content-expiration>False</enable-content-expiration>
      <expire-content>after;0;Minute(s)</expire-content>
      <custom-error name="400">Default</custom-error>
      <custom-error name="403">Default</custom-error>
      <custom-error name="404">Default</custom-error>
      <custom-error name="500">Default</custom-error>
      <custom-error name="501">Default</custom-error>
      <custom-error name="503">Default</custom-error>
      <custom-error name="504">Default</custom-error>
      <virtualpath name="/legend">
        <access />
        <wsid>Monitor</wsid>
        <function>MonitorServerReturnHTMLLegend</function>
        <rarg type="entity-body">R</rarg>
        <result type="document">Z</result>
      </virtualpath>  
    </server>
  </servers>
  <workspaces>
    <workspace id="Monitor">
      <minpool>1</minpool>
      <maxpool>1</maxpool>
      <timeout>15000</timeout>
      <debug>1</debug>
      <visible>1</visible>
      <wslocation>C:\Monitor\Monitor.w3</wslocation>
      <wssize>60m</wssize>
      <evlevel>2</evlevel>
      <busyid />     
    </workspace>
  </workspaces>
</config>

     

Jairo.Lopez
aplwebservices without home directory
Posted: Monday, May 24, 2004 10:45 AM (EST)

The error occurs because the call to create a temporary file in your windows TEMP directory fails.

The most common reason for this error is the number of files in the TEMP folder. To help solve this problem you can delete the unused files from this folder, delete the unused internet files or change the location of you TEMP folder.

     

Owen.Shelksohn
aplwebservices without home directory
Posted: Monday, May 24, 2004 4:16 PM (EST)

Jairo,
Looks like that was the problem! There were >60,000 files in _each_ of c:\winnt\temp
and
c:\documents and settings\{user}\local settings\temp folder
created by webservices.
They were all named tmp{2-4 hex digits}.tmp, most of them were empty, and those that weren't each contained a request header and what is presumably data.
I've got beta 2.1 running on that machine now (which solves my problem), but I can see that it too is generating these files. I could automate the deletion of these files myself but of course it would be better if webservices didn't generate them.
Are these files intentional, and is there a way to control this behavior? Do you have any idea why they are being generated?

Thanks a lot for helping me to figure this out.

     

Jairo.Lopez
aplwebservices temp files
Posted: Monday, May 24, 2004 4:49 PM (EST)

The files are created intentionally but they are deleted when the transaction is done.

However, the system also creates files in the TEMP folder that the developer is responsible for deleting:

- When you use a larg and/or rarg of type "entity-body-filename"

- When you use the 'Notify' method in the workspace with the <aplmethod> set to GET or POST.

Are you using any of the features describe above?.

     

Owen.Shelksohn
aplwebservices temp files
Posted: Monday, May 24, 2004 5:16 PM (EST)

I'm not using either of those two features.

However the 'deleted when transaction is done' might be the problem.

We have hundreds of automated processes that talk to this server and they essentially don't wait for a response. They post data periodically and don't care if the server receives every post. This is so our processes are never held up trying to talk to the server.

[The processes currently use the aplwscom object, but I am in the process of changing them to use the WebTransfer object.]

I'm guessing since they don't always get their response from the server that the server might not ever delete the tmp file.

Also, the TEMP directory you referred to is the windows temp directory, correct? It appears that beta 2.1 is only creating the files in the documents and settings\..\local files\temp folder, and not the windows temp folder.

     

Jairo.Lopez
new version 2.3.7
Posted: Friday, May 28, 2004 1:09 PM (EST)
A new version of the desktop (2.3.7) takes care of this issue as well.

     



APL2000 Official Web Site

Here is a test to find out whether your mission in life is complete. If you're alive, it isn't.
--- Richard Bach

APLDN Home   |    |  Events   |  Trainings   |  APL Books   |  APLDN Links   |    |  Discussion Groups   |    |  Downloads   |  Articles   |  Library   |  Learning Tools   |  APLDN User IO   |  APL2000.com   |