postgresql 9.4 Ubuntu 15.10 не может загрузить pg_hba.conf

Я получаю эту ошибку:

$ sudo -u postgres /usr/lib/postgresql/9.4/bin/pg_ctl start -D /etc/postgresql/9.4/main
server starting
jalal@klein:~/Downloads$ 2016-09-08 13:21:04 CDT [5704-1] LOG:  invalid authentication method "localhost"
2016-09-08 13:21:04 CDT [5704-2] CONTEXT:  line 85 of configuration file "/etc/postgresql/9.4/main/pg_hba.conf"
2016-09-08 13:21:04 CDT [5704-3] FATAL:  could not load pg_hba.conf

У меня есть это в pg_hba.conf:

local   xnat            xnat01          localhost               trust

#local   all             postgres                                peer

# TYPE  DATABASE        USER            ADDRESS                 METHOD

# "local" is for Unix domain socket connections only
local   all             all                                     trust
# IPv4 local connections:
host    all             all             127.0.0.1/32            trust

#host    all             all             0.0.0.0/0               trust
# IPv6 local connections:
host    all             all             ::1/128                 md5

и у меня есть это в моем postgresql.conf:

listen_addresses = '*'

                                        # comma-separated list of addresses;
                                        # defaults to 'localhost'; use '*' for all
                                        # (change requires restart)
port = 5432                             # (change requires restart)
max_connections = 100                   # (change requires restart)
# Note:  Increasing max_connections costs ~400 bytes of shared memory per
# connection slot, plus lock space (see max_locks_per_transaction).
#superuser_reserved_connections = 3     # (change requires restart)
unix_socket_directories = '/var/run/postgresql' # comma-separated list of directories
                                        # (change requires restart)
#unix_socket_group = ''                 # (change requires restart)
#unix_socket_permissions = 0777         # begin with 0 to use octal notation
                                        # (change requires restart)
#bonjour = off                          # advertise server via Bonjour
                                        # (change requires restart)
#bonjour_name = ''                      # defaults to the computer name
                                        # (change requires restart)

# - Security and Authentication -

#authentication_tim[5704-3] FATAL:  could not load pg_hba.confeout = 1min          # 1s-600s
ssl = true                              # (change requires restart)
#ssl_ciphers = 'HIGH:MEDIUM:+3DES:!aNULL' # allowed SSL ciphers
                                        # (change requires restart)
#ssl_prefer_server_ciphers = on         # (change requires restart)
#ssl_ecdh_curve = 'prime256v1'          # (change requires restart)
#ssl_renegotiati[5704-3] FATAL:  could not load pg_hba.confon_limit = 0            # amount of data between renegotiations
ssl_cert_file = '/etc/ssl/certs/ssl-cert-snakeoil.pem'          # (change requires restart)
ssl_key_file = '/etc/ssl/private/ssl-cert-snakeoil.key'         # (change requires restart

[5704-3] FATAL: не удалось загрузить pg_hba.conf

Также в моем build.properties у меня есть:

# WINDOWS USERS: The '\' character is not supported by Maven.  Do not use the '\' character in your file paths.
# Replace any '\'[5704-3] FATAL:  could not load pg_hba.conf characters with the '/'.  The '/' works as a file path separator on UNIX and WINDOWS.

# NOTE: All file paths should be absolute, not relative to the xnat_builder folder. This means that, if your
# pipeline or modules folder is in the same relative folder as your xnat_builder folder, you should still use 
# the full path to those folders instead of ../pipeline or ../modules.
maven.repo.remote = https://nrgxnat.artifactoryonline.com/nrgxnat/xnat-maven1
maven.appserver.home = TOMCAT_HOME

# Default XNAT site title, also used as mail subject prefix.
xnat.site.title=XNAT

xdat.project.name=xnat
xdat.project.db.name=xnat
xdat.project.db.driver=org.postgresql.Driver
xdat.project.db.connection.string=jdbc:postgresql://localhost/xnat
xdat.project.db.user=xnat
xdat.project.db.password=1234

# IMAGE FILE LOCATION (FOR USE WITH THE xnat TEMPLATE)
# Location where image data will be stored, e.g. /tmp/archive.
# As with all folder locations, these paths should be absolute, not relative to your xnat_builder location.
# UNIX Users: For easier setup, we recommend that the data directories specified below (archive, prearchive, cache, etc.) be owned by the same user account which will execute Tomcat. 
xdat.archive.location=/Library/XNAT/archive

# Location where image data is stored temporarily before it is moved into the archive, e.g. /tmp/prearchive.
xdat.prearchive.location=/Library/XNAT/prearchive

# Location where cached image data is stored, e.g. /tmp/cache.
xdat.cache.location=/Library/XNAT/cache

# Location for ftp data
xdat.ftp.location=/Library/XNAT/ftp
[5704-3] FATAL:  could not load pg_hba.conf
# Location for build data.
xdat.build.location=/Library/XNAT/build

# Location of your pipeline installation.
# If you have pipeline installed outside of your xnat_builder folder, un-comment this property to set it
# the appropriate location. As with all folder locations, these paths should be absolute, not relative to
# your xnat_builde[5704-3] FATAL:  could not load pg_hba.confr location.
# xdat.pipeline.in[5704-3] FATAL:  could not load pg_hba.confstaller.location=/Library/XNAT/pipeline-installer
# xdat.pipeline.deployment.location=/Library/XNAT/pipeline
# xdat.pipeline.modules.locations=/Library/XNAT/pipeline_modules

# Mail server, port, and protocol. Standard SMTP port is 25 or 587, Google SMTPS port is 465. See the
# sample configuration files in plugin-resources/conf for examples in how to set up SMTPS servers, as well
# as encrypted mail service credentials.
xdat.mail.server=mail.server
xdat.mail.port=25
xdat.mail.protocol=smtp

# Mail server credentials. These values are only required for mail servers with authentic[5704-3] FATAL:  could not load pg_hba.confation turned on.
xdat.mail.username=
xdat.mail.password=

# The email address for the XNAT system administrator.
xdat.mail.admin=administrator@xnat.org

# The URL for your XNAT server installation, e.g. http://localhost:8080/xnat
xdat.url=http://lo[5704-3] FATAL:  could not load pg_hba.confcalhost:8080/xnat

# 'xdat.require_login' must be set to 'true' or 'false'.  It governs whether or not users will be
# prompted to login when visiting the site.  If true, users will be required to login.  If false,
# users will be automatically logged in using an XNAT guest account.
xdat.require_login=true

# 'xdat.enable_new_registrations' must be set to 'true' or 'false'.  Users are provided with a
# link on the Login.vm page to register for a new account.  If this variable is true, that newly
# registered accoun[5704-3] FATAL:  could not load pg_hba.conft will be automatically enabled and the user will be allowed to immediately login.
# If this is false, then an email will be sent to the admin (xdat.admin_email) requesting that the
# account be enabled, and the user will be unable to login until the account is enabled.
xdat.enable_new_registrations=false

# The modules location setting indicates where custom modules are located. The setup/update scripts
# always look in the modules subfolder of the xnat_builder installation, but will also look in the
# indicated folder if this is set.
# xdat.modules.location=/Library/XNAT/modules

# 'xdat.security.channel' specifies what type of HTTP connection should be configured for the XNAT
# server. This has three possible values:
#  * http indicates that the server MUST be unencrypted http connection
#  * https indicates that the server MUST be an SSL-encrypted https connection
#  * any indicates t[5704-3] FATAL:  could not load pg_hba.confhat the server can use either an unencrypted or SSL-encrypted connection
# Production servers or any server on a network that can be reached from outside the hosting network
# should always use https.
xdat.security.channel=any

#  'xdat.enable_csrf_token' must be set to 'true' or 'false'.  It governs whether or not POST, PUT, & DELETEs
#  are protected by a csrf token.  If true, a CSRF token will be required.  If false,
#  the test for a valid token are skipped.
xdat.enable_csrf_token=true

[5704-3] FATAL: не удалось загрузить pg_hba.conf при попытке запустить ./bin/setup.sh Я получаю эти ошибки:

jalal@klein:~/computer_vision/XNAT/xnat$ ./bin/setup.sh 

Using XDAT Installation: /home/jalal/computer_vision/XNAT/xnat
Using JAVA_HOME:         /usr/lib/jvm/java-8-openjdk-amd64/

Verify Java Version (with java -version)
openjdk version "1.8.0_91"
OpenJDK Runtime Environment (build 1.8.0_91-8u91-b14-3ubuntu1~15.10.1-b14)
OpenJDK 64-Bit Server VM (build 25.91-b14, mixed mode)
 [5704-3] FATAL:  could not load pg_hba.conf
Executing /home/jalal/computer_vision/XNAT/xnat/plugin-resources/maven-1.0.2/bin/maven xdat:setup
 __  __
|  \/  |__ _Apache__ ___
| |\/| / _` \ V / -_) ' \  ~ intelligent projects ~
|_|  |_\__,_|\_/\___|_||_|  v. 1.0.2

build:start:

xdat:setup:
    [echo] HOME: /home/jalal/computer_vision/XNAT/xnat
xdat:version:[5704-3] FATAL:  could not load pg_hba.conf
    [echo] Setting the project version
    [echo] Setting project version to: 1.6.5
Unable to connected to 'jdbc:postgresql://localhost/xnat'
Please resolve the PostgreSQL issue (specified below).

BUILD FAILED
File...... /home/jalal/computer_vision/XNAT/xnat/maven.xml
Element... ant:TestDB
Line...... 1489
Column.... 183[5704-3] FATAL:  could not load pg_hba.conf
Connection refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.
Total time: 2 seconds
Finished at: Thu Sep 08 13:27:03 CDT 2016

[5704-3] FATAL: не удалось загрузить pg_hba.conf

0 ответов

Другие вопросы по тегам