Ubuntu Installation 20.04 New Install

Morning all,

I’ve tried a number of times to get this installed and it doesn’t matter which I follow I never even get to the point where I get the setup page to even load, has any one got a decent and recent how to guide which actually works… the developer really could do with updating the how to for Ubuntu with the correct steps

any help would be really appreciated

Alan

Hi,

Have you tried following this guide?

If you’re seeing any specific errors we can try to help.

Hey there, just re done again and im getting bad gateway 502 I assume this is permissions some where I’ve missed, where should I look

Alan

There should be more details about the 502 error in either the web server error logs or in storage/logs/

2022/11/22 13:07:39 [crit] 1084#1084: *4 connect() to unix:/run/php/php7.4-fpm.sock failed (2: No such file or directory) while connecting to upstream

that’s in ininja.error.log

If you’re using the latest version of the app PHP 8.1 is required.

@david do you have any thoughts?

Php8 is the installed PHP on this test environment, im wondering where its pulled 7.3 from

root@invoiceninja:/usr/share/nginx/invoiceninja# php -v
PHP 8.1.2-1ubuntu2.8 (cli) (built: Nov 2 2022 13:35:25) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.2, Copyright (c) Zend Technologies
with Zend OPcache v8.1.2-1ubuntu2.8, Copyright (c), by Zend Technologies
root@invoiceninja:/usr/share/nginx/invoiceninja#

Full Error:
2022/11/22 13:35:26 [crit] 1084#1084: *8 connect() to unix:/run/php/php7.4-fpm.sock failed (2: No such file or directory) while connecting to upstream, client: 81.152.212.172, server: invoiceninja.urban-automation.co.uk, request: “GET /setup HTTP/2.0”, upstream: “fastcgi://unix:/run/php/php7.4-fpm.sock:”, host: “invoiceninja.urban-automation.co.uk

check in your nginx configuration, most likely you are pointing to the 7.4 fpm socket in there.

Hey David,

Looks like I found the problem in invoiceninja.conf

       fastcgi_pass unix:/run/php/php7.3-fpm.sock;

changed to

       fastcgi_pass unix:/run/php/php-fpm.sock;

Seems to load the setup page now

thanks for your help

Alan

Hey There,

so I completed the setup and now I get internal server error 500 loads part of the page with the image on the left hand side and internal 500 server error on the right hand pane

Alan

Can you please check for any details about the error in storage/logs

Hi There,

weird it says the following

[2022-11-23 08:54:15] production.INFO: account table not found

Alan

It may help to run php artisan migrate to create the tables in the database

Hi There,

now I have this in the log

[2022-11-23 09:04:07] production.ERROR: Attempt to read property “key” on null {“exception”:"[object] (ErrorException(code: 0): Attempt to read property "key" on null at /usr/share/nginx/invoiceninja/app/Http/Middleware/ContactAccount.php:34)

Seems to be around this line of code

class ContactAccount
{
/**
* Handle an incoming request.
*
* @param Request $request
* @param Closure $next
* @return mixed
*/
public function handle($request, Closure $next)
{
if (! Ninja::isHosted()) {
$account = Account::first();

        session()->put('account_key', $account->key);
    }

    return $next($request);
}

}

Hi There,

So looks like the fix was the migrate function to create the tables and then run setup again, seems like were running now, again massive thanks for the replies… im sure ill let you know once I run into something else…

Alan

1 Like

Hi There,

do you know what this error is when trying to login via the IOS app

HandshakeException: Handshake error in client (OS Error:
CERTIFICATE_VERIFY_FAILED: application verification failure(handshake.cc:393))

Alan