New User/Installation of Sahana Eden

273 views
Skip to first unread message

Avinash Kachhy

unread,
Apr 18, 2016, 12:01:46 PM4/18/16
to Sahana-Eden
I have created a flash drive containing the 32-bit version of Sahana Eden and TurnkeyLinux.
At the end of the installation, I get root# prompt.
I am at a loss on how to get to the application to the main screen to get started. What is the URL?

There is no manual for flash drive install in the Wiki. The URL in the below leads to an empty article.

Flash Drive 

Sahana Eden can easily be downloaded and run locally from a flash drive on a Windows computer. it can be configured to be accessed on a local network but for more than 4 users the performance will not be optimal. For instruction on installing a Flash Drive instance, please see http://eden.sahanafoundation.org/wiki/InstallationGuidelines/FlashDrive 


Ideally, I need instructions to run Sahana Eden from a flash drive with persistence.


Fran Boon

unread,
Apr 18, 2016, 12:21:29 PM4/18/16
to sahan...@googlegroups.com
I don't know Turnkey Linux I'm afraid...didn't know they had a Flash
drive version, nor if it has persistence.

A lightweight single-user install is normally accessed as http://127.0.0.1:8080
I don't know if this Turnkey uses that or puts it on port 80, so
http://127.0.0.1
I don't know if this install has it running altready or whether you
need to run it yourself.
If not already running in the background then look for web2py.py
(maybe in /home/web2py?)
Then cd to that folder & do:
python web2py.py -M -S eden -p my_password

That should hopefully allow access from http://127.0.0.1:8080


Sorry about the empty wiki page...not sure how that was allowed into
the book with this being empty!

The normal Windows installer can be installed to USB, so I set this to
forward to here:
http://eden.sahanafoundation.org/wiki/InstallationGuidelines/Windows/User

This installer is very out of date, but there are instructions on how
to build an updated version:
http://eden.sahanafoundation.org/wiki/InstallationGuidelines/Windows/Maintenance

I don't personally have time to update it myself at the moment.

Good luck,
Fran.
> --
> You received this message because you are subscribed to the Google Groups
> "Sahana-Eden" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sahana-eden...@googlegroups.com.
> To post to this group, send email to sahan...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sahana-eden/dbecdede-fbd0-45f6-9740-deeae70d0ad6%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Avinash Kachhy

unread,
Apr 19, 2016, 10:27:33 AM4/19/16
to Sahana-Eden
I installed on a flash drive from the dev. version.
It started and showed the home page.
So, I copied the applications/Eden dir and installed it on pythonanywhrere.com cloud and it had a couple of compile errors but it did start and showed the home page.
However, when I tried to register as a user, I received an error with a URL for a ticket.

I have attached a file with the contents shown at the URL above.
Wonder if it is an easy fix, I am a novice at Python/web2py.
pythonanywhere-errors.txt

Fran Boon

unread,
Apr 19, 2016, 10:39:45 AM4/19/16
to sahan...@googlegroups.com
On 19 April 2016 at 15:27, Avinash Kachhy <avinash...@gmail.com> wrote:
> I installed on a flash drive from the dev. version.

Which again probably starts as somewhat out of date...but should be
easier to update to current: git pull
The Traceback has a very different line for the stauff than I see
which suggests it is old...you can see the date from
/eden/default/about

> It started and showed the home page.
> So, I copied the applications/Eden dir and installed it on
> pythonanywhrere.com cloud and it had a couple of compile errors but it did
> start and showed the home page.
> However, when I tried to register as a user, I received an error with a URL
> for a ticket.
> Internal error
> Ticket issued:
> eden/199.127.199.29.2016-04-19.14-03-46.4707c3d3-fca8-4fd7-a7df-7f01d937e34d
> I have attached a file with the contents shown at the URL above.

Thse are the key lines:
File "applications/eden/modules/s3/s3aaa.py", line 995, in register
self.log_event(log % form.vars)
File "/home/akachhy/web2py/gluon/tools.py", line 2535, in log_event
description=str(description % vars),
KeyError: 'id'
Error snapshot help
<type 'exceptions.KeyError'>('id')

So the default description is 'User %(id)s Registered' but id isn't in form.vars

I'd first start by simply upgrading Eden to current...since the
mismatch between modern Web2Py & old Eden will likely cause issues and
I certainly don't see this error here or on any of the instances I
administer

If this issue still occurs then we need to see why this isn't
appearing there for you & see if we can make sure it does.

> Wonder if it is an easy fix, I am a novice at Python/web2py.

As I am with PythonAnywhere ;)

F

Avinash Kachhy

unread,
Apr 19, 2016, 10:41:20 AM4/19/16
to Sahana-Eden
On the local flash drive instance, I was able to register as a user but still had an error later when I clicked on the volunteers link from the top menu.
The error text is in attach. 2. 
local-env-error.txt

Fran Boon

unread,
Apr 20, 2016, 5:02:13 AM4/20/16
to sahan...@googlegroups.com
On 19 April 2016 at 15:41, Avinash Kachhy <avinash...@gmail.com> wrote:
> On the local flash drive instance, I was able to register as a user but
> still had an error later when I clicked on the volunteers link from the top
> menu.
> The error text is in attach. 2.

OperationalError: table hrm_certificate already exists
<class 'sqlite3.OperationalError'>

This is an inconsistency between what the system thinks the DB looks
like (the databases/*.table files)
and what it really looks like (databases/storage.db)

I guess this happened by you deleting the .table files but not the .db
file (perhaps it was in-use).
Simplest solution for a non-Production system is to delete all of
these & start again.

F

Avinash Kachhy

unread,
Apr 20, 2016, 10:23:08 AM4/20/16
to Sahana-Eden
I tried to follow the directions to get the latest code from github (via download file) and cleanup, etc.
I don''t see some 'some files that need to be removed. (models/000_config.py, etc)

When I ran  the py2exe I received a new error.
C:\web2py>
C:\web2py>python standalone_exe.py py2exe
Copy geos.dll and geos_c.dll from Python27\DLLs into the dist directory
Copy Microsoft.VC90.CRT folder into the dist directory
running py2exe
creating C:\web2py\build
creating C:\web2py\build\bdist.win32
creating C:\web2py\build\bdist.win32\winexe
creating C:\web2py\build\bdist.win32\winexe\collect-2.7
creating C:\web2py\build\bdist.win32\winexe\bundle-2.7
creating C:\web2py\build\bdist.win32\winexe\temp
*** searching for required modules ***
error: web2py.py: No such file or directory

I am really surprised that for an important FOSS project, the installation package for a User (not developer) is unmaintained and a user needs to be a Python expert to be able to get started. ;-(

On Monday, April 18, 2016 at 12:01:46 PM UTC-4, Avinash Kachhy wrote:

Dominic König

unread,
Apr 20, 2016, 10:32:43 AM4/20/16
to sahan...@googlegroups.com
1) We maintain what we use. Nobody installs a Sahana production server on
Windows.

2) The installation instructions for production environments are here:
http://eden.sahanafoundation.org/wiki/InstallationGuidelines/Linux/Server

...and they are exceptionally well-maintained

3) If you want to install a developer environment, then expect that being a
developer is required.

4) If you want help, stop throwing mud.

Dominic
signature.asc

Avinash Kachhy

unread,
Apr 20, 2016, 12:42:28 PM4/20/16
to Sahana-Eden
OK,  I may be going on an incorrect path by reading the below.

Now, I tried to install on pythonanywhere.com following
I cloned the master repository from github
and could not find the 000_config.py file for updating the database connection info in the web2py/applications/eden/models directory.
Please help! Thanks.



On Monday, April 18, 2016 at 12:01:46 PM UTC-4, Avinash Kachhy wrote:

Fran Boon

unread,
Apr 20, 2016, 1:46:44 PM4/20/16
to sahan...@googlegroups.com
On 20 April 2016 at 17:42, Avinash Kachhy <avinash...@gmail.com> wrote:
> I cloned the master repository from github
> and could not find the 000_config.py file for updating the database
> connection info in the web2py/applications/eden/models directory.

000_config.py is copied to models/ from modules/templates on the 1st
run...so I guess the 1st run hasn't happened or permissions didn't
allow the file to be created then.

F

Dominic König

unread,
Apr 20, 2016, 1:52:08 PM4/20/16
to sahan...@googlegroups.com
onsdagen den 20 april 2016 09.42.28 skrev Avinash Kachhy:
> OK, I may be going on an incorrect path by reading the below.
> http://eden.sahanafoundation.org/wiki/InstallationGuidelines/Windows/User
>
> Now, I tried to install on pythonanywhere.com following
> http://eden.sahanafoundation.org/wiki/InstallationGuidelines/PythonAnywhere?
> version=5 I cloned the master repository from github
> and could not find the *000_config.py* file for updating the database
> connection info in the web2py/applications/eden/models directory.
> Please help! Thanks.

What the Guideline does not mention is that models/000_config.py is only
created /after/ the first start ;)

There are three options:
1) you do the steps 4+5 in the last section /once before/ the steps 1+2+3

This will result in an error (but a telling one ;)), but it will create your
000_config.py

2) You go back to the bash, change into /home/your_username/web2py, then
execute:

python web2py.py -S eden -M -R applications/eden/static/scripts/tools/noop.py

This too will result in an error (equally telling), and it will create your
000_config.py

3) You copy the file modules/template/000_config.py into models/000_config.py

---

...after that, proceed with the steps of the last section in the guideline.

Dominic
signature.asc

Avinash Kachhy

unread,
Apr 21, 2016, 10:35:16 AM4/21/16
to Sahana-Eden
Yesterday, I was tried installing the Sahana Eden Production Server software on a Debian Jessie OS running in a VirtualBox VM on my desktop. The VM was very slow and almost unusable. Also, the constantly bouncing mouse pointer was distracting. I know it is a feature of the OS GUI and could be changed. However, I have now procured access to a Dell R720 server which is running CentOS. I believe I read some articles about installing Eden on Debian which needed some script mods. I would like to replace CentOS with Ubuntu if Sahana Eden could be easily installed on Ubuntu (i.e. the scripts could be run without too much modification). If that is not possible, I would install Debian.

Please advise.

Thanks

Fran Boon

unread,
Apr 21, 2016, 10:45:06 AM4/21/16
to sahan...@googlegroups.com
Anything is 'possible' but installing Sahana is easiest on Debian.

F
> --
> You received this message because you are subscribed to the Google Groups
> "Sahana-Eden" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sahana-eden...@googlegroups.com.
> To post to this group, send email to sahan...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sahana-eden/2c7a9756-110d-4d38-995e-09fc43a87044%40googlegroups.com.

Avinash Kachhy

unread,
Apr 22, 2016, 8:36:20 AM4/22/16
to Sahana-Eden
I have a Debian Jessie instance ready on a Dell R320 server.
I intend to install a Apache/MySQL production server.
I have a couple of questions before I start.

1. To run the 2 scripts to install and configure Eden, do I use any user ID or log in as root?
2, Is there anything to be done before, during or after running the 2 scripts?
3. After installing, do I register as the first user (admin) and then find the 000_*.py file?
4. Any other info is appreciated.

Thanks

Fran Boon

unread,
Apr 22, 2016, 9:08:49 AM4/22/16
to sahan...@googlegroups.com
On 22 April 2016 at 13:36, Avinash Kachhy <avinash...@gmail.com> wrote:
> I have a Debian Jessie instance ready on a Dell R320 server.
> I intend to install a Apache/MySQL production server.
> I have a couple of questions before I start.
> 1. To run the 2 scripts to install and configure Eden, do I use any user ID
> or log in as root?

You normally login as the non-root account & run the script as sudo (or sudo su)

> 2, Is there anything to be done before, during or after running the 2
> scripts?

No

> 3. After installing, do I register as the first user (admin) and then find
> the 000_*.py file?

Makes no odds
> https://groups.google.com/d/msgid/sahana-eden/60ec481c-f8f7-4e37-a0cb-2e3fa586802c%40googlegroups.com.

Avinash Kachhy

unread,
Apr 22, 2016, 10:07:17 AM4/22/16
to Sahana-Eden
I had to make the first line
from #!/bin/sh
to
#!/bin/bash
With sh it did not like the read -d and ==, etc.

Avinash Kachhy

unread,
Apr 22, 2016, 10:20:20 AM4/22/16
to Sahana-Eden
OK, Looks like I ran into a problem.
Please see the attached photo of the errors seen. Something related to not being a git repository.
Please let me know how to proceed.
Thanks.
IMG_20160422_101615281_HDR[1].jpg

Avinash Kachhy

unread,
Apr 22, 2016, 12:04:06 PM4/22/16
to Sahana-Eden
1. Is it possible that the dirs in the error messages (where chown fails) are not there because Eden is not executed yet?
2. What should be owner and group of all the files in the /home/webpy dir tree? Most of my files are owned by root eventhough I ran the script with sudo from an ID named odm.
3. Is the error "fatal:Not a git repository, or any parent up to the mount point /home" significant? How do I fix it?

Thanks

Avinash Kachhy

unread,
Apr 22, 2016, 2:36:05 PM4/22/16
to Sahana-Eden
I manually fixed the owner and group of files, re-ran parts of the install script and then the config script and believe that I do have it installed and configured.
How do I access the app in a browser? Just using the server IP address:80 gets the default Apache2 page.
If the the virtualhost name is abc.xyz.com. How to specify that preceded by the IP address in a URL?

Avinash Kachhy

unread,
Apr 22, 2016, 3:36:41 PM4/22/16
to Sahana-Eden
I removed the apache config for default server and then was able to get to the eden app from a awebserver. I copied the 000_config.py from modules/templates to models but still get the error as follows.

Internal error

Ticket issued: eden/192.168.175.21.2016-04-22.15-31-05.d2441b64-19c3-4f4f-adb2-87a6d6890c9a

Admin is disabled because insecure channel

What do I do now?

Dominic König

unread,
Apr 22, 2016, 6:54:41 PM4/22/16
to sahan...@googlegroups.com
fredagen den 22 april 2016 12.36.40 skrev Avinash Kachhy:
> I removed the apache config for default server and then was able to get to
> the eden app from a awebserver. I copied the 000_config.py from
> modules/templates to models but still get the error as follows.
>
> Internal errorTicket issued:
> eden/192.168.175.21.2016-04-22.15-31-05.d2441b64-19c3-4f4f-adb2-87a6d6890c9a
> <http://192.168.175.20/admin/default/ticket/eden/192.168.175.21.2016-04-22.
> 15-31-05.d2441b64-19c3-4f4f-adb2-87a6d6890c9a>
>
> Admin is disabled because insecure channel
>
> What do I do now?
Reading...maybe.

Line #16 in models/000_config.py is good reading matter for the night, you'll
love it.

Dominic
signature.asc

Avinash Kachhy

unread,
Apr 22, 2016, 7:54:29 PM4/22/16
to Sahana-Eden
From the reading it seems that the app context info needs to be populated in 
 models/000_config.py 
I will do that on Monday and see/report the progress. 

Is it OK for me to edit the WIKI to add these undocumented steps in the installation instructions?

Dominic König

unread,
Apr 23, 2016, 3:37:32 AM4/23/16
to sahan...@googlegroups.com


23 apr. 2016 kl. 01:54 skrev Avinash Kachhy <avinash...@gmail.com>:

From the reading it seems that the app context info needs to be populated in 
 models/000_config.py 

It says: /remove/ this line when you're done with the configuration settings.

I will do that on Monday and see/report the progress. 

Is it OK for me to edit the WIKI to add these undocumented steps in the installation instructions?

Depends...you've been taking quite a detour - switching platform several times, reading the wrong docs and trying to do everything by hand.

What you do is definitely not the normal way to set up a Sahana instance, and I don't see much value in having other people follow your example ;)

However, if there are gaps in existing guidelines, then yes, please fill them.

Dominic

Avinash Kachhy

unread,
Apr 25, 2016, 12:54:21 PM4/25/16
to Sahana-Eden
I have uncommented mysql related lines, ID, password, etc. and commented the line that indicates editing is done. Hope that it does need to be actually deleted.
Then I restarted apache with apache2ctl service restart.
I still get the same error about insecure channel.

Please help.
Thanks

Dominic König

unread,
Apr 25, 2016, 2:37:19 PM4/25/16
to sahan...@googlegroups.com
måndagen den 25 april 2016 09.54.21 skrev Avinash Kachhy:
> I have uncommented mysql related lines, ID, password, etc. and commented
> the line that indicates editing is done. Hope that it does need to be
> actually deleted.
> Then I restarted apache with apache2ctl service restart.
> I still get the same error about insecure channel.

"Admin is disabled because insecure channel" means that you must use HTTPs,
unless you're on localhost...

...to access web2py's administration UI ;) not by default for Sahana.

As I understood it, you wanted to access Sahana, right? So, the question is,
can you access the Sahana index page, i.e. the URL:

http://[yourserver.yourdomain]/eden/default/index

? (yeah, replace yourserver.yourdomain accordingly).

The first call to that URL may be a wee bit slow (due to the pre-population of
the database), but that's only once.

Dominic
signature.asc

Avinash Kachhy

unread,
Apr 25, 2016, 3:13:02 PM4/25/16
to Sahana-Eden
If I try to access directly on the server using
http://localhost/eden, the erro"r message is admin disabled because unable to access password file.
If I try to use https, I get connection refused. Both on local and remote browser access.
Do I need to configure https in Apache2?

Dominic König

unread,
Apr 25, 2016, 5:32:39 PM4/25/16
to sahan...@googlegroups.com
måndagen den 25 april 2016 12.13.02 skrev Avinash Kachhy:
> If I try to access directly on the server using
> http://localhost/eden, the erro"r message is admin disabled because unable
> to access password file.
> If I try to use https, I get connection refused. Both on local and remote
> browser access.
> Do I need to configure https in Apache2?

Hmm, I don't quite understand - what is it you are not telling me?

The error message "admin disabled because unable to access password file" again
belongs to the web2py "admin" application. No such error message exists in
Sahana.

However, if you can access the "admin" application (obviously you can), then
Apache is running properly, and hands over the request to web2py (so mod_wsgi
does what it's supposed to do).

What I do not understand is why a /eden request should end up in /admin? Are
you just loading the "localhost/eden" - or are you clicking on something?

Have you modified any Apache configurations, and if yes, then how?

Are file permissions set correctly (make sure that there are the folders
"sessions" and "error" in applications/eden, and that both are writable for
the web server)?

I'm sorry - I've done this many times, never seen it go wrong like this. I
have a strong feeling that there's an important detail missing from this
conversation, something you may consider irrelevant, but that makes all the
difference...

Dominic
signature.asc

Avinash Kachhy

unread,
Apr 26, 2016, 9:02:00 AM4/26/16
to Sahana-Eden
Yes, it seems to be related to Apache. I see other refs. about https denials, too.
I had added eden to /etc/hosts.

127.0.0.1       localhost
127.0.1.1       debian
127.0.1.1       eden

I copied the debian entry. Should I make it 127.0.1.2  ??

Also, I had added a config file in Apache for the virtual host eden. I had to deactivate the default server. Otherwise, I got the Apache default page indicating Apache works.
That one is named /etc/apache2/sites-available/production.conf

It starts as follows and nothing is changed after the first few lines. I am not sure why I commented out the ServerName line. The domain name is fake.
<VirtualHost *:80>
# ServerName eden.dominica.com
# ServerAdmin webm...@dominica.com
 DocumentRoot /home/web2py/applications

  WSGIScriptAlias / /home/web2py/wsgihandler.py
  ## Edit the process and the maximum-requests to reflect your RAM
  WSGIDaemonProcess web2py user=web2py group=web2py home=/home/web2py processes=4 maximum-requests=100

Reviewing what I did so far - 
I had started out with a clean new Debian Jessie server. However, I assigned a root password and I believe( in hindsight  )that makes the sudo command to work differently. 
That may have caused some ownerships/permissions to be set incorrectly which caused the failure during the execution of the first script to install Sahana Eden.
So, I corrected the ownerships/permissions from root to web2py for /home/web2py and below and proceeded with the remaining script.
After that I executed the second script and tried to access the app but then found out that we need to get the file 000_config.py in the models dir and some lines in the 000_config.py need to be uncommented, etc.

I did set 777 perm to error and sessions under eden. It has the owner and group web2py.
That is where we are.

May be I could start afresh - installing Debian without root password - to get the correct ownership/perms from the scripts.

Thanks




On Monday, April 25, 2016 at 5:32:39 PM UTC-4, Dominic wrote:
måndagen den 25 april 2016 12.13.02 skrev  Avinash Kachhy:
> If I try to access directly on the server using
> http://localhost/eden, the error message is admin disabled because unable

Dominic König

unread,
Apr 26, 2016, 10:05:11 AM4/26/16
to sahan...@googlegroups.com
tisdagen den 26 april 2016 06.02.00 skrev Avinash Kachhy:
> Yes, it seems to be related to Apache. I see other refs. about https
> denials, too.
> I had added eden to /etc/hosts.
>
> 127.0.0.1 localhost
> 127.0.1.1 debian
> 127.0.1.1 eden
>
> I copied the debian entry. Should I make it 127.0.1.2 ??
I don't see any reason to modify this file.

> Also, I had added a config file in Apache for the virtual host eden. I had
> to deactivate the default server. Otherwise, I got the Apache default page
> indicating Apache works.
> That one is named /etc/apache2/sites-available/production.conf
>
> It starts as follows and nothing is changed after the first few lines. I am
> not sure why I commented out the ServerName line. The domain name is fake.
> <VirtualHost *:80>
> # ServerName eden.dominica.com
> # ServerAdmin webm...@dominica.com
> DocumentRoot /home/web2py/applications
>
> WSGIScriptAlias / /home/web2py/wsgihandler.py
> ## Edit the process and the maximum-requests to reflect your RAM
> WSGIDaemonProcess web2py user=web2py group=web2py home=/home/web2py
> processes=4 maximum-requests=100
I don't see this directive:

WSGIPassAuthorization On

> Reviewing what I did so far -
> I had started out with a clean new Debian Jessie server. However, I
> assigned a root password and I believe( in hindsight )that makes the sudo
> command to work differently.
> That may have caused some ownerships/permissions to be set incorrectly
> which caused the failure during the execution of the first script to
> install Sahana Eden.
> So, I corrected the ownerships/permissions from root to web2py for
> /home/web2py and below and proceeded with the remaining script.
> After that I executed the second script and tried to access the app but
> then found out that we need to get the file 000_config.py in the models dir
> and some lines in the 000_config.py need to be uncommented, etc.
Did you see this as an error message?

Because if you did, then you did indeed set up and access Sahana properly - so
problem solved.

> I did set 777 perm to error and sessions under eden. It has the owner and
> group web2py.
> That is where we are.
Ok.

> May be I could start afresh - installing Debian without root password - to
> get the correct ownership/perms from the scripts.
It's not going to become any easier if you keep starting over - it just means
that all the efforts so far are wasted.

Ideally you stick with one setup until you are fully clear what all is wrong
and how to make it right. Otherwise - what's the point in trying again?

Dominic
signature.asc

Avinash Kachhy

unread,
Apr 26, 2016, 10:18:59 AM4/26/16
to Sahana-Eden


On Tuesday, April 26, 2016 at 10:05:11 AM UTC-4, Dominic wrote:
tisdagen den 26 april 2016 06.02.00 skrev  Avinash Kachhy:
> Yes, it seems to be related to Apache. I see other refs. about https
> denials, too.
> I had added eden to /etc/hosts.
>
> 127.0.0.1       localhost
> 127.0.1.1       debian
> 127.0.1.1       eden
>
> I copied the debian entry. Should I make it 127.0.1.2  ??
I don't see any reason to modify this file.

OK, I commented it out.
 

> Also, I had added a config file in Apache for the virtual host eden. I had
> to deactivate the default server. Otherwise, I got the Apache default page
> indicating Apache works.
> That one is named /etc/apache2/sites-available/production.conf
>
> It starts as follows and nothing is changed after the first few lines. I am
> not sure why I commented out the ServerName line. The domain name is fake.
> <VirtualHost *:80>
> # ServerName eden.dominica.com
> # ServerAdmin webm...@dominica.com
>  DocumentRoot /home/web2py/applications
>
>   WSGIScriptAlias / /home/web2py/wsgihandler.py
>   ## Edit the process and the maximum-requests to reflect your RAM
>   WSGIDaemonProcess web2py user=web2py group=web2py home=/home/web2py
> processes=4 maximum-requests=100
I don't see this directive:

        WSGIPassAuthorization On

I added this right after the rewrite rule. 
I made the couple of changes (commented out eden in /etc/hosts and added the directive in production.conf file and restarted apache but there is no change. Same errors.

Dominic König

unread,
Apr 26, 2016, 10:38:59 AM4/26/16
to sahan...@googlegroups.com
tisdagen den 26 april 2016 07.18.59 skrev Avinash Kachhy:
> I made the couple of changes (commented out eden in /etc/hosts and added
> the directive in production.conf file and restarted apache but there is no
> change. Same errors.
Ok, now pls describe how you get the error.

- Which URL do you enter into your browser?
- What do you see?

Do not click on anything, just open the URL and describe what you see as
exactly as possible.

Dominic
signature.asc

Avinash Kachhy

unread,
Apr 26, 2016, 10:54:20 AM4/26/16
to Sahana-Eden
I put only the IP address of the server in the location bar and get the below error.
The IP address gets the suffix eden by the response and is seen in h elocation bar as


When I click on the link for the ticket I see 
Admin is disabled because insecure channel

Thanks

Dominic König

unread,
Apr 26, 2016, 11:37:15 AM4/26/16
to sahan...@googlegroups.com
Aha - so you /did/ click on something. Important detail, you know?

Ok, the interesting part is that ticket. You can't see it when you click on it
because you're running from remote without HTTPs. That is *correct* behaviour,
not wrong at all.

As it looks, your Apache setup is working properly, and web2py is accessible
as it's supposed to. Remains the question why Sahana won't start.

What I suspect is that you're running an incompatible version of PyDAL, and to
confirm that, please do two things:

1) Please go into the web2py folder and enter "git log -1", then tell me what
you get.

2) Go into the applications/eden/errors folder, and find this file:
192.168.175.24.2016-04-26.10-50-54.46dbcad2-b7fd-45ba-9860-266b6cda046d

...then post it here (or, if the mailing list refuses, send it to me
directly).

Dominic

tisdagen den 26 april 2016 07.54.20 skrev Avinash Kachhy:
> I put only the IP address of the server in the location bar and get the
> below error.
> The IP address gets the suffix eden by the response and is seen in h
> elocation bar as
> http://192.168.175.20/eden/.
>
> Internal errorTicket issued:
> eden/192.168.175.24.2016-04-26.10-50-54.46dbcad2-b7fd-45ba-9860-266b6cda046d
>
> <http://192.168.175.20/admin/default/ticket/eden/192.168.175.24.2016-04-26.
> 10-50-54.46dbcad2-b7fd-45ba-9860-266b6cda046d>
signature.asc

Avinash Kachhy

unread,
Apr 26, 2016, 11:47:14 AM4/26/16
to Sahana-Eden
The output of the git log -1 is

commit 735d79c2119d6b53a771a9eb15180dee728d3ec8
Author: mdipierro <massimo....@gmail.com>
Date:   Tue Apr 19 22:45:49 2016 -0500

    latest pydal fixed connection issue

The content of the error file is
(dp1
S'output'
p2
S"<type 'exceptions.NameError'> name 'eden' is not defined"
p3
sS'layer'
p4
S'/home/web2py/applications/eden/models/000_config.py'
p5
sS'code'
p6

Wonder where the name eden is not defined!!
Thanks

Dominic König

unread,
Apr 26, 2016, 1:51:35 PM4/26/16
to sahan...@googlegroups.com
tisdagen den 26 april 2016 08.47.14 skrev Avinash Kachhy:
> The output of the git log -1 is
>
> commit 735d79c2119d6b53a771a9eb15180dee728d3ec8
> Author: mdipierro <massimo....@gmail.com>
> Date: Tue Apr 19 22:45:49 2016 -0500
>
> latest pydal fixed connection issue

Ok, you should revert this to the latest stable:

git reset --hard 81d0291
git submodule update


> The content of the error file is
> (dp1
> S'output'
> p2
> S"<type 'exceptions.NameError'> name 'eden' is not defined"
> p3
> sS'layer'
> p4
> S'/home/web2py/applications/eden/models/000_config.py'
> p5
> sS'code'
> p6
>
> Wonder where the name eden is not defined!!

Seems there is an error in your 000_config.py - what changes did you make
there? Can you paste it somewhere?

Dominic
signature.asc

Avinash Kachhy

unread,
Apr 26, 2016, 4:08:30 PM4/26/16
to Sahana-Eden
x.txt

Avinash Kachhy

unread,
Apr 26, 2016, 4:09:42 PM4/26/16
to Sahana-Eden
I attached the correct file here.
Thanks

On Tuesday, April 26, 2016 at 1:51:35 PM UTC-4, Dominic wrote:
config.txt

Dominic König

unread,
Apr 26, 2016, 4:50:17 PM4/26/16
to sahan...@googlegroups.com
This line is incorrect:

settings.log.logfile = eden.log

Must be:

settings.log.logfile = "eden.log"

Dominic

tisdagen den 26 april 2016 13.09.42 skrev Avinash Kachhy:
> I attached the correct file here.
> Thanks
>
> On Tuesday, April 26, 2016 at 1:51:35 PM UTC-4, Dominic wrote:
> > tisdagen den 26 april 2016 08.47.14 skrev Avinash Kachhy:
> > > The output of the git log -1 is
> > >
> > > commit 735d79c2119d6b53a771a9eb15180dee728d3ec8
> > > Author: mdipierro <massimo....@gmail.com <javascript:>>
signature.asc

Avinash Kachhy

unread,
Apr 27, 2016, 8:39:23 AM4/27/16
to Sahana-Eden
Restarted after fixing the log file name specification.
Browser gets the same error.
Errors dir has 6 error files, all with 
 "Table \'auth_user\' already exists"

Dominic König

unread,
Apr 27, 2016, 9:38:01 AM4/27/16
to sahan...@googlegroups.com
onsdagen den 27 april 2016 05.39.22 skrev Avinash Kachhy:
> Restarted after fixing the log file name specification.
> Browser gets the same error.
> Errors dir has 6 error files, all with
> "Table \'auth_user\' already exists"
Yeah - which is because you have an existing database, but no status files
under eden/databases.

You can either try to restore the status files (bit tricky), or you can clean
the database (i.e. drop it and create it new).

For the latter: since you're using MySQL, it would be to open the mysql
client, then "drop database sahana;" and then "create database sahana;"

When you're done with that, don't go back to your browser. It's not really
helping at this stage.

Instead, change into your web2py folder (/home/web2py?), and execute the
following:

python web2py.py -S eden -M -R
applications/eden/static/scripts/tools/noop.py

When this completes without a Python traceback, then (then!) you can use your
browser again.

I recommend that during the setup, you set

settings.base.debug = True

in your 000_config.py. You can still turn that off later - but right now it's
more useful to have it on.

Dominic
signature.asc

Avinash Kachhy

unread,
Apr 27, 2016, 9:53:47 AM4/27/16
to Sahana-Eden
I set debug to True, deleted and recreated the database and executed the python command. Below is the output. No browser, yet?

Traceback (most recent call last):
  File "/home/web2py/gluon/restricted.py", line 227, in restricted
    exec ccode in environment
  File "applications/eden/models/00_tables.py", line 18, in <module>
    import s3db.budget
  File "/home/web2py/gluon/custom_import.py", line 85, in custom_importer
    modules_prefix, globals, locals, [itemname], level)
  File "/home/web2py/gluon/custom_import.py", line 134, in __call__
    result = NATIVE_IMPORTER(name, globals, locals, fromlist, level)
  File "applications/eden/modules/s3db/budget.py", line 29, in <module>
    from reportlab.lib.validators import Percentage
  File "/home/web2py/gluon/custom_import.py", line 95, in custom_importer
    return base_importer(pname, globals, locals, fromlist, level)
  File "/home/web2py/gluon/custom_import.py", line 134, in __call__
    result = NATIVE_IMPORTER(name, globals, locals, fromlist, level)
ImportError: No module named reportlab.lib.validators

Dominic König

unread,
Apr 27, 2016, 2:50:01 PM4/27/16
to sahan...@googlegroups.com
So you didn't install reportlab?

(I'm still not fully clear which installation process you're following, so I
can't foresee such things).

Here's the list of Python libraries you need to run Sahana:
http://eden.sahanafoundation.org/wiki/InstallationGuidelines/Linux/Developer/Manual#InstallPythonLibraries

Besides the mandatory ones, I strongly recommend to have xlwt/xlrd installed.
It may be declared optional, but 99 out of 100 deployments definitely need it.

Dominic
signature.asc

Avinash Kachhy

unread,
Apr 27, 2016, 3:38:14 PM4/27/16
to Sahana-Eden
I was following the below
and ran the 2 scripts and then am in dialog with you.
I am not sure how reportlab is missed.

I installed all now. Some were already there.
sudo su -
apt-get install python-lxml
apt-get install python-shapely
apt-get install python-reportlab
apt-get install python-imaging
apt-get install python-dateutil

Avinash Kachhy

unread,
Apr 27, 2016, 3:41:59 PM4/27/16
to Sahana-Eden
I was able to register as the first user.
Thanks a lot for all the help.
================================================


On Wednesday, April 27, 2016 at 2:50:01 PM UTC-4, Dominic wrote:

Dominic König

unread,
May 10, 2016, 5:56:17 PM5/10/16
to aka...@yahoo.com, sahan...@googlegroups.com
Hi Avinash--

the installation of Sahana on the server is just one piece in the puzzle - a
production deployment does normally require much more than that.

That starts with planning of the deployment - which functionality, locale,
available master data (e.g. locations), user roles and access authorization,
...that'd be the minimum of requirements you need to consider and decide
before you start with the technical part.

For all of the above, there are various options and alternatives - because
Sahana is not one application, but many...it's a platform on which you can
build your application.

The installation of Sahana - regardless which system environment or
installation method you might use - just gives you the naked platform plus
thousands of configuration options.

It will run, but it will not fit for any particular scenario or locale.

So yes, you will have to edit the config files, and most likely also install the
master data sets you need.

No Sahana production deployment does "not need any configuration at all", and
TKL makes no difference here. You have to make choices - in one way or another.

---

The BEST way to install Sahana is to install is:

- a Debian 8 box in the Amazon EC2
- PostgreSQL as database system including PostGIS extension
- Cherokee as front-end web server with web2py executed through uWSGI

This is the best-maintained and most commonly used stack.

An alternative for smaller-scale, less GIS-intensive deployments could be:

- a Debian 8 box in the Amazon EC2
- MySQL as database
- Apache HTTPd as front-end web server with web2py executed through mod_wsgi

That too works well, but the scripts for that are a bit outdated and currently
looking for a maintainer.

All other alternatives are unmaintained and at best experimental. They may
work, or they may not work. We will try to support people with alternative
installation options, but eventually it's up to themselves to fix the issues
they experience - and if they do, then of course other people will appreciate
if they update the respective guidelines and scripts.

Yet hardly anyone does: people complain, get help, solve the problems and then
walk away - without sharing their solutions, without updating guidelines and
scripts, let alone maintaining them.

But this is a FOSS project - it will be as good as YOU make it.

Dominic

tisdagen den 10 maj 2016 16.15.04 skrev du:
> Hi Dominic
> I will greatly appreciate if you could respond to my last post on this.I am
> still not clear about the actual process of installing a production
> server.Is it limited to just the execution of the 2 scripts or does it need
> to be followed by the copying in of the 000_config.py and editing it. I
> found that for a novice to Python, the best way to install and test drive
> Sahana Eden would be to use the TurnkeyLinux VM appliance. It does not need
> any configuration at all. Thanks
> Avinash Kachhy
> ================ https://groups.google.com/d/msgid/sahana-eden/11698441.oFt7
> 2BH3f4%40aldebaran
signature.asc

Dominic König

unread,
May 10, 2016, 7:00:03 PM5/10/16
to aka...@yahoo.com, sahan...@googlegroups.com
And to be clearer with that...

We (as a specialized service provider) have the knowledge and tools required
to deploy Sahana quickly and production-ready.

We share the concepts and scripts we use, so that other people can try to re-
use them - but that doesn't mean they are re-usable for everyone. We are not
everyone ;)

---

Up to now, a production deployment requires expert knowledge, and even some
insight in Sahana's internal architecture and principles. Without that, you
will almost certainly run into problems at some point. We can support you to a
certain extent, but without at least some understanding of the underlying
technology on your side, this may not lead very far.

Surely, over the years, many people have indicated that they would like self-
deployment to become easier - but so far, none of them has really invested
into that.

---

There have been occasional discussions about a web setup tool for Sahana in
order to make installation and configuration easier for people with less in-
depth knowledge of Sahana.

But I don't believe that this alone is actually helpful, because the main
barrier (from my experience) is to know how to make use of Sahana to actually
solve the problems you're trying to solve.

Many people install Sahana, and it gets never really used because it simply
doesn't want to fit. But that problem has two sides - the technical aspects
(which is really best done by experts), and the real-world implementation
aspects (which is really best done by experts).

So, if you are a real-world problem solver with limited technical skills, then
you may want to leave the technical aspects to a specialized service provider
and focus on how people use Sahana to solve the real-world problems - and of
course on the data quality (much more critical than you may think).

Or, if you are a technical expert, then it is certainly a good idea to get
hold of a real-world problem solver (a.k.a. project manager) who can help to
put your solutions into effect.

That indeed is the BEST way to a Sahana deployment ;) and this assessment
doesn't even come from me :D

Dominic
signature.asc
Reply all
Reply to author
Forward
0 new messages