VMware Cloud Community
ConorScolard
Contributor
Contributor
Jump to solution

New 9.7 Appliance Install Issues

Before we go moving to 9.7 and dealing with the SQL to Postgres issues i decided to build a small lab vCloud instance.

I installed the VCD appliance and left all the settings default where possible.

My understanding is that with this basic deployment that VCD would use its internal Postgres DB.

However on boot of the VM after the OVF deployment i am met with this error:

No nodes found in cluster, this likely means PostgreSQL is not running on this node. Consult the management UI from another node where PostgreSQL is running. Otherwise, check /opt/vmware/var/log/vcd/vcd_ova_ui_app.log if you think this is an error.

pastedImage_1.png

This is a bit odd, so i redeployed the OVF. Same issue.

Does the new appliance not have a DB and if it does what the heck am i doing wrong here?

I checked the logs and it shows the images listed.

pastedImage_0.png

Reply
0 Kudos
1 Solution

Accepted Solutions
sk84
Expert
Expert
Jump to solution

It seems that the permissions on the NFS share are still not correct:

2019-05-01 16:23:48 | Mounting NFS file share...

2019-05-01 16:23:48 | System ip0 is: 10.200.1.6

chown: changing ownership of '/opt/vmware/vcloud-director/data/transfer/foo': Operation not permitted

chown: changing ownership of '/opt/vmware/vcloud-director/data/transfer': Operation not permitted

ls: cannot access '/opt/vmware/vcloud-director/data/transfer/appliance-nodes': No such file or directory

ls: cannot access '/opt/vmware/vcloud-director/data/transfer/cells': No such file or directory

The share must be readable and writeable for the vcloud user (user id 1000 or 1001, not sure what the appliances are using in 9.7).

And because of this permission error vCD is not able to write the pg_hba.conf file to the nfs share and therefore the other nodes can't connect to the master db:

2019-05-01 16:23:54,935 | ERROR| main                 | ConfigAgent               | Could not connect to database: FATAL: no pg_hba.conf entry for host "10.200.1.7", user "vcloud", database "vcloud", SSL off |
--- Regards, Sebastian VCP6.5-DCV // VCP7-CMA // vSAN 2017 Specialist Please mark this answer as 'helpful' or 'correct' if you think your question has been answered correctly.

View solution in original post

Reply
0 Kudos
12 Replies
SebastianGrugel
Hot Shot
Hot Shot
Jump to solution

Check NFS rights. etc..

Try mount NFS manually from Appliance and check if you have proper right.

example:

mount 10.10.1.5:/mnt/vcloud-director/data/transfer/transfer2 /tmp/test

I had that same warning...

I think you can find more nformation in logs. Path you have in documentation Later i will share more info.

Sebastian

vExpert VSAN/NSX/CLOUD | VCAP5-DCA | VCP6-DCV/CMA/NV ==> akademiadatacenter.pl
ConorScolard
Contributor
Contributor
Jump to solution

This was right on the money until i got the same issue after fixing permissions.

I found a log file thats helpful - /opt/vmware/var/log/vcd/setupvcd.log

root@vcd01 [ ~ ]# cat /opt/vmware/var/log/vcd/setupvcd.log

2019-05-01 16:23:48 | Mounting NFS file share...

2019-05-01 16:23:48 | System ip0 is: 10.200.1.6

chown: changing ownership of '/opt/vmware/vcloud-director/data/transfer/foo': Operation not permitted

chown: changing ownership of '/opt/vmware/vcloud-director/data/transfer': Operation not permitted

ls: cannot access '/opt/vmware/vcloud-director/data/transfer/appliance-nodes': No such file or directory

ls: cannot access '/opt/vmware/vcloud-director/data/transfer/cells': No such file or directory

2019-05-01 16:23:48 | Invoking appliance-sync.sh now...

2019-05-01 16:23:52 | Configuring vCD from OVF properties as initial cell...

2019-05-01 16:23:52 | Configuring the embedded PostgreSQL database...

2019-05-01 16:23:52 | Creating PostgreSQL user (vcloud) and database (vcloud)...

CREATE ROLE

ALTER ROLE

ALTER ROLE

CREATE DATABASE

2019-05-01 16:23:52 | DB Host value is 10.200.1.7

May 01, 2019 4:23:54 PM org.postgresql.Driver connect

SEVERE: Connection error:

org.postgresql.util.PSQLException: FATAL: no pg_hba.conf entry for host "10.200.1.7", user "vcloud", database "vcloud", SSL off

        at org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:438)

        at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:222)

        at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:49)

        at org.postgresql.jdbc.PgConnection.<init>(PgConnection.java:194)

        at org.postgresql.Driver.makeConnection(Driver.java:450)

        at org.postgresql.Driver.connect(Driver.java:252)

..................................................... obviously this keeps going into meaninglessness

Then i check the logs in vcd

cat /opt/vmware/vcloud-director/logs/configure-2019-05-01-16-23-53.log

2019-05-01 16:23:53,710 | INFO | main                  | ConfigAgent                | System Version=1 |
2019-05-01 16:23:54,003 | DEBUG| main                  | ConfigAgent                | Using the folowing parameters for unattended installation: |
2019-05-01 16:23:54,004 | DEBUG| main                  | ConfigAgent                | unattended-installation: TRUE |
2019-05-01 16:23:54,004 | DEBUG| main                  | ConfigAgent                | database-type: postgres |
2019-05-01 16:23:54,005 | DEBUG| main                  | ConfigAgent                | database-user: vcloud |
2019-05-01 16:23:54,005 | DEBUG| main                  | ConfigAgent                | database-password: ********** |
2019-05-01 16:23:54,005 | DEBUG| main                  | ConfigAgent                | database-host: 10.200.1.7 |
2019-05-01 16:23:54,006 | DEBUG| main                  | ConfigAgent                | database-port: 5432 |
2019-05-01 16:23:54,006 | DEBUG| main                  | ConfigAgent                | database-name: vcloud |
2019-05-01 16:23:54,006 | DEBUG| main                  | ConfigAgent                | keystore: /opt/vmware/vcloud-director/certificates.ks |
2019-05-01 16:23:54,006 | DEBUG| main                  | ConfigAgent                | keystore-password: ********** |
2019-05-01 16:23:54,007 | DEBUG| main                  | ConfigAgent                | primary-ip: 10.200.1.6 |
2019-05-01 16:23:54,007 | DEBUG| main                  | ConfigAgent                | console-proxy-ip: 10.200.1.6 |
2019-05-01 16:23:54,010 | DEBUG| main                  | ConfigAgent                | console-proxy-port-https: 8443 |
2019-05-01 16:23:54,021 | INFO | main                  | ConfigAgent                | Detected the following IP addresses: [/10.200.1.6, /10.200.1.7, /127.0.0.1, /0:0:0:0:0:0:0:1%lo] |
2019-05-01 16:23:54,027 | DEBUG| main                  | ConfigAgent                | The HTTP service and remote console proxy IP addresses have already been set, skipping. |
2019-05-01 16:23:54,028 | INFO | main                  | ConfigAgent                | Keystore path entered: /opt/vmware/vcloud-director/certificates.ks |
2019-05-01 16:23:54,715 | DEBUG| main                  | ConfigAgent                | No DSA certificates found; disabling DSA ciphers for SSL/TLS connections. See KB 2056026 for details |
2019-05-01 16:23:54,716 | INFO | main                  | ConfigAgent                | Generating new UUID: 873c3382-7129-4582-a343-1561567e322b |
2019-05-01 16:23:54,749 | INFO | main                  | ConfigAgent                | Connecting to the database: jdbc:postgresql://10.200.1.7:5432/vcloud?socketTimeout=90 |
2019-05-01 16:23:54,935 | ERROR| main                  | ConfigAgent                | Could not connect to database: FATAL: no pg_hba.conf entry for host "10.200.1.7", user "vcloud", database "vcloud", SSL off |
2019-05-01 16:23:54,938 | ERROR| main                  | ConfigAgent                | Could not connect to database: Verify the database host is reachable from this machine and the provided credentials are valid |
2019-05-01 16:23:54,939 | ERROR| main                  | ConfigAgent                | Aborting configure due to DATABASE_CONNECTION_FAILURE (120) |

com.vmware.vcloud.configure.legacy.ConfigAgentException: Aborting configure due to DATABASE_CONNECTION_FAILURE (120)

Reply
0 Kudos
ConorScolard
Contributor
Contributor
Jump to solution

So from this it seems it cannot connect to the database that is supposed to be running on itself.

This isn't a complicated setup, its a tiny lab with a simple brand new install it shouldn't be this difficult for pity's sake.

So any ideas where i am going wrong or is it that the OVF is the issue...

Reply
0 Kudos
sk84
Expert
Expert
Jump to solution

It seems that the permissions on the NFS share are still not correct:

2019-05-01 16:23:48 | Mounting NFS file share...

2019-05-01 16:23:48 | System ip0 is: 10.200.1.6

chown: changing ownership of '/opt/vmware/vcloud-director/data/transfer/foo': Operation not permitted

chown: changing ownership of '/opt/vmware/vcloud-director/data/transfer': Operation not permitted

ls: cannot access '/opt/vmware/vcloud-director/data/transfer/appliance-nodes': No such file or directory

ls: cannot access '/opt/vmware/vcloud-director/data/transfer/cells': No such file or directory

The share must be readable and writeable for the vcloud user (user id 1000 or 1001, not sure what the appliances are using in 9.7).

And because of this permission error vCD is not able to write the pg_hba.conf file to the nfs share and therefore the other nodes can't connect to the master db:

2019-05-01 16:23:54,935 | ERROR| main                 | ConfigAgent               | Could not connect to database: FATAL: no pg_hba.conf entry for host "10.200.1.7", user "vcloud", database "vcloud", SSL off |
--- Regards, Sebastian VCP6.5-DCV // VCP7-CMA // vSAN 2017 Specialist Please mark this answer as 'helpful' or 'correct' if you think your question has been answered correctly.
Reply
0 Kudos
ConorScolard
Contributor
Contributor
Jump to solution

I have checked the NFS and i can see the folder "appliance-nodes" being written on bootup so i know it can write.

However same errors in logs

root@vcd01 [ ~ ]# cat /opt/vmware/var/log/vcd/setupvcd.log

2019-05-02 14:53:35 | Mounting NFS file share...

2019-05-02 14:53:35 | System ip0 is: 10.200.1.6

chown: changing ownership of '/opt/vmware/vcloud-director/data/transfer': Operation not permitted

ls: cannot access '/opt/vmware/vcloud-director/data/transfer/appliance-nodes': No such file or directory

ls: cannot access '/opt/vmware/vcloud-director/data/transfer/cells': No such file or directory

2019-05-02 14:53:35 | Invoking appliance-sync.sh now...

2019-05-02 14:53:38 | Configuring vCD from OVF properties as initial cell...

2019-05-02 14:53:38 | Configuring the embedded PostgreSQL database...

2019-05-02 14:53:38 | Creating PostgreSQL user (vcloud) and database (vcloud)...

CREATE ROLE

ALTER ROLE

ALTER ROLE

CREATE DATABASE

2019-05-02 14:53:39 | DB Host value is 192.168.20.1

May 02, 2019 2:53:41 PM org.postgresql.Driver connect

SEVERE: Connection error:

org.postgresql.util.PSQLException: FATAL: no pg_hba.conf entry for host "192.168.20.1", user "vcloud", database "vcloud", SSL off

        at org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:438)

        at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:222)

        at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:49)

        at org.postgresql.jdbc.PgConnection.<init>(PgConnection.java:194)

        at org.postgresql.Driver.makeConnection(Driver.java:450)

        at org.postgresql.Driver.connect(Driver.java:252)

        at com.vmware.vcloud.common.datasource.DataSourceFactory$ConfigurationAwareDataSource.getConnection(DataSourceFactory.java:53)

        at org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDataSource(PooledConnection.java:224)

        at org.apache.tomcat.jdbc.pool.PooledConnection.connect(PooledConnection.java:180)

        at org.apache.tomcat.jdbc.pool.ConnectionPool.createConnection(ConnectionPool.java:710)

        at org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:644)

        at org.apache.tomcat.jdbc.pool.ConnectionPool.init(ConnectionPool.java:466)

        at org.apache.tomcat.jdbc.pool.ConnectionPool.<init>(ConnectionPool.java:143)

        at org.apache.tomcat.jdbc.pool.DataSourceProxy.pCreatePool(DataSourceProxy.java:116)

        at org.apache.tomcat.jdbc.pool.DataSourceProxy.createPool(DataSourceProxy.java:103)

        at org.apache.tomcat.jdbc.pool.DataSourceProxy.getConnection(DataSourceProxy.java:127)

        at com.vmware.vcloud.common.install.impl.AbstractDatabaseContext.connect(AbstractDatabaseContext.java:226)

        at com.vmware.vcloud.configure.legacy.Db.<init>(Db.java:78)

        at com.vmware.vcloud.configure.legacy.ConfigAgent.getDb(ConfigAgent.java:1412)

        at com.vmware.vcloud.configure.legacy.ConfigAgent.configureDatabaseParameters(ConfigAgent.java:1270)

        at com.vmware.vcloud.configure.legacy.ConfigAgent.configureDatabase(ConfigAgent.java:1199)

        at com.vmware.vcloud.configure.legacy.ConfigAgent.start(ConfigAgent.java:362)

        at com.vmware.vcloud.configure.legacy.ConfigAgentExecutor.start(ConfigAgentExecutor.java:87)

        at com.vmware.vcloud.configure.legacy.ConfigAgentExecutor.main(ConfigAgentExecutor.java:81)

So i checked the mount, its there ok.

However attempting to write to the location does not work

root@vcd01 [ /opt/vmware/vcloud-director/data/transfer ]# cd appliance-nodes/

root@vcd01 [ /opt/vmware/vcloud-director/data/transfer/appliance-nodes ]# ls

node-49f431fd-94f3-4b54-8e63-e5d3f08dc42c

root@vcd01 [ /opt/vmware/vcloud-director/data/transfer/appliance-nodes ]# cd node-49f431fd-94f3-4b54-8e63-e5d3f08dc42c/

root@vcd01 [ /opt/vmware/vcloud-director/data/transfer/appliance-nodes/node-49f431fd-94f3-4b54-8e63-e5d3f08dc42c ]# ls

root@vcd01 [ /opt/vmware/vcloud-director/data/transfer/appliance-nodes/node-49f431fd-94f3-4b54-8e63-e5d3f08dc42c ]# cd ..

root@vcd01 [ /opt/vmware/vcloud-director/data/transfer/appliance-nodes ]# cd node-49f431fd-94f3-4b54-8e63-e5d3f08dc42c/

root@vcd01 [ /opt/vmware/vcloud-director/data/transfer/appliance-nodes/node-49f431fd-94f3-4b54-8e63-e5d3f08dc42c ]# touch file.txt

touch: cannot touch 'file.txt': Permission denied

It was indeed still permissions, which now i have fixed and its working. Thanks to all!

Reply
0 Kudos
No_Way
Enthusiast
Enthusiast
Jump to solution

Hi Conor,

Can you explain what did you change in the permission? I have the same issue, or similar, but cannot find a way the installation finish with success.

In the setupvcd.log I have this:

2019-05-16 15:17:53 | Mounting NFS file share...

2019-05-16 15:17:54 | System ip0 is: 192.168.1.106

chown: cannot read directory '/opt/vmware/vcloud-director/data/transfer/#recycle': Permission denied

chown: changing ownership of '/opt/vmware/vcloud-director/data/transfer': Operation not permitted

ls: cannot access '/opt/vmware/vcloud-director/data/transfer/appliance-nodes': No such file or directory

ls: cannot access '/opt/vmware/vcloud-director/data/transfer/cells': No such file or directory

2019-05-16 15:17:54 | Invoking appliance-sync.sh now...

2019-05-16 15:17:59 | Configuring vCD from OVF properties as initial cell...

2019-05-16 15:18:00 | Configuring the embedded PostgreSQL database...

2019-05-16 15:18:00 | Creating PostgreSQL user (vcloud) and database (vcloud)...

CREATE ROLE

ALTER ROLE

ALTER ROLE

CREATE DATABASE

2019-05-16 15:18:03 | DB Host value is 192.168.1.107

- .\ | ./ - .\ | ./ - .\ | ./ - .\ | ./ - .\ | ./ - .\ | ./ - .\ | ./ - .\ | ./ - .\ | ./ - .\ | ./ - .\ | ./ - .\ | ./ - .\ | ./ - .\ | ./ - .\ | ./ - .\ | ./ - .\ | ./ - .\ | ./ - .\ | ./ - .\ | ./

Database configuration complete.

2019-05-16 15:19:42 | Copying local responses.properties to NFS.

2019-05-16 15:19:42 | Invoking firstrunwizard.sh now...

2019-05-16 15:19:48 | [ERROR] Failed to run firstrunwizard.sh. See /opt/vmware/var/log/vcd/firstrunwizard.log for details. Aborting.

I can write in the folder/mount without any issues, it seems the issue is that cannot change permissions on the folder. If I try to change permission I also get Permission denied.

I am stuck here and cannot go further.

Thank You

NW

Reply
0 Kudos
No_Way
Enthusiast
Enthusiast
Jump to solution

Hi

Found the issue. The installation was not able to take ownership of the folder with the vcloud user.

It was still own by the root user.

So I manually change the ownership to vcloud user and rerun the configure script and all work ok.

Thank You

NW

Reply
0 Kudos
gpigott
Contributor
Contributor
Jump to solution

The other option is to change the umask setting on the NFS server. Edit /etc/profile and add the line "umask=000". This will ensure that all new files are global r/w.

Reply
0 Kudos
Rob80
Contributor
Contributor
Jump to solution

No_Way,

I have exactly same issue with VCD deployment and wonder if further details could provided on how do I manually change permissions for vcloud user.

Thanks

Reply
0 Kudos
No_Way
Enthusiast
Enthusiast
Jump to solution

Hi,

​You need to change the ownership of the NFS Folder.

​For my case was the opt/vmware/vcloud-director/data/transfer NFS folder that need to change the ownership to vcloud user.

example:

chown -R vcloud:cloud /opt/vmware/vcloud-director/data/transfer

chmod -R 775 /opt/vmware/vcloud-director/data/transfer

Then restarted the service and all run ok: service vmware-vcd restart


I did not wrote any blog post about this, even was in my list. ​In this blog explains how to do it.

VMware vCloud Transfer spooling area is not writa...


JL

Reply
0 Kudos
Rob80
Contributor
Contributor
Jump to solution

Hi

I tried command line below:

  • chown -R vcloud:vcloud /opt/vmware/vcloud-director/data/transfer
  • chmod -R 775 /opt/vmware/vcloud-director/data/transfer

which has brought appliance status to active but DB had same issue

No nodes found in cluster, this likely means PostgreSQL is not running on this node. Consult the management UI from another node where PostgreSQL is running. Otherwise, check /opt/vmware/var/log/vcd/vcd_ova_ui_app.log if you think this is an error.

Than I reinstalled once again and can't access any logs due to permission issues

root@vcloud [ ~ ]# /opt/vmware/var/log/vcd/setupvcd.log

-bash: /opt/vmware/var/log/vcd/setupvcd.log: Permission denied

root@vcloud [ ~ ]# /opt/vmware/var/log/vcd/setupvcd.log

-bash: /opt/vmware/var/log/vcd/setupvcd.log: Permission denied

root@vcloud [ ~ ]#

root@vcloud [ ~ ]# service vmware-vcd status

* vmware-vcd.service - LSB: The VMware vCloud Director service

   Loaded: loaded (/etc/rc.d/init.d/vmware-vcd; generated; vendor preset: enable

   Active: inactive (dead)

     Docs: man:systemd-sysv-generator(8)

lines 1-4/4 (END)

Any help would be appreciated.

Reply
0 Kudos
raghav290787
Contributor
Contributor
Jump to solution

Facing exactly same issue with vCD 10.x. Single cell instance.

NFS permission is fine.

Application Initialization: 'com.vmware.vcloud.common.core' complete.

Successfully handled all queued events.

Successfully verified transfer spooling area: /opt/vmware/vcloud-director/data/transfer

Cell startup completed in 0m 51s

# cat /opt/vmware/var/log/vcd/setupvcd.log

2020-02-21 07:08:16 | Mounting NFS file share...

2020-02-21 07:08:16 | System ip0 is: x.x.x.x

ls: cannot access '/opt/vmware/vcloud-director/data/transfer/appliance-nodes': No such file or directory

ls: cannot access '/opt/vmware/vcloud-director/data/transfer/cells': No such file or directory

2020-02-21 07:08:16 | Invoking appliance-sync.sh now...

2020-02-21 07:08:19 | Configuring vCD from OVF properties as initial cell...

2020-02-21 07:08:19 | Configuring the embedded PostgreSQL database...

2020-02-21 07:08:19 | Creating PostgreSQL user (vcloud) and database (vcloud)...

CREATE ROLE

ALTER ROLE

ALTER ROLE

CREATE DATABASE

2020-02-21 07:08:19 | DB Host value is x.x.x.x

.......................................\

Database configuration complete.

2020-02-21 07:09:31 | Copying local responses.properties to NFS.

2020-02-21 07:09:31 | Invoking firstrunwizard.sh now...

2020-02-21 07:09:33 | [ERROR] Failed to run firstrunwizard.sh. See /opt/vmware/var/log/vcd/firstrunwizard.log for details. Aborting.

Is there any other option to fix this other than redeploying the appliance?

pastedImage_1.png

Reply
0 Kudos