Veeam error 1064 an exception occurred in the service when handling the control request

For some reason and to come to speed with all the Veeam components, I decided to revive my Veeam Lab and during the process, I encountered the following error “Error 1064 - An exception occurred in the service when handling the control request : No connection can be made because the active machine r...

For some reason and to come to speed with all the Veeam components, I decided to revive my Veeam Lab and during the process, I encountered the following error “Error 1064 — An exception occurred in the service when handling the control request : No connection can be made because the active machine rejected it “. Before I proceed to fix this issue, I would love to discuss the capabilities of Veeam for anyone that may stumble on this article. 

Veeam Backup & Replication is comprehensive data protection and disaster recovery solution that provides a centralized console for administering backup, restore, replication operations in all supported platforms (virtual, physical, cloud). Regardless of what your needs are ranging from flexible hybrid cloud capabilities from AWS, Azure, and Google Cloud, or the most robust ransomware protection and recovery options. Veeam brings hardened immutable storage options, dependable cloud-native backup options, Continuous Data Protection, and much more all under one platform, with a single portable license for all workloads

Below are the images of the errors I get when i tried launching the Veeam Backup & Replication console.

The reason for this error was because my “SQL Server Evaluation period got expired”. This means, it exceeded the 180 days permitted. Also, I took a look at the log and found out that the Backup and Replication Server could not connect to the SQL Server as shown below.

[21.02.2022 21:59:45] <04> Info         [db] Connecting to SQL Server (CurrentUser=[TECHDIRECTARCHIChristian], ServerInstance=[MBAMSERV1MBAM], Options=[Direct])
[21.02.2022 21:59:45] <04> Info [db] Removing 'Initial Catalog' property from connection string
[21.02.2022 22:01:45] <04> Info [DB|ERROR] Failed to connect to server . (Microsoft.SqlServer.Management.Common.ConnectionFailureException)
[21.02.2022 22:01:45] <04> Info [DB|ERROR] at Microsoft.SqlServer.Management.Common.ConnectionManager.Connect()
[21.02.2022 22:01:45] <04> Info [DB|ERROR] at Veeam.Backup.DBCreator.DatabaseConnector.Connect(DatabaseConnectorOptions options)
[21.02.2022 22:01:45] <04> Info [DB|ERROR] A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (System.Data.SqlClient.SqlException)

As you can see below, the error message from the Event Viewer with event ID 17051. Here is the link to my blogpost on how I resolved this issue.

To resolve this issues, I had to upgrade the SQL Server instance. here is a link to the complete blogpost.

  • Launch the Open the SQL Server Installation Center and click on the Maintenance link. You can also launch this by launching setup.exe on MS SQL server installation media as well

Upon clicking on the Installation Center, the following window will open up. Then click on the Maintenance Tab, and then on Edition Upgrade

This will open up the “upgrade the Edition for SQL Server” window as shown below,  

On the Product Key page, select ”Enter the product key,” and type the product key and click Next.

Accept the license terms and click Next.

Select the instance you want to upgrade. You can see the instance name and select that instance. In this case, MBAM instance, which pointed out with evaluation. Select the instance and click Next.

On the ”Ready to upgrade edition” page, please click upgrade.

The upgrade process will take a few minutes to complete. Once the upgrade is completed, you will get a complete status, “succeeded”

Next, let’s ensure we are able to start our services again. As you can see, the services are running again.

Note: If you stop at here without granting the Veeam Backup Service the right privilege, you will also not be able to start the services, and launch the VBR console. To fix this, you will need to grant the Veeam Backup Service local administrative rights. Here is a link on this blogpost.

Upon granting this Log On rights, I was able to start the Veeam Backup and Replication Console. 

Veeam Backup and Replication is comprehensive data protection and disaster recovery solution which is capable of creating image-level backups of virtual, physical servers, cloud machines, and restoration as well. You may encounter the following errors when installing the Veeam backup and replication tool “VEEAM service is unable to start, error 1064: An exception occurred in the service when handling the control request”. Therefore, I will be showing you the steps on how to resolve this issue very quickly. Here is a detailed link to this post.

If you are here reading this troubleshooting guide "new Veeam Backup server but then Veeam won’t start", this means you must have recently installed Veeam Backup and Replication Server or must have recently upgraded it. As you can see from the images below, these are some errors I encountered while installing Veeam Backup and Replication in my test environment before deployment.

The «Failed to start service / connect to Veeam» and «connection refused». is not a connection or firewall issue. If you encounter similar issue, please endeavour to review the log file. Below are the 

Because of this error, you will also notice that most of the Veeam services are not running. Also, the SQL Server Express was stopped at this moment. Therefore, the error “Remoting Channel Sink UriNotPublished. RequestUri is ‘/VeeamService’ simply means the Veeam Service has not started yet“. To fix these issues, ensure the following registry keys have your server name and the SQL instance and Veeam database name are correct in the windows registry. If everything is fine here just as it is in my case, please proceed to the steps below. Below are the registry keys that need to be verified.

HKEY_LOCAL_MACHINESOFTWAREVeeamVeeam Backup and ReplicationSqlInstanceName
HKEY_LOCAL_MACHINESOFTWAREVeeamVeeam Backup and ReplicationSqlServerName
HKLMSOFTWAREVeeamVeeam Backup CatalogCatalogSharedFolderPath

Also, try to ensure the Veeam Backup and Replication services and the database services are running. If you get an error as shown below while trying to start any of the services, please proceed to the recommended solution below.

Recommended solution: From my log reviews and programs installed on my Server, It seems Veeam Backup and Replication was not correctly installed as I never got any installation success message. Also, these updates were missing and therefore, Veeam installation failed.
I will have to repair the installation. To do this, run the Veeam setup.exe file again as shown below.

This will open the Veeam Backup and Replication window. Click on install Veeam Backup and replication.
— You will now be prompted with the maintenance mode window. Select Repair and click on Next to continue.

Specify your service account. Veeam recommends using the local system account but you can create your own service again due to security reasons.

The repair process will start as shown below. In between you will be asked to apply updates, please apply these updates and continue.

As we can see, the installation has succeeded.

As you can see below, all services have been started successfully. See this article on how to install and configure Veeam Backup and Replication 11 Community Edition.

Henceforth, Veeam backup and Replication should work as expected. Start the Veeam Backup and Replication Console: From the Start menu, select Apps > Veeam > Veeam Backup & Replication Console. Alternatively, to access the Backup and Replication console, open Veeam using the Veeam Backup and Replication Console shortcut created on your desktop and click on connect as shown below.

If you wish to uninstall Veeam Backup and Replication from your server, please follow the steps discussed in this link. I hope you found this blog post helpful.

Veeam

Veeam Backup and Replication is comprehensive data protection and disaster recovery solution which is capable of creating image-level backups of virtual, physical servers, cloud machines, and restoration as well. You may encounter the following errors when installing the Veeam backup and replication tool “VEEAM service is unable to start, error 1064: An exception occurred in the service when handling the control request”. Here are some related articles: How to migrate Veeam MsSQL Database to a new MsSQL Server, Cloud Protection Manager:How to recover backup via N2WS Veeam CPM, Advantage of using a 3rd party software for Backup (N2WS by Veeam) over AMI, how to recover backup via N2WS Veeam CPM, how to implement N2WS Veeam Cloud Protection Manager (CPM 2.3.0d), how to stop Windows backup job via the Windows Server Backup utility(Wbadmin), how to setup Windows server backup and create backup jobs, and how to create a HyperV checkpoint.

If you are here reading this troubleshooting guide "new Veeam Backup server but then Veeam won’t start", this means you must have recently installed Veeam Backup and Replication Server or must have recently upgared it. As you can see from the images below, these are some errors I encountered while installing Veeam Backup and Replication in my lab enviornment. Because I do not want to create a dedicated article for each problem as they are similar, I decided to group them as shown below. Here is an article on how to install and configure Veeam Backup and Replication 11 Community Edition.

Note: The following errors in itself do not make sense "Failed to start service / connect to Veeam" and "connection refused". This is not a connection or firewall issue as well. Please continue reading to learn how I resolved these issue. To fix this, you may want to review the Veeam logs and the event viewer for more information". Here is the the to the log file C:ProgramDataVeeamSetupTemp
  • Screenshot-2021-05-23-at-21.19.47
  • Screenshot-2021-05-23-at-21.16.01
  • Screenshot-2021-05-23-at-15.52.25

Because of this error, you will also notice that most of the Veeam services are not running. Also, the SQL Server Express was stopped at this moment. Therefore, the error “Remoting Channel Sink UriNotPublished. RequestUri is ‘/VeeamService’ simply means the Veeam Service has not started yet“. To fix these issues, ensure the following registry keys have your server name and the SQL instance and Veeam database name are correct in the windows registry. If everything is fine here just as it is in my case, please proceed to the steps below. Below are the registry keys that need to be verified.

HKEY_LOCAL_MACHINESOFTWAREVeeamVeeam Backup and ReplicationSqlInstanceName
HKEY_LOCAL_MACHINESOFTWAREVeeamVeeam Backup and ReplicationSqlServerName
HKLMSOFTWAREVeeamVeeam Backup CatalogCatalogSharedFolderPath
  • Screenshot-2021-05-24-at-12.59.46
  • Screenshot-2021-05-24-at-12.59.07

Also, try to ensure the Veeam Backup and Replication services and the database services are running. If you get an error as shown below while trying to start any of the services, please proceed to the recommended solution below.

  • Screenshot-2021-05-23-at-21.25.20
  • Screenshot-2021-05-23-at-20.55.27

Recommended solution: From my log reviews and programs installed on my Server, It seems Veeam Backup and Replication was not correctly installed as I never got any installation success message. Also, these updates were missing and therefore, Veeam installation failed.
I will have to repair the installation. To do this, run the Veeam setup.exe file again as shown below.

Screenshot-2021-05-24-at-13.05.09

This will open the Veeam Backup and Replication window. Click on install Veeam Backup and replication.

Screenshot-2021-05-23-at-04.52.34

You will now be prompted with the maintenance mode window. Select Repair and click on Next to continue

Screenshot-2021-05-23-at-22.45.31

Specify your service account. Veeam recommends using the local system account but you can create your own service again due to security reasons.

Screenshot-2021-05-23-at-22.46.01

The repair process will start as shown below. In between you will be asked to apply updates, please apply these updates and continue.

Screenshot-2021-05-23-at-22.46.31

As we can see, the installation has succeeded.

Screenshot-2021-05-23-at-23.15.40

As you can see below, all services have been started successfully. See this article on how to install and configure Veeam Backup and Replication 11 Community Edition.

Screenshot-2021-05-24-at-13.04.04

Henceforth, Veeam backup and Replication should work as expected. Start the Veeam Backup and Replication Console: From the Start menu, select Apps > Veeam > Veeam Backup & Replication Console. Alternatively, to access the Backup and Replication console, open Veeam using the Veeam Backup and Replication Console shortcut created on your desktop and click on connect as shown below.

Screenshot-2021-05-23-at-15.54.17
If you wish to uninstall Veeam Backup and Replication from your server, please follow the steps discussed in this link.

I hope you found this blog post helpful. If you have any questions, please let me know in the comment session.

Avatar of doctorbill

doctorbill

Flag for United Kingdom of Great Britain and Northern Ireland asked on 4/25/2021

I cannot start the Veeam Backup Service on a windows 10 machine
The error:
Windows could not start the Backup Service on Local computer
ERROR 1064: An exception occurred in the service when handling the control request

I have already checked the registry — the VBRCatalogue and the Sql access path — all ok
It is not a firewall issue
SQL servers are running and I can access using SQL express management studio
Ideas please — this is driving me insane!!!!!!!

Event log:

Service cannot be started. System.ServiceModel.CommunicationException: A TCP error (10013: An attempt was made to access a socket in a way forbidden by its access permissions) occurred while listening on IP Endpoint=0.0.0.0:9401. —> System.Net.Sockets.SocketException: An attempt was made to access a socket in a way forbidden by its access permissions at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress) at System.Net.Sockets.Socket.Bind(EndPoint localEP) at System.ServiceModel.Channels.SocketConnectionListener.Listen() — End of inner exception stack trace — at System.ServiceModel.Channels.SocketConnectionListener.Listen() at System.ServiceModel.Channels.ExclusiveTcpTransportManager.OnOpen() at System.ServiceModel.Channels.TransportManager.Open(TransportChannelListener channelListener) at System.ServiceModel.Channels.TransportManagerContainer.Open(SelectTransportManagersCallback selectTransportManagerCallback) at System.ServiceModel.Channels.TransportChan…

VeeamVirtualization

Avatar of undefined

Last Comment

doctorbill


8/22/2022 — Mon

Likely guess…

1) Port 9401 has an admin level listener or has been set to have some sort of admin-ish privilege required for connections.

2) Your client is running as a non-admin user.

3) Simple Test: Run your client under an admin user to see if the problem mysteriously disappears.

If it does, then see #1 to fix one of these conditions or continue running your client under an admin user.

Which «Client» — the veeam backup service or the veeam backup and replication console?

was it working before? what changed?
did you do a repair of the installation?

Yes and no idea
I cannot repair — just uninstall

Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)

4/25/2021

You are not running Insider versions of Windows 10 later than 20H2?

Just checked database connection — all ok
The veeam config just cannot start the backup service

Tried starting it using NET START — same issue

Any ideas — it is driving me mad

I ran a net stat -aon
Port 9401 is not listed as a listening port

Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)

4/25/2021

Not got a reply to:-

You are not running Insider versions of Windows 10 later than 20H2?

Andrew
I am running:
20H2 (OS Build 19042.867)

Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)

4/25/2021

I believe that is 20H2, although your 867 is different to mine! (which is 728)

It is a later build
That an issue?

Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)

4/25/2021

I know Veeam have been issuing issues found and at present do not support later Windows 10 builds. But mention nothing later than 20H2, and no inside previews.

We generally advise our clients to install on Windows Server, and only Windows 10, if they *, must*. But Veeam is supposed to support Windows 10, if the correct build and version.

Andrew:
Anything related specifically to my issue?

Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)

4/25/2021

They’ve not specially stated, just now they don’t support later than 20H2, and no insider previews, which on Windows 10 Admins , love to keep downloading and testing different versions!

Any ideas — it is driving me mad

any anti-virus or security software installed?
could try running…

netsh winsock reset
netsh int ip reset

Open in new window

I believe that is 20H2, although your 867 is different to mine! (which is 728)

maybe behind on updates?
my system is patched through april and on 19042.928 (not on insider preview)

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.

View this solution by signing up for a free trial.

Members can start a

7-Day free trial

and enjoy unlimited access to the platform.

Содержание

  1. ИТ База знаний
  2. Полезно
  3. Навигация
  4. Серверные решения
  5. Телефония
  6. Корпоративные сети
  7. SQL error 1064 – что делать?
  8. Python — программист с нуля
  9. Использование зарезервированных слов
  10. Недостающая информация в таблице
  11. Бесплатный вводный урок на онлайн курс по Linux
  12. Полезно?
  13. Почему?
  14. Official Support Articles
  15. Error 1064 Unable to start Qlik logging service after hostname was changed
  16. Environment:
  17. Cause:
  18. Resolution:
  19. For Cause 1 above:
  20. For Cause 2 above:
  21. I. Update the hostname in the QlikCentralizedLogging.config file via command line.
  22. II. Change the hostname: Connection String Editor
  23. III. Change the hostname: Config file changes
  24. KDS doesn’t start or KDS root key isn’t created in Windows Server 2012 R2
  25. Symptoms
  26. Cause
  27. Resolution
  28. How to get this update
  29. Method 1: Windows Update
  30. Method 2: Microsoft Download Center
  31. Update detail information
  32. Prerequisites
  33. Registry information
  34. Restart requirement
  35. Update replacement information
  36. More information
  37. Status
  38. References
  39. File Information

ИТ База знаний

Курс по Asterisk

Полезно

— Узнать IP — адрес компьютера в интернете

— Онлайн генератор устойчивых паролей

— Онлайн калькулятор подсетей

— Калькулятор инсталляции IP — АТС Asterisk

— Руководство администратора FreePBX на русском языке

— Руководство администратора Cisco UCM/CME на русском языке

— Руководство администратора по Linux/Unix

Навигация

Серверные решения

Телефония

FreePBX и Asterisk

Настройка программных телефонов

Корпоративные сети

Протоколы и стандарты

SQL error 1064 – что делать?

Вам когда-нибудь приходилось видеть ошибку 1064 при работе с MySQL? Причем она указывает на некие синтаксические ошибки в SQL запросе, и эти ошибки могут быть совсем неочевидны – подробнее расскажем ниже.

Python — программист с нуля

Стань разработчиком на одном из самых популярных языков программирования

Использование зарезервированных слов

У каждой версии MySQL есть свой список зарезервированных слов – эти слова используются для особых задач или особых функций внутри движка MySQL. При попытке использовать какие-то из них, вы получите ту самую ошибку 1064. К примеру, ниже пример SQL запроса, который использует зарезервированное слово в качестве имени таблицы.

Как этого избежать? Просто! Только потому что слово alter зарезервировано, это не значит, что его нельзя использовать – нужно просто по-особенному приготовить! Чтобы движок MySQL не воспринимал это слово как команду, мы будем просто использовать кавычки и оно взлетит:

Недостающая информация в таблице

Иногда какой-то части информации в таблице нет и это может вызвать эту ошибку, если запрос обращался к этим данным. К примеру, если в таблице был список сотрудников, и каждому был присвоен ID, было бы логично предположить, что запрос будет вызывать запись сотрудника вместе с номером ID, например:

Если пресловутый $id никогда не был правильно указан, запрос будет выглядеть для MySQL сервера следующим образом:

Т.к запрос по сути пустой, движок MySQL будет выдавать ту самую ошибку 1064. Исправляется это следующим образом – вам нужно каким-то образом вызвать конкретную запись и добавить недостающую информацию, причем сделать это не так просто: если пытаться вызвать запись по уникальному номеру, скорее всего вы увидите точно такую ошибку. Можно с помощью phpMyAdmin вручную выбрать необходимую строку и добавить нужную информацию.

Опечатки в командах

Одной из самых частых причин ошибки 1064 являются опечатки. И иногда можно десять раз посмотреть на команду и не увидеть опечатки – как пример ниже с командой UPDATE:

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

Устаревшие команды

Некоторые команды устарели, и в новых версиях MySQL начинают выдавать хорошо знакомую нам ошибку. К примеру, команда ‘TYPE’ была признана устаревшей в MySQL 4.1 и была полностью удалена в MySQL 5.1, где при попытке использовать ее вы можете видеть ту самую ошибку. Вместо нее необходимо использовать команду ‘ENGINE’.

Ниже неверный вариант:

А вот правильный, модный и современный вариант (как оно должно быть, чтобы не было ошибки):

Заключение

Как можно видеть, для одной несчастной ошибки, указывающей на синтаксис, может быть целый ряд разных причин. Так что когда вы видите подобную ошибку – вспомните эту статью и проверьте все возможные варианты ?

Бесплатный вводный урок на онлайн курс по Linux

Мы собрали концентрат самых востребованных знаний, которые позволят начать карьеру администраторов Linux, расширить текущие знания и сделать уверенный шаг в DevOps

Полезно?

Почему?

😪 Мы тщательно прорабатываем каждый фидбек и отвечаем по итогам анализа. Напишите, пожалуйста, как мы сможем улучшить эту статью.

😍 Полезные IT – статьи от экспертов раз в неделю у вас в почте. Укажите свою дату рождения и мы не забудем поздравить вас.

Источник

Official Support Articles

Search or browse our knowledge base to find answers to your questions ranging from account questions to troubleshooting error messages. The content is curated and updated by our global Support team

  • Qlik Community
  • :
  • Support
  • :
  • Support
  • :
  • Knowledge
  • :
  • Support Articles
  • :
  • Error 1064 Unable to start Qlik logging service af.
  • Subscribe to RSS Feed
  • Mark as New
  • Mark as Read
  • Bookmark
  • Subscribe
  • Printer Friendly Page
  • Report Inappropriate Content

Error 1064 Unable to start Qlik logging service after hostname was changed

  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Report Inappropriate Content

After having successfully changed your Qlik Sense server hostname in an environment where centralized logging is enabled, when attempting to start Qlik logging service you receive

«Error 1064: An exception occurred in the service when handling the control request»

After having enabled centralized logging logs with this article How to enable logging for the Qlik Sense Centralized Logging service, the log returns the following error:

In the Qlik.Sense.Logging.log file, any of the following is registered:

[Qlik.Logging.Service.exe] Qlik.Logging.Service [ERROR] — DevartLogDatabase::Connect failed!
Exception:
No connection could be made because the target machine actively refused it 172.16.16.101:4432
.
[ERROR] — Failed to retrieve settings from database. Error: [«DevartLogDatabase::Connect failed!nException:ntNo connection could be made because the target machine actively refused it 172.16.16.101:4432n»]

.
[Qlik.Logging.Service.exe] Qlik.Logging.Service [ERROR] — Failed to initialize database. [«DevartLogDatabase::Connect failed!nException:ntNo connection could be made because the target machine actively refused it 172.16.16.101:4432n»]

May also see the following:

Qlik.Logging.Service [ERROR] — DevartLogDatabase::Connect failed!
Exception:
No such host is known

Environment:

  • Qlik Sense Enterprise on Windows, February 2019 and later

Cause:

1. The Qlik Sense Server postgreSQL is not listening on the correct IP address

2. The connection string to the QLogs database has not been updated with the new server hostname

Resolution:

For Cause 1 above:

Modify the listen_addresses setting in the postgres.conf file to listen on the address mapped to the new hostname.

Note: Make sure to make a backup copy of postgres.conf before modifying it to contain either a wildcard (e.g «*», as shown on image below) or the new hostname (e.g: the server’s FQDN).

The file is found under the following path on the Central node:

This change requires the restart of the Qlik Sense Repository Database service, or PostgresSQL service if installed on separate server.

For Cause 2 above:

I. Update the hostname in the QlikCentralizedLogging.config file via command line.

See more information on updating the hostname using the CLI under Qlik Logging Service

  1. Open CMD.exe as Administrator
  2. Go to Logging folder: cd C:Program FilesQlikSenseLogging
  3. Execute the following:
    1. Qlik.Logging.Service.exe validate
    2. Verify CentralizedLoggingEnabled: True or False
    3. If an error (example below) is returned instead, also see resolution for cause 1 above.

Failed to validate logging database. Database does not exist or is an invalid version

  1. Change the hostname:
    1. Execute the following command:
    2. Qlik.Logging.Service.exe update —hostname
  2. Verify the hostname is showing in the connection string as shown on the image below, and per II.1 below.
  3. Make sure CentralizedLoggingEnabled is true, and start the Qlik Logging Service in services.msc.

II. Change the hostname: Connection String Editor

Change the hostname with the Qlik Sense «connection string editor»

1. Check the Connection string set in: C:ProgramDataQlikSenseLogQlikCentralizedLogging.config

To do this, use QlikSenseUtil.exe

  1. Go to %Program Files%QlikSenseRepositoryUtilQlikSenseUtil.
  2. Open QlikSenseUtil.exe as Admin (right-lick > run as administrator).
  3. In QlikSenseUtil.exe > connect to the database with your superuser password then select «Connection String Editor».
  4. In the file path to config file, place C:ProgramDataQlikSenseLogQlikCentralizedLogging.config
  5. Compare the host set in the connection string with the current FQDN of the server
  6. If the hostname is different, first backup file C:ProgramDataQlikSenseLogQlikCentralizedLogging.config before making any change

2. Try to modify the hostname in your connection string, and hit the save button.

Make sure your file has been changed by clicking the «read» button afterwords.

3. In case your Connection string cannot be changed please try III.

III. Change the hostname: Config file changes

Change the hostname by editing QlikCentralizedLogging.config

Note that this solution is a workaround in case point II. did not work,
By applying this change the centralize logging connection string will be set in clear text and will be no longer encrypted. Make sure to let the customer aware about this .

  1. Backup file C:ProgramDataQlikSenseLogQlikCentralizedLogging.config before making any change
  2. Edit QlikCentralizedLogging.config as follows
  3. Copy the current connection string in a text editor, by using the QlikSenseUtil.exe .
    Please refer to II.1) to do this
    1. open file C:ProgramDataQlikSenseLogQlikCentralizedLogging.config
    2. Find and remove » » all the way to » «
    3. Replace with with the connection string you saved in a., corrected with the new server FQDN
  4. If it still does not work, and your Database is stored on the same server, replace to host=localhost

Источник

KDS doesn’t start or KDS root key isn’t created in Windows Server 2012 R2

This article describes some issues that occur when you use the group Managed Service Accounts (gMSAs) feature on Windows Server 2012 R2-based domain controllers. You can fix these issues by using the update in this article. Before you install this update, see the Prerequisites section.

Symptoms

If the domain controller account isn’t located in the root of the Domain Controllers organizational unit (OU), you may encounter one of the following issues and receive the corresponding error messages:

Microsoft Key Distribution Service (KDS) start failure:

System error 1064 has occurred. An Exception occurred in the service when handling the control request.

KDS root key generation failure:

The process cannot access the file because it is being used by another process. ( Exception from HRESULT: 0x80070020 )

Cause

This issue occurs because KDS assumes that the domain controllers are in the Domain Controllers OU instead of a child OU of the Domain Controllers.

Resolution

The update changes the KDS service Domain Controller search behavior to look in the subtree below the «Domain Controllers» OU.

How to get this update

Important If you install a language pack after you install this update, you must reinstall this update. Therefore, we recommend that you install any language packs that you need before you install this update. For more information, see Add language packs to Windows.

Method 1: Windows Update

This update is provided as a Recommended update on Windows Update. For more information on how to run Windows Update, see How to get an update through Windows Update.

Method 2: Microsoft Download Center

The update is available for download from the Microsoft Download Center:

For more information about how to download Microsoft support files, select the following article number to view the article in the Microsoft Knowledge Base:

119591 How to get Microsoft support files from online services Microsoft scanned this file for viruses. Microsoft used the most current virus-detection software that was available on the date that the file was posted. The file is stored on security-enhanced servers that help prevent any unauthorized changes to the file.

Update detail information

Prerequisites

Registry information

To apply this update, you don’t have to make any changes to the registry.

Restart requirement

You may have to restart the computer after you apply this update.

Update replacement information

This update doesn’t replace a previously released update.

More information

If you move DCs out of the Domain Controllers OU, the default setup of Group Policy is not applying to the Domain Controllers anymore, as most of the important settings are applied through the «Domain Controllers» OU. See the following TechNet article that warns about this problem:

Important: Do not move any domain controller accounts out of the default Domain Controllers OU, even if some administrators log on to them to run administrative tasks. Moving these accounts will disrupt the consistent application of domain controller policies to all domains and isn’t supported.

Many facilities that search for Domain Controller computer accounts search the subtree of the «Domain Controllers» OU. So placing the computer accounts in subtree may work with a lot of the software solutions out there.

However, there may be some services and applications, including analysis tools, that only search the Domain Controllers OU for DCs (by examining the GUID_DOMAIN_CONTROLLERS_CONTAINER_W value and setting a search base of «one-level»). DCs in child OUs won’t be found in this case.

It is up to the owner of the solution whether they see this as a valid issue to create an update to allow accounts to be located in child OUs of «Domain Controllers».

Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the «Applies to» section.

References

See reference for well-known AD objects:

File Information

The English (United States) version of this software update installs files that have the attributes that are listed in the following tables. The dates and times for these files are listed in Coordinated Universal Time (UTC). Be aware that dates and times for these files on your local computer are displayed in your local time and with your current daylight saving time bias. The dates and times may also change when you perform certain operations on the files.

The files that apply to a specific product, milestone (RTM, SP n), and service branch (LDR, GDR) can be identified by examining the file version numbers as shown in the following table:

Источник

After having successfully changed your Qlik Sense server hostname in an environment where centralized logging is enabled, when attempting to start Qlik logging service you receive

«Error 1064: An exception occurred in the service when handling the control request»

After having enabled centralized logging logs with this article How to enable logging for the Qlik Sense Centralized Logging service, the log returns the following error:

In the Qlik.Sense.Logging.log file, any of the following is registered:

[Qlik.Logging.Service.exe] Qlik.Logging.Service [ERROR] — DevartLogDatabase::Connect failed!
Exception:
No connection could be made because the target machine actively refused it 172.16.16.101:4432

[ERROR] — Failed to retrieve settings from database. Error: [«DevartLogDatabase::Connect failed!nException:ntNo connection could be made because the target machine actively refused it 172.16.16.101:4432n»]


 [Qlik.Logging.Service.exe] Qlik.Logging.Service [ERROR] — Failed to initialize database. [«DevartLogDatabase::Connect failed!nException:ntNo connection could be made because the target machine actively refused it 172.16.16.101:4432n»]

May also see the following:

Qlik.Logging.Service [ERROR] — DevartLogDatabase::Connect failed!
Exception:
    No such host is known

Environment:

  • Qlik Sense Enterprise on Windows, February 2019 and later

Cause:

1. The Qlik Sense Server postgreSQL is not listening on the correct IP address

2. The connection string to the QLogs database has not been updated with the new server hostname

Resolution:

For  Cause 1 above:

Modify the listen_addresses setting in the postgres.conf file to listen on the address mapped to the new hostname.

Note: Make sure to make a backup copy of postgres.conf before modifying it to contain either a wildcard (e.g «*», as shown on image below) or the new hostname (e.g: the server’s FQDN).

The file is found under the following path on the Central node:

 C:ProgramDataQlikSenseRepositoryPostgreSQL9.6 

This change requires the restart of the Qlik Sense Repository Database service, or PostgresSQL service if installed on separate server.

PostgresSQL_listen_addresses.gif

 For more information see PostgreSQL: postgresql.conf and pg_hba.conf explained 

For  Cause 2 above:

I. Update the hostname in the QlikCentralizedLogging.config file via command line.

  1. Open CMD.exe as Administrator
  2. Go to Logging folder: cd C:Program FilesQlikSenseLogging
  3. Execute the following:
    1. Qlik.Logging.Service.exe validate
    2. Verify CentralizedLoggingEnabled: True or False
    3. If an error (example below) is returned instead, also see resolution for cause 1 above.

Failed to validate logging database. Database does not exist or is an invalid version

  1. Change the hostname:
    1. Execute the following command:
    2. Qlik.Logging.Service.exe update —hostname <newhostname>
      example: Qlik.Logging.Service.exe update --hostname QlikServer55.domain.local​
  2. Verify the hostname is showing in the connection string as shown on the image below, and per II.1 below.
  3. Make sure CentralizedLoggingEnabled is true, and start the Qlik Logging Service in services.msc.

CentralizedLogging_HostnameChange.gif

II. Change the hostname: Connection String Editor

Change the hostname with the Qlik Sense «connection string editor»

1. Check the Connection string set in: C:ProgramDataQlikSenseLogQlikCentralizedLogging.config 

To do this, use QlikSenseUtil.exe

  1. Go to %Program Files%QlikSenseRepositoryUtilQlikSenseUtil.
  2. Open QlikSenseUtil.exe as Admin (right-lick > run as administrator).
  3. In QlikSenseUtil.exe > connect to the database with your superuser password then select «Connection String Editor».
  4. In the file  path to config file, place C:ProgramDataQlikSenseLogQlikCentralizedLogging.config
  5. Compare the host set in the connection string with the current FQDN of the server
  6. If the hostname is different, first backup file C:ProgramDataQlikSenseLogQlikCentralizedLogging.config  before making any change

2. Try to modify the hostname in your connection string, and hit the save button.

Make sure your file has been changed by clicking the «read» button afterwords.

3. In case your Connection string cannot be changed please try III. 

III. Change the hostname: Config file changes

Change the hostname by editing QlikCentralizedLogging.config

Note that this solution is a workaround in case point  II. did not work,
By applying this change the centralize logging connection string will be set in clear text and will be no longer encrypted. Make sure to let the customer aware about this

. 

  1. Backup file C:ProgramDataQlikSenseLogQlikCentralizedLogging.config  before making any change
  2. Edit QlikCentralizedLogging.config as follows
  3. Copy the current connection string in a text editor, by using the QlikSenseUtil.exe .
    Please refer to II.1) to do this
    1. open file C:ProgramDataQlikSenseLogQlikCentralizedLogging.config
    2. Find and remove «<connectionStrings configProtectionProvider=»DataProtectionConfigurationProvider»> »  all the way to » </connectionStrings>» 
    3. Replace with with the connection string you saved in a., corrected with the new server FQDN
      <connectionStrings>
          <add name="qlogs_reader" connectionString="user id=qlogs_reader;password=123;host=QsDBserverFQDN;port=4432;database=QLogs;" providerName="Devart.Data.PostgreSql" />
          <add name="qlogs_writer" connectionString="user id=qlogs_writer;password=123;host=QsDBserverFQDN;port=4432;database=QLogs;" providerName="Devart.Data.PostgreSql" />
      </connectionStrings>​
    4. If it still does not work, and your Database is stored on the same server,  replace to host=localhost

I cannot start AD FS windows service in services.msc, it shows error:

Windows could not start AD FS 2.0 Windows Service service on Local Computer. 
Error 1064: An exception occurred in the service when handling the control request.

And i can see following error in Windows Event, what shall i do?  :

Log Name:      AD FS 2.0/Admin
Source:        AD FS 2.0
Date:          4/18/2012 4:26:02 PM
Event ID:      220
Task Category: None
Level:         Error
Keywords:      AD FS
User:          NETWORK SERVICE
Computer:      WIN-CITKF3C8R0O.guyuming.com
Description:
The Federation Service configuration could not be loaded correctly from the AD FS configuration database. 

Additional Data 
Error:  
There is already a listener on IP endpoint :::1500.  Make sure that you are not trying to use this endpoint multiple times in your application and that there are no other applications listening on this endpoint.
Event Xml:
<Event xmlns=»http://schemas.microsoft.com/win/2004/08/events/event»>
  <System>
    <Provider Name=»AD FS 2.0″ Guid=»{20E25DDB-09E5-404B-8A56-EDAE2F12EE81}» />
    <EventID>220</EventID>
    <Version>0</Version>
    <Level>2</Level>
    <Task>0</Task>
    <Opcode>0</Opcode>
    <Keywords>0x8000000000000001</Keywords>
    <TimeCreated SystemTime=»2012-04-18T08:26:02.097156100Z» />
    <EventRecordID>1986</EventRecordID>
    <Correlation />
    <Execution ProcessID=»7256″ ThreadID=»7184″ />
    <Channel>AD FS 2.0/Admin</Channel>
    <Computer>WIN-CITKF3C8R0O.guyuming.com</Computer>
    <Security UserID=»S-1-5-20″ />
  </System>
  <UserData>
    <Event xmlns:auto-ns2=»http://schemas.microsoft.com/win/2004/08/events» xmlns=»http://schemas.microsoft.com/ActiveDirectoryFederationServices/2.0/Events»>
      <EventData>
        <Data>There is already a listener on IP endpoint :::1500.  Make sure that you are not trying to use this endpoint multiple times in your application and that there are no other applications listening on this endpoint.</Data>
      </EventData>
    </Event>
  </UserData>
</Event>

Log Name:      AD FS 2.0/Admin
Source:        AD FS 2.0
Date:          4/18/2012 4:26:02 PM
Event ID:      202
Task Category: None
Level:         Error
Keywords:      AD FS
User:          NETWORK SERVICE
Computer:      WIN-CITKF3C8R0O.guyuming.com
Description:
The Federation Service configuration service could not be opened. 

Additional Data 
Exception details: 
System.ServiceModel.AddressAlreadyInUseException: There is already a listener on IP endpoint :::1500.  Make sure that you are not trying to use this endpoint multiple times in your application and that there are no other applications listening on this
endpoint. —> System.Net.Sockets.SocketException: Only one usage of each socket address (protocol/network address/port) is normally permitted
   at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress)
   at System.Net.Sockets.Socket.Bind(EndPoint localEP)
   at System.ServiceModel.Channels.SocketConnectionListener.Listen()
   — End of inner exception stack trace —
   at System.ServiceModel.Channels.SocketConnectionListener.Listen()
   at System.ServiceModel.Channels.BufferedConnectionListener.Listen()
   at System.ServiceModel.Channels.ExclusiveTcpTransportManager.OnOpen()
   at System.ServiceModel.Channels.TransportManager.Open(TransportChannelListener channelListener)
   at System.ServiceModel.Channels.TransportManagerContainer.Open(SelectTransportManagersCallback selectTransportManagerCallback)
   at System.ServiceModel.Channels.ConnectionOrientedTransportChannelListener.OnOpen(TimeSpan timeout)
   at System.ServiceModel.Channels.TcpChannelListener`2.OnOpen(TimeSpan timeout)
   at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
   at System.ServiceModel.Dispatcher.ChannelDispatcher.OnOpen(TimeSpan timeout)
   at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
   at System.ServiceModel.ServiceHostBase.OnOpen(TimeSpan timeout)
   at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
   at Microsoft.IdentityServer.Service.SecurityTokenService.ServiceHostManager.Open(ServiceHostEntry entry)
Event Xml:
<Event xmlns=»http://schemas.microsoft.com/win/2004/08/events/event»>
  <System>
    <Provider Name=»AD FS 2.0″ Guid=»{20E25DDB-09E5-404B-8A56-EDAE2F12EE81}» />
    <EventID>202</EventID>
    <Version>0</Version>
    <Level>2</Level>
    <Task>0</Task>
    <Opcode>0</Opcode>
    <Keywords>0x8000000000000001</Keywords>
    <TimeCreated SystemTime=»2012-04-18T08:26:02.070154600Z» />
    <EventRecordID>1984</EventRecordID>
    <Correlation />
    <Execution ProcessID=»7256″ ThreadID=»7184″ />
    <Channel>AD FS 2.0/Admin</Channel>
    <Computer>WIN-CITKF3C8R0O.guyuming.com</Computer>
    <Security UserID=»S-1-5-20″ />
  </System>
  <UserData>
    <Event xmlns:auto-ns2=»http://schemas.microsoft.com/win/2004/08/events» xmlns=»http://schemas.microsoft.com/ActiveDirectoryFederationServices/2.0/Events»>
      <EventData>
        <Data>configuration service</Data>
        <Data>System.ServiceModel.AddressAlreadyInUseException: There is already a listener on IP endpoint :::1500.  Make sure that you are not trying to use this endpoint multiple times in your application and that there are
no other applications listening on this endpoint. —&gt; System.Net.Sockets.SocketException: Only one usage of each socket address (protocol/network address/port) is normally permitted
   at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress)
   at System.Net.Sockets.Socket.Bind(EndPoint localEP)
   at System.ServiceModel.Channels.SocketConnectionListener.Listen()
   — End of inner exception stack trace —
   at System.ServiceModel.Channels.SocketConnectionListener.Listen()
   at System.ServiceModel.Channels.BufferedConnectionListener.Listen()
   at System.ServiceModel.Channels.ExclusiveTcpTransportManager.OnOpen()
   at System.ServiceModel.Channels.TransportManager.Open(TransportChannelListener channelListener)
   at System.ServiceModel.Channels.TransportManagerContainer.Open(SelectTransportManagersCallback selectTransportManagerCallback)
   at System.ServiceModel.Channels.ConnectionOrientedTransportChannelListener.OnOpen(TimeSpan timeout)
   at System.ServiceModel.Channels.TcpChannelListener`2.OnOpen(TimeSpan timeout)
   at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
   at System.ServiceModel.Dispatcher.ChannelDispatcher.OnOpen(TimeSpan timeout)
   at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
   at System.ServiceModel.ServiceHostBase.OnOpen(TimeSpan timeout)
   at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
   at Microsoft.IdentityServer.Service.SecurityTokenService.ServiceHostManager.Open(ServiceHostEntry entry)</Data>
      </EventData>
    </Event>
  </UserData>
</Event>

 

I wrote a Windows Service to run on Win10, and it worked perfectly fine until I decided to change it a bit. I rewrote some logic, tested it in both Debug and Release configurations, and everything was fine. Then I uninstalled the current version of the service using installutil.exe /u %servicename.exe% and reinstalled it again using installutil.exe %servicename.exe%.
For some reason, this new version cannot start, and it crashes with Error 1064. This is the full error text:

Windows could not start %servicename% service on Local Computer. Error 1064: An exception occurred in the service when handling the control request.

The last time I installed this service, I ran into some difficulties, but quickly fixed them by changing the Log On properties. This time, it is not working. Please help with this issue.

Thanks.

Update 1

Here are my Main() and OnStart() service methods:

Main()

static void Main()
{
#if DEBUG
    var service = new SalesforceToJiraService();
    service.OnDebug();
    Thread.Sleep(Timeout.Infinite);
#else
    ServiceBase[] ServicesToRun;
    ServicesToRun = new ServiceBase[]
    {
        new SalesforceToJiraService()
    };
     ServiceBase.Run(ServicesToRun);
#endif
}

OnStart()

protected override void OnStart(string[] args)
{
    this.ConfigureServices();

    this.timer.Start();
    this.logger.Information("SalesforceToJira service started.");
}

Update 2

More code:

ConfigureServices()

protected void ConfigureServices()
{
    this.configuration = ConfigurationHelper.LoadConfiguration(ConfigurationPath);
    this.logger = ConfigurationHelper.ConfigureLogger(this.configuration.Logs.LogsPath);

    this.timer = ConfigurationHelper.ConfigureTimer(this.configuration.ProcessInterval.TotalMilliseconds,
        (sender, eventArgs) => this.ProcessCasesAsync(sender, eventArgs).GetAwaiter().GetResult());

    this.salesforceClient = new SalesforceCliClient(this.configuration.Salesforce.CliPath);

    this.jiraClient = Jira.CreateRestClient(
        this.configuration.Jira.Url,
        this.configuration.Jira.Username,
        this.configuration.Jira.Password);
}

I’m using Newtonsoft.JSON for deserializing a JSON configuration file, Serilog for logging, System.Timers.Timer for periodic events, AtlassianSDK for the Jira API and some wrappers over Salesforce CLI for Salesforce.

For some reason and to come to speed with all the Veeam components, I decided to revive my Veeam Lab and during the process, I encountered the following error “Error 1064 — An exception occurred in the service when handling the control request : No connection can be made because the active machine rejected it “. Before I proceed to fix this issue, I would love to discuss the capabilities of Veeam for anyone that may stumble on this article. 

Veeam Backup & Replication is comprehensive data protection and disaster recovery solution that provides a centralized console for administering backup, restore, replication operations in all supported platforms (virtual, physical, cloud). Regardless of what your needs are ranging from flexible hybrid cloud capabilities from AWS, Azure, and Google Cloud, or the most robust ransomware protection and recovery options. Veeam brings hardened immutable storage options, dependable cloud-native backup options, Continuous Data Protection, and much more all under one platform, with a single portable license for all workloads

Below are the images of the errors I get when i tried launching the Veeam Backup & Replication console.

The reason for this error was because my “SQL Server Evaluation period got expired”. This means, it exceeded the 180 days permitted. Also, I took a look at the log and found out that the Backup and Replication Server could not connect to the SQL Server as shown below.

[21.02.2022 21:59:45] <04> Info         [db] Connecting to SQL Server (CurrentUser=[TECHDIRECTARCHIChristian], ServerInstance=[MBAMSERV1MBAM], Options=[Direct])
[21.02.2022 21:59:45] <04> Info [db] Removing 'Initial Catalog' property from connection string
[21.02.2022 22:01:45] <04> Info [DB|ERROR] Failed to connect to server . (Microsoft.SqlServer.Management.Common.ConnectionFailureException)
[21.02.2022 22:01:45] <04> Info [DB|ERROR] at Microsoft.SqlServer.Management.Common.ConnectionManager.Connect()
[21.02.2022 22:01:45] <04> Info [DB|ERROR] at Veeam.Backup.DBCreator.DatabaseConnector.Connect(DatabaseConnectorOptions options)
[21.02.2022 22:01:45] <04> Info [DB|ERROR] A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (System.Data.SqlClient.SqlException)

As you can see below, the error message from the Event Viewer with event ID 17051. Here is the link to my blogpost on how I resolved this issue.

To resolve this issues, I had to upgrade the SQL Server instance. here is a link to the complete blogpost.

  • Launch the Open the SQL Server Installation Center and click on the Maintenance link. You can also launch this by launching setup.exe on MS SQL server installation media as well

Upon clicking on the Installation Center, the following window will open up. Then click on the Maintenance Tab, and then on Edition Upgrade

This will open up the “upgrade the Edition for SQL Server” window as shown below,  

On the Product Key page, select ”Enter the product key,” and type the product key and click Next.

Accept the license terms and click Next.

Select the instance you want to upgrade. You can see the instance name and select that instance. In this case, MBAM instance, which pointed out with evaluation. Select the instance and click Next.

On the ”Ready to upgrade edition” page, please click upgrade.

The upgrade process will take a few minutes to complete. Once the upgrade is completed, you will get a complete status, “succeeded”

Next, let’s ensure we are able to start our services again. As you can see, the services are running again.

Note: If you stop at here without granting the Veeam Backup Service the right privilege, you will also not be able to start the services, and launch the VBR console. To fix this, you will need to grant the Veeam Backup Service local administrative rights. Here is a link on this blogpost.

Upon granting this Log On rights, I was able to start the Veeam Backup and Replication Console. 

3 / 3 / 1

Регистрация: 19.05.2019

Сообщений: 155

1

04.04.2021, 14:31. Показов 8253. Ответов 5


https://docs.microsoft.com/ru-… t-designer

выполнял код отсюда, значит код рабочий , уверен кто это делал сталкивался с этой проблемой и надеюсь решил.
Тоесть моя служба видна в списке служб , при ее запуске выскакивает такая ошибка.

__________________
Помощь в написании контрольных, курсовых и дипломных работ, диссертаций здесь

0

3 / 3 / 1

Регистрация: 19.05.2019

Сообщений: 155

04.04.2021, 14:36

 [ТС]

2

Увеличиваю сообщение до 3х символов

Миниатюры

Ошибка службы при обработке команды (1064)
 

0

2715 / 2026 / 374

Регистрация: 22.07.2011

Сообщений: 7,671

04.04.2021, 14:58

3

ДЛ имончик, пример кода в методе OnStart покажите.

0

ДЛ имончик

3 / 3 / 1

Регистрация: 19.05.2019

Сообщений: 155

04.04.2021, 16:44

 [ТС]

4

C#
1
2
3
4
5
6
7
8
9
10
11
12
13
14
protected override void OnStart(string[] args)
        {
            ServiceStatus serviceStatus = new ServiceStatus();
            serviceStatus.dwCurrentState = ServiceState.SERVICE_START_PENDING;
            serviceStatus.dwWaitHint = 100000;
            SetServiceStatus(this.ServiceHandle, ref serviceStatus);
            eventLog1.WriteEntry("In OnStart.");
            Timer timer = new Timer();
            timer.Interval = 60000; // 60 seconds
            timer.Elapsed += new ElapsedEventHandler(this.OnTimer);
            timer.Start();
            serviceStatus.dwCurrentState = ServiceState.SERVICE_RUNNING;
            SetServiceStatus(this.ServiceHandle, ref serviceStatus);
        }

0

2715 / 2026 / 374

Регистрация: 22.07.2011

Сообщений: 7,671

04.04.2021, 20:42

5

ДЛ имончик, оберни все это в try catch , наверняка тут падает , потому служба и не стартует.

0

ДЛ имончик

3 / 3 / 1

Регистрация: 19.05.2019

Сообщений: 155

05.04.2021, 13:08

 [ТС]

6

не помогло, служба запускается , грузится и тогда возникает ошибка (где то на 10%), она и раньше начинала запуск
У меня есть метод

C#
1
private void eventLog1_EntryWritten(object sender, EntryWrittenEventArgs e)

он пустой , но при этом есть такие команды

C#
1
 eventLog1.WriteEntry("File not found");

мб тут проблема?

Добавлено через 16 минут
не фигня, не прав

0

Hi,

I’m running into a little behavior that I cannot explain. I’ve build a C# Service that watches the Security EventLog for specific events and generates a little report based on them. 

The application runs on a Windows 2008 R2 Standard Server with .NET 4.8 installed. The target framework is .NET 4.7.2 and the service runs as Local System. 

So far the application works like a charm but… in the wrong folder and I seem unable to change it. The default folder is «C:WindowsSysWow64», normal for a 32-bits service. But I’d like to point it to another folder «C:TestAppsEventLogGuard»
as a working directory. 

I’ve tried to change the working directory or path it writes files to in two ways (both resulting in the same error):

1. By changing the working directory

string path = @"C:TestAppsEventLogGuard";
Directory.SetCurrentDirectory(path);

2. By changing the path I’m writing to in a streamwriter to:

string fileName = @"C:TestAppsEventLogGuardIPList.txt"; string fileLog = @"C:TestAppsEventLogGuardEventLogGuard.log";

using (System.IO.StreamWriter file = new System.IO.StreamWriter(fileName))
{

~~~~~~

}

As soon as either option is added I’m getting an error 1064 on-start. In the Windows EventLog I can see the following error displayed:

Problem signature:
P1: EventLogGuardSVC.exe
P2: 1.0.0.0
P3: f8080359
P4: mscorlib
P5: 4.8.3761.0
P6: 5c9c6e98
P7: 168e
P8: fc
P9: System.IO.DirectoryNotFound
P10: 

Does anyone have an idea what may be causing this behavior or experienced something similar? 

Edit: The directory exists and I do have a check added if the path exists as well, makes no difference.

  • Edited by

    Friday, October 25, 2019 8:44 AM

Hi,

I’m running into a little behavior that I cannot explain. I’ve build a C# Service that watches the Security EventLog for specific events and generates a little report based on them. 

The application runs on a Windows 2008 R2 Standard Server with .NET 4.8 installed. The target framework is .NET 4.7.2 and the service runs as Local System. 

So far the application works like a charm but… in the wrong folder and I seem unable to change it. The default folder is «C:WindowsSysWow64», normal for a 32-bits service. But I’d like to point it to another folder «C:TestAppsEventLogGuard»
as a working directory. 

I’ve tried to change the working directory or path it writes files to in two ways (both resulting in the same error):

1. By changing the working directory

string path = @"C:TestAppsEventLogGuard";
Directory.SetCurrentDirectory(path);

2. By changing the path I’m writing to in a streamwriter to:

string fileName = @"C:TestAppsEventLogGuardIPList.txt"; string fileLog = @"C:TestAppsEventLogGuardEventLogGuard.log";

using (System.IO.StreamWriter file = new System.IO.StreamWriter(fileName))
{

~~~~~~

}

As soon as either option is added I’m getting an error 1064 on-start. In the Windows EventLog I can see the following error displayed:

Problem signature:
P1: EventLogGuardSVC.exe
P2: 1.0.0.0
P3: f8080359
P4: mscorlib
P5: 4.8.3761.0
P6: 5c9c6e98
P7: 168e
P8: fc
P9: System.IO.DirectoryNotFound
P10: 

Does anyone have an idea what may be causing this behavior or experienced something similar? 

Edit: The directory exists and I do have a check added if the path exists as well, makes no difference.

  • Edited by

    Friday, October 25, 2019 8:44 AM

Я написал службу Windows для работы на Win10, и она отлично работала, пока я не решил немного ее изменить. Я переписал некоторую логику, протестировал ее как в конфигурации Debug, так и в конфигурации Release, и все было в порядке. Затем я удалил текущую версию службы с помощью installutil.exe /u %servicename.exe% и заново установил ее с помощью installutil.exe %servicename.exe%.
По какой-то причине эта новая версия не запускается, и она вылетает с ошибкой 1064. Это полный текст ошибки:

Windows could not start %servicename% service on Local Computer. Error 1064: An exception occurred in the service when handling the control request.

В последний раз, когда я устанавливал эту службу, я столкнулся с некоторыми трудностями, но быстро исправил их, изменив свойства Log On. На этот раз это не работает. Пожалуйста, помогите с этой проблемой.

Спасибо.

Обновление 1

Вот мои методы обслуживания Main() и OnStart():

Main()

static void Main()
{
#if DEBUG
    var service = new SalesforceToJiraService();
    service.OnDebug();
    Thread.Sleep(Timeout.Infinite);
#else
    ServiceBase[] ServicesToRun;
    ServicesToRun = new ServiceBase[]
    {
        new SalesforceToJiraService()
    };
     ServiceBase.Run(ServicesToRun);
#endif
}

OnStart()

protected override void OnStart(string[] args)
{
    this.ConfigureServices();

    this.timer.Start();
    this.logger.Information("SalesforceToJira service started.");
}

Обновление 2

Больше кода:

ConfigureServices()

protected void ConfigureServices()
{
    this.configuration = ConfigurationHelper.LoadConfiguration(ConfigurationPath);
    this.logger = ConfigurationHelper.ConfigureLogger(this.configuration.Logs.LogsPath);

    this.timer = ConfigurationHelper.ConfigureTimer(this.configuration.ProcessInterval.TotalMilliseconds,
        (sender, eventArgs) => this.ProcessCasesAsync(sender, eventArgs).GetAwaiter().GetResult());

    this.salesforceClient = new SalesforceCliClient(this.configuration.Salesforce.CliPath);

    this.jiraClient = Jira.CreateRestClient(
        this.configuration.Jira.Url,
        this.configuration.Jira.Username,
        this.configuration.Jira.Password);
}

Я использую Newtonsoft.JSON для десериализации файла конфигурации JSON, Serilog для ведения журнала, System.Timers.Timer для периодических событий, AtlassianSDK для Jira API и некоторые оболочки над Salesforce CLI для Salesforce.


Ответы
8

У меня была такая же ошибка 1064 при запуске моей службы. Для меня пользователь, у которого была зарегистрирована служба, не был действительным пользователем в базе данных. После добавления он отлично работал.

Благодаря комментарию @Siderite Zackwehdex я смог найти полную трассировку стека основного исключения в EventViewer в разделе:

Windows LogsApplication

В моем случае моя служба называется «HttpDispatcher», которая отображается в столбце «Источник» на верхней панели.

Я сразу понял, что это произошло из-за проблемы с зависимостью, когда мой проект .NET 4.7.2 не работал с моими ссылками на .NET Standard. (Этот каштан).

Я столкнулся с той же проблемой. Причина в том, что я забыл правильно настроить соединение с базой данных в конфигурациях.

У меня также была такая же ошибка в моей службе Windows.
Причина в том, что он не может прочитать параметр конфигурации, поэтому он аварийно завершает работу.

Добавив некоторую проверку (исправление ошибок), Службы Windows могут запустить его правильно.

Я тоже столкнулся с этой проблемой. В моем случае это связано с ошибкой подключения к базе данных. Я думаю, это связано с тем, что код вызывает исключение.

Моя ошибка:
Windows не может запустить службу service1 на локальном компьютере.

Ошибка 1064: исключение в службе при обработке запроса управления

Я исправил свою проблему, обновив стороннюю DLL.

Я столкнулся с той же проблемой, вот как я решил ее после устранения неполадок.

  • Если вы запускаете службу на сервере с несколькими пользователями, сделайте
    обязательно запустите службу от имени администратора. Нажмите на услугу
    properties, а затем на вкладке «Вход в систему» ​​щелкните эту учетную запись и укажите
    имя пользователя и пароль администратора.

  • И если ваша служба обращается к какому-то общему диску, убедитесь, что
    у вас есть общий пользователь на всех серверах для доступа к общему
    диски и добавить пользователя в качестве локального администратора.

В моем случае ошибка возникла из-за проблем с именем журнала событий

Это было исправлено после того, как я перешел на RegEdit и удалил старое имя службы из HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServices.

Для меня это произошло, когда я попытался перезапустить процесс. Оказалось, что процесс зависал в «Остановке», поэтому мне пришлось убить его вручную через командную строку и PID.

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

Понравилась статья? Поделить с друзьями:
  • Veeam backup error log
  • Vectors must be the same lengths ошибка матлаб
  • Vectors must be the same length matlab как исправить
  • Vector subscript out of range c как исправить
  • Vec3 pool size error nullpointerexception null