1

I noticed in the g-wan User Manual pdf documentation as of 10/19/2012, http://gwan.ch/download that it says:

Updating servlets (C, C++, etc.) When you need to add or update servlets located in the csp directory you can do so without stopping G-WAN (all cached files are updated in real-time).

Yet when I start gwan, it appears to compile everything in the csp directory. That would be down right ugly on a system with 1000's of .c files. Anyway, I tried updating the hello.c file just to see what happens. When I access it again, the changes do not take. I have to restart the server. Also, if I put in a new servlet, like hello2.c, I get "The requested URL was not found on this server." until I restart the server?

what gives?

G-WAN 3.3.28 64-bit (Mar 28 2012 11:24:16) - the latest version I saw in the download as of Oct 19th, 2012

sday
  • 1,041
  • 14
  • 22
  • G-WAN does reload scripts on-the-fly since years. If it does not, check your files permission or what you are doing in the first place. – Gil Oct 20 '12 at 06:02
  • 1
    I don't think a downvote is appropriate, its a valid question, and I doubt I'll be the only one with the issue (since I'm not the only novice linux user in the world :). You are correct, it was permissions. I tried 777 on the file and even changed the owner/group of the file to match the www-data that the daemon was started with (did not work), but forgot that the owner/group of the directory csp is just as important. When I started the daemon with the same owner group as the directory and file, everything works as advertised. Thanks for the help. – sday Oct 20 '12 at 13:15
  • Since you now acknoledged that it was a file permission issue I upvoted your question. I also upvoted your answer. – Gil Oct 20 '12 at 15:48

3 Answers3

2

This works for me. I'm running CentOS. The only issue I can find is with header files not updating.

I can't seem to replicate what you're experiencing. What OS are you on?

Tango Bravo
  • 3,221
  • 3
  • 22
  • 44
  • strange. Ubuntu Server 10.04.4 LTS - 64 bit (although header files not updating is also a problem, I kinda need both to work) Does your setup also re-compile all the servlets during startup? – sday Oct 20 '12 at 03:36
  • I'm pretty sure they're recompiling or at least they get parsed for errors. But yeah any changes I make are reflected. I have G-WAN running in a virtual environment for my setup. Don't think that matters though. Just trying to give as much info as possible. – Tango Bravo Oct 20 '12 at 03:53
  • thanks. Mine is not a virtual environment. I'm far from a linux guru so I'm not sure where to even start looking. I tested the initial question running simply sudo ./gwan. – sday Oct 20 '12 at 04:00
  • I just tried it as a daemon. After starting, I then copied the example hello.c into the csp directory. Then browse to /?hello.c and get a URL not found. If I restart the server, hello.c is parsed and I can access it. – sday Oct 20 '12 at 04:01
  • False alarm.. I thought I figured it out.. turns out I was editing the wrong file. :( I'm a moron. But I still can't replicate the issue. When I change it, it works for me. I even set up an Ubuntu server (11.4). – Tango Bravo Oct 20 '12 at 05:25
  • Thanks for going to the trouble of setting up an Ubuntu server. Looks like Gil was right, it was permissions. In this case making sure the daemon was started with the same group/owner as the csp directory. Works like a charm now. Thanks for the help. – sday Oct 20 '12 at 13:17
2

Gil found the answer. It was permissions. (for the linux newbie like myself) The csp directory must have the same owner/group as how the gwan server is started.

sudo ./gwan -d:www-data:www-data

If started as above, the csp directory must also be www-data as owner and group along with the actual servlet file. In my case it was the hello.c file.

sday
  • 1,041
  • 14
  • 22
  • For the novice linux guy having this issue. use "sudo chgrp wwww-data csp" without the quotes and "sudo chown www-data csp" You probably have to do that with each file as well and most likely a good idea to do it to all the directories under your root or subdomain directory. – sday Oct 20 '12 at 22:14
-1

Only applies to the next release which should be soon, version 3.10.x I believe. Search for the tag "g-wan" and you will see other threads where the new version is mentioned.

Brad
  • 7
  • 1
  • 1
  • 1
    Thanks for the confirmation. I saw those threads, just none seem to mention what features exist in the current release, vs. what is in the new release. I think it is bad form to advertise and market features that do not exist yet as a release. That should be in a "soon to be released" section. Nonetheless, I'm excited for the new release. I do like the straight forward bare metal approach. Can you imagine if Capt. Kirk was being chased by the Klingons and said, "Warp 8 now Sulu!" "sorry Captain, I know the manual says we can, but that's only available in Enterprise v2.0" :) – sday Oct 20 '12 at 02:56
  • I take it PHP doesn't work either in this version. Just tried that with no luck. – sday Oct 20 '12 at 04:04
  • PHP will work in the next release with the reverse proxy. You can try the fast cgi handler too. – Tango Bravo Oct 20 '12 at 05:14
  • G-WAN does reload scripts on-the-fly since years. If it does not, check your files permission or what you are doing in the first place. – Gil Oct 20 '12 at 06:02
  • This is where the downvote should be as this answer in incorrect as Gil stated. Thanks again for the help. – sday Oct 20 '12 at 13:18