1

Be warned this is sort of Docker related question too.

I try to build local development environment using Docker (nginx 1.16.1 + postgresql 12.1.0) running Craft 3.4.1. I've came up to a point where I run the setup wizard over browser. During the steps (connection to database is skipped) I fill the required fields and proceed to final "Next" button where the installation step begins.

Install failed 😞 Please check your logs for more info.

PHPerrors log shows:

An Error occurred while handling another error: PDOException: SQLSTATE[42P01]: Undefined table: 7 ERROR: relation "queue" does not exist ...

Web log shows:

There is a lot of it but it's about info table and to summarise to one general sentence I've picked this line

ERROR: relation "info" does not exist ...

What I'm able to:

  • I'm able to connect to database over docker CLI and PGadmin
  • I'm able to create database over docker CLI and PGadmin

What I'm not able to:

  • I'm not able to successfully run ./craft setup which reports back this failure SQLSTATE[08006] [7] could not translate host name "postgresql" to address: Name or service not known

Every image lives in it's own container and are connected over external network. If more info required I'd be happy to provide.

Is there anyone Who have experienced similar issue?

1 Answer 1

1

A compatibility issue with Craft 3.4.1 and maybe earlier. Running PostgreSQL12+ (PgSQL12+) couldn't finish Craft's installation setup.

I have no idea what change in PgSQL12+ could cause this behavior but downgrading PgSQL12 to lower versions like PostgreSQL11 worked as expected.

However Craft's docs states that PostgreSQL 9.5+ should meet Craft’s server requirements.

I can't take this for answer to my question because if this is an incompatibility issue than downgrading doesn't answer my question. I believe you guys get to it and crack it as always.

Anyway here are the logs when tried to run Craft with PgSQL12+.


Update

Running Craft 3.4.6 along with PostgreSQL 12.2 seems to remove the problem. I checked the CHANGELOG-v3 and I couldn't find anything related to PgSQL database.


Update

I decided to upgrade all underlying software that Craft depends on with higher security precautions in mind.

Recently I got into troubles when I couldn't finish installation on my setup -> NGINX, PHP-FPM, PostgreSQL and Redis. No matter what version I tried (now latest) I always got
ERROR: relation "info" does not exist ....
I even tried MySQL database. No luck.

I found the issue in my NGINX's nginx.conf file. The directives client_header_buffer_size and large_client_header_buffers. I went with lowest sizes possible to avoid avoidable. And that was my problem why I couldn't finish my Craft's installation. Craft (v3.x+) writes longer cookies with POST request and it couldn't fit into buffer size set in nginx.conf file

My setup was:

client_header_buffer_size 1k;
large_client_header_buffers 1 2k;

now

client_header_buffer_size 2k;
large_client_header_buffers 4 8k;

with security in mind. Tweak it according to your project's needs.

And the reason why I couldn't find out right away was that I run my local website with locally SSL installed and for some reason “Request Entity Too Large” (413) wasn't showing up in my console. Good thing was that from my last effort I switched SSL off and the error showed up. From there it was easy to fix that.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.