pgbouncer startup problem












1















I followed the steps from http://www.guguncube.com/1692/pgbouncer-installation-and-configuration-in-ubuntu for pgbouncer setup.



When I start pgbouncer, I get the error



Cannot open logfile: 'pgbouncer.log': Permission denied


Debug transcript:



rajavelu-1469@rajavelu-1469:/etc/pgbouncer$ pgbouncer -d -v pgbouncer.ini 
2014-12-29 15:39:31.045 18299 DEBUG parse_ini_file: [databases]
2014-12-29 15:39:31.045 18299 DEBUG parse_ini_file: '*' = 'host=localhost port=5432 user=$USER'
2014-12-29 15:39:31.045 18299 DEBUG parse_ini_file: '*' = 'host=localhost port=5432 user=$USER' ok:1
2014-12-29 15:39:31.045 18299 DEBUG parse_ini_file: [pgbouncer]
2014-12-29 15:39:31.046 18299 DEBUG parse_ini_file: 'listen_port' = '5433'
2014-12-29 15:39:31.046 18299 DEBUG parse_ini_file: 'listen_port' = '5433' ok:1
2014-12-29 15:39:31.046 18299 DEBUG parse_ini_file: 'listen_addr' = 'localhost'
2014-12-29 15:39:31.046 18299 DEBUG parse_ini_file: 'listen_addr' = 'localhost' ok:1
2014-12-29 15:39:31.046 18299 DEBUG parse_ini_file: 'auth_type' = 'any'
2014-12-29 15:39:31.046 18299 DEBUG parse_ini_file: 'auth_type' = 'any' ok:1
2014-12-29 15:39:31.046 18299 DEBUG parse_ini_file: 'logfile' = 'pgbouncer.log'
2014-12-29 15:39:31.046 18299 **FATAL Cannot open logfile: 'pgbouncer.log': Permission denied**


When I start pgbouncer with sudo I got the error



@src/main.c:736 in function main(): PgBouncer should not run as root".


Debug transcript:



rajavelu-1469@rajavelu-1469:/etc/pgbouncer$ sudo pgbouncer -d -v pgbouncer.ini 
2014-12-29 15:39:54.861 18302 DEBUG parse_ini_file: [databases]
2014-12-29 15:39:54.861 18302 DEBUG parse_ini_file: '*' = 'host=localhost port=5432 user=$USER'
2014-12-29 15:39:54.861 18302 DEBUG parse_ini_file: '*' = 'host=localhost port=5432 user=$USER' ok:1
2014-12-29 15:39:54.861 18302 DEBUG parse_ini_file: [pgbouncer]
2014-12-29 15:39:54.862 18302 DEBUG parse_ini_file: 'listen_port' = '5433'
2014-12-29 15:39:54.862 18302 DEBUG parse_ini_file: 'listen_port' = '5433' ok:1
2014-12-29 15:39:54.862 18302 DEBUG parse_ini_file: 'listen_addr' = 'localhost'
2014-12-29 15:39:54.862 18302 DEBUG parse_ini_file: 'listen_addr' = 'localhost' ok:1
2014-12-29 15:39:54.862 18302 DEBUG parse_ini_file: 'auth_type' = 'any'
2014-12-29 15:39:54.862 18302 DEBUG parse_ini_file: 'auth_type' = 'any' ok:1
2014-12-29 15:39:54.862 18302 DEBUG parse_ini_file: 'logfile' = 'pgbouncer.log'
2014-12-29 15:39:54.862 18302 DEBUG parse_ini_file: 'logfile' = 'pgbouncer.log' ok:1
2014-12-29 15:39:54.862 18302 DEBUG parse_ini_file: 'pidfile' = 'pgbouncer.pid'
2014-12-29 15:39:54.862 18302 DEBUG parse_ini_file: 'pidfile' = 'pgbouncer.pid' ok:1
2014-12-29 15:39:54.862 18302 **FATAL @src/main.c:736 in function main(): PgBouncer should not run as root**


My pgbouncer.ini file is:



[databases]
* = host=localhost port=5432 user=$USER
[pgbouncer]
listen_port = 5433
listen_addr = localhost
auth_type = any
logfile = pgbouncer.log
pidfile = pgbouncer.pid









share|improve this question
















bumped to the homepage by Community 1 hour ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
















  • Now, I downloaded source from pgfoundry.org

    – Raja
    Jan 8 '15 at 8:39











  • Pgbouncer started using the steps from michael.otacoo.com/postgresql-2/… . But when trying to connect as "psql -p 5433 postgres" met err: 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.5433"?

    – Raja
    Jan 8 '15 at 8:45


















1















I followed the steps from http://www.guguncube.com/1692/pgbouncer-installation-and-configuration-in-ubuntu for pgbouncer setup.



When I start pgbouncer, I get the error



Cannot open logfile: 'pgbouncer.log': Permission denied


Debug transcript:



rajavelu-1469@rajavelu-1469:/etc/pgbouncer$ pgbouncer -d -v pgbouncer.ini 
2014-12-29 15:39:31.045 18299 DEBUG parse_ini_file: [databases]
2014-12-29 15:39:31.045 18299 DEBUG parse_ini_file: '*' = 'host=localhost port=5432 user=$USER'
2014-12-29 15:39:31.045 18299 DEBUG parse_ini_file: '*' = 'host=localhost port=5432 user=$USER' ok:1
2014-12-29 15:39:31.045 18299 DEBUG parse_ini_file: [pgbouncer]
2014-12-29 15:39:31.046 18299 DEBUG parse_ini_file: 'listen_port' = '5433'
2014-12-29 15:39:31.046 18299 DEBUG parse_ini_file: 'listen_port' = '5433' ok:1
2014-12-29 15:39:31.046 18299 DEBUG parse_ini_file: 'listen_addr' = 'localhost'
2014-12-29 15:39:31.046 18299 DEBUG parse_ini_file: 'listen_addr' = 'localhost' ok:1
2014-12-29 15:39:31.046 18299 DEBUG parse_ini_file: 'auth_type' = 'any'
2014-12-29 15:39:31.046 18299 DEBUG parse_ini_file: 'auth_type' = 'any' ok:1
2014-12-29 15:39:31.046 18299 DEBUG parse_ini_file: 'logfile' = 'pgbouncer.log'
2014-12-29 15:39:31.046 18299 **FATAL Cannot open logfile: 'pgbouncer.log': Permission denied**


When I start pgbouncer with sudo I got the error



@src/main.c:736 in function main(): PgBouncer should not run as root".


Debug transcript:



rajavelu-1469@rajavelu-1469:/etc/pgbouncer$ sudo pgbouncer -d -v pgbouncer.ini 
2014-12-29 15:39:54.861 18302 DEBUG parse_ini_file: [databases]
2014-12-29 15:39:54.861 18302 DEBUG parse_ini_file: '*' = 'host=localhost port=5432 user=$USER'
2014-12-29 15:39:54.861 18302 DEBUG parse_ini_file: '*' = 'host=localhost port=5432 user=$USER' ok:1
2014-12-29 15:39:54.861 18302 DEBUG parse_ini_file: [pgbouncer]
2014-12-29 15:39:54.862 18302 DEBUG parse_ini_file: 'listen_port' = '5433'
2014-12-29 15:39:54.862 18302 DEBUG parse_ini_file: 'listen_port' = '5433' ok:1
2014-12-29 15:39:54.862 18302 DEBUG parse_ini_file: 'listen_addr' = 'localhost'
2014-12-29 15:39:54.862 18302 DEBUG parse_ini_file: 'listen_addr' = 'localhost' ok:1
2014-12-29 15:39:54.862 18302 DEBUG parse_ini_file: 'auth_type' = 'any'
2014-12-29 15:39:54.862 18302 DEBUG parse_ini_file: 'auth_type' = 'any' ok:1
2014-12-29 15:39:54.862 18302 DEBUG parse_ini_file: 'logfile' = 'pgbouncer.log'
2014-12-29 15:39:54.862 18302 DEBUG parse_ini_file: 'logfile' = 'pgbouncer.log' ok:1
2014-12-29 15:39:54.862 18302 DEBUG parse_ini_file: 'pidfile' = 'pgbouncer.pid'
2014-12-29 15:39:54.862 18302 DEBUG parse_ini_file: 'pidfile' = 'pgbouncer.pid' ok:1
2014-12-29 15:39:54.862 18302 **FATAL @src/main.c:736 in function main(): PgBouncer should not run as root**


My pgbouncer.ini file is:



[databases]
* = host=localhost port=5432 user=$USER
[pgbouncer]
listen_port = 5433
listen_addr = localhost
auth_type = any
logfile = pgbouncer.log
pidfile = pgbouncer.pid









share|improve this question
















bumped to the homepage by Community 1 hour ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
















  • Now, I downloaded source from pgfoundry.org

    – Raja
    Jan 8 '15 at 8:39











  • Pgbouncer started using the steps from michael.otacoo.com/postgresql-2/… . But when trying to connect as "psql -p 5433 postgres" met err: 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.5433"?

    – Raja
    Jan 8 '15 at 8:45
















1












1








1








I followed the steps from http://www.guguncube.com/1692/pgbouncer-installation-and-configuration-in-ubuntu for pgbouncer setup.



When I start pgbouncer, I get the error



Cannot open logfile: 'pgbouncer.log': Permission denied


Debug transcript:



rajavelu-1469@rajavelu-1469:/etc/pgbouncer$ pgbouncer -d -v pgbouncer.ini 
2014-12-29 15:39:31.045 18299 DEBUG parse_ini_file: [databases]
2014-12-29 15:39:31.045 18299 DEBUG parse_ini_file: '*' = 'host=localhost port=5432 user=$USER'
2014-12-29 15:39:31.045 18299 DEBUG parse_ini_file: '*' = 'host=localhost port=5432 user=$USER' ok:1
2014-12-29 15:39:31.045 18299 DEBUG parse_ini_file: [pgbouncer]
2014-12-29 15:39:31.046 18299 DEBUG parse_ini_file: 'listen_port' = '5433'
2014-12-29 15:39:31.046 18299 DEBUG parse_ini_file: 'listen_port' = '5433' ok:1
2014-12-29 15:39:31.046 18299 DEBUG parse_ini_file: 'listen_addr' = 'localhost'
2014-12-29 15:39:31.046 18299 DEBUG parse_ini_file: 'listen_addr' = 'localhost' ok:1
2014-12-29 15:39:31.046 18299 DEBUG parse_ini_file: 'auth_type' = 'any'
2014-12-29 15:39:31.046 18299 DEBUG parse_ini_file: 'auth_type' = 'any' ok:1
2014-12-29 15:39:31.046 18299 DEBUG parse_ini_file: 'logfile' = 'pgbouncer.log'
2014-12-29 15:39:31.046 18299 **FATAL Cannot open logfile: 'pgbouncer.log': Permission denied**


When I start pgbouncer with sudo I got the error



@src/main.c:736 in function main(): PgBouncer should not run as root".


Debug transcript:



rajavelu-1469@rajavelu-1469:/etc/pgbouncer$ sudo pgbouncer -d -v pgbouncer.ini 
2014-12-29 15:39:54.861 18302 DEBUG parse_ini_file: [databases]
2014-12-29 15:39:54.861 18302 DEBUG parse_ini_file: '*' = 'host=localhost port=5432 user=$USER'
2014-12-29 15:39:54.861 18302 DEBUG parse_ini_file: '*' = 'host=localhost port=5432 user=$USER' ok:1
2014-12-29 15:39:54.861 18302 DEBUG parse_ini_file: [pgbouncer]
2014-12-29 15:39:54.862 18302 DEBUG parse_ini_file: 'listen_port' = '5433'
2014-12-29 15:39:54.862 18302 DEBUG parse_ini_file: 'listen_port' = '5433' ok:1
2014-12-29 15:39:54.862 18302 DEBUG parse_ini_file: 'listen_addr' = 'localhost'
2014-12-29 15:39:54.862 18302 DEBUG parse_ini_file: 'listen_addr' = 'localhost' ok:1
2014-12-29 15:39:54.862 18302 DEBUG parse_ini_file: 'auth_type' = 'any'
2014-12-29 15:39:54.862 18302 DEBUG parse_ini_file: 'auth_type' = 'any' ok:1
2014-12-29 15:39:54.862 18302 DEBUG parse_ini_file: 'logfile' = 'pgbouncer.log'
2014-12-29 15:39:54.862 18302 DEBUG parse_ini_file: 'logfile' = 'pgbouncer.log' ok:1
2014-12-29 15:39:54.862 18302 DEBUG parse_ini_file: 'pidfile' = 'pgbouncer.pid'
2014-12-29 15:39:54.862 18302 DEBUG parse_ini_file: 'pidfile' = 'pgbouncer.pid' ok:1
2014-12-29 15:39:54.862 18302 **FATAL @src/main.c:736 in function main(): PgBouncer should not run as root**


My pgbouncer.ini file is:



[databases]
* = host=localhost port=5432 user=$USER
[pgbouncer]
listen_port = 5433
listen_addr = localhost
auth_type = any
logfile = pgbouncer.log
pidfile = pgbouncer.pid









share|improve this question
















I followed the steps from http://www.guguncube.com/1692/pgbouncer-installation-and-configuration-in-ubuntu for pgbouncer setup.



When I start pgbouncer, I get the error



Cannot open logfile: 'pgbouncer.log': Permission denied


Debug transcript:



rajavelu-1469@rajavelu-1469:/etc/pgbouncer$ pgbouncer -d -v pgbouncer.ini 
2014-12-29 15:39:31.045 18299 DEBUG parse_ini_file: [databases]
2014-12-29 15:39:31.045 18299 DEBUG parse_ini_file: '*' = 'host=localhost port=5432 user=$USER'
2014-12-29 15:39:31.045 18299 DEBUG parse_ini_file: '*' = 'host=localhost port=5432 user=$USER' ok:1
2014-12-29 15:39:31.045 18299 DEBUG parse_ini_file: [pgbouncer]
2014-12-29 15:39:31.046 18299 DEBUG parse_ini_file: 'listen_port' = '5433'
2014-12-29 15:39:31.046 18299 DEBUG parse_ini_file: 'listen_port' = '5433' ok:1
2014-12-29 15:39:31.046 18299 DEBUG parse_ini_file: 'listen_addr' = 'localhost'
2014-12-29 15:39:31.046 18299 DEBUG parse_ini_file: 'listen_addr' = 'localhost' ok:1
2014-12-29 15:39:31.046 18299 DEBUG parse_ini_file: 'auth_type' = 'any'
2014-12-29 15:39:31.046 18299 DEBUG parse_ini_file: 'auth_type' = 'any' ok:1
2014-12-29 15:39:31.046 18299 DEBUG parse_ini_file: 'logfile' = 'pgbouncer.log'
2014-12-29 15:39:31.046 18299 **FATAL Cannot open logfile: 'pgbouncer.log': Permission denied**


When I start pgbouncer with sudo I got the error



@src/main.c:736 in function main(): PgBouncer should not run as root".


Debug transcript:



rajavelu-1469@rajavelu-1469:/etc/pgbouncer$ sudo pgbouncer -d -v pgbouncer.ini 
2014-12-29 15:39:54.861 18302 DEBUG parse_ini_file: [databases]
2014-12-29 15:39:54.861 18302 DEBUG parse_ini_file: '*' = 'host=localhost port=5432 user=$USER'
2014-12-29 15:39:54.861 18302 DEBUG parse_ini_file: '*' = 'host=localhost port=5432 user=$USER' ok:1
2014-12-29 15:39:54.861 18302 DEBUG parse_ini_file: [pgbouncer]
2014-12-29 15:39:54.862 18302 DEBUG parse_ini_file: 'listen_port' = '5433'
2014-12-29 15:39:54.862 18302 DEBUG parse_ini_file: 'listen_port' = '5433' ok:1
2014-12-29 15:39:54.862 18302 DEBUG parse_ini_file: 'listen_addr' = 'localhost'
2014-12-29 15:39:54.862 18302 DEBUG parse_ini_file: 'listen_addr' = 'localhost' ok:1
2014-12-29 15:39:54.862 18302 DEBUG parse_ini_file: 'auth_type' = 'any'
2014-12-29 15:39:54.862 18302 DEBUG parse_ini_file: 'auth_type' = 'any' ok:1
2014-12-29 15:39:54.862 18302 DEBUG parse_ini_file: 'logfile' = 'pgbouncer.log'
2014-12-29 15:39:54.862 18302 DEBUG parse_ini_file: 'logfile' = 'pgbouncer.log' ok:1
2014-12-29 15:39:54.862 18302 DEBUG parse_ini_file: 'pidfile' = 'pgbouncer.pid'
2014-12-29 15:39:54.862 18302 DEBUG parse_ini_file: 'pidfile' = 'pgbouncer.pid' ok:1
2014-12-29 15:39:54.862 18302 **FATAL @src/main.c:736 in function main(): PgBouncer should not run as root**


My pgbouncer.ini file is:



[databases]
* = host=localhost port=5432 user=$USER
[pgbouncer]
listen_port = 5433
listen_addr = localhost
auth_type = any
logfile = pgbouncer.log
pidfile = pgbouncer.pid






postgresql






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Dec 29 '14 at 22:42









Gilles

532k12810651592




532k12810651592










asked Dec 29 '14 at 10:13









RajaRaja

65




65





bumped to the homepage by Community 1 hour ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







bumped to the homepage by Community 1 hour ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.















  • Now, I downloaded source from pgfoundry.org

    – Raja
    Jan 8 '15 at 8:39











  • Pgbouncer started using the steps from michael.otacoo.com/postgresql-2/… . But when trying to connect as "psql -p 5433 postgres" met err: 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.5433"?

    – Raja
    Jan 8 '15 at 8:45





















  • Now, I downloaded source from pgfoundry.org

    – Raja
    Jan 8 '15 at 8:39











  • Pgbouncer started using the steps from michael.otacoo.com/postgresql-2/… . But when trying to connect as "psql -p 5433 postgres" met err: 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.5433"?

    – Raja
    Jan 8 '15 at 8:45



















Now, I downloaded source from pgfoundry.org

– Raja
Jan 8 '15 at 8:39





Now, I downloaded source from pgfoundry.org

– Raja
Jan 8 '15 at 8:39













Pgbouncer started using the steps from michael.otacoo.com/postgresql-2/… . But when trying to connect as "psql -p 5433 postgres" met err: 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.5433"?

– Raja
Jan 8 '15 at 8:45







Pgbouncer started using the steps from michael.otacoo.com/postgresql-2/… . But when trying to connect as "psql -p 5433 postgres" met err: 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.5433"?

– Raja
Jan 8 '15 at 8:45












2 Answers
2






active

oldest

votes


















0














I know this is old but i just encountered this error today in my FreeBSD box. The default installation is OK, but I needed to run a different pgbouncer instance.



To fix this I had to change the rc.d/pgbouncer to add -u to execute.



. /etc/rc.subr

name="pgbouncer_slave"
rcvar=pgbouncer_enable

load_rc_config "$name"
: ${pgbouncer_enable="NO"}
: ${pgbouncer_user="pgbouncer"}
: ${pgbouncer_conf="/usr/local/etc/$name.ini"}

extra_commands="reload"

command="/usr/local/bin/pgbouncer"
pidfile="/var/run/pgbouncer/$name.pid"
required_files="${pgbouncer_conf}"
command_args="-d ${pgbouncer_conf} -u pgbouncer"

run_rc_command "$1"





share|improve this answer































    -1














    Make sure the log file is owned by the postgres user.






    share|improve this answer

























      Your Answer








      StackExchange.ready(function() {
      var channelOptions = {
      tags: "".split(" "),
      id: "106"
      };
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function() {
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled) {
      StackExchange.using("snippets", function() {
      createEditor();
      });
      }
      else {
      createEditor();
      }
      });

      function createEditor() {
      StackExchange.prepareEditor({
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: false,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: null,
      bindNavPrevention: true,
      postfix: "",
      imageUploader: {
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      },
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      });


      }
      });














      draft saved

      draft discarded


















      StackExchange.ready(
      function () {
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f176396%2fpgbouncer-startup-problem%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      0














      I know this is old but i just encountered this error today in my FreeBSD box. The default installation is OK, but I needed to run a different pgbouncer instance.



      To fix this I had to change the rc.d/pgbouncer to add -u to execute.



      . /etc/rc.subr

      name="pgbouncer_slave"
      rcvar=pgbouncer_enable

      load_rc_config "$name"
      : ${pgbouncer_enable="NO"}
      : ${pgbouncer_user="pgbouncer"}
      : ${pgbouncer_conf="/usr/local/etc/$name.ini"}

      extra_commands="reload"

      command="/usr/local/bin/pgbouncer"
      pidfile="/var/run/pgbouncer/$name.pid"
      required_files="${pgbouncer_conf}"
      command_args="-d ${pgbouncer_conf} -u pgbouncer"

      run_rc_command "$1"





      share|improve this answer




























        0














        I know this is old but i just encountered this error today in my FreeBSD box. The default installation is OK, but I needed to run a different pgbouncer instance.



        To fix this I had to change the rc.d/pgbouncer to add -u to execute.



        . /etc/rc.subr

        name="pgbouncer_slave"
        rcvar=pgbouncer_enable

        load_rc_config "$name"
        : ${pgbouncer_enable="NO"}
        : ${pgbouncer_user="pgbouncer"}
        : ${pgbouncer_conf="/usr/local/etc/$name.ini"}

        extra_commands="reload"

        command="/usr/local/bin/pgbouncer"
        pidfile="/var/run/pgbouncer/$name.pid"
        required_files="${pgbouncer_conf}"
        command_args="-d ${pgbouncer_conf} -u pgbouncer"

        run_rc_command "$1"





        share|improve this answer


























          0












          0








          0







          I know this is old but i just encountered this error today in my FreeBSD box. The default installation is OK, but I needed to run a different pgbouncer instance.



          To fix this I had to change the rc.d/pgbouncer to add -u to execute.



          . /etc/rc.subr

          name="pgbouncer_slave"
          rcvar=pgbouncer_enable

          load_rc_config "$name"
          : ${pgbouncer_enable="NO"}
          : ${pgbouncer_user="pgbouncer"}
          : ${pgbouncer_conf="/usr/local/etc/$name.ini"}

          extra_commands="reload"

          command="/usr/local/bin/pgbouncer"
          pidfile="/var/run/pgbouncer/$name.pid"
          required_files="${pgbouncer_conf}"
          command_args="-d ${pgbouncer_conf} -u pgbouncer"

          run_rc_command "$1"





          share|improve this answer













          I know this is old but i just encountered this error today in my FreeBSD box. The default installation is OK, but I needed to run a different pgbouncer instance.



          To fix this I had to change the rc.d/pgbouncer to add -u to execute.



          . /etc/rc.subr

          name="pgbouncer_slave"
          rcvar=pgbouncer_enable

          load_rc_config "$name"
          : ${pgbouncer_enable="NO"}
          : ${pgbouncer_user="pgbouncer"}
          : ${pgbouncer_conf="/usr/local/etc/$name.ini"}

          extra_commands="reload"

          command="/usr/local/bin/pgbouncer"
          pidfile="/var/run/pgbouncer/$name.pid"
          required_files="${pgbouncer_conf}"
          command_args="-d ${pgbouncer_conf} -u pgbouncer"

          run_rc_command "$1"






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Sep 29 '15 at 9:24









          user2927304user2927304

          1




          1

























              -1














              Make sure the log file is owned by the postgres user.






              share|improve this answer






























                -1














                Make sure the log file is owned by the postgres user.






                share|improve this answer




























                  -1












                  -1








                  -1







                  Make sure the log file is owned by the postgres user.






                  share|improve this answer















                  Make sure the log file is owned by the postgres user.







                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Aug 4 '15 at 7:21









                  dr01

                  16k114971




                  16k114971










                  answered Aug 4 '15 at 6:59









                  vinayvinay

                  1




                  1






























                      draft saved

                      draft discarded




















































                      Thanks for contributing an answer to Unix & Linux Stack Exchange!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid



                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.


                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function () {
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f176396%2fpgbouncer-startup-problem%23new-answer', 'question_page');
                      }
                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      Accessing regular linux commands in Huawei's Dopra Linux

                      Can't connect RFCOMM socket: Host is down

                      Kernel panic - not syncing: Fatal Exception in Interrupt