Results 1 to 23 of 23

Thread: postgresql-9.1 errors after installing a package

  1. #1

    postgresql-9.1 errors after installing a package

    I keep getting postgresql-9.1 errors towards the end of just about any installation. Is this something to be concerned about? Please see below:

    Setting up postgresql-9.1 (9.1.9-1) ...
    [....] Starting PostgreSQL 9.1 database server: main[....] The PostgreSQL server failed to start. Please check the log output: 2013-04-13 03:02:51 UTC LOG: could not create IPv6 socket: Permission denied 2013-04-13 03:02:51 UTC LOG: could not create IPv4 socket: Permission denied 2013-04-13 03:02:51 UTC WARNING: could not create listen socket for "localhost" 2013-04-13 03:02:51 UTC FATAL: could no[FAILate any TCP/IP sockets ... failed!
    failed!
    invoke-rc.d: initscript postgresql, action "start" failed.
    dpkg: error processing postgresql-9.1 (--configure):
    subprocess installed post-installation script returned error exit status 1
    Setting up less (444-4) ...
    Setting up bundler (1.1.4-6) ...
    Setting up liberror-perl (0.17-1) ...
    Setting up git-man (1:1.7.10.4-1+wheezy1) ...
    Setting up git (1:1.7.10.4-1+wheezy1) ...
    Setting up rubygems-integration (1.1) ...
    Setting up metasploit-framework (4.6.0-1-1kali1) ...
    Errors were encountered while processing:
    postgresql-9.1
    E: Sub-process /usr/bin/dpkg returned an error code (1)


    ---
    Setting up apache2 (2.2.22-13) ...
    Setting up libdpkg-perl (1.16.10) ...
    Setting up dpkg-dev (1.16.10) ...
    Setting up kali-menu (1.333) ...
    Processing triggers for menu ...
    Processing triggers for python-support ...
    Errors were encountered while processing:
    postgresql-9.1
    E: Sub-process /usr/bin/dpkg returned an error code (1)

  2. Quote Originally Posted by clearday View Post
    The PostgreSQL server failed to start. Please check the log output: 2013-04-13 03:02:51 UTC LOG: could not create IPv6 socket: Permission denied 2013-04-13 03:02:51
    Can you post the output of the log, should be in /var/log/ directory
    Fact, Science and the Pursuit of Knowledge. Working to secure your networks from threats; Outside and Within.

  3. #3
    Quote Originally Posted by charonsecurity View Post
    Can you post the output of the log, should be in /var/log/ directory
    Not sure which log you needed (couldn't find a UTC log). Attached are the syslog, postgre, messages log files.
    Attached Files Attached Files
    Last edited by clearday; 2013-04-13 at 13:09.

  4. hmm, it may be you are already using the port with another program, (Nexpose?). Try stopping the service and starting it manually.
    Code:
    service postgresql stop
    service postgresql start
    , let us know what that does.

    If that doesn't work, can you please tell us more about your setup, Which Kali version, type of install etc. Thanxs!
    Fact, Science and the Pursuit of Knowledge. Working to secure your networks from threats; Outside and Within.

  5. #5
    Quote Originally Posted by charonsecurity View Post
    hmm, it may be you are already using the port with another program, (Nexpose?). Try stopping the service and starting it manually.
    Code:
    service postgresql stop
    service postgresql start
    , let us know what that does.

    If that doesn't work, can you please tell us more about your setup, Which Kali version, type of install etc. Thanxs!
    Unfortunately, it didn't work. I have Kali 1.0, using Galaxy Note 10.1 image* installed in a Galaxy Note 2. Other than the annoying PostGreSql (used by Metasploit Framework) error, everything else seems to work fine. The error only presents itself when invoking the apt-get command (apt-get upgrade, apt-get install, apt-get autoremove).

    * http://docs.kali.org/armel-armhf/kal...on-galaxy-note

    I launch Kali via Linux Deploy. Then I either use SSH for command line or VNC to use the GUI.

  6. I apologize, I'm am not sure where the error is coming from at this point. Not to familiar with how Kali is working on devices like the Note 2 (Though I must admit, it is one beautiful piece of hardware) Hopefully, someone else can chime in to help out with this issue (if its not a bug - which it might be).
    Fact, Science and the Pursuit of Knowledge. Working to secure your networks from threats; Outside and Within.

  7. #7
    UPDATE: RESOLVED (HOPEFULLY)

    "----------------------------------------------------------------------
    (0000372) muts (administrator) - 2013-04-15 03:57
    http://bugs.kali.org/view.php?id=264#c372
    ----------------------------------------------------------------------
    This is not bug. Postgresql wont install in a Linux Deploy chroot without first
    whitelisting it in update-rc.d.

    Issue History
    Date Modified Username Field Change
    ================================================== ====================
    2013-04-14 11:51 clearday New Issue
    2013-04-14 11:51 clearday File Added: attachments.zip
    2013-04-15 03:57 muts Note Added: 0000372
    2013-04-15 03:57 muts Status new => closed
    ================================================== ===================="

  8. #8
    No problem. Thanks for trying.

    Quote Originally Posted by charonsecurity View Post
    I apologize, I'm am not sure where the error is coming from at this point. Not to familiar with how Kali is working on devices like the Note 2 (Though I must admit, it is one beautiful piece of hardware) Hopefully, someone else can chime in to help out with this issue (if its not a bug - which it might be).

  9. #9
    By the way, does anyone know how to whitelist postgresql in init.d?

    #!/bin/sh
    set -e

    ### BEGIN INIT INFO
    # Provides: postgresql
    # Required-Start: $local_fs $remote_fs $network $time
    # Required-Stop: $local_fs $remote_fs $network $time
    # Should-Start: $syslog
    # Should-Stop: $syslog
    # Default-Start: 2 3 4 5
    # Default-Stop: 0 1 6
    # Short-Description: PostgreSQL RDBMS server
    ### END INIT INFO

    # Setting environment variables for the postmaster here does not work; please
    # set them in /etc/postgresql/<version>/<cluster>/environment instead.

    [ -r /usr/share/postgresql-common/init.d-functions ] || exit 0

  10. I'm not sure as I've never ran into like this but maybe we can try:
    update-rc.d postgresql defaults
    or
    update-rc.d postgresql enable

    I'm learning this issue just as you are now. Let us know.
    Fact, Science and the Pursuit of Knowledge. Working to secure your networks from threats; Outside and Within.

  11. #11
    Quote Originally Posted by charonsecurity View Post
    I'm not sure as I've never ran into like this but maybe we can try:
    update-rc.d postgresql defaults
    or
    update-rc.d postgresql enable

    I'm learning this issue just as you are now. Let us know.
    Tried both commands, but no go. Here is the output:

    Setting up postgresql-common (134wheezy3) ...
    supported_versions: WARNING: Unknown Debian release: Kali Linux 1.0
    Starting PostgreSQL 9.1 database server: mainThe PostgreSQL server failed to start. Please check the log output: 2013-04-16 07:09:43 EDT LOG: could not create IPv6 socket: Permission denied 2013-04-16 07:09:43 EDT LOG: could not create IPv4 socket: Permission denied 2013-04-16 07:09:43 EDT WARNING: could not create listen socket for "localhost" 2013-04-16 07:09:43 EDT FATAL: could not create any TCP/IP sockets ... failed!
    failed!
    invoke-rc.d: initscript postgresql, action "start" failed.
    dpkg: error processing postgresql-common (--configure):
    subprocess installed post-installation script returned error exit status 1
    dpkg: dependency problems prevent configuration of postgresql-9.1:
    postgresql-9.1 depends on postgresql-common (>= 115~); however:
    Package postgresql-common is not configured yet.

    dpkg: error processing postgresql-9.1 (--configure):
    dependency problems - leaving unconfigured
    dpkg: dependency problems prevent configuration of postgresql:
    postgresql depends on postgresql-9.1; however:
    Package postgresql-9.1 is not configured yet.

    dpkg: error processing postgresql (--configure):
    dependency problems - leaving unconfigured
    Errors were encountered while processing:
    postgresql-common
    postgresql-9.1
    postgresql
    E: Sub-process /usr/bin/dpkg returned an error code (1)
    root@localhost:~#
    Last edited by clearday; 2013-04-16 at 11:20.

  12. #12
    Join Date
    2013-Apr
    Posts
    1
    I am having the same problem when i try to install postgresql, and
    Update-rc.d postgresql defaulta/enable
    Is not working too, some suggestion? About how to whitelisting it in update-rc.d. .???

  13. #13
    Join Date
    2013-Jun
    Posts
    1
    ok first you need to edit update-rc.d and add postgresql to whitelist and comment in blacklist
    nano /usr/sbin/update-rc.d
    # Blacklist
    # postgresql disabled (comment)

    #Whitelist
    postgresql enabled (add)
    -----
    than you need to grand permisson of postgresql
    usermod -a -G aid_inet postgres
    service postgresql start

    reboot kali

    than start apt-get update && apt-get upgrade
    than if you didn't install metasploit run apt-get install metasploit-framework

    enjoy

  14. #14
    Join Date
    2016-Mar
    Posts
    29
    I didn't understand your tried can u do more details.

  15. #15
    Join Date
    2016-Feb
    Posts
    116
    Dude, read one reply above yours... it's right there.

  16. #16
    Join Date
    2016-Mar
    Posts
    29
    I am not English so I didn't get it again sorry for that

  17. #17
    Join Date
    2016-Mar
    Posts
    29
    root@kali:~# service postgresql stop
    [ ok ] Stopping PostgreSQL 9.4 database server: main.
    root@kali:~# service postgresql start
    [....] Starting PostgreSQL 9.4 database server: main[....] The PostgreSQL server failed to start. Please check the log output: 2016-03-14 10:34:59 UTC [16509-1] FATAL: could not create shared memory segment: Function not implemented 2016-03-14 10:34:59 UTC [16509-2] DETAI[FAILiled system call was shmget(key=5432001, size=40, 03600). ... failed!
    failed!
    root@kali:~#

  18. #18
    Join Date
    2016-Mar
    Posts
    29
    I know that Postgresql won't work on a chroot environment without whitelisting it.
    But how I do that

  19. #19
    Join Date
    2016-Feb
    Posts
    116
    Like I said, one reply above yours.. you had the answer...

    Code:
    https://forums.kali.org/showthread.php?1950-postgresql-9-1-errors-after-installing-a-package&p=24551&viewfull=1#post24551

  20. #20
    Join Date
    2016-Mar
    Posts
    29
    never did figure out how to whitelist postgresql. You tried to help with updating update-rc.d. Muts never bothered to explain how to actually do to it.

  21. #21
    Join Date
    2016-Feb
    Posts
    116
    That's how you whitelist it.....

  22. #22
    Join Date
    2016-Mar
    Posts
    29
    I think that i got it now

  23. #23
    Join Date
    2016-Mar
    Posts
    29
    And thanks for your help.
    Last edited by root1234; 2016-04-02 at 01:42.

Similar Threads

  1. apt still shows errors after i install a package with dpkg
    By iLaurian in forum TroubleShooting Archive
    Replies: 0
    Last Post: 2021-10-30, 17:40
  2. Unable to locate package” errors for all software
    By aciang in forum Installing Archive
    Replies: 4
    Last Post: 2015-10-09, 13:27
  3. Metasploit package errors please help
    By Sly14Cat in forum General Archive
    Replies: 4
    Last Post: 2013-05-28, 13:34

Posting Permissions

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