FAQ
Hi all,
I install a new cloud foundry from source code last week. and I found
the postgresql_node can not work well.
Then I check the log and found that the postgresql_node can not
connect to localhost 5433. But there is no prints when I use "netstat -
an | grep 5433", so does it means the postgresql service fail to
start?

and the following is my postgresql_node configuration:
-------------------------------------------------------------------------------
capacity: 50
plan: free
local_db: sqlite3:/var/vcap/services/postgresql/postgresql_node.db
ip_route: 127.0.0.1
base_dir: /var/vcap/services/postgresql/
dump_bin: pg_dump
restore_bin: pg_resotre
mbus: nats://nats:nats@10.10.24.131:4222/
index: 0
pid: /var/vcap/sys/run/postgresql_node.pid
node_id: postgresql_node_0
max_db_size: 20
max_long_query: 3
max_long_tx: 30
max_db_conns: 20
db_size_overhead: 5.4
migration_nfs: /mnt/migration
postgresql:
host: localhost
port: 5433
user: root
pass: changeme
database: pg_service
logging:
level: debug
-------------------------------------------------------------------------------

And the following is the log:

=================== LOG ======================
/home/dragon/cloudfoundry/.deployments/devbox/deploy/rubies/ruby-1.9.2-
p180/lib/ruby/gems/1.9.1/gems/uuid-2.3.5/lib/uuid.rb:72: warning:
already initialized constant VERSION
[2012-06-19 02:42:39.999342] postgresql_node_0 - pid=13718 tid=ce0b
fid=b6b2 INFO -- AuaaS-Node: Initializing
[2012-06-19 02:42:40.172745] postgresql_node_0 - pid=13718 tid=ce0b
fid=b6b2 DEBUG -- AuaaS-Node: Connected to node mbus
DataObjects::URI.new with arguments is deprecated, use a Hash of URI
components (/home/dragon/cloudfoundry/.deployments/devbox/deploy/
rubies/ruby-1.9.2-p180/lib/ruby/gems/1.9.1/gems/dm-do-adapter-1.1.0/
lib/dm-do-adapter/adapter.rb:231:in `new')
[2012-06-19 02:42:40.362114] postgresql_node_0 - pid=13718 tid=ce0b
fid=b6b2 INFO -- PostgreSQL connect: localhost, 5433, root,
changeme, pg_service (fail_with_nil: false)
[2012-06-19 02:42:40.362668] postgresql_node_0 - pid=13718 tid=ce0b
fid=b6b2 ERROR -- PostgreSQL connection attempt failed: localhost
5433 pg_service root changeme
[2012-06-19 02:42:42.362939] postgresql_node_0 - pid=13718 tid=ce0b
fid=b6b2 INFO -- PostgreSQL connect: localhost, 5433, root,
changeme, pg_service (fail_with_nil: false)
[2012-06-19 02:42:42.363444] postgresql_node_0 - pid=13718 tid=ce0b
fid=b6b2 ERROR -- PostgreSQL connection attempt failed: localhost
5433 pg_service root changeme
[2012-06-19 02:42:44.363716] postgresql_node_0 - pid=13718 tid=ce0b
fid=b6b2 INFO -- PostgreSQL connect: localhost, 5433, root,
changeme, pg_service (fail_with_nil: false)
[2012-06-19 02:42:44.364400] postgresql_node_0 - pid=13718 tid=ce0b
fid=b6b2 ERROR -- PostgreSQL connection attempt failed: localhost
5433 pg_service root changeme
[2012-06-19 02:42:46.364706] postgresql_node_0 - pid=13718 tid=ce0b
fid=b6b2 INFO -- PostgreSQL connect: localhost, 5433, root,
changeme, pg_service (fail_with_nil: false)
[2012-06-19 02:42:46.365100] postgresql_node_0 - pid=13718 tid=ce0b
fid=b6b2 ERROR -- PostgreSQL connection attempt failed: localhost
5433 pg_service root changeme
[2012-06-19 02:42:48.365321] postgresql_node_0 - pid=13718 tid=ce0b
fid=b6b2 INFO -- PostgreSQL connect: localhost, 5433, root,
changeme, pg_service (fail_with_nil: false)
[2012-06-19 02:42:48.365871] postgresql_node_0 - pid=13718 tid=ce0b
fid=b6b2 ERROR -- PostgreSQL connection attempt failed: localhost
5433 pg_service root changeme
[2012-06-19 02:42:50.366111] postgresql_node_0 - pid=13718 tid=ce0b
fid=b6b2 FATAL -- PostgreSQL connection unrecoverable
[2012-06-19 02:42:50.366267] postgresql_node_0 - pid=13718 tid=ce0b
fid=b6b2 INFO -- AuaaS-Node: Shutting down

===================================

How to fix it and let the postgresql_node work as well?

Thanks
Brick.

Search Discussions

  • Frank Lu at Jun 27, 2012 at 2:46 am
    1) Could you check whether postgresql 9.0 is installed
    successfully? There should be some files in /etc/postgresql/9.0/main/ and
    /var/lib/postgresql/9.0/bin if it is installed successfully.
    Before this commit
    https://github.com/cloudfoundry/vcap/commit/1d02dcb03856f116b12a998856b245df7c0e9c23
    .
    The vcap_dev_setup could report installation is successful even if
    postgresql 9.0 failed to install for some reasons.
    You could try to run manually to see what happen to your apt.
    sudo apt-get install -y postgresql-9.0
    2) If it is installed, could you check the configuration files such as
    postgresql.conf and pg_hba.conf, is there any suspicious things ?
    I think you could take a look
    at /var/log/postgresql/postgresql-9.0-main.log to get more details why it
    failed to start.

    On Wed, Jun 27, 2012 at 10:23 AM, stoneage14@163.com wrote:

    Hi all,
    I install a new cloud foundry from source code last week. and I found
    the postgresql_node can not work well.
    Then I check the log and found that the postgresql_node can not
    connect to localhost 5433. But there is no prints when I use "netstat -
    an | grep 5433", so does it means the postgresql service fail to
    start?

    and the following is my postgresql_node configuration:

    -------------------------------------------------------------------------------
    capacity: 50
    plan: free
    local_db: sqlite3:/var/vcap/services/postgresql/postgresql_node.db
    ip_route: 127.0.0.1
    base_dir: /var/vcap/services/postgresql/
    dump_bin: pg_dump
    restore_bin: pg_resotre
    mbus: nats://nats:nats@10.10.24.131:4222/
    index: 0
    pid: /var/vcap/sys/run/postgresql_node.pid
    node_id: postgresql_node_0
    max_db_size: 20
    max_long_query: 3
    max_long_tx: 30
    max_db_conns: 20
    db_size_overhead: 5.4
    migration_nfs: /mnt/migration
    postgresql:
    host: localhost
    port: 5433
    user: root
    pass: changeme
    database: pg_service
    logging:
    level: debug

    -------------------------------------------------------------------------------

    And the following is the log:

    =================== LOG ======================
    /home/dragon/cloudfoundry/.deployments/devbox/deploy/rubies/ruby-1.9.2-
    p180/lib/ruby/gems/1.9.1/gems/uuid-2.3.5/lib/uuid.rb:72: warning:
    already initialized constant VERSION
    [2012-06-19 02:42:39.999342] postgresql_node_0 - pid=13718 tid=ce0b
    fid=b6b2 INFO -- AuaaS-Node: Initializing
    [2012-06-19 02:42:40.172745] postgresql_node_0 - pid=13718 tid=ce0b
    fid=b6b2 DEBUG -- AuaaS-Node: Connected to node mbus
    DataObjects::URI.new with arguments is deprecated, use a Hash of URI
    components (/home/dragon/cloudfoundry/.deployments/devbox/deploy/
    rubies/ruby-1.9.2-p180/lib/ruby/gems/1.9.1/gems/dm-do-adapter-1.1.0/
    lib/dm-do-adapter/adapter.rb:231:in `new')
    [2012-06-19 02:42:40.362114] postgresql_node_0 - pid=13718 tid=ce0b
    fid=b6b2 INFO -- PostgreSQL connect: localhost, 5433, root,
    changeme, pg_service (fail_with_nil: false)
    [2012-06-19 02:42:40.362668] postgresql_node_0 - pid=13718 tid=ce0b
    fid=b6b2 ERROR -- PostgreSQL connection attempt failed: localhost
    5433 pg_service root changeme
    [2012-06-19 02:42:42.362939] postgresql_node_0 - pid=13718 tid=ce0b
    fid=b6b2 INFO -- PostgreSQL connect: localhost, 5433, root,
    changeme, pg_service (fail_with_nil: false)
    [2012-06-19 02:42:42.363444] postgresql_node_0 - pid=13718 tid=ce0b
    fid=b6b2 ERROR -- PostgreSQL connection attempt failed: localhost
    5433 pg_service root changeme
    [2012-06-19 02:42:44.363716] postgresql_node_0 - pid=13718 tid=ce0b
    fid=b6b2 INFO -- PostgreSQL connect: localhost, 5433, root,
    changeme, pg_service (fail_with_nil: false)
    [2012-06-19 02:42:44.364400] postgresql_node_0 - pid=13718 tid=ce0b
    fid=b6b2 ERROR -- PostgreSQL connection attempt failed: localhost
    5433 pg_service root changeme
    [2012-06-19 02:42:46.364706] postgresql_node_0 - pid=13718 tid=ce0b
    fid=b6b2 INFO -- PostgreSQL connect: localhost, 5433, root,
    changeme, pg_service (fail_with_nil: false)
    [2012-06-19 02:42:46.365100] postgresql_node_0 - pid=13718 tid=ce0b
    fid=b6b2 ERROR -- PostgreSQL connection attempt failed: localhost
    5433 pg_service root changeme
    [2012-06-19 02:42:48.365321] postgresql_node_0 - pid=13718 tid=ce0b
    fid=b6b2 INFO -- PostgreSQL connect: localhost, 5433, root,
    changeme, pg_service (fail_with_nil: false)
    [2012-06-19 02:42:48.365871] postgresql_node_0 - pid=13718 tid=ce0b
    fid=b6b2 ERROR -- PostgreSQL connection attempt failed: localhost
    5433 pg_service root changeme
    [2012-06-19 02:42:50.366111] postgresql_node_0 - pid=13718 tid=ce0b
    fid=b6b2 FATAL -- PostgreSQL connection unrecoverable
    [2012-06-19 02:42:50.366267] postgresql_node_0 - pid=13718 tid=ce0b
    fid=b6b2 INFO -- AuaaS-Node: Shutting down

    ===================================

    How to fix it and let the postgresql_node work as well?

    Thanks
    Brick.


    --

    Frank(mingfan) Lu


    Ext. 8004

    Tel: 86-21-60349004

    VMware Cloudfoundry Service Team
    10F, KIC III, No. 333 Songhu Road, Yangpu District. Shanghai 200433
  • Stoneage14 at Jun 27, 2012 at 3:16 am
    Thanks Frank,

    I check the directories that you said, and there are some config
    files.
    and I found both of the 8.4/main/postgresql.conf and 9.1/main/
    postgresql.conf, the listen port are 5432, I think it is the reason
    that my postgresql_node faild to start, because postgresql_node will
    connect 5433.

    I will try to fix it and restart the cloud foundry.

    Thanks very much :)
    On Jun 27, 10:46 am, Frank Lu wrote:
    1)  Could you check whether postgresql 9.0 is installed
    successfully? There should be some files in /etc/postgresql/9.0/main/ and
    /var/lib/postgresql/9.0/bin if it is installed successfully.
    Before this commithttps://github.com/cloudfoundry/vcap/commit/1d02dcb03856f116b12a99885...
    .
    The vcap_dev_setup could report installation is successful even if
    postgresql 9.0 failed to install for some reasons.
    You could try to run manually to see what happen to your apt.
    sudo apt-get install -y postgresql-9.0
    2)  If it is installed, could you check the configuration files such as
    postgresql.conf and pg_hba.conf, is there any suspicious things ?
    I think you could take a look
    at /var/log/postgresql/postgresql-9.0-main.log to get more details why it
    failed to start.

    On Wed, Jun 27, 2012 at 10:23 AM, stoneag...@163.com wrote:








    Hi all,
    I install a new cloud foundry from source code last week. and I found
    the postgresql_node can not work well.
    Then I check the log and found that the postgresql_node can not
    connect to localhost 5433. But there is no prints when I use "netstat -
    an | grep 5433", so does it means the postgresql service fail to
    start?
    and the following is my postgresql_node configuration:
    --------------------------------------------------------------------------- ----
    capacity: 50
    plan: free
    local_db: sqlite3:/var/vcap/services/postgresql/postgresql_node.db
    ip_route: 127.0.0.1
    base_dir: /var/vcap/services/postgresql/
    dump_bin: pg_dump
    restore_bin: pg_resotre
    mbus: nats://nats:n...@10.10.24.131:4222/
    index: 0
    pid: /var/vcap/sys/run/postgresql_node.pid
    node_id: postgresql_node_0
    max_db_size: 20
    max_long_query: 3
    max_long_tx: 30
    max_db_conns: 20
    db_size_overhead: 5.4
    migration_nfs: /mnt/migration
    postgresql:
    host: localhost
    port: 5433
    user: root
    pass: changeme
    database: pg_service
    logging:
    level: debug
    --------------------------------------------------------------------------- ----
    And the following is the log:
    =================== LOG ======================
    /home/dragon/cloudfoundry/.deployments/devbox/deploy/rubies/ruby-1.9.2-
    p180/lib/ruby/gems/1.9.1/gems/uuid-2.3.5/lib/uuid.rb:72: warning:
    already initialized constant VERSION
    [2012-06-19 02:42:39.999342] postgresql_node_0 - pid=13718 tid=ce0b
    fid=b6b2   INFO -- AuaaS-Node: Initializing
    [2012-06-19 02:42:40.172745] postgresql_node_0 - pid=13718 tid=ce0b
    fid=b6b2  DEBUG -- AuaaS-Node: Connected to node mbus
    DataObjects::URI.new with arguments is deprecated, use a Hash of URI
    components (/home/dragon/cloudfoundry/.deployments/devbox/deploy/
    rubies/ruby-1.9.2-p180/lib/ruby/gems/1.9.1/gems/dm-do-adapter-1.1.0/
    lib/dm-do-adapter/adapter.rb:231:in `new')
    [2012-06-19 02:42:40.362114] postgresql_node_0 - pid=13718 tid=ce0b
    fid=b6b2   INFO -- PostgreSQL connect: localhost, 5433, root,
    changeme, pg_service (fail_with_nil: false)
    [2012-06-19 02:42:40.362668] postgresql_node_0 - pid=13718 tid=ce0b
    fid=b6b2  ERROR -- PostgreSQL connection attempt failed: localhost
    5433 pg_service root changeme
    [2012-06-19 02:42:42.362939] postgresql_node_0 - pid=13718 tid=ce0b
    fid=b6b2   INFO -- PostgreSQL connect: localhost, 5433, root,
    changeme, pg_service (fail_with_nil: false)
    [2012-06-19 02:42:42.363444] postgresql_node_0 - pid=13718 tid=ce0b
    fid=b6b2  ERROR -- PostgreSQL connection attempt failed: localhost
    5433 pg_service root changeme
    [2012-06-19 02:42:44.363716] postgresql_node_0 - pid=13718 tid=ce0b
    fid=b6b2   INFO -- PostgreSQL connect: localhost, 5433, root,
    changeme, pg_service (fail_with_nil: false)
    [2012-06-19 02:42:44.364400] postgresql_node_0 - pid=13718 tid=ce0b
    fid=b6b2  ERROR -- PostgreSQL connection attempt failed: localhost
    5433 pg_service root changeme
    [2012-06-19 02:42:46.364706] postgresql_node_0 - pid=13718 tid=ce0b
    fid=b6b2   INFO -- PostgreSQL connect: localhost, 5433, root,
    changeme, pg_service (fail_with_nil: false)
    [2012-06-19 02:42:46.365100] postgresql_node_0 - pid=13718 tid=ce0b
    fid=b6b2  ERROR -- PostgreSQL connection attempt failed: localhost
    5433 pg_service root changeme
    [2012-06-19 02:42:48.365321] postgresql_node_0 - pid=13718 tid=ce0b
    fid=b6b2   INFO -- PostgreSQL connect: localhost, 5433, root,
    changeme, pg_service (fail_with_nil: false)
    [2012-06-19 02:42:48.365871] postgresql_node_0 - pid=13718 tid=ce0b
    fid=b6b2  ERROR -- PostgreSQL connection attempt failed: localhost
    5433 pg_service root changeme
    [2012-06-19 02:42:50.366111] postgresql_node_0 - pid=13718 tid=ce0b
    fid=b6b2  FATAL -- PostgreSQL connection unrecoverable
    [2012-06-19 02:42:50.366267] postgresql_node_0 - pid=13718 tid=ce0b
    fid=b6b2   INFO -- AuaaS-Node: Shutting down
    ===================================
    How to fix it and let the postgresql_node work as well?
    Thanks
    Brick.
    --

    Frank(mingfan) Lu

    Ext. 8004

    Tel: 86-21-60349004

    VMware Cloudfoundry Service Team
    10F, KIC III, No. 333 Songhu Road, Yangpu District. Shanghai 200433
  • Frank Lu at Jun 27, 2012 at 3:21 am
    By default, we will use postgresql 9.0 It seems that you failed to install
    postgresql 9.0. (have you modified the cookbooks to use 9.1?)
    You should try to check why you could not install postgresql 9.0. Do you
    have pitti-postgresql-lucid.list in /etc/apt/sources.list.d/ ?

    On Wed, Jun 27, 2012 at 11:16 AM, stoneage14@163.com wrote:

    Thanks Frank,

    I check the directories that you said, and there are some config
    files.
    and I found both of the 8.4/main/postgresql.conf and 9.1/main/
    postgresql.conf, the listen port are 5432, I think it is the reason
    that my postgresql_node faild to start, because postgresql_node will
    connect 5433.

    I will try to fix it and restart the cloud foundry.

    Thanks very much :)
    On Jun 27, 10:46 am, Frank Lu wrote:
    1) Could you check whether postgresql 9.0 is installed
    successfully? There should be some files in /etc/postgresql/9.0/main/ and
    /var/lib/postgresql/9.0/bin if it is installed successfully.
    Before this commithttps://
    github.com/cloudfoundry/vcap/commit/1d02dcb03856f116b12a99885...
    .
    The vcap_dev_setup could report installation is successful even if
    postgresql 9.0 failed to install for some reasons.
    You could try to run manually to see what happen to your apt.
    sudo apt-get install -y postgresql-9.0
    2) If it is installed, could you check the configuration files such as
    postgresql.conf and pg_hba.conf, is there any suspicious things ?
    I think you could take a look
    at /var/log/postgresql/postgresql-9.0-main.log to get more details why it
    failed to start.

    On Wed, Jun 27, 2012 at 10:23 AM, stoneag...@163.com <stoneag...@163.com
    wrote:








    Hi all,
    I install a new cloud foundry from source code last week. and I found
    the postgresql_node can not work well.
    Then I check the log and found that the postgresql_node can not
    connect to localhost 5433. But there is no prints when I use "netstat -
    an | grep 5433", so does it means the postgresql service fail to
    start?
    and the following is my postgresql_node configuration:
    ---------------------------------------------------------------------------
    ----
    capacity: 50
    plan: free
    local_db: sqlite3:/var/vcap/services/postgresql/postgresql_node.db
    ip_route: 127.0.0.1
    base_dir: /var/vcap/services/postgresql/
    dump_bin: pg_dump
    restore_bin: pg_resotre
    mbus: nats://nats:n...@10.10.24.131:4222/
    index: 0
    pid: /var/vcap/sys/run/postgresql_node.pid
    node_id: postgresql_node_0
    max_db_size: 20
    max_long_query: 3
    max_long_tx: 30
    max_db_conns: 20
    db_size_overhead: 5.4
    migration_nfs: /mnt/migration
    postgresql:
    host: localhost
    port: 5433
    user: root
    pass: changeme
    database: pg_service
    logging:
    level: debug
    ---------------------------------------------------------------------------
    ----
    And the following is the log:
    =================== LOG ======================
    /home/dragon/cloudfoundry/.deployments/devbox/deploy/rubies/ruby-1.9.2-
    p180/lib/ruby/gems/1.9.1/gems/uuid-2.3.5/lib/uuid.rb:72: warning:
    already initialized constant VERSION
    [2012-06-19 02:42:39.999342] postgresql_node_0 - pid=13718 tid=ce0b
    fid=b6b2 INFO -- AuaaS-Node: Initializing
    [2012-06-19 02:42:40.172745] postgresql_node_0 - pid=13718 tid=ce0b
    fid=b6b2 DEBUG -- AuaaS-Node: Connected to node mbus
    DataObjects::URI.new with arguments is deprecated, use a Hash of URI
    components (/home/dragon/cloudfoundry/.deployments/devbox/deploy/
    rubies/ruby-1.9.2-p180/lib/ruby/gems/1.9.1/gems/dm-do-adapter-1.1.0/
    lib/dm-do-adapter/adapter.rb:231:in `new')
    [2012-06-19 02:42:40.362114] postgresql_node_0 - pid=13718 tid=ce0b
    fid=b6b2 INFO -- PostgreSQL connect: localhost, 5433, root,
    changeme, pg_service (fail_with_nil: false)
    [2012-06-19 02:42:40.362668] postgresql_node_0 - pid=13718 tid=ce0b
    fid=b6b2 ERROR -- PostgreSQL connection attempt failed: localhost
    5433 pg_service root changeme
    [2012-06-19 02:42:42.362939] postgresql_node_0 - pid=13718 tid=ce0b
    fid=b6b2 INFO -- PostgreSQL connect: localhost, 5433, root,
    changeme, pg_service (fail_with_nil: false)
    [2012-06-19 02:42:42.363444] postgresql_node_0 - pid=13718 tid=ce0b
    fid=b6b2 ERROR -- PostgreSQL connection attempt failed: localhost
    5433 pg_service root changeme
    [2012-06-19 02:42:44.363716] postgresql_node_0 - pid=13718 tid=ce0b
    fid=b6b2 INFO -- PostgreSQL connect: localhost, 5433, root,
    changeme, pg_service (fail_with_nil: false)
    [2012-06-19 02:42:44.364400] postgresql_node_0 - pid=13718 tid=ce0b
    fid=b6b2 ERROR -- PostgreSQL connection attempt failed: localhost
    5433 pg_service root changeme
    [2012-06-19 02:42:46.364706] postgresql_node_0 - pid=13718 tid=ce0b
    fid=b6b2 INFO -- PostgreSQL connect: localhost, 5433, root,
    changeme, pg_service (fail_with_nil: false)
    [2012-06-19 02:42:46.365100] postgresql_node_0 - pid=13718 tid=ce0b
    fid=b6b2 ERROR -- PostgreSQL connection attempt failed: localhost
    5433 pg_service root changeme
    [2012-06-19 02:42:48.365321] postgresql_node_0 - pid=13718 tid=ce0b
    fid=b6b2 INFO -- PostgreSQL connect: localhost, 5433, root,
    changeme, pg_service (fail_with_nil: false)
    [2012-06-19 02:42:48.365871] postgresql_node_0 - pid=13718 tid=ce0b
    fid=b6b2 ERROR -- PostgreSQL connection attempt failed: localhost
    5433 pg_service root changeme
    [2012-06-19 02:42:50.366111] postgresql_node_0 - pid=13718 tid=ce0b
    fid=b6b2 FATAL -- PostgreSQL connection unrecoverable
    [2012-06-19 02:42:50.366267] postgresql_node_0 - pid=13718 tid=ce0b
    fid=b6b2 INFO -- AuaaS-Node: Shutting down
    ===================================
    How to fix it and let the postgresql_node work as well?
    Thanks
    Brick.
    --

    Frank(mingfan) Lu

    Ext. 8004

    Tel: 86-21-60349004

    VMware Cloudfoundry Service Team
    10F, KIC III, No. 333 Songhu Road, Yangpu District. Shanghai 200433


    --

    Frank(mingfan) Lu


    Ext. 8004

    Tel: 86-21-60349004

    VMware Cloudfoundry Service Team
    10F, KIC III, No. 333 Songhu Road, Yangpu District. Shanghai 200433
  • Stoneage14 at Jun 27, 2012 at 3:45 am
    you're right, my VM is ubuntu12.04, and I updated the cookbooks
    attributes to use 9.1
    On Jun 27, 11:21 am, Frank Lu wrote:
    By default, we will use postgresql 9.0  It seems that you failed to install
    postgresql 9.0. (have you modified the cookbooks to use 9.1?)
    You should try to check why you could not install postgresql 9.0.  Do you
    have pitti-postgresql-lucid.list in /etc/apt/sources.list.d/ ?

    On Wed, Jun 27, 2012 at 11:16 AM, stoneag...@163.com wrote:








    Thanks Frank,
    I check the directories that you said, and there are some config
    files.
    and I found both of the 8.4/main/postgresql.conf and 9.1/main/
    postgresql.conf, the listen port are 5432, I think it is the reason
    that  my postgresql_node faild to start, because postgresql_node will
    connect 5433.
    I will try to fix it and restart the cloud foundry.
    Thanks very much :)
    On Jun 27, 10:46 am, Frank Lu wrote:
    1)  Could you check whether postgresql 9.0 is installed
    successfully? There should be some files in /etc/postgresql/9.0/main/ and
    /var/lib/postgresql/9.0/bin if it is installed successfully.
    Before this commithttps://
    github.com/cloudfoundry/vcap/commit/1d02dcb03856f116b12a99885...
    .
    The vcap_dev_setup could report installation is successful even if
    postgresql 9.0 failed to install for some reasons.
    You could try to run manually to see what happen to your apt.
    sudo apt-get install -y postgresql-9.0
    2)  If it is installed, could you check the configuration files such as
    postgresql.conf and pg_hba.conf, is there any suspicious things ?
    I think you could take a look
    at /var/log/postgresql/postgresql-9.0-main.log to get more details why it
    failed to start.
    On Wed, Jun 27, 2012 at 10:23 AM, stoneag...@163.com <stoneag...@163.com
    wrote:
    Hi all,
    I install a new cloud foundry from source code last week. and I found
    the postgresql_node can not work well.
    Then I check the log and found that the postgresql_node can not
    connect to localhost 5433. But there is no prints when I use "netstat -
    an | grep 5433", so does it means the postgresql service fail to
    start?
    and the following is my postgresql_node configuration:
    ---------------------------------------------------------------------------
    ----
    capacity: 50
    plan: free
    local_db: sqlite3:/var/vcap/services/postgresql/postgresql_node.db
    ip_route: 127.0.0.1
    base_dir: /var/vcap/services/postgresql/
    dump_bin: pg_dump
    restore_bin: pg_resotre
    mbus: nats://nats:n...@10.10.24.131:4222/
    index: 0
    pid: /var/vcap/sys/run/postgresql_node.pid
    node_id: postgresql_node_0
    max_db_size: 20
    max_long_query: 3
    max_long_tx: 30
    max_db_conns: 20
    db_size_overhead: 5.4
    migration_nfs: /mnt/migration
    postgresql:
    host: localhost
    port: 5433
    user: root
    pass: changeme
    database: pg_service
    logging:
    level: debug
    ---------------------------------------------------------------------------
    ----
    And the following is the log:
    =================== LOG ======================
    /home/dragon/cloudfoundry/.deployments/devbox/deploy/rubies/ruby-1.9.2-
    p180/lib/ruby/gems/1.9.1/gems/uuid-2.3.5/lib/uuid.rb:72: warning:
    already initialized constant VERSION
    [2012-06-19 02:42:39.999342] postgresql_node_0 - pid=13718 tid=ce0b
    fid=b6b2   INFO -- AuaaS-Node: Initializing
    [2012-06-19 02:42:40.172745] postgresql_node_0 - pid=13718 tid=ce0b
    fid=b6b2  DEBUG -- AuaaS-Node: Connected to node mbus
    DataObjects::URI.new with arguments is deprecated, use a Hash of URI
    components (/home/dragon/cloudfoundry/.deployments/devbox/deploy/
    rubies/ruby-1.9.2-p180/lib/ruby/gems/1.9.1/gems/dm-do-adapter-1.1.0/
    lib/dm-do-adapter/adapter.rb:231:in `new')
    [2012-06-19 02:42:40.362114] postgresql_node_0 - pid=13718 tid=ce0b
    fid=b6b2   INFO -- PostgreSQL connect: localhost, 5433, root,
    changeme, pg_service (fail_with_nil: false)
    [2012-06-19 02:42:40.362668] postgresql_node_0 - pid=13718 tid=ce0b
    fid=b6b2  ERROR -- PostgreSQL connection attempt failed: localhost
    5433 pg_service root changeme
    [2012-06-19 02:42:42.362939] postgresql_node_0 - pid=13718 tid=ce0b
    fid=b6b2   INFO -- PostgreSQL connect: localhost, 5433, root,
    changeme, pg_service (fail_with_nil: false)
    [2012-06-19 02:42:42.363444] postgresql_node_0 - pid=13718 tid=ce0b
    fid=b6b2  ERROR -- PostgreSQL connection attempt failed: localhost
    5433 pg_service root changeme
    [2012-06-19 02:42:44.363716] postgresql_node_0 - pid=13718 tid=ce0b
    fid=b6b2   INFO -- PostgreSQL connect: localhost, 5433, root,
    changeme, pg_service (fail_with_nil: false)
    [2012-06-19 02:42:44.364400] postgresql_node_0 - pid=13718 tid=ce0b
    fid=b6b2  ERROR -- PostgreSQL connection attempt failed: localhost
    5433 pg_service root changeme
    [2012-06-19 02:42:46.364706] postgresql_node_0 - pid=13718 tid=ce0b
    fid=b6b2   INFO -- PostgreSQL connect: localhost, 5433, root,
    changeme, pg_service (fail_with_nil: false)
    [2012-06-19 02:42:46.365100] postgresql_node_0 - pid=13718 tid=ce0b
    fid=b6b2  ERROR -- PostgreSQL connection attempt failed: localhost
    5433 pg_service root changeme
    [2012-06-19 02:42:48.365321] postgresql_node_0 - pid=13718 tid=ce0b
    fid=b6b2   INFO -- PostgreSQL connect: localhost, 5433, root,
    changeme, pg_service (fail_with_nil: false)
    [2012-06-19 02:42:48.365871] postgresql_node_0 - pid=13718 tid=ce0b
    fid=b6b2  ERROR -- PostgreSQL connection attempt failed: localhost
    5433 pg_service root changeme
    [2012-06-19 02:42:50.366111] postgresql_node_0 - pid=13718 tid=ce0b
    fid=b6b2  FATAL -- PostgreSQL connection unrecoverable
    [2012-06-19 02:42:50.366267] postgresql_node_0 - pid=13718 tid=ce0b
    fid=b6b2   INFO -- AuaaS-Node: Shutting down
    ===================================
    How to fix it and let the postgresql_node work as well?
    Thanks
    Brick.
    --
    Frank(mingfan) Lu
    Ext. 8004
    Tel: 86-21-60349004
    VMware Cloudfoundry Service Team
    10F, KIC III, No. 333 Songhu Road, Yangpu District. Shanghai 200433
    --

    Frank(mingfan) Lu

    Ext. 8004

    Tel: 86-21-60349004

    VMware Cloudfoundry Service Team
    10F, KIC III, No. 333 Songhu Road, Yangpu District. Shanghai 200433
  • Frank Lu at Jun 27, 2012 at 3:55 am
    Have you also modified this line?
    https://github.com/cloudfoundry/vcap/blob/master/dev_setup/cookbooks/postgresql/attributes/default.rb#L4
    default[:postgresql][:service_port] = "5433" to default[:postgresql][
    :service_port] = "5432" ?

    If yes, it is port conflict.
    If no, you should check why you postgresql 9.1 failed to start. look at the
    log /var/log/postgresql/postgresql-9.1-main.log

    On Wed, Jun 27, 2012 at 11:45 AM, stoneage14@163.com wrote:

    you're right, my VM is ubuntu12.04, and I updated the cookbooks
    attributes to use 9.1
    On Jun 27, 11:21 am, Frank Lu wrote:
    By default, we will use postgresql 9.0 It seems that you failed to install
    postgresql 9.0. (have you modified the cookbooks to use 9.1?)
    You should try to check why you could not install postgresql 9.0. Do you
    have pitti-postgresql-lucid.list in /etc/apt/sources.list.d/ ?

    On Wed, Jun 27, 2012 at 11:16 AM, stoneag...@163.com <stoneag...@163.com
    wrote:








    Thanks Frank,
    I check the directories that you said, and there are some config
    files.
    and I found both of the 8.4/main/postgresql.conf and 9.1/main/
    postgresql.conf, the listen port are 5432, I think it is the reason
    that my postgresql_node faild to start, because postgresql_node will
    connect 5433.
    I will try to fix it and restart the cloud foundry.
    Thanks very much :)
    On Jun 27, 10:46 am, Frank Lu wrote:
    1) Could you check whether postgresql 9.0 is installed
    successfully? There should be some files in
    /etc/postgresql/9.0/main/ and
    /var/lib/postgresql/9.0/bin if it is installed successfully.
    Before this commithttps://
    github.com/cloudfoundry/vcap/commit/1d02dcb03856f116b12a99885...
    .
    The vcap_dev_setup could report installation is successful
    even if
    postgresql 9.0 failed to install for some reasons.
    You could try to run manually to see what happen to your apt.
    sudo apt-get install -y postgresql-9.0
    2) If it is installed, could you check the configuration files such
    as
    postgresql.conf and pg_hba.conf, is there any suspicious things ?
    I think you could take a look
    at /var/log/postgresql/postgresql-9.0-main.log to get more details
    why it
    failed to start.
    On Wed, Jun 27, 2012 at 10:23 AM, stoneag...@163.com <
    stoneag...@163.com
    wrote:
    Hi all,
    I install a new cloud foundry from source code last week. and I
    found
    the postgresql_node can not work well.
    Then I check the log and found that the postgresql_node can not
    connect to localhost 5433. But there is no prints when I use
    "netstat -
    an | grep 5433", so does it means the postgresql service fail to
    start?
    and the following is my postgresql_node configuration:
    ---------------------------------------------------------------------------
    ----
    capacity: 50
    plan: free
    local_db: sqlite3:/var/vcap/services/postgresql/postgresql_node.db
    ip_route: 127.0.0.1
    base_dir: /var/vcap/services/postgresql/
    dump_bin: pg_dump
    restore_bin: pg_resotre
    mbus: nats://nats:n...@10.10.24.131:4222/
    index: 0
    pid: /var/vcap/sys/run/postgresql_node.pid
    node_id: postgresql_node_0
    max_db_size: 20
    max_long_query: 3
    max_long_tx: 30
    max_db_conns: 20
    db_size_overhead: 5.4
    migration_nfs: /mnt/migration
    postgresql:
    host: localhost
    port: 5433
    user: root
    pass: changeme
    database: pg_service
    logging:
    level: debug
    ---------------------------------------------------------------------------
    ----
    And the following is the log:
    =================== LOG ======================
    /home/dragon/cloudfoundry/.deployments/devbox/deploy/rubies/ruby-1.9.2-
    p180/lib/ruby/gems/1.9.1/gems/uuid-2.3.5/lib/uuid.rb:72: warning:
    already initialized constant VERSION
    [2012-06-19 02:42:39.999342] postgresql_node_0 - pid=13718 tid=ce0b
    fid=b6b2 INFO -- AuaaS-Node: Initializing
    [2012-06-19 02:42:40.172745] postgresql_node_0 - pid=13718 tid=ce0b
    fid=b6b2 DEBUG -- AuaaS-Node: Connected to node mbus
    DataObjects::URI.new with arguments is deprecated, use a Hash of
    URI
    components (/home/dragon/cloudfoundry/.deployments/devbox/deploy/
    rubies/ruby-1.9.2-p180/lib/ruby/gems/1.9.1/gems/dm-do-adapter-1.1.0/
    lib/dm-do-adapter/adapter.rb:231:in `new')
    [2012-06-19 02:42:40.362114] postgresql_node_0 - pid=13718 tid=ce0b
    fid=b6b2 INFO -- PostgreSQL connect: localhost, 5433, root,
    changeme, pg_service (fail_with_nil: false)
    [2012-06-19 02:42:40.362668] postgresql_node_0 - pid=13718 tid=ce0b
    fid=b6b2 ERROR -- PostgreSQL connection attempt failed: localhost
    5433 pg_service root changeme
    [2012-06-19 02:42:42.362939] postgresql_node_0 - pid=13718 tid=ce0b
    fid=b6b2 INFO -- PostgreSQL connect: localhost, 5433, root,
    changeme, pg_service (fail_with_nil: false)
    [2012-06-19 02:42:42.363444] postgresql_node_0 - pid=13718 tid=ce0b
    fid=b6b2 ERROR -- PostgreSQL connection attempt failed: localhost
    5433 pg_service root changeme
    [2012-06-19 02:42:44.363716] postgresql_node_0 - pid=13718 tid=ce0b
    fid=b6b2 INFO -- PostgreSQL connect: localhost, 5433, root,
    changeme, pg_service (fail_with_nil: false)
    [2012-06-19 02:42:44.364400] postgresql_node_0 - pid=13718 tid=ce0b
    fid=b6b2 ERROR -- PostgreSQL connection attempt failed: localhost
    5433 pg_service root changeme
    [2012-06-19 02:42:46.364706] postgresql_node_0 - pid=13718 tid=ce0b
    fid=b6b2 INFO -- PostgreSQL connect: localhost, 5433, root,
    changeme, pg_service (fail_with_nil: false)
    [2012-06-19 02:42:46.365100] postgresql_node_0 - pid=13718 tid=ce0b
    fid=b6b2 ERROR -- PostgreSQL connection attempt failed: localhost
    5433 pg_service root changeme
    [2012-06-19 02:42:48.365321] postgresql_node_0 - pid=13718 tid=ce0b
    fid=b6b2 INFO -- PostgreSQL connect: localhost, 5433, root,
    changeme, pg_service (fail_with_nil: false)
    [2012-06-19 02:42:48.365871] postgresql_node_0 - pid=13718 tid=ce0b
    fid=b6b2 ERROR -- PostgreSQL connection attempt failed: localhost
    5433 pg_service root changeme
    [2012-06-19 02:42:50.366111] postgresql_node_0 - pid=13718 tid=ce0b
    fid=b6b2 FATAL -- PostgreSQL connection unrecoverable
    [2012-06-19 02:42:50.366267] postgresql_node_0 - pid=13718 tid=ce0b
    fid=b6b2 INFO -- AuaaS-Node: Shutting down
    ===================================
    How to fix it and let the postgresql_node work as well?
    Thanks
    Brick.
    --
    Frank(mingfan) Lu
    Ext. 8004
    Tel: 86-21-60349004
    VMware Cloudfoundry Service Team
    10F, KIC III, No. 333 Songhu Road, Yangpu District. Shanghai 200433
    --

    Frank(mingfan) Lu

    Ext. 8004

    Tel: 86-21-60349004

    VMware Cloudfoundry Service Team
    10F, KIC III, No. 333 Songhu Road, Yangpu District. Shanghai 200433


    --

    Frank(mingfan) Lu


    Ext. 8004

    Tel: 86-21-60349004

    VMware Cloudfoundry Service Team
    10F, KIC III, No. 333 Songhu Road, Yangpu District. Shanghai 200433
  • Stoneage14 at Jun 27, 2012 at 6:00 am
    humm, the config file is good. Now it works well, Thanks Frank:)
    On Jun 27, 11:55 am, Frank Lu wrote:
    Have you also modified this line?https://github.com/cloudfoundry/vcap/blob/master/dev_setup/cookbooks/...
    default[:postgresql][:service_port] = "5433" to default[:postgresql][
    :service_port] = "5432" ?

    If yes, it is port conflict.
    If no, you should check why you postgresql 9.1 failed to start. look at the
    log /var/log/postgresql/postgresql-9.1-main.log

    On Wed, Jun 27, 2012 at 11:45 AM, stoneag...@163.com wrote:








    you're right, my VM is ubuntu12.04, and I updated the cookbooks
    attributes to use 9.1
    On Jun 27, 11:21 am, Frank Lu wrote:
    By default, we will use postgresql 9.0  It seems that you failed to install
    postgresql 9.0. (have you modified the cookbooks to use 9.1?)
    You should try to check why you could not install postgresql 9.0.  Do you
    have pitti-postgresql-lucid.list in /etc/apt/sources.list.d/ ?
    On Wed, Jun 27, 2012 at 11:16 AM, stoneag...@163.com <stoneag...@163.com
    wrote:
    Thanks Frank,
    I check the directories that you said, and there are some config
    files.
    and I found both of the 8.4/main/postgresql.conf and 9.1/main/
    postgresql.conf, the listen port are 5432, I think it is the reason
    that  my postgresql_node faild to start, because postgresql_node will
    connect 5433.
    I will try to fix it and restart the cloud foundry.
    Thanks very much :)
    On Jun 27, 10:46 am, Frank Lu wrote:
    1)  Could you check whether postgresql 9.0 is installed
    successfully? There should be some files in
    /etc/postgresql/9.0/main/ and
    /var/lib/postgresql/9.0/bin if it is installed successfully.
    Before this commithttps://
    github.com/cloudfoundry/vcap/commit/1d02dcb03856f116b12a99885...
    .
    The vcap_dev_setup could report installation is successful
    even if
    postgresql 9.0 failed to install for some reasons.
    You could try to run manually to see what happen to your apt.
    sudo apt-get install -y postgresql-9.0
    2)  If it is installed, could you check the configuration files such
    as
    postgresql.conf and pg_hba.conf, is there any suspicious things ?
    I think you could take a look
    at /var/log/postgresql/postgresql-9.0-main.log to get more details
    why it
    failed to start.
    On Wed, Jun 27, 2012 at 10:23 AM, stoneag...@163.com <
    stoneag...@163.com
    wrote:
    Hi all,
    I install a new cloud foundry from source code last week. and I
    found
    the postgresql_node can not work well.
    Then I check the log and found that the postgresql_node can not
    connect to localhost 5433. But there is no prints when I use
    "netstat -
    an | grep 5433", so does it means the postgresql service fail to
    start?
    and the following is my postgresql_node configuration:
    ---------------------------------------------------------------------------
    ----
    capacity: 50
    plan: free
    local_db: sqlite3:/var/vcap/services/postgresql/postgresql_node.db
    ip_route: 127.0.0.1
    base_dir: /var/vcap/services/postgresql/
    dump_bin: pg_dump
    restore_bin: pg_resotre
    mbus: nats://nats:n...@10.10.24.131:4222/
    index: 0
    pid: /var/vcap/sys/run/postgresql_node.pid
    node_id: postgresql_node_0
    max_db_size: 20
    max_long_query: 3
    max_long_tx: 30
    max_db_conns: 20
    db_size_overhead: 5.4
    migration_nfs: /mnt/migration
    postgresql:
    host: localhost
    port: 5433
    user: root
    pass: changeme
    database: pg_service
    logging:
    level: debug
    ---------------------------------------------------------------------------
    ----
    And the following is the log:
    =================== LOG ======================
    /home/dragon/cloudfoundry/.deployments/devbox/deploy/rubies/ruby-1.9.2-
    p180/lib/ruby/gems/1.9.1/gems/uuid-2.3.5/lib/uuid.rb:72: warning:
    already initialized constant VERSION
    [2012-06-19 02:42:39.999342] postgresql_node_0 - pid=13718 tid=ce0b
    fid=b6b2   INFO -- AuaaS-Node: Initializing
    [2012-06-19 02:42:40.172745] postgresql_node_0 - pid=13718 tid=ce0b
    fid=b6b2  DEBUG -- AuaaS-Node: Connected to node mbus
    DataObjects::URI.new with arguments is deprecated, use a Hash of
    URI
    components (/home/dragon/cloudfoundry/.deployments/devbox/deploy/
    rubies/ruby-1.9.2-p180/lib/ruby/gems/1.9.1/gems/dm-do-adapter-1.1.0/
    lib/dm-do-adapter/adapter.rb:231:in `new')
    [2012-06-19 02:42:40.362114] postgresql_node_0 - pid=13718 tid=ce0b
    fid=b6b2   INFO -- PostgreSQL connect: localhost, 5433, root,
    changeme, pg_service (fail_with_nil: false)
    [2012-06-19 02:42:40.362668] postgresql_node_0 - pid=13718 tid=ce0b
    fid=b6b2  ERROR -- PostgreSQL connection attempt failed: localhost
    5433 pg_service root changeme
    [2012-06-19 02:42:42.362939] postgresql_node_0 - pid=13718 tid=ce0b
    fid=b6b2   INFO -- PostgreSQL connect: localhost, 5433, root,
    changeme, pg_service (fail_with_nil: false)
    [2012-06-19 02:42:42.363444] postgresql_node_0 - pid=13718 tid=ce0b
    fid=b6b2  ERROR -- PostgreSQL connection attempt failed: localhost
    5433 pg_service root changeme
    [2012-06-19 02:42:44.363716] postgresql_node_0 - pid=13718 tid=ce0b
    fid=b6b2   INFO -- PostgreSQL connect: localhost, 5433, root,
    changeme, pg_service (fail_with_nil: false)
    [2012-06-19 02:42:44.364400] postgresql_node_0 - pid=13718 tid=ce0b
    fid=b6b2  ERROR -- PostgreSQL connection attempt failed: localhost
    5433 pg_service root changeme
    [2012-06-19 02:42:46.364706] postgresql_node_0 - pid=13718 tid=ce0b
    fid=b6b2   INFO -- PostgreSQL connect: localhost, 5433, root,
    changeme, pg_service (fail_with_nil: false)
    [2012-06-19 02:42:46.365100] postgresql_node_0 - pid=13718 tid=ce0b
    fid=b6b2  ERROR -- PostgreSQL connection attempt failed: localhost
    5433 pg_service root changeme
    [2012-06-19 02:42:48.365321] postgresql_node_0 - pid=13718 tid=ce0b
    fid=b6b2   INFO -- PostgreSQL connect: localhost, 5433, root,
    changeme, pg_service (fail_with_nil: false)
    [2012-06-19 02:42:48.365871] postgresql_node_0 - pid=13718 tid=ce0b
    fid=b6b2  ERROR -- PostgreSQL connection attempt failed: localhost
    5433 pg_service root changeme
    [2012-06-19 02:42:50.366111] postgresql_node_0 - pid=13718 tid=ce0b
    fid=b6b2  FATAL -- PostgreSQL connection unrecoverable
    [2012-06-19 02:42:50.366267] postgresql_node_0 - pid=13718 tid=ce0b
    fid=b6b2   INFO -- AuaaS-Node: Shutting down
    ===================================
    How to fix it and let the postgresql_node work as well?
    Thanks
    Brick.
    --
    Frank(mingfan) Lu
    Ext. 8004
    Tel: 86-21-60349004
    VMware Cloudfoundry Service Team
    10F, KIC III, No. 333 Songhu Road, Yangpu District. Shanghai 200433
    --
    Frank(mingfan) Lu
    Ext. 8004
    Tel: 86-21-60349004
    VMware Cloudfoundry Service Team
    10F, KIC III, No. 333 Songhu Road, Yangpu District. Shanghai 200433
    --

    Frank(mingfan) Lu

    Ext. 8004

    Tel: 86-21-60349004

    VMware Cloudfoundry Service Team
    10F, KIC III, No. 333 Songhu Road, Yangpu District. Shanghai 200433

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupvcap-dev @
postedJun 27, '12 at 2:24a
activeJun 27, '12 at 6:00a
posts7
users2

2 users in discussion

Stoneage14: 4 posts Frank Lu: 3 posts

People

Translate

site design / logo © 2022 Grokbase