При установке postgresql выдает ошибку

I tried to install postgresql 8.4 in my windows 7 (64 bit). But it fails with following messages in log Initialising the database cluster (this may take a few minutes)... Executing cscript //NoLog...

I’ve pulled shin’s link from the google cache:

Original link:
http://www.geekscribes.net/blog/2009/04/22/postgresql-database-cluster-initialisation-failed-solution/

Cached link:
http://webcache.googleusercontent.com/search?q=cache:RXu-5-ZzfcgJ:www.geekscribes.net/blog/2009/04/22/postgresql-database-cluster-initialisation-failed-solution/+&cd=3&hl=ro&ct=clnk


PostgreSQL Database Cluster Initialisation Failed Solution

I’ll keep this one short and sweet. For those of you that have tried to install PostgreSQL (mine was 8.3.7-1) on Windows Vista and got the error Database Cluster Initialisation Failed error at the end of the install, read this.

The problem is that Vista has some safety features associated with setting permissions on the Program Files folder. Basically, even if you are an admin, you can’t change permissions on some folders like Program Files and Windows folder itself. This causes initdb to be unable to create some folders and the database cluster. What this means for you is that you need to install PostgreSQL in another folder that is not inside Program Files.

By the way, if you have forgotten your Postgres account password while installing the first time, just open a Command Prompt in Vista (If you don’t know how, Google for it). Then type the command “net user”. You will see a list of users on your computer. Find Postgre’s account. It’s usually “postgres“. Then you need to change its password by typing “net user postgres new_password” where new_password is… well, a new password for the account. You will be needing that postgres account during install. You will need admin privileges to do this change however.

Firstly, uninstall any failed installations. Use the Control Panel or the PostgreSQL installer in the install folder.

During the install, you will be prompted to choose where you want to install the program. Just select a location in another place. Like “C:PostgreSQL” or something similar. It may even be on your desktop. But not inside Program Files. Not inside Windows folder. However, it’s not as easy. Bear with me.

After the install, you will still see that darned error message (or something like non-fatal error occured). Do not despair! (For Windows Power Users, we are just assigning Full Control permission to Postgres account on the new PostgreSQL install folder). For other users, read on if you don’t know how to do it.

Go to where you just installed PostgreSQL. In this case, the C: drive. There, right-click on the folder (usually called PostgreSQL), and go to Properties – Security tab. Click on the Edit button. You will now see some usernames and other stuff. Click on the Add button. In the “Enter the object names to select” box, enter “postgres” and press Check. Postgres’ user account should appear there. Click on Ok.

Now from the “Group or Usernames” box, select the Postgres account. In the window below, with lots of checkboxes, assign permission “Full Control” in the Allow Column to it. Note, if you don’t want to allow full control, just give it read/write. But I just went ahead and gave it Full Control. (I was tired and annoyed. The “World’s most advanced open source database” had failed to install!). Click on Ok and wait a bit for permissions to be applied.

Then, just do a re-install. Do not uninstall anything. Just run the setup again. It’ll say that a PostgreSQL install folder already exists and other stuff. Just click on Next until the install finishes. If you see “file cannot be copied” errors, click on the “ignore” button when needed.

That’s it. PostgreSQL should be up and running on Vista now. Hope it works for you too as it did for me, and that my guide is helpful to anybody. If it works, or if you have other solutions, let us know. Thanks for reading!

This page is intended to help people collect information to troubleshoot problems with the PostgreSQL Installers supplied by EnterpriseDB.

Many problems have already been identified and fixed, so make sure you’re using the installer for the latest point-release of PostgreSQL before reporting a problem.

Because some problems can’t be fixed in the installer, but are issues with the Windows installation or how it is being used, there is also a list of frequently asked questions and frequently encountered problems with PostgreSQL on Windows. Please read the common installation errors section, or preferably the whole document. You’ll probably save some time and hassle by doing so.

If you’ve tried all that, and you’re still having problems getting PostgreSQL installed, please read on to find out how you can collect the information we need to be able to help you with installation problems.

Contents

  • 1 Make sure you’re installing on a supported platform
  • 2 Try again without your virus scanner or 3rd-party firewall
  • 3 Read about other common installation problems
  • 4 Reporting an installation error
    • 4.1 Note down the basic information about your system
    • 4.2 Collect the installer log file
    • 4.3 Get the contents of the PostgreSQL server error log
    • 4.4 Extra information Windows users need to collect
      • 4.4.1 Windows: Check for messages in the Windows event log
      • 4.4.2 Windows: Check what Group Policy, if any, is active on your computer
      • 4.4.3 Windows: Take a copy of the environment variables set on the computer

Make sure you’re installing on a supported platform

See the installer download page and (for Windows) the Running & Installing PostgreSQL On Native Windows for platform support details.

Please do not ask the mailing list for help with installation on unsupported Windows platforms. However, one of the paid PostgreSQL consultants, or EnterpriseDB (who make the PostgreSQL installer) may be able to help you on a paid basis.

Try again without your virus scanner or 3rd-party firewall

The Windows FAQ discusses potential issues with antivirus software and 3rd-party firewalls. If you’re encountering any installation issues, please try again with your virus scanner uninstalled (not just disabled) to see if the problem goes away. If it does, please report the fact to the mailing list and to the vendor of your antivirus product.

Read about other common installation problems

Before reporting a problem, please read the windows FAQ to see if your problem is one we’ve already seen and found a workaround or fix for.

Reporting an installation error

To be able to help you with an installation problem, we will need you to collect some basic details about your computer and the problem. Please see the instructions below.

Note down the basic information about your system

Any problem report must include:

  • The exact words of any error message you see when the installation fails
  • The exact version of PostgreSQL you are installing
  • Whether you installed a 32-bit or 64-bit release of PostgreSQL
  • The operating system and version you are using, eg:
    • «Windows XP Professional with Service Pack 3»
    • «Mac OS X 10.4.2»
    • «Fedora Core 14»
  • Whether you are running a 32-bit or 64-bit version of your operating system
  • How you ran the installer. Command-line arguments, what user account you ran it from, etc.
  • What antivirus and/or software firewall products you have installed, if any, even if they are disabled
  • Which, if any, of the troubleshooting instructions you have already tried
  • Whether a previous version of PostgreSQL was installed, and if so:
    • whether you uninstalled it before running the new installer
    • If you uninstalled a previous version, whether you did it with the uninstaller or some other way
    • Whether you removed the postgres user/service account when you uninstalled
  • Additional details and platform-specific information as described below

Collect the installer log file

The installer creates a log file in the system ‘temp’ directory. This will log all manner of data about the installation, and is invaluable when troubleshooting. The log will be called install-postgresql.log if the installation completed successfully. If not, the installer may not have been able to rename it, in which case the name will be either bitrock_installer.log or bitrock_installer_xxx.log, where xxx is a number (actually the process ID of the installation attempt).

On Linux and Mac systems, the logfile will almost always be found in the /tmp/ directory.

On Windows, the easiest way to find the logfile is to click Start -> Run, enter %TEMP% in the box and then click OK (these instructions apply to Windows XP and 2003 — adjust as necessary for other versions).

Get the contents of the PostgreSQL server error log

The PostgreSQL server has its own error log. This may not exist if installation failed early on, but it can be very informative for errors that happened later in installation. You can find it in the «pg_log» folder inside the data directory you chose for PostgreSQL. If it exists, please include it in any problem reports.

Windows users must collect additional Windows-specific details to help troubleshoot installation issues:

  • (On Windows Vista and Windows 7): The UAC security level
  • Whether you started the installer by logging in as Administrator, started it from from your own normal user account, or ran it using the «Run As Administrator» menu option.
  • Whether your computer is a part of a Windows domain. Home computers usually are not, business computers usually are.
  • Whether your computer and network has any Group Policy configured. If you’re on a corporate windows domain you probably have group policy and need to ask your network administrator for details about it.

Windows: Check for messages in the Windows event log

Please check the Windows Event Viewer for messages that might be related to installation problems or service startup problems.

TODO: detail on how to collect and save events.

Windows: Check what Group Policy, if any, is active on your computer

TODO: instructions for collecting domain and local group policy.

Windows: Take a copy of the environment variables set on the computer

Open a command prompt and run «set». Then copy and paste the results into your problem report.

I’d be better to collect the «all users» environment from the system control panel, but it’s not easy to just dump this information.

I’ve pulled shin’s link from the google cache:

Original link:
http://www.geekscribes.net/blog/2009/04/22/postgresql-database-cluster-initialisation-failed-solution/

Cached link:
http://webcache.googleusercontent.com/search?q=cache:RXu-5-ZzfcgJ:www.geekscribes.net/blog/2009/04/22/postgresql-database-cluster-initialisation-failed-solution/+&cd=3&hl=ro&ct=clnk


PostgreSQL Database Cluster Initialisation Failed Solution

I’ll keep this one short and sweet. For those of you that have tried to install PostgreSQL (mine was 8.3.7-1) on Windows Vista and got the error Database Cluster Initialisation Failed error at the end of the install, read this.

The problem is that Vista has some safety features associated with setting permissions on the Program Files folder. Basically, even if you are an admin, you can’t change permissions on some folders like Program Files and Windows folder itself. This causes initdb to be unable to create some folders and the database cluster. What this means for you is that you need to install PostgreSQL in another folder that is not inside Program Files.

By the way, if you have forgotten your Postgres account password while installing the first time, just open a Command Prompt in Vista (If you don’t know how, Google for it). Then type the command “net user”. You will see a list of users on your computer. Find Postgre’s account. It’s usually “postgres“. Then you need to change its password by typing “net user postgres new_password” where new_password is… well, a new password for the account. You will be needing that postgres account during install. You will need admin privileges to do this change however.

Firstly, uninstall any failed installations. Use the Control Panel or the PostgreSQL installer in the install folder.

During the install, you will be prompted to choose where you want to install the program. Just select a location in another place. Like “C:PostgreSQL” or something similar. It may even be on your desktop. But not inside Program Files. Not inside Windows folder. However, it’s not as easy. Bear with me.

After the install, you will still see that darned error message (or something like non-fatal error occured). Do not despair! (For Windows Power Users, we are just assigning Full Control permission to Postgres account on the new PostgreSQL install folder). For other users, read on if you don’t know how to do it.

Go to where you just installed PostgreSQL. In this case, the C: drive. There, right-click on the folder (usually called PostgreSQL), and go to Properties – Security tab. Click on the Edit button. You will now see some usernames and other stuff. Click on the Add button. In the “Enter the object names to select” box, enter “postgres” and press Check. Postgres’ user account should appear there. Click on Ok.

Now from the “Group or Usernames” box, select the Postgres account. In the window below, with lots of checkboxes, assign permission “Full Control” in the Allow Column to it. Note, if you don’t want to allow full control, just give it read/write. But I just went ahead and gave it Full Control. (I was tired and annoyed. The “World’s most advanced open source database” had failed to install!). Click on Ok and wait a bit for permissions to be applied.

Then, just do a re-install. Do not uninstall anything. Just run the setup again. It’ll say that a PostgreSQL install folder already exists and other stuff. Just click on Next until the install finishes. If you see “file cannot be copied” errors, click on the “ignore” button when needed.

That’s it. PostgreSQL should be up and running on Vista now. Hope it works for you too as it did for me, and that my guide is helpful to anybody. If it works, or if you have other solutions, let us know. Thanks for reading!

В этот FAQ я собираю вопросы, которые мне показались интересными и заслуживающими внимания. Здесь не будет тех же вопросов что в переводе англоязычного FAQ. Вопросы не ограничиваются какой-то конкретной областью применения или настройки PostgreSQL.

Авторские права и условия распространения


По идейным соображениям, вся информация в этом FAQ предоставляется на условиях лицензии Creative Commons CC-BY-SA. Если вы не согласны с условиями этой лицензии — откажитесь от использования данного FAQ, если вы автор одного из ответов и против использования вашего материала под этой лицензией, напишите на admin@postgresql.ru.net и ваш материал будет удалён из данного FAQ.

Присылайте свои вопросы на адрес: admin@postgresql.ru.net

Общие вопросы


Q001: При изменение структуры БД иногда требуется на время отключить FOREIGN KEY. Как это сделать?
Q002: Как скачать самые последние исходные тексты (исходники) PostgreSQL из CVS?
Q003: Почему выдаёт ошибку при создании функции, где в качестве параметра я использую имя таблицы?
Q004: Как мне написать запрос, делающий SELECT на таблицу, имя которой получено в подзапросе?

Проблемы при установке


Q100: Я хочу установить Holdem Manager, но у меня не получается. Почему вы не хотите помочь мне установить PostgreSQL, который входит в его состав?
Q101: Не знаю как поставить PostgreSQL на Windows. Что делать?
Q102: Во время установки PostgreSQL на Windows получаю сообщение об ошибке «Invalid user specified: Logon Failure: Unknown user name or bad password». Что делать?
Q103: Во время установки PostgreSQL на Windows получаю сообщение об ошибке «Invalid User specified: Logon Failure: The user has not been granted the requested logon type at this computer». Что делать?
Q104: Во время установки PostgreSQL на Windows получаю сообщение об ошибке «Failed to create process for initdb: 1385!». Что делать?
Q105: Регистрирую сервис так: pg_ctl register -N postgres_svc -w -D %windir%PostgreSQLdata и вылазит ошибка номер 1057. Что это за ошибка и по какой причине сервис не может быть зарегистрирован?
Q106: Во время установки выдает ошибку: Сервис ‘Secondary Logon’ не запущен. Этот сервис необходим для инициализации кластера базы данных. Пожалуйста, запустите сервис и попобуйте еще раз. Что делать?
Q107: Во время установки, на этапе Loading additional SQL modules выскочило сообщение: «problem runing post instal step/instalation mya not complete corecltly.error reading file c:/postgresql/8.4/data/postgresql.cfg». Что делать?
Q108: Не запускается сервис. Выдаёт: «More help is available by typing NET HELPMSG 3534». Что делать?
Q109: Во время установки выдаёт: «Внутренняя ошибка поиска учётной записи: Сопоставление между именами пользователей и идентификаторами безопасности не было произведено». Что делать?
Q110: Во время установки выдаёт: «Failed to establish a connection to ‘127.0.0.1’». Что делать?
Q111: При старте в логе вот такое сообщение: «MSD FATAL: the database system is starting up». Как исправить эту ошибку?
Q112: Устанавливаю PostgreSQL повторно и у меня спрашивает пароль: «Please provide a password for the database superuser and service account (postgres)…». Не понимаю где его взять?
Q113: Во время установки, на этапе инициализации кластера БД выскочило сообщение: «Problem running post-install step. Installation may not complete correctly. The database cluster initialization failed.» Что делать?

PostgreSQL и 1C


Q201: Будет ли работать PostgreSQL из дистрибутива или скаченный с оригинального сайта PostgreSQL с 1C?


Общие вопросы


Q001: При изменение структуры БД иногда требуется на время отключить FOREIGN KEY. В oracle это делается так

ALTER TABLE TABLE MODIFY CONSTRAINT constraint ENABLE/DISABLE


А как это делается на postgresql?

A001: Сделайте все FOREIGN KEYS, которые хотите отключить на время, DEFERRED (см. man по FOREIGN KEY). Потом в DDL-транзакции в начале просто указывайте SET CONSTRAINTS ALL DEFERRED; и целостность базы будет проверяться только в самом конце при операции COMMIT (Автор совета: Иван Золотухин).

Q002: Как скачать самые последние исходные тексты (исходники) PostgreSQL из CVS?

A002: Создайте какой-либо каталог или перейдите в каталог, в котором у вас есть права на запись. Выполните последовательно:

Подробности смотрите на странице: http://www.postgresql.org/docs/current/static/anoncvs.html

Q003: Почему выдаёт ошибку при создании функции, где в качестве параметра я использую имя таблицы?

A003: Потому что любая функция (хранимая процедура) должна быть скомпилирована до начала её использования. А при компиляции PostgreSQL не знает не только типов полей той таблицы, которую вы планируете использовать в функции, но и даже вообще существует ли она. Поэтому проверка на соответствие типов и на имена полей становится невозможным, вследствие чего вы и получаете ошибку. Таким образом, использование имён таблиц в качестве аргументов в функциях НЕВОЗМОЖНО. Вы должны явно указывать имя таблицы, если хотите использовать её в запросе.

Q004: Как мне написать запрос, делающий SELECT на таблицу, имя которой получено в подзапросе?

A004: Любой запрос перед началом выполнения должен быть скомпилирован. Но в момент компиляции PostgreSQL не знает какое имя таблицы вернёт подзапрос и вернёт ли он вообще какое-либо имя таблицы, а также будет ли существовать такая таблица. Таким образом, проверка на соответствие типов полей и вообще на наличие таких полей в дальнейшем становится нереальным, план запроса построить невозможным и как следствие вы получите ошибку на любые такие попытки. Поэтому, подстановка имени нужной таблицы во время запроса НЕВОЗМОЖНА. Вы должны явно указывать имя таблицы, если хотите использовать её в запросе.


Проблемы при установке


Q100: Я хочу установить Holdem Manager, но у меня не получается. Почему вы не хотите помочь мне установить PostgreSQL, который входит в его состав?

A100: Потому что Holdem Manager — это игра в покер и поставить вы его можете только с двумя целями: развлечение или заработок денег. Если вы зарабатываете на покере — наймите специалиста, который установит и настроит вам всё, что нужно. Если вы развлекаетесь, то мы не хотим тратить свои силы и время, чтобы вы могли развлекаться. И в любом случае, дальнейшая польза сообществу PostgreSQL от вас — нулевая, зачем нам тратить на вас время? Исключения могут быть сделаны лишь для пользователей, имеющих уровень компетенции «администратор Windows», которым не надо объяснять, что означает «посмотреть логи», «вручную удалить службу», «почистить реестр» и т.д., если вопросы этих пользователей касаются чётко PostgreSQL.

Q101: Не знаю как поставить PostgreSQL на Windows. Что делать?

A101: Для начала прочитать статью: Установка PostgreSQL 8.3 на Windows XP или Установка PostgreSQL 9.0.1 на Windows 7. Возможно вам больше ничего и не понадобится.

Q102: Во время установки PostgreSQL на Windows получаю сообщение об ошибке «Invalid user specified: Logon Failure: Unknown user name or bad password». Что делать?

A102: (Автор совета Bruce Modick). Зайдите в Панель Управления Windows, в управление пользователями и сделайте пользователя postgres членом группы Пользователи.

Q103: Во время установки PostgreSQL на Windows получаю сообщение об ошибке «Invalid User specified: Logon Failure: The user has not been granted the requested logon type at this computer». Что делать?

A103: (Автор совета Bruce Modick). Зайдите администратором в настройки Локальных Политик Безопасности и для учётной записи postgres предоставьте права «Access this computer from the network» (Доступ к данному компьютеру из сети).

Q104: Во время установки PostgreSQL на Windows получаю сообщение об ошибке «Failed to create process for initdb: 1385!». Что делать?

A104: (Автор совета Bruce Modick). Зайдите администратором в настройки Локальных Политик Безопасности и для учётной записи postgres предоставьте права «Log on Locally».

Q105: Регистрирую сервис так: pg_ctl register -N postgres_svc -w -D %windir%PostgreSQLdata и вылазит ошибка номер 1057. Что это за ошибка и по какой причине сервис не может быть зарегистрирован?

A105: (Автор ответа msr). Service «service_name» faild with error: «System error. Code 1057. Имя учетной записи задано не верно или не существует, или же неверен указаный пароль».

Q106: Во время установки выдает ошибку: Сервис ‘Secondary Logon’ не запущен. Этот сервис необходим для инициализации кластера базы данных. Пожалуйста, запустите сервис и попобуйте еще раз. Что делать?

A106: Зайдите администратором. Найдите диспетчер служб (Службы или Services). Найдите в списке службу с названием ‘Secondary Logon’ и запустите её, щёлкнул правой кнопкой мыши.

Q107: Во время установки, на этапе Loading additional SQL modules выскочило сообщение: «problem runing post instal step/instalation mya not complete corecltly.error reading file c:/postgresql/8.4/data/postgresql.cfg». Что делать?

A107: Попробуйте проверить права доступа на каталог «c:/postgresql/8.4/data». Возможно, по какой-то причине для этого каталога установлен флаг read-only (только чтение). Если это так, уберите его и запустите установку заново.

Если это не помогает, то предлагается вот такой рецепт от cx@ukr.net:

  1. В службах запускаем «Вторичный вход в систему» и ставим тип запуска — «Автозапуск»
  2. Создаём нового пользователя в системе с названием латинскими буквами и правами администратора — к примеру «Sexy»
  3. Жмём «Выход из системы» и входим с учётной записью «Sexy»
  4. Запускаем инсталлятор PostgreSQL 9.x x64 от имени администратора и наслаждаемся ЧИСТОЙ установкой!!! Wow!!!
  5. Проверяем работоспособность сервера подключением к template1 из psql — «psql -U postgres -W template1» (на запрос ввести пароль, указанный при инсталляции!)
  6. Выходим из учётной записи «Sexy» и заходим в нашу обычную, грохаем учётную запись «Sexy» со всеми файлами.
  7. Пишем премногую благодарность мне на cx@ukr.net за сэкономленых несколько часов (или больше, кому как) времени!

Q108: Не запускается сервис. Выдаёт: «More help is available by typing NET HELPMSG 3534». Что делать?

A108: Попробуйте сделать следующее:

  1. Зайдите администратором. Найдите диспетчер служб (Службы или Services).
  2. В списке служб найдите PostgreSQL и щёлкните правой кнопкой мыши. Из появившегося меню выберите Свойства (Properties)
  3. В диалоговом окне свойств перейдите на вкладку Start Session (Вход в систему). На этой вкладке есть два варианта выбора «С учётной записью» и «С системной учётной записью». Измените вариант выбора на «С системной учётной записью» (галочку «Разрешить взаимодействие с рабочим столом» не ставить), нажмите «Применить» и «Ок». Должно помочь.

Q109: Во время установки выдаёт: «Внутренняя ошибка поиска учётной записи: Сопоставление между именами пользователей и идентификаторами безопасности не было произведено». Что делать?

A109: Такая ошибка может быть вызвана тем, что «Компьютер и Полное имя» должны быть на английском языке (информацию предоставил: shurickan).

Q110:: Во время установки выдаёт: «Failed to establish a connection to ‘127.0.0.1’». Что делать?

A110:

  1. Открываем в Блокноте файл C:Windowssystem32driversetchosts
  2. Удаляем существующий текст, относящийся к 127.0.0.1 и localhost
  3. Пишем строку: «127.0.0.1 localhost» и сохраняем файл
  4. Перезапускаем службу PostgreSQL.

Должно работать!

Q111: При старте в логе вот такое сообщение: «MSD FATAL: the database system is starting up». Как исправить эту ошибку?

A111: На самом деле — это не ошибка. Просто PostgreSQL ругается, что к нему делаются попытки подключиться, хотя он ещё только запускается.

Q112:Устанавливаю PostgreSQL повторно и у меня спрашивает пароль: «Please provide a password for the database superuser and service account (postgres)…». Не понимаю где его взять?

A112: По идее взять нужно из своей же головы — вспомнить, что вводили ранее. Если на голову надежды мало, то попробуйте так: Пуск -> Все программы -> Стандартные -> Выполнить. Далее введите:

net user postgres postgres

после чего пароль пользователя postgres будет таким же как и имя пользователя, т.е. тоже postgres. (за рецепт спасибо surmaless)

Q113:: Во время установки, на этапе инициализации кластера БД выскочило сообщение: «Problem running post-install step. Installation may not complete correctly. The database cluster initialization failed.» Что делать?

A113: Причин может быть великое множество. Например, установка старой версии PostgreSQL, в которой не учтены сервис паки Windows. Или установка PostgreSQL на машину в домене, где собственные политики безопасности мешают нормальной установке PostgreSQL. Или по какой-то причине работу инсталлятора заблокировал антивирус.

Рекомендации следующие: найдите лог инсталлятора, который обычно находится в WINDOWSTEMP (возможно также для старых версий в самом каталоге установки PostgreSQL) и прочитайте сообщения, которые там написаны. Возможно это поможет понять в чём собственно проблема.

Также советую не забывать совет в вопросе Q107, касающийся установки PostgreSQL с пользователем-администратором, а не пользователем postgres


PostgreSQL и 1C


Q201: Будет ли работать PostgreSQL из дистрибутива или скаченный с оригинального сайта PostgreSQL с 1C?

A201: Нет, не будет. Для своей работы 1C использует специальный тип данных, но есть и другие отличия. Смотрите сюда: http://v8.1c.ru/overview/postgres_patches_notes.htm. Также посетите ещё и эту страницу: http://wiki.etersoft.ru/PostgreSQL.

I’m trying to install postgreSQL on my windows 10 computer for the first time. I got two errors at the end of the installation

1) a non-fatal error occured during cluster initialisation. please check the installation log in C:usersabcAppDataLocalTemp for details

2) problem running post-install step. Installation may not complete correctly.Failed to start the database-server.

I also tried a number of other (but very dated) solutions to similar problems users experienced such as moving my data directory outside of the Postgres directory entirely. Most of these solutions date back and don’t seem to work anymore.

The one that seemed closest to working is [PostgreSQL Database Cluster Initialisation Failed Solution][1]

However, I can’t find «postgres» as a user. I get an error saying: «An object named «postgres» cannot be found. Check the selected object types and location for accuracy and ensure that you typed the object name correctly, or remove this object from the selection.»

Does anybody have any updated solutions/tips for this?

Please see the logs: I have added some more logs below this.

> Log started 09/08/2017 at 15:35:34
Preferred installation mode : qt
Trying to init installer in mode qt
Mode qt successfully initialized
Executing C:UsersskumAppDataLocalTemp/postgresql_installer_c42ee2159f/temp_check_comspec.bat 
Script exit code: 0

Script output:
 "test ok"

Script stderr:


Could not find registry key HKEY_LOCAL_MACHINESOFTWAREPostgreSQLInstallationspostgresql-x64-9.6 Data Directory. Setting variable iDataDirectory to empty value
Could not find registry key HKEY_LOCAL_MACHINESOFTWAREPostgreSQLInstallationspostgresql-x64-9.6 Service ID. Setting variable iServiceName to empty value
Could not find registry key HKEY_LOCAL_MACHINESOFTWAREPostgreSQLInstallationspostgresql-x64-9.6 Service Account. Setting variable iServiceAccount to empty value
Could not find registry key HKEY_LOCAL_MACHINESOFTWAREPostgreSQLInstallationspostgresql-x64-9.6 Super User. Setting variable iSuperuser to empty value
Could not find registry key HKEY_LOCAL_MACHINESOFTWAREPostgreSQLInstallationspostgresql-x64-9.6 Branding. Setting variable iBranding to empty value
Could not find registry key HKEY_LOCAL_MACHINESOFTWAREPostgreSQLInstallationspostgresql-x64-9.6 DisableStackBuilder. Setting variable iDisableStackBuilder to empty value
[15:35:38] Existing base directory: C:Usersskumpostgres_inst
[15:35:38] Existing data directory: 
[15:35:38] Using branding: PostgreSQL 9.6
[15:35:38] Using Super User: postgres and Service Account: NT AUTHORITYNetworkService
[15:35:38] Using Service Name: postgresql-x64-9.6
Executing cscript //NoLogo "C:UsersskumAppDataLocalTemppostgresql_installer_c42ee2159fprerun_checks.vbs"
Script exit code: 0

Script output:
 The scripting host appears to be functional.

Script stderr:


Executing C:UsersskumAppDataLocalTemppostgresql_installer_c42ee2159fvcredist_x64.exe /passive /norestart
Script exit code: 0

Script output:


Script stderr:


Executing C:UsersskumAppDataLocalTemppostgresql_installer_c42ee2159fvcredist_x86.exe /passive /norestart
Script exit code: 0

Script output:


Script stderr:


Executing C:UsersskumAppDataLocalTemppostgresql_installer_c42ee2159fgetlocales.exe 
Script exit code: 0

Logs Part 1:

Failed to ensure the data directory is accessible (C:UsersskumpostgresqlData)
Executing batch file 'radB66AD.bat'...
The files belonging to this database system will be owned by user "skum".
This user must also own the server process.

The database cluster will be initialized with locale "English_United States.1252".
The default text search configuration will be set to "english".

Data page checksums are disabled.

fixing permissions on existing directory C:/Users/skum/postgresqlData ... ok
creating subdirectories ... ok
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting dynamic shared memory implementation ... windows
creating configuration files ... ok
running bootstrap script ... ok
performing post-bootstrap initialization ... ok
syncing data to disk ... ok

Success. You can now start the database server using:

    "C:Usersskumpostgres_instbinpg_ctl" -D "C:UsersskumpostgresqlData" -l logfile start


Reading:    C:UsersskumpostgresqlDatapostgresql.conf exists...
Writing:    C:UsersskumpostgresqlDatapostgresql.conf exists...
Called AclCheck(C:UsersskumpostgresqlData)
Called IsVistaOrNewer()...
    'winmgmts' object initialized...
    Version:10.
    MajorVersion:10
Executing icacls to ensure the NT AUTHORITYNetworkService account can read the path C:UsersskumpostgresqlData
    Executing batch file 'radB66AD.bat'...
    'icacls' is not recognized as an internal or external command,
operable program or batch file.

Called IsVistaOrNewer()...
    'winmgmts' object initialized...
    Version:10.
    MajorVersion:10
Granting service account access to the data directory (using icacls) to NT AUTHORITYNetworkService:
    Executing batch file 'radB66AD.bat'...
    'icacls' is not recognized as an internal or external command,
operable program or batch file.

Failed to grant service account access to the data directory (C:UsersskumpostgresqlData)
initcluster.vbs ran to completion

Script stderr:
 Program ended with an error exit code

Error running cscript //NoLogo "C:Usersskumpostgres_inst/installer/server/initcluster.vbs" "NT AUTHORITYNetworkService" "postgres" "****" "C:Usersskumpostgres_inst" "C:UsersskumpostgresqlData" 5432 "DEFAULT" 0: Program ended with an error exit code
Configuring database server startup...
Executing cscript //NoLogo "C:Usersskumpostgres_instinstallerserverstartupcfg.vbs" 9.6 "NT AUTHORITYNetworkService" "****" "C:Usersskumpostgres_inst" "C:UsersskumpostgresqlData" "postgresql-x64-9.6"
Script exit code: 0

Script output:
 startupcfg.vbs ran to completion

Script stderr:


Creating menu shortcuts...
Executing cscript //NoLogo "C:Usersskumpostgres_instinstallerservercreateshortcuts.vbs" 9.6 "postgres" 5432 "PostgreSQL 9.6" "C:Usersskumpostgres_inst" "C:UsersskumpostgresqlData" "postgresql-x64-9.6"
Script exit code: 0

Script output:
 Start FixupFile(C:Usersskumpostgres_instscriptsserverctl.vbs)...
   Opening file for reading...
   Closing file (reading)...
   Replacing placeholders...
   Opening file for writing...
   Closing file...
  End FixupFile()...
Start FixupFile(C:Usersskumpostgres_instscriptsrunpsql.bat)...
   Opening file for reading...
   Closing file (reading)...
   Replacing placeholders...
   Opening file for writing...
   Closing file...
  End FixupFile()...
createshortcuts.vbs ran to completion

Script stderr:


Starting the database server...
Executing cscript //NoLogo "C:Usersskumpostgres_instinstallerserverstartserver.vbs" postgresql-x64-9.6
Script exit code: 1

Script output:
 Starting postgresql-x64-9.6
Failed to start the database server (2)

Script stderr:
 Program ended with an error exit code

Error running cscript //NoLogo "C:Usersskumpostgres_instinstallerserverstartserver.vbs" postgresql-x64-9.6: Program ended with an error exit code
Problem running post-install step. Installation may not complete correctly
 Failed to start the database server.
Creating Uninstaller
Creating uninstaller 25%
Creating uninstaller 50%
Creating uninstaller 75%
Creating uninstaller 100%
Installation completed
Log finished 09/08/2017 at 15:41:35

I’m trying to install postgreSQL on my windows 10 computer for the first time. I got two errors at the end of the installation

1) a non-fatal error occured during cluster initialisation. please check the installation log in C:usersabcAppDataLocalTemp for details

2) problem running post-install step. Installation may not complete correctly.Failed to start the database-server.

I also tried a number of other (but very dated) solutions to similar problems users experienced such as moving my data directory outside of the Postgres directory entirely. Most of these solutions date back and don’t seem to work anymore.

The one that seemed closest to working is [PostgreSQL Database Cluster Initialisation Failed Solution][1]

However, I can’t find «postgres» as a user. I get an error saying: «An object named «postgres» cannot be found. Check the selected object types and location for accuracy and ensure that you typed the object name correctly, or remove this object from the selection.»

Does anybody have any updated solutions/tips for this?

Please see the logs: I have added some more logs below this.

> Log started 09/08/2017 at 15:35:34
Preferred installation mode : qt
Trying to init installer in mode qt
Mode qt successfully initialized
Executing C:UsersskumAppDataLocalTemp/postgresql_installer_c42ee2159f/temp_check_comspec.bat 
Script exit code: 0

Script output:
 "test ok"

Script stderr:


Could not find registry key HKEY_LOCAL_MACHINESOFTWAREPostgreSQLInstallationspostgresql-x64-9.6 Data Directory. Setting variable iDataDirectory to empty value
Could not find registry key HKEY_LOCAL_MACHINESOFTWAREPostgreSQLInstallationspostgresql-x64-9.6 Service ID. Setting variable iServiceName to empty value
Could not find registry key HKEY_LOCAL_MACHINESOFTWAREPostgreSQLInstallationspostgresql-x64-9.6 Service Account. Setting variable iServiceAccount to empty value
Could not find registry key HKEY_LOCAL_MACHINESOFTWAREPostgreSQLInstallationspostgresql-x64-9.6 Super User. Setting variable iSuperuser to empty value
Could not find registry key HKEY_LOCAL_MACHINESOFTWAREPostgreSQLInstallationspostgresql-x64-9.6 Branding. Setting variable iBranding to empty value
Could not find registry key HKEY_LOCAL_MACHINESOFTWAREPostgreSQLInstallationspostgresql-x64-9.6 DisableStackBuilder. Setting variable iDisableStackBuilder to empty value
[15:35:38] Existing base directory: C:Usersskumpostgres_inst
[15:35:38] Existing data directory: 
[15:35:38] Using branding: PostgreSQL 9.6
[15:35:38] Using Super User: postgres and Service Account: NT AUTHORITYNetworkService
[15:35:38] Using Service Name: postgresql-x64-9.6
Executing cscript //NoLogo "C:UsersskumAppDataLocalTemppostgresql_installer_c42ee2159fprerun_checks.vbs"
Script exit code: 0

Script output:
 The scripting host appears to be functional.

Script stderr:


Executing C:UsersskumAppDataLocalTemppostgresql_installer_c42ee2159fvcredist_x64.exe /passive /norestart
Script exit code: 0

Script output:


Script stderr:


Executing C:UsersskumAppDataLocalTemppostgresql_installer_c42ee2159fvcredist_x86.exe /passive /norestart
Script exit code: 0

Script output:


Script stderr:


Executing C:UsersskumAppDataLocalTemppostgresql_installer_c42ee2159fgetlocales.exe 
Script exit code: 0

Logs Part 1:

Failed to ensure the data directory is accessible (C:UsersskumpostgresqlData)
Executing batch file 'radB66AD.bat'...
The files belonging to this database system will be owned by user "skum".
This user must also own the server process.

The database cluster will be initialized with locale "English_United States.1252".
The default text search configuration will be set to "english".

Data page checksums are disabled.

fixing permissions on existing directory C:/Users/skum/postgresqlData ... ok
creating subdirectories ... ok
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting dynamic shared memory implementation ... windows
creating configuration files ... ok
running bootstrap script ... ok
performing post-bootstrap initialization ... ok
syncing data to disk ... ok

Success. You can now start the database server using:

    "C:Usersskumpostgres_instbinpg_ctl" -D "C:UsersskumpostgresqlData" -l logfile start


Reading:    C:UsersskumpostgresqlDatapostgresql.conf exists...
Writing:    C:UsersskumpostgresqlDatapostgresql.conf exists...
Called AclCheck(C:UsersskumpostgresqlData)
Called IsVistaOrNewer()...
    'winmgmts' object initialized...
    Version:10.
    MajorVersion:10
Executing icacls to ensure the NT AUTHORITYNetworkService account can read the path C:UsersskumpostgresqlData
    Executing batch file 'radB66AD.bat'...
    'icacls' is not recognized as an internal or external command,
operable program or batch file.

Called IsVistaOrNewer()...
    'winmgmts' object initialized...
    Version:10.
    MajorVersion:10
Granting service account access to the data directory (using icacls) to NT AUTHORITYNetworkService:
    Executing batch file 'radB66AD.bat'...
    'icacls' is not recognized as an internal or external command,
operable program or batch file.

Failed to grant service account access to the data directory (C:UsersskumpostgresqlData)
initcluster.vbs ran to completion

Script stderr:
 Program ended with an error exit code

Error running cscript //NoLogo "C:Usersskumpostgres_inst/installer/server/initcluster.vbs" "NT AUTHORITYNetworkService" "postgres" "****" "C:Usersskumpostgres_inst" "C:UsersskumpostgresqlData" 5432 "DEFAULT" 0: Program ended with an error exit code
Configuring database server startup...
Executing cscript //NoLogo "C:Usersskumpostgres_instinstallerserverstartupcfg.vbs" 9.6 "NT AUTHORITYNetworkService" "****" "C:Usersskumpostgres_inst" "C:UsersskumpostgresqlData" "postgresql-x64-9.6"
Script exit code: 0

Script output:
 startupcfg.vbs ran to completion

Script stderr:


Creating menu shortcuts...
Executing cscript //NoLogo "C:Usersskumpostgres_instinstallerservercreateshortcuts.vbs" 9.6 "postgres" 5432 "PostgreSQL 9.6" "C:Usersskumpostgres_inst" "C:UsersskumpostgresqlData" "postgresql-x64-9.6"
Script exit code: 0

Script output:
 Start FixupFile(C:Usersskumpostgres_instscriptsserverctl.vbs)...
   Opening file for reading...
   Closing file (reading)...
   Replacing placeholders...
   Opening file for writing...
   Closing file...
  End FixupFile()...
Start FixupFile(C:Usersskumpostgres_instscriptsrunpsql.bat)...
   Opening file for reading...
   Closing file (reading)...
   Replacing placeholders...
   Opening file for writing...
   Closing file...
  End FixupFile()...
createshortcuts.vbs ran to completion

Script stderr:


Starting the database server...
Executing cscript //NoLogo "C:Usersskumpostgres_instinstallerserverstartserver.vbs" postgresql-x64-9.6
Script exit code: 1

Script output:
 Starting postgresql-x64-9.6
Failed to start the database server (2)

Script stderr:
 Program ended with an error exit code

Error running cscript //NoLogo "C:Usersskumpostgres_instinstallerserverstartserver.vbs" postgresql-x64-9.6: Program ended with an error exit code
Problem running post-install step. Installation may not complete correctly
 Failed to start the database server.
Creating Uninstaller
Creating uninstaller 25%
Creating uninstaller 50%
Creating uninstaller 75%
Creating uninstaller 100%
Installation completed
Log finished 09/08/2017 at 15:41:35

  • What’s New?
  • Forum
    • New Posts
    • FAQ
    • Calendar
  • Advanced Search
  • Home
  • Forum
  • Foreign Language Support
  • Русский форум
  • Ошибка при установке PostgreSQL

Thread: Ошибка при установке PostgreSQL

  1. 09-22-2011, 06:33 AM


    #1

    Grubbun is offline


    Junior Member


    Здравствуйте, уже замучился с установкой ХМ из-за того, что не устанавливается PostgreSQL. Пробовал уже на 2-х компьютерах все безрезультатно. В конце установки говорит, что возникла ошибка. Пробовал и обычный установщик и комбо. Не могу понять в чем дело? Очень надо!


  2. 09-22-2011, 07:07 AM


    #2

    Grubbun is offline


    Junior Member


    Default

    При загрузке ХМ пишет о следующей ошибке. The following error occurred when trying to open the database. Failed to establish a connection to 127.0.0.1

    ФРэймворк устанвлен


  3. 09-26-2011, 10:44 AM


    #3

    Sarek is offline


    Holdem Manager Support

    Sarek's Avatar


    Default

    Если операционная система Вин7 (или Виста), следует иметь в виду все это:
    1) Имя компьютера должно быть на английском и «в одно слово» (без пробелов) — после изменения требуется перезагрузка2) Имя пользователя Виндовс — аналогично. Если это не так, следует создать нового пользователя с английским именем, дать ему права администратора и перегрузить компьютер под него. Затем установить Postgres и ХМ, после чего снова перегрузить комп — обратно под старого пользователя, а этого можно будет удалить — его миссия завершена.
    3) Служба «Вторичный вход в систему» должна быть установлена на «Автостарт». Панель управления — администрирование — Службы.
    4) Контроль учетных записей UAC надо выключить. ( How to Disable and Turn Off UAC in Windows 7 � My Digital Life )
    5) При установке Postgres и ХМ рекомендуется выключить антивирус и файерволл. Или совсем их деинсталлировать на это время.
    6) Все установки обязательно запускать «от администратора» (по правому клику на файл) — невзирая на то, что у пользователя Виндовс права администратора, как правило, имеются. И желательно запускать установки первым делом после перезагрузки компа.
    7) Если есть необходимость устанавливать Postgres не в папку по умолчанию (см следующий пункт), или использовать неумолчальную папку для базы данных — следует скачать отдельный установщик Download PostgreSQL | EnterpriseDB (при выборе версии 9.0 над брать тот, что соответствует разрядности Виндовс на компе).
    8) Если Виндовс не на английском — устанавливать Postgres надо именно не в умолчальную папку. Требуется создат в корне диска (например) папку и ставить программу в нее.
    9) Устанавливать Postgres и ХМ надо отдельно, по очереди. От админа. and HM separarelly, one after one. Когда ХМ после первого запуска сообщит, что отстуствует база данных — просто создать ее через DBControlpanel.exe
    10) После каждой неудачной попытки установки Postgres ее следует не только деинсталлировать через Панель управления, но и удалить из системы пользователя по имени «postgres»:
    «Пуск», «Выполнить», набрать с клавиатуры «cmd» и по правому клику запустить командную строку от админа
    В черном окне набрать без ошибок следующую команду (и нажать Enter):
    net user postgres /del
    Должно появиться сообщение, что команда выполнена успешно. Для проверки набрать
    net user
    (без параметров) — получим список пользователей, в котором не должно быть пользователя postgres
    11) Кстати, все клиенты покер-румов также должны запускаться «от админа»


Similar Threads

  1. Replies: 2

    Last Post: 08-08-2011, 09:11 AM

  2. Replies: 9

    Last Post: 06-21-2011, 03:32 AM

  3. Replies: 1

    Last Post: 05-22-2011, 10:49 AM

  4. Replies: 1

    Last Post: 02-19-2011, 04:36 PM

  5. Replies: 2

    Last Post: 02-01-2011, 06:00 AM


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
  • BB code is On
  • Smilies are On
  • [IMG] code is On
  • [VIDEO] code is On
  • HTML code is Off

Forum Rules

Понравилась статья? Поделить с друзьями:
  • При установке модов wot выдает ошибку
  • При установке метро эксодус выдает ошибку
  • При установке мафия 3 выдает ошибку
  • При установке pes 2013 выдает ошибку
  • При установке nvidia geforce experience возникает ошибка