Page 1 of 3 123 LastLast
Results 1 to 10 of 26

Thread: LEAP 42.3 PostgreSQL reinstall

  1. #1

    Post LEAP 42.3 PostgreSQL reinstall

    Hi,

    I tried
    HTML Code:
    https://en.opensuse.org/SDB:PostgreSQL
    Code:
    systemctl start postgresql
    Result:
    Job for postgresql.service failed because the control process exited with error code. See "systemctl status postgresql.service" and "journalctl -xe" for details.


    Code:
    sudo systemctl status postgresql
    Result:

    [sudo] password for root:
    ● postgresql.service - PostgreSQL database server
    Loaded: loaded (/usr/lib/systemd/system/postgresql.service; enabled; vendor preset: disabled)
    Active: failed (Result: exit-code) since Wed 2018-03-07 16:57:37 +08; 20min ago
    Process: 24052 ExecStart=/usr/lib/postgresql-init start (code=exited, status=1/FAILURE)

    Mar 07 16:57:37 r3 systemd[1]: Starting PostgreSQL database server...
    Mar 07 16:57:37 r3 systemd[1]: postgresql.service: Control process exited, ...=1
    Mar 07 16:57:37 r3 systemd[1]: Failed to start PostgreSQL database server.
    Mar 07 16:57:37 r3 systemd[1]: postgresql.service: Unit entered failed state.
    Mar 07 16:57:37 r3 systemd[1]: postgresql.service: Failed with result 'exit...'.
    Mar 07 16:58:16 r3 systemd[1]: postgresql.service: Unit cannot be reloaded ...e.
    Hint: Some lines were ellipsized, use -l to show in full.
    postgres@r3:~>


    Since it is a new database, I am open to:
    a) Fixing from above
    b) deleting the old install and reinstalling again (actually this is what I tried and I ended with the above)

    Appreciate your help

  2. #2

    Default Re: LEAP 42.3 PostgreSQL reinstall

    Well, I have no knowledge about PostgreSQL (never used it), but the output you posted is basically useless as the actual error messages are truncated.

    Please run "sudo systemctl -l status postgresql" as instructed.
    Maybe this will give a better clue where the problem lies...

  3. #3
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    11,381
    Blog Entries
    2

    Default Re: LEAP 42.3 PostgreSQL reinstall

    First,
    The recommendation to install PostgreSQL from the special database repository is probably very old and unnecessary today... You should be able to find PostgreSQL in the OSS. Also, the SDB describes installing from teh Tumbleweed repo (A likely big no-no).

    So, my recommendation is to remove the repository, refresh your repositories and then do a "force re-install" of your PostgreSQL packages. The following compound command will do all that for you
    Code:
    zypper -n rr PostgreSQL && zypper ref && zypper -n in -f postgresql postgresql-server postgresql-contrib
    After that go ahead and try to start your database server
    Code:
    systemctl start postgresql
    My guess is the above should fix your problem.
    To my eye, everything else in the SDB looks OK (am not actually testing).

    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  4. #4

    Default Re: LEAP 42.3 PostgreSQL reinstall

    Hi,

    zypper -n rr PostgreSQL && zypper ref && zypper -n in -f postgresql postgresql-server postgresql-contrib
    Still doesn't work




    sudo systemctl -l status postgresql
    Result:

    ● postgresql.service - PostgreSQL database server
    Loaded: loaded (/usr/lib/systemd/system/postgresql.service; enabled; vendor preset: disabled)
    Active: failed (Result: exit-code) since Thu 2018-03-08 10:17:05 +08; 5min ago
    Process: 9061 ExecStart=/usr/lib/postgresql-init start (code=exited, status=1/FAILURE)

    Mar 08 10:17:05 r3 systemd[1]: Starting PostgreSQL database server...
    Mar 08 10:17:05 r3 systemd[1]: postgresql.service: Control process exited, code=exited status=1
    Mar 08 10:17:05 r3 systemd[1]: Failed to start PostgreSQL database server.
    Mar 08 10:17:05 r3 systemd[1]: postgresql.service: Unit entered failed state.
    Mar 08 10:17:05 r3 systemd[1]: postgresql.service: Failed with result 'exit-code'.

  5. #5

    Default Re: LEAP 42.3 PostgreSQL reinstall

    My bad, Does the following provide more info?

    For more details see su(1).
    r3:~ # psql
    psql: could not connect to server: No such file or directory
    Is the server running locally and accepting
    connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?

  6. #6

    Default Re: LEAP 42.3 PostgreSQL reinstall

    I apologise for another thread. I suppose purging postgresql might be the way:

    Code:
    apt-get --purge remove postgresql\*

    Result:

    Loading repository data...
    Reading installed packages...
    Resolving package dependencies...

    The following 12 packages are going to be REMOVED:
    postgresql postgresql-contrib postgresql-init postgresql-plpython
    postgresql-server postgresql94 postgresql94-contrib postgresql94-server
    postgresql96 postgresql96-contrib postgresql96-plpython postgresql96-server

    12 packages to remove.
    After the operation, 48.4 MiB will be freed.
    Continue? [y/n/...? shows all options] (y): y
    ( 1/12) Removing postgresql-9.6-1.1.noarch ...............................[done]
    ( 2/12) Removing postgresql-contrib-9.6-1.1.noarch .......................[done]
    ( 3/12) Removing postgresql-plpython-9.6-1.1.noarch ......................[done]
    ( 4/12) Removing postgresql-server-9.6-1.1.noarch ........................[done]
    ( 5/12) Removing postgresql94-contrib-9.4.15-15.1.x86_64 .................[done]
    ( 6/12) Removing postgresql96-contrib-9.6.7-12.1.x86_64 ..................[done]
    ( 7/12) Removing postgresql96-plpython-9.6.7-12.1.x86_64 .................[done]
    ( 8/12) Removing postgresql94-server-9.4.15-15.1.x86_64 ..................[done]
    ( 9/12) Removing postgresql96-server-9.6.7-12.1.x86_64 ...................[done]
    Additional rpm output:
    warning: directory /var/lib/pgsql: remove failed: Device or resource busy


    (10/12) Removing postgresql94-9.4.15-15.1.x86_64 .........................[done]
    (11/12) Removing postgresql96-9.6.7-12.1.x86_64 ..........................[done]
    (12/12) Removing postgresql-init-9.6-15.1.noarch .........................[done]
    Additional rpm output:
    Removed symlink /etc/systemd/system/multi-user.target.wants/postgresql.service.


    Seems like PGSQL is the recurring theme...

    Any Ideas?

  7. #7
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    11,381
    Blog Entries
    2

    Default Re: LEAP 42.3 PostgreSQL reinstall

    Is what you just posted from somewhere else on the Internet or on your system?
    Apt-get is not a command which should be executed on an openSUSE system.

    If you are running apt-get somehow on your system, then I don't know what to say and don't know what you did on your system.

    If you'd like to remove all psotgresql remnants from your system completely, this is my procedure...

    1. Remove all your postgresql packages
    Code:
    zypper rm "postgre*"
    2. install mlocate to be able to use the locate command
    Code:
    zypper in mlocate
    3. To run locate, you first need to update its index/database of files on your system (It updates automatically every 24 hrs, but we're not going to wait 24 hrs for first use)
    Code:
    updatedb
    4. Search for all files on your system with "postgr" in the name. Remove any of the results you wish.
    Code:
    locate postgr
    Your system should now be completely cleaned of any postresql related files you want removed, and can re-install <from the OSS>

    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  8. #8
    Join Date
    Jun 2008
    Location
    Groningen, Netherlands
    Posts
    19,983
    Blog Entries
    14

    Default Re: LEAP 42.3 PostgreSQL reinstall

    First: You must have installed apt-get manually since 'zypper' is the preferred packagemanager.
    Second: Do not treat your openSUSE system as if it is a Debian / *buntu system, take your time and learn about zypper.
    Third: I have been using PostgreSQL as a database for the Kontact suite, both on Leap 42.3 and TW, without any of these issues
    Fourth: Question: did you add extra repos? I've been horrified lately by the mess people can make of their packagecollection on *buntu when using the PPAs. Please show output of
    Code:
    zypper lr -d
    And #5: Why don't you use the stock PostgreSQL packages? Any reason for that?
    ° Appreciate my reply? Click the star and let me know why.

    ° Perfection is not gonna happen. No way.

    https://en.opensuse.org/openSUSE:Board#Members
    http://en.opensuse.org/User:Knurpht
    http://nl.opensuse.org/Gebruiker:Knurpht

  9. #9

    Default Re: LEAP 42.3 PostgreSQL reinstall

    Hi Tsu2, Knurpht,

    Thanks for your comments. I am very new to linux and Postgresql, so in the process of finding my way to daylight...

    [Is what you just posted from somewhere else on the Internet or on your system?
    It is from my own system but I got the command from the Internet

    Code:
    zypper rm "postgre*"
    Code:
    zypper in mlocate
    Code:
    updatedb
    Code:
    locate postgr
    Result:

    /root/anaconda3/pkgs/tk-8.6.7-h5979e9b_1/lib/tdbcpostgres1.0.5/tdbcpostgres.tcl
    /usr/lib/postgresql94
    /usr/lib/postgresql95
    /usr/lib/postgresql96
    /usr/lib64/tcl/tdbcpostgres1.0.5
    /usr/lib64/tcl/tdbcpostgres1.0.5/libtdbcpostgres1.0.5.so
    /usr/lib64/tcl/tdbcpostgres1.0.5/pkgIndex.tcl
    /usr/lib64/tcl/tdbcpostgres1.0.5/tdbcpostgres.tcl
    /usr/share/postgresql96
    /usr/share/augeas/lenses/dist/postgresql.aug
    /usr/share/man/mann/tdbc_postgres.n.gz
    /usr/share/postgresql96/pg_service.conf.sample
    /usr/share/susehelp/meta/Manuals/Productivity/postgresql-docs.desktop
    /usr/share/susehelp/meta/Manuals/Productivity/postgresql-tk.desktop
    /usr/share/susehelp/meta/Manuals/Productivity/postgresql.desktop
    /var/lib/pgsql/data/postgresql.auto.conf
    /var/lib/pgsql/data/postgresql.conf.old
    /var/lib/pgsql/data/pg_log/postgresql-2018-03-05_130554.log
    /var/lib/sudo/lectured/postgres

    I didn't copy the output for other log files like /var/lib/pgsql/data/pg_log/postgresql-2018-03-05_130554.log and other anaconda files to keep the message shorter.

    Code:
    zypper lr -d
    Output:

    Repository priorities are without effect. All enabled repositories share the same priority.

    # | Alias | Name | Enabled | GPG Check | Refresh | Priority | Type | URI | Service
    ---+-------------------------------------+-----------------------------------------+---------+-----------+---------+----------+--------+------------------------------------------------------------------------------------+--------
    1 | download.nvidia.com-leap | nVidia Graphics Drivers | Yes | (r ) Yes | Yes | 99 | rpm-md | https://download.nvidia.com/opensuse/leap/42.3 |
    2 | http-download.opensuse.org-9fcdf72e | openSUSE:Leap:42.3 | Yes | (r ) Yes | Yes | 99 | rpm-md | http://download.opensuse.org/reposit...42.3/standard/ |
    3 | openSUSE-Leap-42.3-0 | openSUSE-Leap-42.3-0 | No | ---- | ---- | 99 | yast2 | hd:///?device=/dev/disk/by-id/usb-SanDisk_Ultra_Fit_4C531001560725109115-0:0-part1 |
    4 | packman | packman | Yes | (r ) Yes | Yes | 99 | rpm-md | http://packman.inode.at/suse/openSUSE_Leap_42.3/ |
    5 | packman.inode.at-suse | Packman Repository | Yes | (r ) Yes | Yes | 99 | rpm-md | http://packman.inode.at/suse/openSUSE_Leap_42.3/ |
    6 | repo-debug | openSUSE-Leap-42.3-Debug | No | ---- | ---- | 99 | NONE | http://download.opensuse.org/debug/d...42.3/repo/oss/ |
    7 | repo-debug-non-oss | openSUSE-Leap-42.3-Debug-Non-Oss | No | ---- | ---- | 99 | NONE | http://download.opensuse.org/debug/d.../repo/non-oss/ |
    8 | repo-debug-update | openSUSE-Leap-42.3-Update-Debug | No | ---- | ---- | 99 | NONE | http://download.opensuse.org/debug/u...leap/42.3/oss/ |
    9 | repo-debug-update-non-oss | openSUSE-Leap-42.3-Update-Debug-Non-Oss | No | ---- | ---- | 99 | NONE | http://download.opensuse.org/debug/u.../42.3/non-oss/ |
    10 | repo-non-oss | openSUSE-Leap-42.3-Non-Oss | Yes | (r ) Yes | Yes | 99 | yast2 | http://download.opensuse.org/distrib.../repo/non-oss/ |
    11 | repo-oss | openSUSE-Leap-42.3-Oss | Yes | (r ) Yes | Yes | 99 | yast2 | http://download.opensuse.org/distrib...42.3/repo/oss/ |
    12 | repo-source | openSUSE-Leap-42.3-Source | No | ---- | ---- | 99 | NONE | http://download.opensuse.org/source/...42.3/repo/oss/ |
    13 | repo-source-non-oss | openSUSE-Leap-42.3-Source-Non-Oss | No | ---- | ---- | 99 | NONE | http://download.opensuse.org/source/.../repo/non-oss/ |
    14 | repo-update | openSUSE-Leap-42.3-Update | Yes | (r ) Yes | Yes | 99 | rpm-md | http://download.opensuse.org/update/leap/42.3/oss/ |
    15 | repo-update-non-oss | openSUSE-Leap-42.3-Update-Non-Oss | Yes | (r ) Yes | Yes | 99 | rpm-md | http://download.opensuse.org/update/leap/42.3/non-oss/ |

    Why don't you use the stock PostgreSQL packages? Any reason for that?
    Tried it initially but not too sure where I went wrong...

    Thanks again

  10. #10

    Default Re: LEAP 42.3 PostgreSQL reinstall

    Quote Originally Posted by Knurpht View Post
    First: You must have installed apt-get manually since 'zypper' is the preferred packagemanager.
    There is the package zypper-aptitude, which contains an "apt-get" as a wrapper for zypper.
    I do have it installed here without remembering to install it manually...

    It's just a shell script that runs zypper with appropriate arguments though.
    Last edited by wolfi323; 09-Mar-2018 at 00:54.

Page 1 of 3 123 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •