invoiceninja / dockerfiles

Docker files for Invoice Ninja
https://hub.docker.com/r/invoiceninja/invoiceninja
GNU General Public License v2.0
411 stars 267 forks source link

Cannot connect to mainpage #430

Open vawaver opened 2 years ago

vawaver commented 2 years ago

What version of Invoice Ninja are you running? v5.0.30

What environment are you running? Docker

I started docker version but I am not able to connect to Invoiceninja mainpage on my localhost IP 192.168.1.35:9980 (I changed port)- Nginx - Bad gateway.

I checked logs in dockerfiles_app_1 and I see this `2022-02-02T08:48:04Z [INFO] [Entrypoint]: Initialising Invoice Ninja... Configuration cache cleared! Configuration cached successfully! Configuration cache cleared! Configuration cached successfully! Route cache cleared! Routes cached successfully! Files cached successfully! Migrating: 2014_10_13_000000_create_users_table

In Connection.php line 703:

SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'languages'
already exists (SQL: create table languages (id int unsigned not null a
uto_increment primary key, name varchar(191) not null, locale varchar(1
91) not null) default character set utf8mb4 collate 'utf8mb4_unicode_ci' en
gine = InnoDB)

In Connection.php line 492:

SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'languages'
already exists

2022-02-02T08:49:08Z [INFO] [Entrypoint]: Initialising Invoice Ninja... Configuration cache cleared! Configuration cached successfully! Configuration cache cleared! Configuration cached successfully! Route cache cleared! Routes cached successfully! Files cached successfully! Migrating: 2014_10_13_000000_create_users_table

In Connection.php line 703:

SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'languages'
already exists (SQL: create table languages (id int unsigned not null a
uto_increment primary key, name varchar(191) not null, locale varchar(1
91) not null) default character set utf8mb4 collate 'utf8mb4_unicode_ci' en
gine = InnoDB)

In Connection.php line 492:

SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'languages'
already exists

2022-02-02T08:50:11Z [INFO] [Entrypoint]: Initialising Invoice Ninja... Configuration cache cleared! Configuration cached successfully! Configuration cache cleared! Configuration cached successfully! Route cache cleared! Routes cached successfully! Files cached successfully! Migrating: 2014_10_13_000000_create_users_table

In Connection.php line 703:

SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'languages'
already exists (SQL: create table languages (id int unsigned not null a
uto_increment primary key, name varchar(191) not null, locale varchar(1
91) not null) default character set utf8mb4 collate 'utf8mb4_unicode_ci' en
gine = InnoDB)

In Connection.php line 492:

SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'languages'
already exists

2022-02-02T08:51:15Z [INFO] [Entrypoint]: Initialising Invoice Ninja... Configuration cache cleared! Configuration cached successfully! Configuration cache cleared! Configuration cached successfully! Route cache cleared! Routes cached successfully! Files cached successfully! Migrating: 2014_10_13_000000_create_users_table

In Connection.php line 703:

SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'languages'
already exists (SQL: create table languages (id int unsigned not null a
uto_increment primary key, name varchar(191) not null, locale varchar(1
91) not null) default character set utf8mb4 collate 'utf8mb4_unicode_ci' en
gine = InnoDB)

In Connection.php line 492:

SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'languages'
already exists

` How to fix it?

turbo124 commented 2 years ago

It looks like there is an issue with your database. The migrations are attempting to run again, but they have already been run. Something has happened to the state of your application?

vawaver commented 2 years ago

When I installed Invoiceninja first time, there was no problem. I was able to connect to the homepage with no problem. But after the update of docker, this issue starts. I am very unhappy because I do not how to resolve it.

vawaver commented 2 years ago

I found out that dockerfiles_server_1 contains some IP problem. My server runs on 192.168.1.35:9980 but it there is some reference on 192.168.1.23 (my client IP)

/docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration /docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/ /docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh 10-listen-on-ipv6-by-default.sh: info: Getting the checksum of /etc/nginx/conf.d/default.conf 10-listen-on-ipv6-by-default.sh: info: Enabled listen on IPv6 in /etc/nginx/conf.d/default.conf /docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh /docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh /docker-entrypoint.sh: Configuration complete; ready for start up 2022/02/03 09:51:19 [notice] 1#1: using the "epoll" event method 2022/02/03 09:51:19 [notice] 1#1: nginx/1.21.6 2022/02/03 09:51:19 [notice] 1#1: built by gcc 10.2.1 20210110 (Debian 10.2.1-6) 2022/02/03 09:51:19 [notice] 1#1: OS: Linux 5.4.0-97-generic 2022/02/03 09:51:19 [notice] 1#1: getrlimit(RLIMIT_NOFILE): 1048576:1048576 2022/02/03 09:51:19 [notice] 1#1: start worker processes 2022/02/03 09:51:19 [notice] 1#1: start worker process 31 2022/02/03 09:51:36 [error] 31#31: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.1.23, server: _, request: "GET / HTTP/1.1", upstream: "fastcgi://172.19.0.3:9000", host: "192.168.1.35:9980" 192.168.1.23 - - [03/Feb/2022:09:51:36 +0000] "GET / HTTP/1.1" 502 559 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.87 Safari/537.36" "-"

Any idea?