starting postgresql

This is what I did:

systemctl status postgresql
**●** postgresql.service - PostgreSQL database server
   Loaded: loaded (/usr/lib/systemd/system/postgresql.service; disabled; vendor preset: disa>
   Active: **failed** (Result: exit-code) since Sat 2018-12-29 13:32:02 EST; 3h 59min ago

Dec 29 13:32:02 linux-s6kv systemd[1]: Starting PostgreSQL database server...
Dec 29 13:32:02 linux-s6kv postgresql-script[1646]: postgres: could not access the server co>
Dec 29 13:32:02 linux-s6kv postgresql-script[1646]: pg_ctl: could not start server
Dec 29 13:32:02 linux-s6kv postgresql-script[1646]: Examine the log output.
Dec 29 13:32:02 linux-s6kv systemd[1]: **postgresql.service: Control process exited, code=exit**>
Dec 29 13:32:02 linux-s6kv systemd[1]: **postgresql.service: Failed with result 'exit-code'.**
Dec 29 13:32:02 linux-s6kv systemd[1]: **Failed to start PostgreSQL database server.**


systemctl enable postgresql
Created symlink /etc/systemd/system/multi-user.target.wants/postgresql.service → /usr/lib/sys
temd/system/postgresql.service.

systemctl start postgresql
Job for postgresql.service failed because the control process exited with error code.
See "systemctl status postgresql.service" and "journalctl -xe" for details.


Any ideas?

How did you install postgresql ? No issues here in startinig the service.

 zypper in -f postgresql10 postgresql10-docs postgresql10-test  


Try


zypper in postgresql

then retry starting the service,

On Sat, 29 Dec 2018 22:36:03 +0000, ultra99 wrote:

> Code: --------------------
> systemctl start postgresql
> Job for postgresql.service failed because the control process exited
> with error code.
> See “systemctl status postgresql.service” and “journalctl -xe” for
> details.
>
>
> --------------------
>
>
> Any ideas?

What do you see when you execute the recommended command to get the
details?

Jim


Jim Henderson
openSUSE Forums Administrator
Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C

zypper in postgresql
Loading repository data...
Reading installed packages...
'postgresql' is already installed.
No update candidate for 'postgresql-10-4.2.noarch'. The highest available version is already 
installed.
Resolving package dependencies...

Nothing to do.


journalctl -xe
Dec 29 20:26:30 linux-s6kv plasmashell[2024]: **qt.qpa.xcb: QXcbConnection: XCB error: 2 (BadV**>
Dec 29 20:26:31 linux-s6kv plasmashell[2024]: **qt.qpa.xcb: QXcbConnection: XCB error: 2 (BadV**>
Dec 29 20:26:38 linux-s6kv systemd[1]: Starting PostgreSQL database server...
-- Subject: Unit postgresql.service has begun start-up
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
--  
-- Unit postgresql.service has begun starting up.
Dec 29 20:26:38 linux-s6kv postgresql-script[12965]: postgres: could not access the server c>
Dec 29 20:26:38 linux-s6kv postgresql-script[12965]: pg_ctl: could not start server
Dec 29 20:26:38 linux-s6kv postgresql-script[12965]: Examine the log output.
Dec 29 20:26:38 linux-s6kv systemd[1]: **postgresql.service: Control process exited, code=exit**>
Dec 29 20:26:38 linux-s6kv systemd[1]: **postgresql.service: Failed with result 'exit-code'.**
Dec 29 20:26:38 linux-s6kv systemd[1]: **Failed to start PostgreSQL database server.**
-- Subject: Unit postgresql.service has failed
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
--  
-- Unit postgresql.service has failed.
--  
-- The result is RESULT.


systemctl status postgresql.service  
**●** postgresql.service - PostgreSQL database server
   Loaded: loaded (/usr/lib/systemd/system/postgresql.service; enabled; vendor preset: disab>
   Active: **failed** (Result: exit-code) since Sat 2018-12-29 20:29:58 EST; 21s ago
  Process: 13055 ExecStart=/usr/share/postgresql/postgresql-script start **(code=exited, statu**>

Dec 29 20:29:58 linux-s6kv systemd[1]: Starting PostgreSQL database server...
Dec 29 20:29:58 linux-s6kv postgresql-script[13055]: postgres: could not access the server c>
Dec 29 20:29:58 linux-s6kv postgresql-script[13055]: pg_ctl: could not start server
Dec 29 20:29:58 linux-s6kv postgresql-script[13055]: Examine the log output.
Dec 29 20:29:58 linux-s6kv systemd[1]: **postgresql.service: Control process exited, code=exit**>
Dec 29 20:29:58 linux-s6kv systemd[1]: **postgresql.service: Failed with result 'exit-code'.**
Dec 29 20:29:58 linux-s6kv systemd[1]: **Failed to start PostgreSQL database server.**
lines 1-12/12 (END)


You don’t show us whether you’re invoking the commands as a user or as root.

all as root.

Is your system up to date?
Please update as root with su -l:

zypper dup

Show:

zypper se -si postgre

I have installed it here in a VBox:

tumbleweed:~ # zypper in -f postgresql10 postgresql10-docs postgresql10-test
Loading repository data...
Reading installed packages...
Forcing installation of 'postgresql10-10.5-1.5.x86_64' from repository 'OSS'.
Forcing installation of 'postgresql10-docs-10.5-1.5.noarch' from repository 'OSS'.
Forcing installation of 'postgresql10-test-10.5-1.5.x86_64' from repository 'OSS'.
Resolving package dependencies...

The following 8 NEW packages are going to be installed:
  postgresql postgresql-docs postgresql-server postgresql-test postgresql10 postgresql10-docs postgresql10-server postgresql10-test

The following 3 recommended packages were automatically selected:
  postgresql10 postgresql10-docs postgresql10-server

8 new packages to install.
Overall download size: 9.1 MiB. Already cached: 0 B. After the operation, additional 51.4 MiB will be used.
Continue? [y/n/...? shows all options] (y): 
Retrieving package postgresql-10-4.2.noarch                                                                                                                                  (1/8),  11.7 KiB (  713   B unpacked)
Retrieving: postgresql-10-4.2.noarch.rpm ...................................................................................................................................................................[done]
Retrieving package postgresql10-docs-10.5-1.5.noarch                                                                                                                         (2/8),   2.3 MiB ( 17.1 MiB unpacked)
Retrieving: postgresql10-docs-10.5-1.5.noarch.rpm ............................................................................................................................................[done (680.1 KiB/s)]
Retrieving package postgresql10-10.5-1.5.x86_64                                                                                                                              (3/8),   1.4 MiB (  6.2 MiB unpacked)
Retrieving: postgresql10-10.5-1.5.x86_64.rpm .................................................................................................................................................[done (664.2 KiB/s)]
Retrieving package postgresql-docs-10-4.2.noarch                                                                                                                             (4/8),  10.9 KiB (   83   B unpacked)
Retrieving: postgresql-docs-10-4.2.noarch.rpm ................................................................................................................................................[done (222.3 KiB/s)]
Retrieving package postgresql-server-10-4.2.noarch                                                                                                                           (5/8),  19.3 KiB (  4.5 KiB unpacked)
Retrieving: postgresql-server-10-4.2.noarch.rpm ............................................................................................................................................................[done]
Retrieving package postgresql10-server-10.5-1.5.x86_64                                                                                                                       (6/8),   4.2 MiB ( 18.9 MiB unpacked)
Retrieving: postgresql10-server-10.5-1.5.x86_64.rpm ..........................................................................................................................................[done (677.2 KiB/s)]
Retrieving package postgresql-test-10-4.2.noarch                                                                                                                             (7/8),  10.7 KiB (   83   B unpacked)
Retrieving: postgresql-test-10-4.2.noarch.rpm ..............................................................................................................................................................[done]
Retrieving package postgresql10-test-10.5-1.5.x86_64                                                                                                                         (8/8),   1.1 MiB (  9.3 MiB unpacked)
Retrieving: postgresql10-test-10.5-1.5.x86_64.rpm ............................................................................................................................................[done (648.7 KiB/s)]
Checking for file conflicts: ...............................................................................................................................................................................[done]
(1/8) Installing: postgresql-10-4.2.noarch .................................................................................................................................................................[done]
(2/8) Installing: postgresql10-docs-10.5-1.5.noarch ........................................................................................................................................................[done]
(3/8) Installing: postgresql10-10.5-1.5.x86_64 .............................................................................................................................................................[done]
(4/8) Installing: postgresql-docs-10-4.2.noarch ............................................................................................................................................................[done]
(5/8) Installing: postgresql-server-10-4.2.noarch ..........................................................................................................................................................[done]
Additional rpm output:
Updating /etc/sysconfig/postgresql ...


(6/8) Installing: postgresql10-server-10.5-1.5.x86_64 ......................................................................................................................................................[done]
(7/8) Installing: postgresql-test-10-4.2.noarch ............................................................................................................................................................[done]
(8/8) Installing: postgresql10-test-10.5-1.5.x86_64 ........................................................................................................................................................[done]
Executing %posttrans scripts ...............................................................................................................................................................................[done]
tumbleweed:~ # systemctl enable postgresql.service 
Created symlink /etc/systemd/system/multi-user.target.wants/postgresql.service → /usr/lib/systemd/system/postgresql.service.
tumbleweed:~ # systemctl start postgresql.service 
tumbleweed:~ # systemctl status postgresql.service 
● postgresql.service - PostgreSQL database server
   Loaded: loaded (/usr/lib/systemd/system/postgresql.service; enabled; vendor preset: disabled)
   Active: active (running) since Sun 2018-12-30 08:14:48 CET; 12s ago
  Process: 4897 ExecStart=/usr/share/postgresql/postgresql-script start (code=exited, status=0/SUCCESS)
 Main PID: 4922 (postgres)
    Tasks: 8 (limit: 4709)
   Memory: 118.6M
   CGroup: /system.slice/postgresql.service
           ├─4922 /usr/lib/postgresql10/bin/postgres -D /var/lib/pgsql/data
           ├─4923 postgres: logger process   
           ├─4925 postgres: checkpointer process   
           ├─4926 postgres: writer process   
           ├─4927 postgres: wal writer process   
           ├─4928 postgres: autovacuum launcher process   
           ├─4929 postgres: stats collector process   
           └─4930 postgres: bgworker: logical replication launcher   

Dec 30 08:14:12 tumbleweed systemd[1]: Starting PostgreSQL database server...
Dec 30 08:14:12 tumbleweed postgresql-script[4897]: Initializing PostgreSQL 10.5 at location /var/lib/pgsql/data
Dec 30 08:14:47 tumbleweed postgresql-script[4897]: 2018-12-30 08:14:47.803 CET   [4922]LOG:  listening on IPv4 address "127.0.0.1", port 5432
Dec 30 08:14:47 tumbleweed postgresql-script[4897]: 2018-12-30 08:14:47.803 CET   [4922]LOG:  could not bind IPv6 address "::1": Cannot assign requested address
Dec 30 08:14:47 tumbleweed postgresql-script[4897]: 2018-12-30 08:14:47.803 CET   [4922]HINT:  Is another postmaster already running on port 5432? If not, wait a few seconds and retry.
Dec 30 08:14:47 tumbleweed postgresql-script[4897]: 2018-12-30 08:14:47.878 CET   [4922]LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
Dec 30 08:14:47 tumbleweed postgresql-script[4897]: 2018-12-30 08:14:47.935 CET   [4922]LOG:  listening on Unix socket "/tmp/.s.PGSQL.5432"
Dec 30 08:14:47 tumbleweed postgresql-script[4897]: 2018-12-30 08:14:47.990 CET   [4922]LOG:  redirecting log output to logging collector process
Dec 30 08:14:47 tumbleweed postgresql-script[4897]: 2018-12-30 08:14:47.990 CET   [4922]HINT:  Future log output will appear in directory "log".
Dec 30 08:14:48 tumbleweed systemd[1]: Started PostgreSQL database server.
tumbleweed:~ # 

It’s up to date.

**linux-s6kv:~ #** zypper dup
Loading repository data...
Reading installed packages...
Warning: You are about to do a distribution upgrade with all enabled repositories. Make sure 
these repositories are compatible before you continue. See 'man zypper' for more information 
about this command.
Computing distribution upgrade...

Nothing to do.


**linux-s6kv:~ #** zypper se -si postgre
Loading repository data...
Reading installed packages...

S  | Name                | Type    | Version  | Arch   | Repository              
---+---------------------+---------+----------+--------+------------------------
i  | postgresql          | package | 10-4.2   | noarch | openSUSE-Tumbleweed-Oss
i  | postgresql-docs     | package | 10-4.2   | noarch | openSUSE-Tumbleweed-Oss
i  | postgresql-server   | package | 10-4.2   | noarch | openSUSE-Tumbleweed-Oss
i  | postgresql-test     | package | 10-4.2   | noarch | openSUSE-Tumbleweed-Oss
i+ | postgresql10        | package | 10.5-1.5 | x86_64 | openSUSE-Tumbleweed-Oss
i+ | postgresql10-docs   | package | 10.5-1.5 | noarch | openSUSE-Tumbleweed-Oss
i  | postgresql10-server | package | 10.5-1.5 | x86_64 | openSUSE-Tumbleweed-Oss
i+ | postgresql10-test   | package | 10.5-1.5 | x86_64 | openSUSE-Tumbleweed-Oss


Your output from terminal is cut.
Please increase the size of your terminal window and post:

systemctl restart postgresql.service
systemctl status postgresql.service
journalctl -xe
zypper lr -d

I was able to get the service running. Now, for pgadmin, I just:

zypper in pgadmin3

?

linux-l6qh:~ # zypper se pgadmin
Loading repository data...
Reading installed packages...

S | Name          | Summary                                                    | Type   
--+---------------+------------------------------------------------------------+--------
  | pgadmin3      | Management and Administration Tools for the PostgreSQL D-> | package
  | pgadmin3-lang | Translations for package pgadmin3                          | package
  | pgadmin4      | Management tool for PostgreSQL                             | package
  | pgadmin4-doc  | Documentation for pgAdmin4                                 | package
  | pgadmin4-web  | Web package for pgAdmin4                                   | package
  | phpPgAdmin    | Administration of PostgreSQL over the web                  | package

It would be nice if you let us know what exactly you did to get it working,

I formatted the SSD. I know it’s not the solution but my computer needed and format. :smiley:

so any suggestions on pgadmin?

New Problem, new thread.