ERPNext.com Frappe Cloud Support Partners Foundation Frappe School

ERPNext on a Raspberry Pi 3 with Debian 9

I have developed a detailed guide to install ERPNext on a Raspberry Pi 3 with Debian 9:

Your comments are welcome!

The main reason is that the “easy install” doesn’t work yet for this Debian version.

I would like to thank @saidsl who wrote a great article on installing ERPNext on Debian 9, published on the ERPNext discussion board and which was an invaluable starting point. (Guide: Manual Install ERPNext on Ubuntu 16.xx & Debian v8 & 9)

18 Likes

Hi there!

I’ve been trying to install ERPnext onto my Raspberry Pi 3 as a trial system. I’ve gotten everything else to install properly until I get to this line.

bench init frappe-bench && cd frappe-bench

This is what I get.

kip_redis_config_generation=skip_redis_config_generation)
File “/home/frappe/bench-repo/bench/utils.py”, line 64, in init
get_app(frappe_path, branch=frappe_branch, bench_path=path, build_asset_files=False, verbose=verbose)
File “/home/frappe/bench-repo/bench/app.py”, line 65, in get_app
cwd=os.path.join(bench_path, ‘apps’))
File “/home/frappe/bench-repo/bench/utils.py”, line 140, in exec_cmd
raise CommandFailedError(cmd)
bench.utils.CommandFailedError: git clone https://github.com/frappe/frappe.git --origin upstream

could you please direct me to let me know what I’ve been doing wrong. Everything else prior to this was done properly with the output you’ve listed in the document.

Hello,

Apparently, the command “git clone https://github.com/frappe/frappe.git --origin upstream” failed. This command simply copies the frappe directory to your Raspberry Pi.

I don’t see how this command can fail, I have two ideas:

  1. Your SD card is full and the whole frappe directory cannot be copied
    Run the command:
    df -h
    to verify the available disk space
  2. Your Raspberry Pi was not connected to the Internet or the connection was too slow Just retry the command
    bench init frappe-bench && cd frappe-bench
    (before issuing the command, verify if the directory ~/frappe-bench exists. if it exists, you must first remove it by rm -rf frappe-bench)

(edit: space missing between df and -h; error in the name of the directory to remove, must be frappe-bench instead of frappe)

Seems to be different everyday. This is the 3rd day I’ve been trying to install it. Today when I get to step 41 the command “git clone https://github.com/frappe/bench bench-repo” yields this error. "fatal: uable to access ‘https://github.com/frappe/bench/’: gnutls_handshake() failed: Close notify.

My internet connections are working fine and everything else has worked up to this point. I’ve also tried to repeat the command several times.

A quick search on the Internet leads to an issue with the certificate on your Raspberry Pi used to handshake with the git repository. I just tried the command and it worked flawlessly.

  1. Have you installed any other product on your Pi? Did you start from a clean copy of Debian 9 from raspberrypi.org?
  2. Is your git version the same as mine? (git --version returns git version 2.11.0)

I installed everything based on your instructions. The Raspbian version is “2017-11-29-raspbian-stretch.zip”. It’s a clean install fresh and everytime I’ve encountered an issue with installation I start fresh again. I’m on a Raspberry Pi 3.

I’ve noticed that from step 7 onwards, some of the results don’t match that of your tutorial. The Raspbian version is exactly the same. But as soon as I get to step 41, it comes out with the same error. The git version is exactly the same. But has the same issue.

I’m just wondering. Could this be because I’m behind a firewall? I also tried to install using your fast install method which is also from scratch and tried both changing the variables as well as keeping the same variables. But no options worked. Still come out with the same handshake issue.

As the error is from a command requiring Internet access, it is well possible that this is the cause of your problem! Have a look at https://serverfault.com/questions/189070/what-firewall-ports-need-to-be-open-to-allow-access-to-external-git-repositories.

Hmmm… I tried both things and both didn’t yield a positive install.

  1. I brought the Pi home where there is no firewall. But I used your fast install method and it stopped half way. When I get to b.sh section it couldn’t get past the frappe install.

  2. I opened the ports 22 & 9418 at my office and it still gave the handshake error

Hi @webingold2, could you share this installation guide on https://github.com/frappe/frappe/wiki ?

I resorted to using my mobile data to do the install and same with my attempt at home with no firewall, when carrying out step 43, the following lines comes out
INFO:bench.utils:frappe-bench/env/bin/pip install -q -e frappe-bench/apps/frappe --no-cache-dir
Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by ‘ProtocolError(‘Connection aborted.’, BadStatusLine("’’",))’: /simple/pyopenssl/
Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by ‘ProtocolError(‘Connection aborted.’, BadStatusLine("’’",))’: /simple/lxml/

I have no problem to share the installation guide on frappe wiki but I have two questions before:

  1. Is it the right place to put an installation guide for ERPNext (this is the ultimate goal, have an ERP running on the Raspberry Pi) on a wiki page that only talks about frappe framework?

  2. Is there a wiki explaining how to modify a wiki page, I have never done it…

Again, the error log mentions “Bad status line” which indicates a connection issue… Are you eventually living in a country where the Internet is partially or totally regulated by the authorities?

Is it the right place to put an installation guide for ERPNext (this is the ultimate goal, have an ERP running on the Raspberry Pi) on a wiki page that only talks about frappe framework?

Have it at the ERPNext Wiki then. (But it’d be nice if you’d link it to Frappe as well since the guide also serves as a purpose for having Frappe installed).

Is there a wiki explaining how to modify a wiki page, I have never done it…

Here’s a good guide to get started - https://help.github.com/articles/about-github-wikis/

2 Likes

Hi there @webingold2,

Last week, I was able to make an install via connection to my mobile phone. But as I found out, the IP address is confined to working only on my mobile’s tithering which of course isn’t feasible for long term operation. I contacted my firewall supplier and they helped to stop blocking Github for me, but today during a fresh install, upon carrying out Step 44, it came out with a line like this. pymysql.err.OperationalError: (1045, u"Access denied for user ‘87a0fb99758ee7f9’@‘localhost’ (using password: YES)")
Do you know what’s happening? I’m following your instructions to the dot and there’s nothing blocking me from installing frappe. Everything was smooth up to that point.

Just to be sure, you run command 44 from ~/frappe-bench directory of user frappe, don’t you?

What is happening is an error during the connection to mariadb database, apparently the password is not working. Try:
mysql -u root -p
and enter the password you used at step 13. If it works, then the connection is OK. However, I don’t know what to do with this information…

Frankly I’m getting a little bit battered from trying to install this properly. I ran your fast install without changing a single thing. Just wishing to see if it will install properly. The ports and url block have all been cleared. But a number of things aren’t installing as per your document. Currently, running your fast install without any the variables changed, it’s not installing a lot of things correctly. Maybe if you find the time, you can do a clean install to check it yourself. But after 6 days of attempting to install this, I can pretty much tell you this install doesn’t work properly. I’ve basically tried all the possibilities in installing this. I live in Hong Kong where the connection is 1Gbps so there’s no chance in the world it has anything to do with the connection.

Do you have any chance to try with different ISP or VPN?

You are right @Clinton_Wong, it is highly frustrating to have a procedure which doesn’t work. I tested the procedure many times and after I read your last message, I decided to re-test it once again. I now have an error in the script b.sh that I cannot solve, it is something linked to the installation of the chromedriver extension of npm:
npm ERR! Linux 4.9.59-v7+
npm ERR! argv “/usr/bin/nodejs” “/usr/bin/npm” “install” “chromedriver”
npm ERR! node v7.10.1
npm ERR! npm v4.2.0
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! chromedriver@2.34.0 install: node install.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the chromedriver@2.34.0 install script ‘node install.js’.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the chromedriver package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node install.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs chromedriver

Maybe in a couple of days, the package error will be fixed and the procedure will work again!