Greetings,
Back at the end of June, my well working network settings got hosed and though I got help from the list, the requirements I was facing at the time didn't justify playing the network game to get my laptop (which typically operated in three different network environments daily) to test through the web server, so I punted and started using WODirectConnect. What a nice crutch.
Thought I've since had a reduction in the number of network environments in which I'm actively developing with my laptop, direct connect has worked fine until this week when I've had problems directly associated with WODirectConnect. So with a little time available this weekend, I was hoping to re-establish testing through the web server on my machine.
Unfortunately, I can't seem to get wotaskd to see my app. When the app fires up, the browser displays the message:
The requested application was not found on this server.
Sure enough, when I check wotaskd at http://jwpismo:1085/, the browser displays the appropriate page with the following section:
============================================ Adaptor Config as sent to Local WOAdaptors - All Running Applications and Instances
<?xml version="1.0" encoding="ASCII"?> <adaptor> </adaptor> ============================================
Hmmm. Definitely not recognizing the app.
To get this far, I've followed an incantation first recited to me by Master Wizard Gary Teter late last year when I asked how he would set up a Mac OS X WO development laptop named "jwpizmo" facing the network changes mine faced every day.
He mystically committed the following words to paper for me: ============================================ 1. Set up a virtual doman called "jwpismo" in Apache by modifying /etc/httpd/httpd.conf:
1A. Under the line: "#NameVirtualHost *:80" add this line:
NameVirtualHost *
1B. Add the following VirtualHost block:
<VirtualHost jwpismo *> ServerName jwpismo DocumentRoot /Library/WebServer/Documents/ ErrorLog /private/var/log/jwpismo.com-error_log CustomLog /private/var/log/jwpismo.com-access_log common </VirtualHost>
2. Set up an entry in netinfo:
1. Open /Applications/Utilities/NetInfo Manager 2. Choose "Authenticate..." from Security menu 3. Enter password 4. Select "machines" in 2nd column 5. Select localhost 6. Click Duplicate 7. Change name to "jwpismo" 8. Remove "serves: ./local" entry 9. Save changes ============================================
He suggested a third step to manually configure the woapps, which I DID NOT DO:
============================================ 3. Manually configure WebObjects applications. In httpd.conf, comment out this line if it exists:
Include /System/Library/WebObjects/Adaptors/Apache/apache.conf
Add this entry at the end of /etc/httpd/httpd.conf:
Include /private/etc/httpd/webobjects.conf
Copy apache.conf:
sudo cp /System/Library/WebObjects/Adaptors/Apache/apache.conf /etc/httpd/webobjects.conf
Edit webobjects.conf:
Change this line: to this:
Add this line:
Create /etc/httpd/WOConfig.xml:
<?xml version="1.0" encoding="ASCII"?> <adaptor> <application name="Store" urlVersion="4"> <application name="FoundImage" urlVersion="4"> <instance id="1" port="2001" host="localhost" recvTimeout="300"/> </application> </adaptor> ============================================
I then set launch arguments appropriately in Xcode:
-WODirectConnectEnabled NO -WOPort 2001 -WHServerName jwpismo
So following all that, wotaskd fails to recognize my running app.
I did the following checks from Chuck Hill's invaluable network diagnostics guide (published a couple times on this list):
1) Get wotaskd running at boot if it is not 2) Enable Personal Web Sharing 3) Launch app with -WODirectConnectEnabled false 4) (optional ease of use thing) add -WOPort 3456 or whatever you will remember so the URL will be consistent 5) Build and run
1A. Make sure that wotaskd really is running:
It is: 1052-27-17:37:08-jwpismo% sudo lsof -i tcp:1085 ~ Password: COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME java 188 root 7u IPv6 0x018e0f48 0t0 TCP [::127.0.0.1]:webobjects (LISTEN)
1B. Check the config file. This is not strictly needed for dev launches, but let's nip any troubles in the bud.
1053-27-17:39:56-jwpismo% ls -l /Library/WebObjects/Configuration/ ~ total 8 -rw-r--r-- 1 root admin 351 Oct 27 16:09 SiteConfig.xml
Do you see any permissions conflict on your machine? <NOPE> If so, fix them. <No need here> The wotaskd process need to write to this file.
2. Enable Personal Web Sharing
3. Launch app with -WODirectConnectEnabled false
It is so set.
4. (optional ease of use thing) add -WOPort 3456 or whatever you will remember so the URL will be consistent
Set to -WOPort 7777
5. Build and run
I did. No go.
Following that failure, I looked everything over carefully again and modified the apache.conf file to add the jwpismo host in the Host List Configuration with the following line:
Still no go. So does anyone have any idea why the app is failing to let wotaskd know that it's running?
Regards, Jerry
-- __ Jerry W. Walker, WebObjects Developer/Instructor for High Performance Industrial Strength Internet Enabled Systems
203 278-4085 office
|