UPDATE
=======
After some more tinkering and Internet searching, I have finally figured out what was the problem, which is weird and IMHO the correct way (until the packaging issue is not fixed) - specifying the version of PostgreSQL about to be installed implicitly - should be mentioned in the iRODS installation instructions. Relevant info include this answer (
http://askubuntu.com/a/334730) as well as mentioned in the comments there advice on complete removal of a PostgreSQL server installation (
http://johnmee.com/how-to-reinstall-postgresql-on-ubuntu). I have followed both recommendations and, after installing PostgreSQL 9.6 was happy to see that the server is not only running, but also listening on the default post:
root@matin-irods:~# netstat -ln | grep 5432
tcp6 0 0 ::1:5432 :::* LISTEN
unix 2 [ ACC ] STREAM LISTENING 1505327 /var/run/postgresql/.s.PGSQL.5432
However, unfortunately, continuing following the prompts of the iRODS setup script, I have experienced the following error (sorry about the long output, but I want you to see most of the relevant context). Any help with this issue will be much appreciated.
=======
root@matin-irods:~# python /var/lib/irods/scripts/setup_irods.py
Updating /var/lib/irods/VERSION.json...
The iRODS service account name needs to be defined.
iRODS user [irods]:
iRODS group [irods]:
+--------------------------------+
| Setting up the service account |
+--------------------------------+
Existing Group Detected: irods
Existing Account Detected: irods
Setting owner of /var/lib/irods to irods:irods
Setting owner of /etc/irods to irods:irods
iRODS server's role:
1. provider
2. consumer
Please select a number or choose 0 to enter a new value [1]:
Updating /etc/irods/server_config.json...
+-----------------------------------------+
| Configuring the database communications |
+-----------------------------------------+
You are configuring an iRODS database plugin. The iRODS server cannot be started until its database has been properly configured.
ODBC driver for postgres:
1. PostgreSQL ANSI
2. PostgreSQL Unicode
Please select a number or choose 0 to enter a new value [1]:
Database server's hostname or IP address [localhost]:
Database server's port [5432]:
Database name [ICAT]:
Database username [irods]:
-------------------------------------------
Database Type: postgres
ODBC Driver: PostgreSQL ANSI
Database Host: localhost
Database Port: 5432
Database Name: ICAT
Database User: irods
-------------------------------------------
Please confirm [yes]:
Database password:
Updating /etc/irods/server_config.json...
Listing database tables...
Salt for passwords stored in the database:
Updating /etc/irods/server_config.json...
+--------------------------------+
| Configuring the server options |
+--------------------------------+
iRODS server's zone name [matinZone]:
iRODS server's port [1247]:
iRODS port range (begin) [20000]:
iRODS port range (end) [20199]:
Control Plane port [1248]:
Schema Validation Base URI (or off) [
https://schemas.irods.org/configuration]:
iRODS server's administrator username [rods]:
-------------------------------------------
Zone name: matinZone
iRODS server port: 1247
iRODS port range (begin): 20000
iRODS port range (end): 20199
Control plane port: 1248
Schema validation base URI:
https://schemas.irods.org/configurationiRODS server administrator: rods
-------------------------------------------
Please confirm [yes]:
iRODS server's zone key:
iRODS server's negotiation key (32 characters):
Control Plane key (32 characters):
Updating /etc/irods/server_config.json...
+-----------------------------------+
| Setting up the client environment |
+-----------------------------------+
iRODS server's administrator password:
Updating /var/lib/irods/.irods/irods_environment.json...
+--------------------------+
| Setting up default vault |
+--------------------------+
iRODS Vault directory [/var/lib/irods/Vault]:
+-------------------------+
| Setting up the database |
+-------------------------+
Listing database tables...
Creating database tables...
+-------------------+
| Starting iRODS... |
+-------------------+
Validating [/var/lib/irods/.irods/irods_environment.json]... Success
Validating [/var/lib/irods/VERSION.json]... Success
Error encountered running setup_irods:
Traceback (most recent call last):
File "/var/lib/irods/scripts/setup_irods.py", line 436, in main
setup_server(irods_config, json_configuration_file=options.json_configuration_file)
File "/var/lib/irods/scripts/setup_irods.py", line 126, in setup_server
IrodsController(irods_config).start()
File "/var/lib/irods/scripts/irods/controller.py", line 43, in start
self.config.validate_configuration()
File "/var/lib/irods/scripts/irods/configuration.py", line 256, in validate_configuration
name=config_file['path'])
File "/var/lib/irods/scripts/irods/json_validation.py", line 77, in validate_dict
sys.exc_info()[2])
File "/var/lib/irods/scripts/irods/json_validation.py", line 58, in validate_dict
jsonschema.validate(config_dict, schema)
File "/usr/lib/python2.7/dist-packages/jsonschema/validators.py", line 432, in validate
cls(schema, *args, **kwargs).validate(instance)
File "/usr/lib/python2.7/dist-packages/jsonschema/validators.py", line 117, in validate
raise error
IrodsError: ERROR: Validation Failed for [/etc/irods/server_config.json]:
against [
https://schemas.irods.org/configuration/v3/server_config.json]
ValidationError: u'authentication' is a required property
Failed validating u'required' in schema[u'properties'][u'plugin_configuration']:
{u'properties': {u'authentication': {u'properties': {},
u'type': u'object'},
u'database': {u'additionalProperties': {u'$ref': u'database_config.json'},
u'maxProperties': 1,
u'minProperties': 1,
u'type': u'object'},
u'network': {u'properties': {}, u'type': u'object'},
u'resource': {u'properties': {}, u'type': u'object'},
u'rule_engines': {u'items': {u'$ref': u'rule_engine.json'},
u'minItems': 1,
u'type': u'array'}},
u'required': [u'authentication',
u'network',
u'resource',
u'rule_engines'],
u'type': u'object'}
On instance[u'plugin_configuration']:
{'database': {'postgres': {'db_host': 'localhost',
'db_name': 'ICAT',
'db_odbc_driver': 'PostgreSQL ANSI',
'db_password': '**********',
'db_port': 5432,
'db_username': 'irods'}}}
Exiting...
=======
Thank you,
Aleksandr