r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[!Cheyenne] Discussions about the Cheyenne Web Server

Graham
7-Mar-2009
[4190x2]
7/3-21:59:42.822-## Error in [OS-API] : OpenSCManager failed : Access 
is denied. !
7/3-21:59:42.826-[boot] Cmdline args : -v
7/3-21:59:42.835-[boot] Processed    : [verbosity 1]
7/3-21:59:42.838-[boot] Boot flags   : [verbose]

7/3-21:59:42.840-[boot] Data folder  : %/C/cheyenne-r0919/Cheyenne/
7/3-21:59:42.906-[uniserve] Async Protocol FastCGI loaded
7/3-21:59:42.936-[conf-parser] Loading extension: mod-internal
7/3-21:59:42.940-[conf-parser] Loading extension: mod-extapp
7/3-21:59:42.943-[conf-parser] Loading extension: mod-static
7/3-21:59:42.948-[conf-parser] Loading extension: mod-action
7/3-21:59:42.952-[conf-parser] Loading extension: mod-fastcgi
7/3-21:59:42.955-[conf-parser] Loading extension: mod-rsp
7/3-21:59:42.960-[conf-parser] Loading extension: mod-ssi
7/3-21:59:42.963-[conf-parser] Loading extension: mod-alias
7/3-21:59:42.972-[uniserve] Starting RConsole...

7/3-21:59:43.003-## Error in [uniserve] : Cannot open server RConsole 
on port 9801 !
7/3-21:59:43.006-[uniserve] Starting Logger...

7/3-21:59:43.009-## Error in [uniserve] : Cannot open server Logger 
on port 9802 !
7/3-21:59:43.012-[uniserve] Starting HTTPd...
7/3-21:59:43.016-[uniserve] Starting task-master...

7/3-21:59:43.019-## Error in [uniserve] : Cannot open server task-master 
on port 9799 !
are these ports fixed and so I can only have one instance of cheyenne 
running?
Dockimbel
7-Mar-2009
[4192x2]
Multiple running instances :


1 ) Cheyenne uses a port translation method for task-master to avoid 
clashing between Cheyenne's instances. This translation is currently 
triggered by the -p command line option specifying on which port(s) 
Cheyenne should listen. So the 'listen keyword in config file doesn't 
trigger the translation. After a quick look, it should be fixable.


2) Logger and RConsole services ports are not translated. This should 
be fixed too.


3) As a consequence of 1) & 2), Cheyenne can't currently run multiple 
instances on the same machine.


I am running two instances because the web app uses the same database 
name
 :


4) I very well aware of this issue and I intend to find a solution 
asap.

OpenSCManager failed : Access is denied
 :


5) I should load that routine! only if trying to run as a Windows 
Service without having admin rights.
I'm looking for 4) first because it's the quickest and cleaner way 
to solve your issues.
Graham
7-Mar-2009
[4194x2]
What if I use different names for the database, and then alias them 
in the webapp init ?  Then could i just run the one Cheyenne?
no .. that won't work.
Oldes
7-Mar-2009
[4196]
I don't understand what's the problem with database names?
Graham
7-Mar-2009
[4197x4]
My webapp uses 'emr for the database name.
for one user emr points to one database, but for another user it 
points to a different database
So, to use a single instance of cheyenne, I have to go thru all my 
source and change the database name so that it's different each time 
I want to run more than one instance of this web app
I guess I could use remark for that.
Dockimbel
7-Mar-2009
[4201x2]
You've set up one database per user?
I'm working on the support of per webapp databases definition instead 
of being global. So you could have a 'emr database definition different 
for each webapp (while keeping the same name in sources).
Graham
7-Mar-2009
[4203x3]
I have a demo database that contains dummy data ... anyone can access 
it.
I have a real database which I don't let anyone except myself access 
:)
so one set of users access the demo website, and I use the other 
one.
Dockimbel
7-Mar-2009
[4206]
I see, so the patch I'm working on should solve that. It should be 
available tomorrow.
Graham
7-Mar-2009
[4207]
Thanks.
Dockimbel
8-Mar-2009
[4208x7]
Graham, I have a working patch that supports setting same DB virtual 
name to different connections URL per webapps. Here's an example 
definition of 2 webapps using this new feature :

	webapp [
		virtual-root "/curecode1/"
		root-dir %//dev/curecode/
		locales-dir %private/locales/
		
		databases [
			bugs	mysql://[root-:-localhost]/bugs1
		]
	]
	webapp [
		virtual-root "/curecode2/"
		root-dir %//dev/curecode/
		locales-dir %private/locales/

		databases [
			bugs	mysql://[root-:-localhost]/bugs2
		]
	]
So, in order to reuse the same code for your EMR app but branching 
on 2 disctinct databases, you'll have to define 2 different webapps.
I've also patched the systray code to include the port number(s) 
in the yellow help message.
Patch available here : http://cheyenne-server.org/tmp/patch-0920.zip
Just replace the patched file in your current Cheyenne v0.9.19 sources 
folder.
Test this very carefully before taking it in production and report 
me any issue/bugs related to that patch (be sure to have checked 
your own code before reporting).
Btw, the 'databases keyword in global section is still working but 
the 'databases definition block in webapp will take precedence if 
provided.
Graham
8-Mar-2009
[4215]
thanks .. I'm out of town today, but will try it tonight.
Graham
10-Mar-2009
[4216x4]
what's the process of acccessing a rsp page ?
is this all I need ?

	session/start
    	session/content/login?: yes
and I need an app-init.r in the web-app directory?
Looks like it won't work without an app-init.r
Dockimbel
10-Mar-2009
[4220]
An RSP page can be accessed standalone without a webapp. The webapp 
gives  you some additional features like automatic session starting, 
optional authentification protection, private folders, app-init events, 
etc...
Graham
10-Mar-2009
[4221]
I tried that .. and got no response
Dockimbel
10-Mar-2009
[4222x2]
See the RSP script examples provided in %www folder from Cheyenne 
sources.
I don't understand what you want to achieve with the code above?
Graham
10-Mar-2009
[4224x2]
access the web app folder
I couldn't get rsp working in www/ directory
Dockimbel
10-Mar-2009
[4226x2]
What's your webapp folder?
/
 ?
Graham
10-Mar-2009
[4228x6]
no ..
let me try this again.
gee, rsp is now working again in the www/ directory.
I was creating rsp pages writing them to the www directory and trying 
to browse to them ... and it wasn't working with my test.rsp page
Isn't the above the correct way to add a browser to the webapp?
well, I guess it isn't because it can't find 'login?
Dockimbel
10-Mar-2009
[4234x2]
I don't understand why you need this code if you're in a webapp context.
The webapp will provide you with automatic session, so session/start 
is not needed (it may even mess up your session content).
Graham
10-Mar-2009
[4236]
If I want to login in users from a particular ip address to the webapp?
Dockimbel
10-Mar-2009
[4237x2]
The login? session special value is used only to control access when 
authentication protection is set using the AUTH keyword in config 
file. You need to set it only when you consider that the user has 
provided enough credentials to let him in (for example once he has 
filled a login form with correct ID / pass values).
For login users from particular IP address, just force the login? 
session value in the RSP script used for authentication.
Graham
10-Mar-2009
[4239]
so just session/login?: true