I followed the guide at this URL
https://forum2.invoiceninja.com/t/install-invoice-ninja-v5-on-ubuntu-20-04/4588
When I get to the step “php7.4 artisan key:generate” I get the two errors below
In Connection.php line 712:
SQLSTATE[HY000] [1045] Access denied for user ‘forge’@‘localhost’ (using password: NO) (SQL: select * from information_schema.tables where table_schema = forge and table_name = accounts and table_type = ‘BASE TABLE’)
And
In Connector.php line 70:
SQLSTATE[HY000] [1045] Access denied for user ‘forge’@‘localhost’ (using password: NO)
Every thing seem to work but when I try to log on to my installation*
I get the standard front end picture with this error
500 — Server Error Back to 10.254.254.199
I’m not using a FQN but an IP Address …
Regards
GV
Ryan_G
March 18, 2022, 10:51am
2
Check your .env file. I had the same problem when first doing v5 and it didn’t exist. There is a .env.example you can copy from in the root of invoiceninja. From there you can modify the DB_DATABASE, _USERNAME, and _PASSWORD.
hillel
March 18, 2022, 11:40am
3
Hi,
Please check you’re using the latest version, currently v5.3.73
Hi Hillel,
Yes I’m running version v5.3.73
After fixing the “.env” file, problem changed, when I try to log into my server ip address I end up on a screen where there is an image that is zoomed out disproportionately and in the bottom left corner I still get the
"Server Error Back to 10.254.254.199 "
Might be a silly question but i’m a noob to Ubuntu but where can I find all the logs relating to invoice ninja?
Regards
GV
Hi Ryan
I followed your advice and created the “.env” file and I was able to set application key successfully.
Regards
GV
1 Like
Ryan_G
March 19, 2022, 3:13am
6
/usr/share/nginx/invoiceninja/storage/logs/laravel.log assuming you followed the Ubuntu 20 guide.
Thanks for the feedback I’ve made some edits to the guide for others in the future to work around this.
https://forum2.invoiceninja.com/t/install-invoice-ninja-v5-on-ubuntu-20-04/4588#populate-env-file-with-new-random-encryption-key-12
There’s a shortcut link to my new comments.
2 Likes
Hi,
After my previous adventure I decided to do a complete fresh install following the newly published instructions on:
How to Install InvoiceNinja on Ubuntu 22.04 Server with Apache/Nginx …
I followed the Apache route … the only notable exception from this set of instructions is that I’m using a self signed cert and I did not follow the certbot path …
To get a self signed cert installed I followed these instructions
How To Create a Self-Signed SSL Certificate for Apache in Ubuntu 20.04 | DigitalOcean and I adjusted the config file accordingly.
I completed the setup phase and it passed with flying colors … during which I thought that I setup a new user as part of the process …
But when I tried to sign on I get
500 — Server Error
I then went down the "reset password’ path then it came back saying that the user I created does not exist …
Below are excerpts from the appropriate log files:
error.log
AH00558: apache2: Could not reliably determine the server’s fully qualified domain name, using 127.0.1.1. Set the ‘ServerName’ directive globally to suppress this message
[Sat May 28 00:03:32.720809 2022] [mpm_prefork:notice] [pid 4883] AH00163: Apache/2.4.52 (Ubuntu) OpenSSL/3.0.2 configured – resuming normal operations
[Sat May 28 00:03:32.720818 2022] [core:notice] [pid 4883] AH00094: Command line: ‘/usr/sbin/apache2’
[Sat May 28 00:03:59.996596 2022] [mpm_prefork:notice] [pid 4883] AH00170: caught SIGWINCH, shutting down gracefully
[Sat May 28 00:04:49.399756 2022] [mpm_prefork:notice] [pid 637] AH00163: Apache/2.4.52 (Ubuntu) OpenSSL/3.0.2 configured – resuming normal operations
[Sat May 28 00:04:49.399913 2022] [core:notice] [pid 637] AH00094: Command line: ‘/usr/sbin/apache2’
[Sat May 28 00:14:44.563269 2022] [mpm_prefork:notice] [pid 637] AH00171: Graceful restart requested, doing restart
AH00558: apache2: Could not reliably determine the server’s fully qualified domain name, using 127.0.1.1. Set the ‘ServerName’ directive globally to suppress this message
[Sat May 28 00:14:44.587690 2022] [mpm_prefork:notice] [pid 637] AH00163: Apache/2.4.52 (Ubuntu) OpenSSL/3.0.2 configured – resuming normal operations
[Sat May 28 00:14:44.587696 2022] [core:notice] [pid 637] AH00094: Command line: ‘/usr/sbin/apache2’
[Sat May 28 00:20:13.315249 2022] [mpm_prefork:notice] [pid 637] AH00171: Graceful restart requested, doing restart
AH00558: apache2: Could not reliably determine the server’s fully qualified domain name, using 127.0.1.1. Set the ‘ServerName’ directive globally to suppress this message
[Sat May 28 00:20:13.353727 2022] [mpm_prefork:notice] [pid 637] AH00163: Apache/2.4.52 (Ubuntu) OpenSSL/3.0.2 configured – resuming normal operations
[Sat May 28 00:20:13.353732 2022] [core:notice] [pid 637] AH00094: Command line: ‘/usr/sbin/apache2’
invoiceninja.access.log
workstation ip addr - - [28/May/2022:00:08:36 +0000] “GET / HTTP/1.0” 400 623 “-” “-”
workstation ip addr - - [28/May/2022:00:15:20 +0000] “GET /setup HTTP/1.1” 200 5682 “-” “Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:100.0) Gecko/20100101 Firefox/100.0”
workstation ip addr - - [28/May/2022:00:15:21 +0000] “GET /js/app.js HTTP/1.1” 200 10863 “https://invoice.local/setup ” “Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:100.0) Gecko/20100101 Firefox/100.0”
workstation ip addr - - [28/May/2022:00:15:21 +0000] “GET /css/app.css HTTP/1.1” 200 7839 “https://invoice.local/setup ” “Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:100.0) Gecko/20100101 Firefox/100.0”
workstation ip addr - - [28/May/2022:00:15:21 +0000] “GET /vendor/[email protected] /alpine.js HTTP/1.1” 200 19738 “https://invoice.local/setup ” “Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:100.0) Gecko/20100101 Firefox/100.0”
workstation ip addr - - [28/May/2022:00:15:21 +0000] “GET /vendor/cookieconsent@3/cookieconsent.min.css HTTP/1.1” 200 2190 “https://invoice.local/setup ” “Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:100.0) Gecko/20100101 Firefox/100.0”
workstation ip addr - - [28/May/2022:00:15:21 +0000] “GET /vendor/cookieconsent@3/cookieconsent.min.js HTTP/1.1” 200 7654 “https://invoice.local/setup ” “Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:100.0) Gecko/20100101 Firefox/100.0”
workstation ip addr - - [28/May/2022:00:15:21 +0000] “GET /js/setup/setup.js HTTP/1.1” 200 8499 “https://invoice.local/setup ” “Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:100.0) Gecko/20100101 Firefox/100.0”
workstation ip addr - - [28/May/2022:00:15:21 +0000] “GET /favicon.ico HTTP/1.1” 200 15432 “https://invoice.local/setup ” “Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:100.0) Gecko/20100101 Firefox/100.0”
workstation ip addr - - [28/May/2022:00:22:54 +0000] “GET /setup HTTP/1.1” 200 7179 “-” “Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:100.0) Gecko/20100101 Firefox/100.0”
workstation ip addr - - [28/May/2022:00:22:54 +0000] “GET /js/app.js HTTP/1.1” 200 10863 “https://invoice.local/setup ” “Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:100.0) Gecko/20100101 Firefox/100.0”
workstation ip addr - - [28/May/2022:00:24:36 +0000] “POST /setup/check_pdf HTTP/1.1” 200 2171 “https://invoice.local/setup ” “Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:100.0) Gecko/20100101 Firefox/100.0”
workstation ip addr - - [28/May/2022:00:24:52 +0000] “POST /setup/check_db HTTP/1.1” 400 2258 “https://invoice.local/setup ” “Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:100.0) Gecko/20100101 Firefox/100.0”
workstation ip addr - - [28/May/2022:00:25:54 +0000] “POST /setup/check_db HTTP/1.1” 400 2262 “https://invoice.local/setup ” “Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:100.0) Gecko/20100101 Firefox/100.0”
workstation ip addr - - [28/May/2022:00:28:25 +0000] “POST /setup/check_db HTTP/1.1” 200 2143 “https://invoice.local/setup ” “Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:100.0) Gecko/20100101 Firefox/100.0”
workstation ip addr - - [28/May/2022:00:39:38 +0000] “POST /setup/check_mail HTTP/1.1” 400 3925 “https://invoice.local/setup ” “Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:100.0) Gecko/20100101 Firefox/100.0”
workstation ip addr - - [28/May/2022:00:40:15 +0000] “POST /setup/check_mail HTTP/1.1” 200 2143 “https://invoice.local/setup ” “Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:100.0) Gecko/20100101 Firefox/100.0”
workstation ip addr - - [28/May/2022:00:40:34 +0000] “GET /images/emails/forum.png HTTP/1.1” 200 3721 “-” “Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:100.0) Gecko/20100101 Firefox/100.0”
workstation ip addr - - [28/May/2022:00:40:34 +0000] “GET /images/emails/email.png HTTP/1.1” 200 4828 “-” “Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:100.0) Gecko/20100101 Firefox/100.0”
workstation ip addr - - [28/May/2022:00:40:34 +0000] “GET /images/emails/slack.png HTTP/1.1” 200 5745 “-” “Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:100.0) Gecko/20100101 Firefox/100.0”
workstation ip addr - - [28/May/2022:00:43:55 +0000] “POST /setup/check_mail HTTP/1.1” 200 2143 “https://invoice.local/setup ” “Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:100.0) Gecko/20100101 Firefox/100.0”
workstation ip addr - - [28/May/2022:00:44:22 +0000] “POST /setup/check_mail HTTP/1.1” 200 2143 “https://invoice.local/setup ” “Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:100.0) Gecko/20100101 Firefox/100.0”
workstation ip addr - - [28/May/2022:00:46:26 +0000] “POST /setup/check_mail HTTP/1.1” 200 2143 “https://invoice.local/setup ” “Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:100.0) Gecko/20100101 Firefox/100.0”
workstation ip addr - - [28/May/2022:00:47:26 +0000] “POST /setup/check_mail HTTP/1.1” 200 2143 “https://invoice.local/setup ” “Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:100.0) Gecko/20100101 Firefox/100.0”
workstation ip addr - - [28/May/2022:00:47:32 +0000] “POST /setup HTTP/1.1” 302 2547 “https://invoice.local/setup ” “Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:100.0) Gecko/20100101 Firefox/100.0”
workstation ip addr - - [28/May/2022:00:47:32 +0000] “GET /setup HTTP/1.1” 302 1985 “https://invoice.local/setup ” “Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:100.0) Gecko/20100101 Firefox/100.0”
workstation ip addr - - [28/May/2022:00:47:32 +0000] “GET / HTTP/1.1” 500 6747 “https://invoice.local/setup ” “Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:100.0) Gecko/20100101 Firefox/100.0”
workstation ip addr - - [28/May/2022:00:47:33 +0000] “GET /js/app.js?id=0e3959ab851d3350364d HTTP/1.1” 200 11395 “https://invoice.local/ ” “Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:100.0) Gecko/20100101 Firefox/100.0”
workstation ip addr - - [28/May/2022:00:47:33 +0000] “GET /css/app.css?id=1347051cc03a8dd2a17c HTTP/1.1” 200 8371 “https://invoice.local/ ” “Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:100.0) Gecko/20100101 Firefox/100.0”
workstation ip addr - - [28/May/2022:00:47:33 +0000] “GET /images/client-portal-new-image.jpg HTTP/1.1” 200 639279 “https://invoice.local/ ” “Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:100.0) Gecko/20100101 Firefox/100.0”
10.254.254.185 - - [28/May/2022:00:47:33 +0000] “GET /vendor/livewire/livewire.js?id=940557fc56b15ccb9a2d HTTP/1.1” 200 42450 “https://invoice.local/ ” “Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:100.0) Gecko/20100101 Firefox/100.0”
workstation ip addr - - [28/May/2022:00:48:42 +0000] “GET /setup HTTP/1.1” 302 2517 “-” “Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:100.0) Gecko/20100101 Firefox/100.0”
workstation ip addr - - [28/May/2022:00:48:42 +0000] “GET / HTTP/1.1” 500 6747 “-” “Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:100.0) Gecko/20100101 Firefox/100.0”
workstation ip addr - - [28/May/2022:00:49:21 +0000] “GET / HTTP/1.1” 500 7278 “-” “Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:100.0) Gecko/20100101 Firefox/100.0”
workstation ip addr - - [28/May/2022:00:49:36 +0000] “GET /client HTTP/1.1” 200 4375 “https://invoice.local/ ” “Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:100.0) Gecko/20100101 Firefox/100.0”
workstation ip addr - - [28/May/2022:00:49:36 +0000] “GET /images/invoiceninja-black-logo-2.png HTTP/1.1” 200 23835 “https://invoice.local/client ” “Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:100.0) Gecko/20100101 Firefox/100.0”
workstation ip addr - - [28/May/2022:00:50:03 +0000] “POST /client/login HTTP/1.1” 500 7289 “https://invoice.local/client ” “Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:100.0) Gecko/20100101 Firefox/100.0”
workstation ip addr - - [28/May/2022:00:50:13 +0000] “GET /client HTTP/1.1” 200 4375 “https://invoice.local/client/login ” “Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:100.0) Gecko/20100101 Firefox/100.0”
workstation ip addr - - [28/May/2022:00:51:29 +0000] “POST /client/login HTTP/1.1” 500 7289 “https://invoice.local/client ” “Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:100.0) Gecko/20100101 Firefox/100.0”
invoiceninja.error.log
[Sat May 28 00:03:32.720690 2022] [ssl:warn] [pid 4883] AH01906: invoice.local:443:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Sat May 28 00:04:49.343609 2022] [ssl:warn] [pid 636] AH01906: invoice.local:443:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Sat May 28 00:04:49.397646 2022] [ssl:warn] [pid 637] AH01906: invoice.local:443:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Sat May 28 00:14:44.587594 2022] [ssl:warn] [pid 637] AH01906: invoice.local:443:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Sat May 28 00:20:13.353636 2022] [ssl:warn] [pid 637] AH01906: invoice.local:443:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
Sort of at a loss would really appreciate some directional guidance …
Have you checked the app logs in storage/logs?
@david any thoughts?
Hi Hillel,
Happy to report I got it working, When I first installed the app I tried going down the certbot way but when it insisted on a FQDN and demanded that I open holes in my firewall I decided to go down the self signing path. I turns out that there was some leftover config left which I removed and then re-installed Ninja V5 … btw I picked it up because certbot was logging an error log …
Anyhow the next challenge is that email is not working …
I checked all the usual bits … in the .env
QUEUE_CONNECTION=sync
MAIL_MAILER=“smtp”
MAIL_HOST=“valid.email.host.address”
MAIL_PORT=“465”
MAIL_USERNAME=“[email protected] ”
MAIL_PASSWORD=“the_right_password”
MAIL_ENCRYPTION=“ssl”
MAIL_FROM_ADDRESS=“[email protected] ”
MAIL_FROM_NAME=“Service at MyBussiness”
It does give me an error warning at the bottom left of the screen
“The crons needs to be enabled”
Is this a reference that an automated script isn’t running?
If it is how do I enable it ?
must admit this self hosting is an adventure …
GV
hillel
May 29, 2022, 8:18am
11
checked out those links suggested i run
"sudo php artisan optmize"
I get this answer
"Could not open input file: artisan"
running ‘php -v’ results in
PHP 8.1.2 (cli) (built: Apr 7 2022 17:46:26) (NTS) Copyright (c) The PHP Group Zend Engine v4.1.2, Copyright (c) Zend Technologies with Zend OPcache v8.1.2, Copyright (c), by Zend Technologies
hmmm…
hillel
May 29, 2022, 10:50am
13
Are you running the command from the root folder of the app code?
oops … big red face … was in the wrong directory …