>>
APLDN Home

>>
Events

>>
Trainings

>>
APL Books

>>
APLDN Links

>>
Discussion Groups

>>
Downloads

>>
Articles

>>
Library

>>
Learning Tools

>>
APLDN User IO

>>
APL2000.com




Bug Reports

Author Thread: "Cannot find server"
brent.hildebrand
"Cannot find server"
Posted: Tuesday, May 11, 2004 4:37 PM (EST)
The file DirectoryServer is attached for my simple Directory web server per the discussion Wildpath - oddities in the General discussion area.

Attached file: DirectoryServer


Comments:

Author Thread:
Jairo.Lopez
"Cannot find server"
Posted: Tuesday, May 11, 2004 5:42 PM (EST)
After reviewing your configuration file you have a real folder named "/LinkGifs" under your "Home Directory".
When the server receives the GET request for /LinkGifs, the HTTP protocol states this is a request to browse the directory when no file matching the default file is found in the directory. As we do not permit directory browsing, as a matter of security, we return a 501 error.

     

Jairo.Lopez
"Cannot find server"
Posted: Tuesday, May 11, 2004 5:42 PM (EST)
After reviewing your configuration file you have a real folder named "/LinkGifs" under your "Home Directory".
When the server receives the GET request for /LinkGifs, the HTTP protocol states this is a request to browse the directory when no file matching the default file is found in the directory. As we do not permit directory browsing, as a matter of security, we return a 501 error.

     

brent.hildebrand
"Cannot find server"
Posted: Tuesday, May 11, 2004 7:10 PM (EST)
Yes, I do have a real directory named /LinkGifs.  But I also have a real directories named /MP3 and /Pictures, and they work fine.  If I rename /LinkGifs to /MyGifs, it works fine.  Only when named /LinkGifs.  It makes no sense to me.  And note, I am not getting a 501 error, but in the browser, I'm getting,  "Cannot find server".   When using the HttpSpy function in the NI workspace to see what WebServices is returning on this request, I see the connect, and then a close with no data.  And it is only with the directory named /LinkGifs.  Makes no sense to me. Does it have to do with the search order of the directories?  /LinkGifs is the second real directory in alphebetical order in my setup. 

     

brent.hildebrand
"Cannot find server"
Posted: Tuesday, May 11, 2004 7:20 PM (EST)
In my setup, the requests for /MP3 and /Pictures results in a 404 error, which is then handled by my /wild* directory.  The original URI is passed to my Wild function, which then makes the determination of the request is a real Directory.  If it is real, then a document is returned with a list of directories and files in that directory.  The /LinkGifs  request, never makes it to APL, it is stopped by WebServices.  All others make it to APL and my Wild function. 

     

brent.hildebrand
"Cannot find server"
Posted: Tuesday, May 11, 2004 7:53 PM (EST)

I setup another WebServer on a different port.  I used the same Workspace, and the same home directory.  The only difference is that I set up only one Virtual directory,  "/*".  And set 404 Errors to it.  It works fine.  The /LinkGifs directory works fine.  It still does not work on the other WebServer. 

 

<moretests></moretests>

 

I now changed the other WebServer to a similar configuration as the new test webserver, and it now works.  I have no explanation. 

 

<moretests></moretests>

 

I changed the original webserver back to having 2 virtual directories, "/" and "/wild*", and everything works EXCEPT  /LinkGifs again. 

 

<confused>

 

 

     

brent.hildebrand
"Cannot find server"
Posted: Tuesday, May 11, 2004 8:25 PM (EST)

Sorry to drone on.  I did some more testing.  I now setup 2 webservers, one on Port 80, and one on Port 88.  I did a copy and paste of the virtual directories from the 80 server to the 88 server.  The only difference is the name,  Custom Errors are the same.  The first will produces the "Cannot find server" on /LinkGifs.  The second does not.  I deleted the first.  Second (remaining) works.  I changed the port from 88 to 80.  Nothing works.  Stop and Start the WebServer - still does not work.  I added :88 back to the address, and everything works.  But I do not have a webserver on 88 according to the configuration.  What gives?   I stopped WebServices, and restarted it.  Everything works as expected now, including /LinkGifs. 

 

So while I don't have a real answer to the original question, I now have observed what appears to be issues with changing webserver parameters not getting applied immediately.   I don't know how this all applies, but should be a starting point to test webserver configuration changes.  And right now, everything works as I would expect (until I make another change?).   

 

</thread>

     

Jairo.Lopez
"Cannot find server"
Posted: Thursday, May 13, 2004 6:03 PM (EST)

The special characteristic of the /LinkGifs is that the path was defined as a real-path in your configuration file (it was the only one).

When the server receives a request to browse a directory it closes the connection as a prevention against hacking. Because directory browsing is not provided nothing good is expected of somebody trying to browse a folder.

     

brent.hildebrand
"Cannot find server"
Posted: Thursday, May 13, 2004 6:11 PM (EST)
OK - how did I define it as a real path?  I'm a bit confused.  In deed, it is a read directory off the Home directory, but it was not the only one, I have serveral real paths.  When I look at the WebServer from the GUI, it all looks fine.  When I had 2 WebServers, with the only different which port was used on the same address, with the same Virtual Directories and Same Home directory, the second worked and the first did not.  I had no indication of anything different in the setups.  I do have everything working correctly now, but I did this by just deleting the old WebServer definition.  I would like to avoid the confusion in the future. 

     

Jairo.Lopez
"Cannot find server"
Posted: Thursday, May 13, 2004 6:38 PM (EST)

The way the UI is working now if you click on a real-path for the Tree view it will write the real-path to the configuration file.
When you replaced the server, the new one didn't have the real-path entry so the path work just fine.

 

     

brent.hildebrand
"Cannot find server"
Posted: Thursday, May 13, 2004 9:34 PM (EST)

OK - I can now reproduce the problem.  You are of course correct.  I edited the real directory property.  I've changed the value from the default blank, to 0 and to 1.  The only thing I observer from the Browser is "Cannot find server", regardless of the setting.  Also, setting it back to a blank value does not change the server response.  While this may be an intended behavior, to me it appears to be a failure of the GUI to provide feedback to me on what WebServices is really going to do.  I guess I could save the configuration to a file, edit the XML, and reload the configuration.  Not as pleasing a solution.  <g>

 

OK - tried the configuration file.  I saved the configuration first - and then tried to reload it.   No go.  I get this:

 

Validation XML file: C:\APLWIN50\Workspaces\DirectoryServer...
Validation error: The element 'workspace' has invalid child element 'user_HomeDir'. An error occurred at file:///C:/APLWIN50/Workspaces/DirectoryServer, (54, 8).validation error occurred when validating the instance document.file:///C:/APLWIN50/Workspaces/DirectoryServer,8,54
Validation error: The 'user_HomeDir' element is not declared. An error occurred at file:///C:/APLWIN50/Workspaces/DirectoryServer, (54, 8).validation error occurred when validating the instance document.file:///C:/APLWIN50/Workspaces/DirectoryServer,8,54
Validation finished. Validation failed

 

Appearently there are restrictions on userProperty values?  hm. 

 

But I do see the realpath data in the XML.  So I assume I clean up the XML, remove the stuff WebServices does not like, that the server will work as expected.  

 

OK - XML edited,  WebServer and Workspace definitions deleted.  Loaded the Configuration.  All works as expected...  

 

So - when is the COM version of WebServices going to be available to test?  <g>

     

Jairo.Lopez
"Cannot find server"
Posted: Friday, May 14, 2004 1:16 PM (EST)

The problem you are having is because the AplWebServices.xsd does not define the user properties for workspaces.

Because the user properties depend on your specific application, the intended mechanism is to modified the schema to include your user properties. With the new schema the import should work fine.

 

We don't have a tentative date for the first public beta of the COM interface for APL+WebServices.

     



APL2000 Official Web Site

I don't pretend to understand the Universe - it's a great deal bigger than I am.
-- Thomas Carlyle

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