d-note icon indicating copy to clipboard operation
d-note copied to clipboard

New installation - Internal Server error and no hashcash.db

Open karibuTW opened this issue 9 years ago • 10 comments

Hi guys,

I followed the installation steps on my Debian server but was not able to have d-node running. I got the infamous 500 Internal Server Error.

I have even tried to give full access to the dnote folder (chown -R www-data:www-data) and even chmod 777, but no success.

Actually, I don't even have a hashcash.db .... At which step it is created? Any other idea on this issue?

Thank you!

karibuTW avatar Jul 16 '14 14:07 karibuTW

How are you installing the application? With Apache or Nginx? Are you using WSGI, or something else to interpret the Python? Also, have you run the setup.py installation script? The hashcash.db will be automatically created on the first note. Also, there is no need to "chmod 777" anything. I would recommend making 'root' the owner of all the files and directories, and 'www-data' the group, and fully removing all permissions for the 'other' permission mode.

atoponce avatar Jul 16 '14 15:07 atoponce

Hi Atoponce, I'm using Apache with WSGI Basically I've followed the installation steps on the readme.

I did run the setup.py too.

So not sure where is the issue is coming from...

karibuTW avatar Jul 17 '14 00:07 karibuTW

At install, and after running python setup.py, your directory tree setup should look like this: http://ae7.st/p/6wp (without the hashcash.db, actually). Your dnote.wsgi should be in the same root path as the dnote/ directory. Permissions should be as follows: http://ae7.st/p/6iy. The dnote.wsgi should be something like: http://ae7.st/p/5i0 (note that it's importing the dnote/__init.py__ module). Finally, for my Apache2 installation, here is the relevant section of my /etc/apache2/sites-enabled/default config file: http://ae7.st/p/7so. Make sure to reload Apache, so it loads in the config. You need libapache2-mod-wsgi installed, and the module loaded with a2enmod wsgi.

Hope that helps.

atoponce avatar Jul 17 '14 13:07 atoponce

Sorry for such late reply. Unfortunately, I'm still not able to install it on my server. And may be I got some confusion there: In your virtualhost, you mention the variable <Directory /var/www/d>
But you don't have a folder called "d" Same thing for your dnote.wsgi

Also, on the official tutorial, we need to create the data folder manually (But I though the setup script would do it?) and for the permission, still on the same tutorial, there is: chmod g+w,o= root.www-data /var/www/data/dnote/data But no folder called /var/www/data (May be a typo)

So most probably I'm missing something...

After checking my logs I got: File "/var/www/dnote.wsgi", line 6, in from dnote import DNOTE as application ImportError: No module named dnote

Any idea?

karibuTW avatar Jul 26 '14 06:07 karibuTW

Hi Atoponce and all, any suggestion? Thank you!

karibuTW avatar Aug 04 '14 12:08 karibuTW

Sorry. I've been swamped at work and personal life, and haven't had the time to help out here.

I'm not sure what problems your having, but I've successfully built this from scratch on an Apache virtual machine, with no problem, using the documentation outlined.

atoponce avatar Aug 20 '14 15:08 atoponce

Hi Atoponce, Okay I'll try. By the way, in the documentation, there is: chmod g+w,o= root.www-data /var/www/data/dnote/data But I don't get the /var/www/data folder, where does it come from? Not written on the documentation I think. (An error?)

Thanks!

karibuTW avatar Aug 21 '14 12:08 karibuTW

I'll look into fixing the documentation, to make it a bit more agnostic. I'm guessing that is data that came from a copy/paste of an existing installation.

atoponce avatar Aug 25 '14 18:08 atoponce

Karibu was this ever resolved? I have run into the same issue I cannot find a fix. The tutorial and what atoponce have are not the same.

JacobTheEvans avatar Mar 23 '15 17:03 JacobTheEvans

I'm having the same issue... /var/log/apache2/error.log shows:

mod_wsgi (pid=4355): Target WSGI script '/var/www/dnote.wsgi' cannot be loaded as Python module.
 mod_wsgi (pid=4355): Exception occurred processing WSGI script '/var/www/dnote.wsgi'.
 Traceback (most recent call last):
   File "/var/www/dnote.wsgi", line 7, in <module>
     from dnote import DNOTE as application
ImportError: No module named dnote

coloradotechie avatar Nov 03 '18 00:11 coloradotechie