Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

HDP sandbox on docker fails to start POSTGRES ERROR

Highlighted

HDP sandbox on docker fails to start POSTGRES ERROR

New Contributor

I have downloaded the shell script for linux

I have changes some ports on the outside (as I have already some services running on that docker host.

Now when I start the start script I get:

./start-sandbox-hdp-standalone_2-6-4-pcloud.sh Waiting for docker daemon to start up: 2.6.4: Pulling from hortonworks/sandbox-hdp-standalone Digest: sha256:d8591fdf9d082a0ba4aba2a0b1045b6599103b04e56ca9cfa241498f5166de00 Status: Image is up to date for hortonworks/sandbox-hdp-standalone:2.6.4 0eef99e55a827c56a6bababa92d11a3285ccfe2f7196ea5d749ce3de78d0a660 Starting mysqld: [ OK ]

Starting postgresql service: [FAILED]

Using python /usr/bin/python Starting ambari-server Ambari Server running with administrator privileges. Running initdb: This may take up to a minute. About to start PostgreSQL ERROR: Exiting with exit code 1. REASON: Unable to start PostgreSQL server. Status None. . Exiting Verifying Python version compatibility... Using python /usr/bin/python Checking for previously running Ambari Agent... Checking ambari-common dir... Starting ambari-agent Verifying ambari-agent process status... Ambari Agent successfully started Agent PID at: /var/run/ambari-agent/ambari-agent.pid Agent out at: /var/log/ambari-agent/ambari-agent.out Agent log at: /var/log/ambari-agent/ambari-agent.log Starting shellinaboxd: [ OK ] Starting tutorials... [ Ok ] Waiting for ambari agent to connect .....^C

I can login to the container, seems postgresql cannot start

[root@sandbox-hdp /]# service postgresql status

postmaster dead but pid file exists

pgstartup.log tells me there is something wrong with my SHMMAX parameters ...

[root@sandbox-hdp pgsql]# cat pgstartup.log The files belonging to this database system will be owned by user "postgres". This user must also own the server process. The database cluster will be initialized with locale en_US.UTF-8. The default database encoding has accordingly been set to UTF8. The default text search configuration will be set to "english". fixing permissions on existing directory /var/lib/pgsql/data ... ok creating subdirectories ... ok selecting default max_connections ... 100 selecting default shared_buffers ... 32MB creating configuration files ... ok creating template1 database in /var/lib/pgsql/data/base/1 ... ok initializing pg_authid ... ok initializing dependencies ... ok creating system views ... ok loading system objects' descriptions ... ok creating conversions ... ok creating dictionaries ... ok setting privileges on built-in objects ... ok creating information schema ... ok vacuuming database template1 ... ok copying template1 to template0 ... ok copying template1 to postgres ... ok Success. You can now start the database server using: /usr/bin/postgres -D /var/lib/pgsql/data or /usr/bin/pg_ctl -D /var/lib/pgsql/data -l logfile start LOG: could not bind IPv6 socket: Cannot assign requested address HINT: Is another postmaster already running on port 5432? If not, wait a few seconds and retry. FATAL: could not create shared memory segment: Invalid argument DETAIL: Failed system call was shmget(key=5432001, size=37879808, 03600). HINT: This error usually means that PostgreSQL's request for a shared memory segment exceeded your kernel's SHMMAX parameter. You can either reduce the request size or reconfigure the kernel with larger SHMMAX. To reduce the request size (currently 37879808 bytes), reduce PostgreSQL's shared_buffers parameter (currently 4096) and/or its max_connections parameter (currently 103). If the request size is already small, it's possible that it is less than your kernel's SHMMIN parameter, in which case raising the request size or reconfiguring SHMMIN is called for. The PostgreSQL documentation contains more information about shared memory configuration. FATAL: could not create shared memory segment: Invalid argument DETAIL: Failed system call was shmget(key=5432001, size=37879808, 03600). HINT: This error usually means that PostgreSQL's request for a shared memory segment exceeded your kernel's SHMMAX parameter. You can either reduce the request size or reconfigure the kernel with larger SHMMAX. To reduce the request size (currently 37879808 bytes), reduce PostgreSQL's shared_buffers parameter (currently 4096) and/or its max_connections parameter (currently 103). If the request size is already small, it's possible that it is less than your kernel's SHMMIN parameter, in which case raising the request size or reconfiguring SHMMIN is called for. The PostgreSQL documentation contains more information about shared memory configuration.

[root@sandbox-hdp pgsql]#

PLEASE ADVISE

2 REPLIES 2

Re: HDP sandbox on docker fails to start POSTGRES ERROR

Rising Star

@Hugo Koopmans

The two issues you mentioned don't seem related to each other. Can you try using the default script and see if it works?

Re: HDP sandbox on docker fails to start POSTGRES ERROR

New Contributor

well, postgres did not start out-of-the-box on my server ubuntu 14 24GB RAM.

after changing the postgress parameters max_connections to 50 and shared_buffers to 24Mb postgress started... now it all works fine

Don't have an account?
Coming from Hortonworks? Activate your account here