Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New installation - Internal Server error and no hashcash.db #40

Open
karibuTW opened this issue Jul 16, 2014 · 10 comments
Open

New installation - Internal Server error and no hashcash.db #40

karibuTW opened this issue Jul 16, 2014 · 10 comments

Comments

@karibuTW
Copy link

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!

@atoponce
Copy link
Owner

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.

@karibuTW
Copy link
Author

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...

@atoponce
Copy link
Owner

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.

@karibuTW
Copy link
Author

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
Copy link
Author

karibuTW commented Aug 4, 2014

Hi Atoponce and all, any suggestion?
Thank you!

@atoponce
Copy link
Owner

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.

@karibuTW
Copy link
Author

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!

@atoponce
Copy link
Owner

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.

@JacobTheEvans
Copy link

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.

@coloradotechie
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants