Подготовлен сервер с ОС Windows Server 2016. Нужно развернуть на нём СУБД PostgreSQL для работы с базами 1С:Предприятие.
В рабочей зоне не рекомендуется использовать PostgreSQL на Windows, так как производительность СУБД в таком случае будет ниже, чем при использовании PostgreSQL на Linux.
Скачиваем дистрибутив PostgreSQL с сайта 1С. Я скачал версию 15.5:
Перед установкой этой СУБД в службах Windows нужно запустить службу «Вторичный вход в систему» (Secondary Logon):
Если этого не сделать, то при установке PostgreSQL всё равно появится соответствующее уведомление — «The ‘Secondary Logon’ service is not running.»:
Запускаем файл установки. PostgreSQL ставим, как службу. Задаём каталог для размещения баз данных:
Указываем пароль для встроенной учётной записи postgres:
На этом установка СУБД закончена.
Основная настройка PostgreSQL осуществляется в двух файлах:
1. C:\Program Files\PostgreSQL\15.5-10.1C\data\postgresql.conf
2. C:\Program Files\PostgreSQL\15.5-10.1C\data\pg_hba.conf
Здесь показаны настройки для возможности подключения к серверу СУБД с других устройств. В частности, за это отвечает параметр listen_adresses
(в файле postgresql.conf), который задаёт адреса TCP/IP, по которым сервер будет принимать подключения клиентских приложений. Значение этого параметра равное ‘*’ (звёздочка), обозначает все имеющиеся IP-интерфейсы. А строка в файле pg_hba.conf
host all all 192.168.238.0/24 md5
разрешает подключение к СУБД с устройств указанной подсети.
Более подробно про настройки в этих файлах написано в инструкции «Установка PostgreSQL для 1С:Предприятие на ОС Ubuntu» и статье «Подготовка к тесту 1С:Эксплуатация информационных систем. 4 — Администрирование серверов с СУБД PostgreSQL» (ссылки внизу страницы).
После внесённых изменений перезапускаем службу PostgreSQL Database Server:
Для администрирования PostgreSQL есть утилита pgAdmin.
При первом запуске после установки pgAdmin попросит установить мастер-пароль, который потом нужно будет вводить при каждом запуске этой утилиты:
После этого можно подключаться к СУБД. В данном случае pgAdmin установлена на том же хосте, что и PostgreSQL, поэтому локальный сервер уже будет в списке. Чтобы к нему подключиться остаётся только ввести пароль от учётной записи postgres:
После подключения к серверу можно будет создать нового пользователя для будущих подключений от сервера 1С:Предприятие:
Задаём ему имя, пароль и права:
Теперь на сервере 1С можно создавать информационную базу с указанием этого настроенного сервера баз данных:
При этом могут возникнуть следующие ошибки:
— «Сервер баз данных не обнаружен. Connection to server at …, port 5432 failed: timeout expired»
Если сервер 1С и сервер с PostgreSQL, это разные хосты, то между ними должен быть открыт TCP-порт 5432 (если номер порта не менялся) и для входящих, и для исходящих подключений.
— «Сервер баз данных не обнаружен. Connection to server at …, port 5432 failed: FATAL: no pg_hba.conf for host …»
При данной ошибке нужно в файле pg_hba.conf настроить подключение к PostgreSQL со сторонних устройств.
— «У пользователя недостаточно прав на исполнение операции над базой данных»
При данной ошибке нужно либо повысить уровень прав, используемому пользователю, либо задать другого пользователя (например, postgres).
Asked By
20 points
N/A
Posted on — 05/28/2012
Hello!
I am getting an error message when installing Postgre SQL. The exact error message is «
Service check
The ‘secondary logon’ service is not running. This service is required for the installer to initialize the database.
Please start this service and try again.»
Attached is a screenshot of the error message I receive. Please help in any way you can.
Thank you.
Hi,
Try to change your service setting on administrator tools and disable secondary logon the error will disappear?, In that case, if you turn on secondary logon in service settings and if it is disable, it prevents Postgre to install. If you want to turn on to secondary logon press Window key+R type «service. msc. or you can click start>controlpanel>administrativetools> double click service>secondary logon>right click start> properties>start up and type:automatic. Secondary logon is for convenience because it enables administrators with ordinary user account to logon once than to log-on and off depending on the task involved.
-
09-30-2008, 11:15 PM
#1
Junior Member
PostGres Installation error ( Secondary Logon Service )
Could somebody help me get PostGres going without the default options of creating a service? My problem is that the Secondary Logon Service was stripped from my install and PostGres does not run right without it. I can get it to install by unchecking the install as service option but it still gives me the error «Secondary Logon Service unavailable…» when finishing the installation ( its trying to run under the account I am logged in as ). I cannot recreate this service, I have tried rebuilding the entries in registry and using the create service command. The service just never starts.
I run the Start command for PostGres after the installation then load HEM and it says it cannot connect to the DB. I know it can run without this service as Pokertracker 3 installs and runs fine when using their PostGres installer that is bundled with PT3.
This machine is running Windows XP sp2 nd HEM Pro whatever the latest build is.
Anyone with experience using PostGres, I would appreciate your help.
-
09-30-2008, 11:32 PM
#2
Junior Member
I got this working by installing PokerTracker3 with PostGres then using HEM to create a new database.
For anyone with the same problem see below
Install HEM
Install PT3 with PostGres using all default options.
Open HEM and connect to PostGres using username and password of your choosing
Let HEM configure PostGres to use your username and password
Create a new database
Set as default
Start HEM
Uninstall PT3
Do not Uninstall PostGres installed by PT3its dirty but it should work for anyone having the same problem.
-
08-30-2009, 06:21 PM
#3
Junior Member
-
10-28-2009, 08:47 PM
#4
Junior Member
Didn’t work for me, once I try connecting with HEM it won’t accept any password.
I’m considering getting a software that actually fucking works consistently, if there is such a thing. Switched from PT2 to HEM, payed the max amount for both and frankly, this software is really fucking high maintenance and so full of problems I’m considering playing sites that don’t allow trackers.
-
10-29-2009, 12:22 AM
#5
*** HM3! ***
Originally Posted by Stoneburg
Didn’t work for me, once I try connecting with HEM it won’t accept any password.
I’m considering getting a software that actually fucking works consistently, if there is such a thing. Switched from PT2 to HEM, payed the max amount for both and frankly, this software is really fucking high maintenance and so full of problems I’m considering playing sites that don’t allow trackers.
What is the problem specifically? This thread is 2 months old.
If you need to install sql, to a clean db:
Please update to the latest beta — http://www.holdemmanager.com/downloads/HmBetaUpdate.exe
Under Vista and Windows 7 make sure UAC is disabled http://www.holdemmanager.net/faq/afmmain.aspx?faqid=73 or else you must set \holdem manager\dbcontrolpanel.exe, holdemmanager.exe and hmhud.exe are started as administrator. Run the windows explorer and navigate to your Holdemmanager installation directory. Right click the executables and select «Run as admin» from the popup menu. Windows 7 you MUST set all the executables to always run as admin.
Turn off Windows Firewall for installing HM and PostgreSQL. Once you get those installed you can add exceptions to the firewall. If you have a 3rd party firewall, uninstall it completely before installing HM/SQL — http://www.holdemmanager.net/faq/afm…aspx?faqid=171
For reinstalling SQL to a new/empty DB, please follow these steps:
1) Uninstall PostgreSQL from the Windows Control Panel.
2) manually delete or rename the Program Files\Postgresql folders
3) run the command — start > programs > accessories > command prompt > right-click > run as administratorPHP Code:
net user postgres /delete
4) reboot.
5) Install PostgreSQL 8.4, with your firewall uninstalled or turned off if windows firewall — http://www.enterprisedb.com/products…oad.do#windows
-
11-02-2009, 03:21 PM
#6
Junior Member
Took close to two hours but after following your instructions I finally got it to work and the importing seems to be working as well. Cheers.
-
11-19-2009, 10:50 AM
#7
Junior Member
Hi guys.
this is probably an old thread but I googled my problem and found it.
I can’t install sql. Windows 7 says I need to have «Secondary Logon Service» running.
I’ve tried what fozzy wrote but I still get the same error. I’m not able to run the «postgresql-8.3» file as an administator (dunno why?). I’ve set the three files in my Holdem Manager folder to be run as administrator though. I’ve tried to run the «postgresql-8.3» with «run as» and then running as my administrator (even though I don’t think this should be neccesary ’cause I’m already logged in from my administrator account) but I can’t for some reason.
Any help would be much appreciated as I’m getting pretty desperate. I’ve spend several hours on this and I’m hating life, Windows and HEM right now.
-
11-19-2009, 02:47 PM
#8
*** HM3! ***
Install this version of postgresql — http://www.holdemmanager.com/downloads/pginstaller.exe
If you get an error that the user account already exists, follow these instructions — http://forums.holdemmanager.com/showthread.php?t=20755
Once you actually get postgresql installed the instructions for the secondary logon service should work.
-
11-22-2009, 10:23 AM
#9
Junior Member
-
11-22-2009, 02:21 PM
#10
*** HM3! ***
Originally Posted by legendus88
hey i have the same problem, tried with the last solution from fozzy, but this is what I got after like 80% of the process passed:
Please email me at fozzy@holdemmanager.net, with a link to this thread, and your forum name, so we can schedule a Teamviewer session. Download the Teamviewer Quick Support Module — http://www.holdemmanager.com/downloads/TeamViewerQS.exe. Please let me know what time zone you are in and what time/days are convenient for you.
I would like to run a test client on your PC to see why our installer is failing, and what I can do to get you up and running.
Join Date: Jun 2008
Posts: 450
tried to install postgreSQL but when I get to end, says
«secondary logon» service is not running. This service is required for the installer to initialize the database. Please start this service and try again.
Join Date: Jun 2008
Posts: 450
sorry figured it out, changed my «service» settings in adminstrator tools, disabled secondary logon but HEM works fine now.
Join Date: Feb 2005
Posts: 13,147
ty for posting the fix you found
Join Date: Jun 2008
Posts: 450
sorry ment that I had to turn on «secondary logon» in service settings to get it working. Also you have to «start» it (right click). I set it to disabled that prevented it from getting the PostgreSQL to install.
Join Date: Jan 2009
Posts: 5
Can someone tell me how to turn on secondary logon in vista?
Join Date: Apr 2008
Posts: 322
Quote:
Originally Posted by terryor
Can someone tell me how to turn on secondary logon in vista?
press Window Key + R, type «services.msc» in.
Last edited by tonypkr7; 01-06-2009 at 03:25 PM.
Join Date: Apr 2009
Posts: 343
just wanted to say thanks!
Join Date: Dec 2008
Posts: 68
Join Date: Apr 2008
Posts: 368
omg thank you for this thread
Join Date: Mar 2008
Posts: 9,931
Join Date: Nov 2009
Posts: 1
tyty
Join Date: Oct 2008
Posts: 16
Join Date: May 2005
Posts: 1,449
Join Date: Nov 2009
Posts: 1,805
okay…I am a complete computer dummy…can anyone help walk me through this?
I am getting the same message about secondary logon service not running, but do not understand how to get to the places that you are speaking of…
Any advice on how to get this fixed?
Join Date: Mar 2007
Posts: 38,233
The secondary logon service is a standard windows service which is available on every windows computer. In the latest versions it is not started automatically. You need to start it via control panel > administrative tools > services > secondary logon > right-click > start AND right-click > properties > startup type: automatic.
Join Date: Oct 2009
Posts: 1,482
Join Date: Sep 2011
Posts: 3,255
Quote:
Originally Posted by fozzy71
The secondary logon service is a standard windows service which is available on every windows computer. In the latest versions it is not started automatically. You need to start it via control panel > administrative tools > services > secondary logon > right-click > start AND right-click > properties > startup type: automatic.
thanx a lot for this
Join Date: Sep 2008
Posts: 16
Yes, a huge thank you to those who contributed to this thread. I tried updating my postgreSQL database to 8.3.17 to get my beta of PT4 to run properly and ended up having to reinstall postgreSQL altogether. I kept getting that darn ‘Secondary logon’ error message. Seems to be working now.
Again, thanks.
Контакты
Случайный пост