World: r3wp
[!Cheyenne] Discussions about the Cheyenne Web Server
older newer | first last |
Dockimbel 2-May-2011 [10121] | Never saw such error before. |
onetom 2-May-2011 [10122] | im trying to put an alias into a webapp. is it possible? |
Dockimbel 2-May-2011 [10123x4] | In theory, it should be possible, but never tested. I'm having a quick look at 'alias code atm... |
I don't see anything in the 'alias implementation preventing it to work from within a webapp. | |
Doing a quick test... | |
Works here. Here is my webapp config: webapp [ virtual-root "/testapp" root-dir %www/testapp/ auth "/testapp/login.rsp" alias "/testapp/hello" %testapp/login.rsp ] | |
onetom 2-May-2011 [10127x2] | hmm.. it doesn't throw an error if im trying to load a non-existant module |
how do u ignore .svn dirs while grepping an svn repo? it's annoying to say | grep -v \\.svn all the time | |
Dockimbel 2-May-2011 [10129] | Grepping: don't know. I would do a "svn export" of the SVN repository in such case. |
onetom 2-May-2011 [10130] | ah, it goes into the crashlog if a module is not found. im not sure how would it be the best but it's freaking hard to debug like this. 1, i won't know the names of the chey-pid-*.log files and there are multiple of them, so i can't easily tail -F them 2, trace and crash logs are created where the cheyenne executable or rebol source is located. -- that place usually not writable and it's somewhere else, not where the application is. 3, i won't know what is logged where unless i check all of these logs -- i could imagine a non-daemonizing mode where every fucking things is just dumped onto the stderr |
Dockimbel 2-May-2011 [10131] | i won't know the names of the chey-pid-*.log files As the -pid- part suggests, you just need to search for the one having the same PID as the current Cheyenne main process. |
onetom 2-May-2011 [10132x2] | i mean, i can't know it in advance. now im running cheyenne with -w 1 and having a look at the log with less *pid*log |
btw, that error at ! is logged even if my cfg file is only $ cat httpd.cfg modules [ internal extapp static action rsp alias ] globals [ listen [8080] bind-extern RSP to [ .r ] ] | |
Dockimbel 2-May-2011 [10134] | I wonder why you guys are make things harder by trying to debug your apps under production conditions? Why don't you make a local development setup using Cheyenne from sources, lauching it from a console in verbose mode to have a direct look at everything that could go wrong. The only log file I need to look at during Cheyenne development is %trace.log file (and even this one is accessible from your browser in RSP 'debug mode...). |
onetom 2-May-2011 [10135x3] | im writing a json webservice and actually it's very annoying when i get a RSP error html page, instead of the usual rebol error. |
what do u mean by production condition, btw? there is nothing in production yet | |
i have a global debug option just as a per-vhost one and im starting cheyenne w -vvv beside -w 1 | |
Dockimbel 2-May-2011 [10138x2] | Production mode: using the binary version as a daemon, instead of using the source version from a REBOL console. |
im writing a json webservice and actually it's very annoying when i get a RSP error html page, instead of the usual rebol error. debug/off should fix that: http://cheyenne-server.org/docs/rsp-api.html#def-65 | |
onetom 2-May-2011 [10140x2] | because - normally - i shouldn't care about the webserver. that would be one of the great things about cheyenne. it's just a 1-file-webserver |
(meanwhile i see there should be 1 vhost definition at least, so that's why the conf-parser fails; the error at: ! still doesn't make sense though :) anyway, i keep on debugging) | |
Dockimbel 2-May-2011 [10142] | I don't care about Cheyenne while coding RSP scripts or webapps, *but*, I always launch it in source mode (and never as a binary) on my local development box. That way, when something odd happens, I just have a look at the REBOL console and scroll up until I see what happened (so I never need to look at any %chey-pid* or %crash.log during development). |
onetom 2-May-2011 [10143] | aha. and we can't start the binary in a similar mode, where the errors are not caught and logged, but showed in the console instead? (im trying to do a do %cheyenne.r now) |
Dockimbel 2-May-2011 [10144] | The Cheyenne binary version is meant for production, so all things are logged in files. If you want to have them in a REBOL console from the binary, you need to build a custom binary and change the encap options in the %cheyenne.r header. Removing the 'no-window option will redirect all logs (except %trace.log) to a REBOL console. |
onetom 2-May-2011 [10145] | hm.. is this no-window thing documented? |
Dockimbel 2-May-2011 [10146x2] | BTW, if you launch Cheyenne from REBOL console, you can still pass it command line options, my local Cheyenne is launched using: rebol -s cheyenne.r -vvv -w 0 |
No-window: yes, it's part of REBOL/SDK documentation. | |
onetom 2-May-2011 [10148x2] | i was trying: onetom ~/p/ob $ rebol -qs --do 'do/args %~/rebol/cheyenne/Cheyenne/cheyenne.r "-w 1 -vvv"' |
is this no-window option equivalent to the -w option? | |
Dockimbel 2-May-2011 [10150x2] | IIRC, yes it is. |
-w as REBOL option (to not confuse with Cheyenne's -w option). | |
onetom 2-May-2011 [10152] | sure |
Dockimbel 2-May-2011 [10153] | Here is the SDK documentation about encap headers: http://www.rebol.com/docs/sdk/encap.html#section-8 |
onetom 2-May-2011 [10154x2] | which means im not supposed to hack cheyenne (easily) unless i buy the SDK and learn encap? because in turn that's what it means not to include this specific "trick" into cheyenne's documentation |
and since im running it with the plain rebol/core, i wouldn't have thought that encap header might be relevant | |
Dockimbel 2-May-2011 [10156x2] | You can hack Cheyenne as much as you want. The SDK is only required if you want to build a binary version of Cheyenne, which is not mandatory for using Cheyenne, even in production. |
The encap header is only revelant if you build a binary, it is ignored if run from sources. | |
onetom 2-May-2011 [10158] | aahha... i was using the -w as usual, that's why i didn't see any output when i was starting cheyenne from source. normally i use -w, otherwise pipeing the output doesn't work properly. okay, everything makes more sense now. |
Dockimbel 2-May-2011 [10159] | Good. :-) |
Kaj 2-May-2011 [10160] | The binary is mandatory for using Library |
GrahamC 2-May-2011 [10161] | command/core has library |
Kaj 2-May-2011 [10162] | Most people don't have Command/Core |
Maxim 2-May-2011 [10163x2] | nowadays, I think command is only available via the sdk, no? |
should the hosts be configured via IP addresses? it seems php has issues using localhost as a domain name. | |
onetom 2-May-2011 [10165] | ## Error in [conf-parser] : Error in conf file at: ! was caused by writing a debug word outside of a vhost definition... |
Maxim 2-May-2011 [10166] | should = "should it be possible to configure host via IP addresses" ? |
onetom 2-May-2011 [10167] | u mean vhost? the docs says it is possible. but u can't listen on a specific address only -- it's a rebol limitation |
Maxim 2-May-2011 [10168] | yeah, but it seems php prefers using 127.0.0.1 instead of localhost, but my client is reporting cheyenne errors (I haven't tested it yet)... just want to know if its possible first. |
Dockimbel 2-May-2011 [10169x2] | Declaring a vhost using an IP address: yes and it is documented in the wiki. |
onetom: thanks for reporting the cause, I will test that locally and see if I can improve the error message for such cases. | |
older newer | first last |