Leantime install

hi, i am trying to get this project managment software running, but got some kind of issue somewhere ^^ maybe some1 can spot it…
according to their very detailed docs i just would need to go to domain.org/install to finish the rest of the config through the web ui
https://docs.leantime.io/#/installation/quick-installation

so i just get a blank page and cant reach the website. but i do see the right ssl cert, and can reach the destination, its just blank(saw the dir structur at one point playing around with vhost settings). the leantime docs say served stuff is inside public/ - should my vhost doc root also point to that subdir?

thats what i did so far:

## apache
* neth ui -> applications -> webserver -> virtual host
* create virtual host
    FQDN -> domain.org
    require SSL encrypted connection -> on
* copy web root path
    /var/lib/nethserver/vhost/960374bb5e54059/

### pkg
    cd /tmp
    wget https://leantime.io/download?wpdmdl=7413 -O leantime.zip
    unzip leantime.zip -d /var/lib/nethserver/vhost/960374bb5e54059/
    rm leantime.zip
    
    chown -R apache:apache /var/lib/nethserver/vhost/960374bb5e54059/
    chmod 755 -R /var/lib/nethserver/vhost/960374bb5e54059/
#### config    
    cd /var/lib/nethserver/vhost/960374bb5e54059/config
    cp configuration.sample.php configuration.php

#### rand security key
    head /dev/urandom | tr -dc A-Za-z0-9 | head -c 32 ; echo ''

    cp cp configuration.sample.php configuration.php
    vi configuration.php
    
    sitename: domain.com
    dbHost: localhost
    dbUser: leantime
    dbPass: SECRET
    dbDatabase: leantime
    seassion password -> rand security key

### create db
/opt/rh/rh-mariadb105/root/bin/mysql --socket="/var/run/rh-mariadb105-mariadb/nextcloud-mysql.sock"
create database leantime;
create user 'leantime'@'localhost' identified by 'keepass';
grant all privileges on leantime.* to 'leantime'@'localhost';
flush privileges;
exit

Hi @tmp501

I think your error lies here, in your using domain.org instead of eg leantime.domain.org for this application…

Domain.org is usually used by NethServer itself…

My 2 cents
Andy

1 Like

hey, yes i am using a subdomain. i have a cert for lean.domain.com. i had tested it before i downloaded the app by placing a index.html into that vhost dir and it worked. just tested the html again now - after the install and obviously now it isnt working :)… ill keep poking around

1 Like

You are using the nextcloud mariadb instance that is configured to only use sockets, there are no open network ports and leantime doesn’t provide socket configuration.

I recommend to use the mariadb103 module by @stephdl, it listens on 127.0.0.1:3313.

EDIT:

PHP8 is required for leantime, it need to be set it in the virtualhost config.

2 Likes

yes thanks for that! guess thats resolved cause now i see a db connection error


No database connection, check your database credentials in your configuration file.

looks good to me…

public $dbHost = ‘127.0.0.1’; //Database host
public $dbUser = ‘leantime’; //Database username
public $dbPassword = ‘keepass’; //Database password
public $dbDatabase = ‘leantime’; //Database name
public $dbPort = ‘3313’; //Database port

Did you create the db and user by using mysql103 ?

yeah, just wanted to add that that :slight_smile:


yum install nethserver-rh-mariadb103 --enablerepo=stephdl

mysql103
create database leantime;
create user 'leantime'@'localhost' identified by 'keepass';
grant all privileges on leantime.* to 'leantime'@'localhost';
flush privileges;
exit

Hm, it’s working here, I had the same database connection error before.

configuration.php:

    public $sitename = 'test.domain.local';
    ...
    /* Database */
    public $dbHost = '127.0.0.1';                         //Database host
    public $dbUser = 'leantime';                                  //Database username
    public $dbPassword = 'keepass';                              //Database password
    public $dbDatabase = 'leantime';                              //Database name
    public $dbPort = '3313';                              //Database port

Maybe refresh browser or restart httpd? Do you have IPv6 disabled?

1 Like

hmm, na its refusing. i didnt mess around with ipv6 stuff, where can i find that? maybe a reboot… ill investigate tomorrow. thanks for your help

ps.: but i never got to the installer… is it lean.domain.com/install or lean.domain.com/public/install

Then it shouldn’t be an issue.

If the reboot isn’t successful you may try to use the local network IP instead of 127.0.0.1.

no luck… restarted, rechecked configs, tried my local ip instead of 127.0.0.1. wondering why mysql103 is not showing up under services as the 105 does. but i suppose it is running…

MariaDB [(none)]> SELECT User, Host FROM mysql.user;
+------------+-----------+
| User       | Host      |
+------------+-----------+
| root       | 127.0.0.1 |
| root       | ::1       |
| admin      | localhost |
| leantime   | localhost |
| phpmyadmin | localhost |
| root       | localhost |
+------------+-----------+
6 rows in set (0.000 sec)

mariadb103 logs

2022-10-23  9:00:32 0 [Note] InnoDB: Using Linux native AIO
2022-10-23  9:00:32 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2022-10-23  9:00:32 0 [Note] InnoDB: Uses event mutexes
2022-10-23  9:00:32 0 [Note] InnoDB: Compressed tables use zlib 1.2.7
2022-10-23  9:00:32 0 [Note] InnoDB: Number of pools: 1
2022-10-23  9:00:32 0 [Note] InnoDB: Using SSE2 crc32 instructions
2022-10-23  9:00:32 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2022-10-23  9:00:32 0 [Note] InnoDB: Completed initialization of buffer pool
2022-10-23  9:00:32 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2022-10-23  9:00:32 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
2022-10-23  9:00:32 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2022-10-23  9:00:32 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2022-10-23  9:00:32 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2022-10-23  9:00:32 0 [Note] InnoDB: Waiting for purge to start
2022-10-23  9:00:32 0 [Note] InnoDB: 10.3.35 started; log sequence number 1625470; transaction id 20
2022-10-23  9:00:32 0 [Note] InnoDB: Loading buffer pool(s) from /var/opt/rh/rh-mariadb103/lib/mysql/ib_buffer_pool
2022-10-23  9:00:32 0 [Note] InnoDB: Buffer pool(s) load completed at 221023  9:00:32
2022-10-23  9:00:32 0 [Note] Plugin 'FEEDBACK' is disabled.
2022-10-23  9:00:32 0 [Note] Server socket created on IP: '::'.
2022-10-23  9:00:32 0 [Note] Reading of all Master_info entries succeeded
2022-10-23  9:00:32 0 [Note] Added new Master_info '' to hash table
2022-10-23  9:00:32 0 [Note] /opt/rh/rh-mariadb103/root/usr/libexec/mysqld: ready for connections.
Version: '10.3.35-MariaDB'  socket: '/var/lib/rh-mariadb103/mariadb.sock'  port: 3313  MariaDB Server
config show rh-mariadb103-mariadb 
rh-mariadb103-mariadb=configuration
    LocalNetworkingOnly=no
    MaxAllowedPacket=16M
    TCPPort=3313
    access=private
    status=enabled

Can you login to the leantime DB with user leantime in cli?

if thats the right way of doing that… then yes.

mysql103 -u leantime -p
Enter password: 
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 12
Server version: 10.3.35-MariaDB MariaDB Server

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| leantime           |
+--------------------+
2 rows in set (0.002 sec)

shouldnt that also work?

mysql103 -u leantime -h 127.0.0.1 -p
Enter password: 
ERROR 1045 (28000): Access denied for user 'leantime'@'localhost' (using password: YES)

i briefly tried phpmyadmin which i didnt need and uninstalled it. was wondering if it left some config files behind cause i see a phpmyadmin db

thats what i see in the browser console… not sure why it is printing stuff bout funkwhale stuff ^^

Failed to register a ServiceWorker: The path of the provided scope ‘https://funk.domain.com/’ is not under the max scope allowed ‘/front/’. Adjust the scope, move the Service Worker script, or use the Service-Worker-Allowed HTTP header to allow the scope.

Maybe the funkwhale apache configuration makes problems? You could rename/move the funkwhale apache .conf files and restart httpd to check if leantime is working without the funkwhale config.

1 Like

browser console: mhh. nope… i checked the console in chromium and that is blank, maybe firefox was giving me feedback on all open tabs or something.

leantime config db ip: tried 127.0.0.1 and my local one 192.168.1.1

what works:

  • reaching a dummy index.html with the right ssl cert placed in vhost/public dir
  • mariadb103
systemctl -l status rh-mariadb103-mariadb
● rh-mariadb103-mariadb.service - MariaDB 10.3 database server
   Loaded: loaded (/etc/systemd/system/rh-mariadb103-mariadb.service; enabled; vendor preset: disabled)
   Active: active (running) since Sun 2022-10-23 18:52:18 CEST; 14h ago
     Docs: man:mysqld(8)
           https://mariadb.com/kb/en/library/systemd/
 Main PID: 32063 (mysqld)
   Status: "Taking your SQL requests now..."
    Tasks: 30
   Memory: 72.4M
   CGroup: /system.slice/rh-mariadb103-mariadb.service
           └─32063 /opt/rh/rh-mariadb103/root/usr/libexec/mysqld --basedir=/opt/rh/rh-mariadb103/root/usr

Oct 23 18:52:17 tank.domain.com systemd[1]: Starting MariaDB 10.3 database server...
Oct 23 18:52:17 tank.domain.com scl[32019]: Database MariaDB is probably initialized in /var/opt/rh/rh-mariadb103/lib/mysql already, nothing is done.
Oct 23 18:52:17 tank.domain.com scl[32019]: If this is not the case, make sure the /var/opt/rh/rh-mariadb103/lib/mysql is empty before running mysql-prepare-db-dir.
Oct 23 18:52:18 tank.domain.com mysqld-scl-helper[32063]: 2022-10-23 18:52:18 0 [Note] /opt/rh/rh-mariadb103/root/usr/libexec/mysqld (mysqld 10.3.35-MariaDB) starting as process 32063 ...
Oct 23 18:52:18 tank.domain.com mysqld-scl-helper[32063]: 2022-10-23 18:52:18 0 [Warning] Could not increase number of max_open_files to more than 1024 (request: 32186)
Oct 23 18:52:18 tank.domain.com mysqld-scl-helper[32063]: 2022-10-23 18:52:18 0 [Warning] Changed limits: max_open_files: 1024  max_connections: 151 (was 151)  table_cache: 421 (was 2000)
Oct 23 18:52:18 tank.domain.com systemd[1]: Started MariaDB 10.3 database server.
mysql103
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 8
Server version: 10.3.35-MariaDB MariaDB Server

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| leantime           |
| mysql              |
| performance_schema |
| phpmyadmin         |
+--------------------+
5 rows in set (0.011 sec)

MariaDB [(none)]> SELECT User, Host FROM mysql.user;
+------------+-----------+
| User       | Host      |
+------------+-----------+
| root       | 127.0.0.1 |
| root       | ::1       |
| admin      | localhost |
| leantime   | localhost |
| phpmyadmin | localhost |
| root       | localhost |
+------------+-----------+
6 rows in set (0.002 sec)

MariaDB [(none)]> SHOW GRANTS FOR leantime@localhost;
+-----------------------------------------------------------------------------------------------------------------+
| Grants for leantime@localhost                                                                                   |
+-----------------------------------------------------------------------------------------------------------------+
| GRANT USAGE ON *.* TO `leantime`@`localhost` IDENTIFIED BY PASSWORD '*8DECC4B56279D57A5F513FFB14EBD453434BA8D1' |
| GRANT ALL PRIVILEGES ON `leantime`.* TO `leantime`@`localhost`                                                  |
+-----------------------------------------------------------------------------------------------------------------+
2 rows in set (0.002 sec)

current install steps:

## apache virtual host
* neth ui -> applications -> webserver -> virtual host
* create virtual host
    FQDN -> lean.domain.org
    require SSL encrypted connection -> on
    Version of PHP -> 8.0
* copy web root path
    /var/lib/nethserver/vhost/960374bb5e54059/

### pkg
    cd /tmp
    wget https://leantime.io/download?wpdmdl=7413 -O leantime.zip
    unzip leantime.zip -d /var/lib/nethserver/vhost/960374bb5e54059/
    rm leantime.zip
    
#### config    
    cd /var/lib/nethserver/vhost/960374bb5e54059/config
    cp configuration.sample.php configuration.php

    chown -R apache:apache /var/lib/nethserver/vhost/960374bb5e54059/
    chmod 755 -R /var/lib/nethserver/vhost/960374bb5e54059/

#### rand security key
    head /dev/urandom | tr -dc A-Za-z0-9 | head -c 32 ; echo ''

    vi /var/lib/nethserver/vhost/960374bb5e54059/config/configuration.php
    
    sitename: lean.domain.com
    timezone Europe/Berlin
    dbHost: 127.0.0.1
    dbUser: leantime
    dbPass: KeePass
    dbDatabase: leantime
    dbPort -> 3313
    seassion password -> rand security key

### create db
* https://wiki.nethserver.org/doku.php?id=mariadb103
yum install nethserver-rh-mariadb103 --enablerepo=stephdl

mysql103
create database leantime;
create user 'leantime'@'localhost' identified by 'keepass';
grant all privileges on leantime.* to 'leantime'@'localhost';

flush privileges;
exit

Does mariadb listen on the 3313 port?

[root@testserver2 ~]# netstat -tlpn | grep 3313
tcp6       0      0 :::3313                 :::*                    LISTEN      8386/mysqld
1 Like

:slight_smile:

netstat -tlpn | grep 3313
tcp6       0      0 :::3313                 :::*                    LISTEN      32063/mysqld

scrolled through leantimes forum… i made a dns entry for lean.domain.com… should it be a subdomain instead? dunno if thats related…
Installation on Shared Hosting · Discussion #674 · Leantime/leantime · GitHub

looks nifty, looks unlimited unlike opensnproject

yeah, tried both. openproject was too restritive. i need to keep todo’s and the timeline looser. ie. at what date do i arrive if i need to do xyz… was not too happy with all those freemium msg’s - rent it if u want feature X unlocked. besides… every seriuous software needs a true dark mode (pointing fingers at NS8)