Install Zabbix Agent on Windows 2016 Avoid Windows Agent – Error 1053

How to Install Zabbix Agent on Windows 2016 and avoid the: Windows error service could not be started. Error 1053: The service did not respond to the start or control request in a timely fashion.

Download – https://www.zabbix.com/download_agents

If you have the agent service installed incorrectly now, you can remove it by running “zabbix_agentd.exe –uninstall”.

cd c:\zabbix
zabbix_agentd.exe --uninstall

New Install

  1. Create directory C:\zabbix and place zabbix_agentd.exe and zabbix_agentd.win.conf files there.
  2. Edit the zabbix_agentd.win.conf file and set the values:

LogFile=C:\zabbix\zabbix_agentd.log
Server = IP address of your Zabbix server
# ListenPort = 10050 Leave it commented as is if you don’t change the defaults
ServerActive = IP of your Zabbix server
Hostname = computer that will be monitored as listed in the zabbix server hosts setup

3. Open command prompt and execute:

C:\zabbix\zabbix_agentd.exe --config C:\zabbix\zabbix_agentd.win.conf --install
zabbix_agentd.exe [5584]: service [Zabbix Agent] installed successfully
zabbix_agentd.exe [5584]: event source [Zabbix Agent] installed successfully


4. Start Windows service.

If you receive an error – Windows Agent – Error 1053 – that the service could not be started, run the uninstall above and restart the installation and make sure the files are in the correct directory and the config file changes match what you need.

Please find more info here: https://www.zabbix.com/documentation/4.0/manual/appendix/install/windows_agent

Adding a firewall rule in Windows.

Go to Windows Firewall. Add new rule. Choose port, TCP, Specific Local Ports. Add port 10050.

Changing File Ownership in Windows

Taking Ownership of Files and Folders in Windows Server. Here are some notes on how to do this:

If you are an administrator, an authorized user, or a backup operator, you can take ownership of a file or folder by completing the following steps:
1. In Windows Explorer, open the file or folder’s Properties dialog box by right-clicking the file or folder and then clicking Properties.
2. On the Security tab, click Advanced to display the Advanced Security Settings dialog box.
3. On the Owner tab, click Edit.This opens the Advanced Security Settings dialog box for editing.
4. In the Change Owner To list, select the new owner.If you’re taking ownership of a folder, you can take ownership of all subfolders and files within the folder by selecting the Replace Owner On Subcontainers And Objects option.
5. Click OK twice when you have finished.

Assigning Ownership
If you are an administrator or the current owner of a file, you can assign ownership of a file or a folder to another user or group by completing these steps:
1. In Windows Explorer, open the file or folder’s Properties dialog box by right-clicking the file or folder and then clicking Properties.
2. On the Security tab, click Advanced to display the Advanced Security Settings dialog box.
3. On the Owner tab, click Edit. This opens the Advanced Security Settings dialog box for editing.
4. Click Other Users Or Groups to display the Select User, Computer, Service Account, Or Group dialog box.
5. Type the name of a user or a group, and then click Check Names. If multiple names match the value you entered, you’ll see a list of names and can choose the one you want to use. Otherwise, the name will be filled in for you, and you can click OK to close the Select User, Computer, Service Account, Or Group dialog box.
6. In the Change Owner To list, select the new owner. If you’re assigning ownership of a folder, you can assign ownership of all subfolders and files within the folder by selecting the Replace Owner On Subcontainers And Objects option.
7. Click OK twice when you have finished.
Codero

Let’s Encrypt for Windows Server 2012 R2

I recently added MailEnable to a Windows server and wanted to add SSL. I checked and there is an application that you can use to add the Let’s Encrypt SSL.

Quick Start
Download from https://certifytheweb.com/ and install it.
Click ‘New Certificate’, choose your IIS site (which must have 1 or more hostname bindings set). Save your settings and click ‘Request Certificate’
All done!

Unable to remote desktop to Server 2012 after adding user to Remote Desktop Users Group

Are you having trouble accessing your Windows Server 2012 machine using remote desktop, even after adding the user to the Remote Desktop Users group? Remote Desktop appears to accept the login credentials but then you receive the following error message:

“To sign in remotely, you need the right to sign in through Remote Desktop Services. By default members of the Administrators group have this right. If the group you’re in does not have the right, or if the right has been removed from the Administrators group, you need to be granted the right manually.”

With Server 2012 it seems that you now also need to grant the user remote access privileges though the Local Security Policy as well as the Remote Desktop Users group.

To grant this access, search for and open the Local Security Policy program.
Expand Local Policies and select User Rights Assignment. A list of polices will appear on the right hand side. Right click on the policy named “Allow log on through Remote Desktop Services” and select Properties.

You will now have the option to add users or groups to the policy.

Test the login…

Since i am logging into a domain as a domain user, I received the following error:

Login to the Computer as Administrator (not the domain controller or AD server).

Got to Start > Right Click on “This PC. Go to Remote Settings.

Go to Select users.

Click Add.

Type part of the name. In this example, lisa. Click “Check Names”. The name now appears as the domain username. Click OK and OK. Now login.

 

 

 

 

How to setup FTP server / users on Windows 2012 R2

Introduction

This tutorial should assist with creating FTP server on Windows 2012 R2 – Depend on your version – Your setting might be slightly different.

Even there are too many free third-party tools like Filezilla that provide a client access to FTP serve..

Here you have the steps I followed to set up my FTP server in Windows 2012 R2.
The steps below assume you are using IIS 8.5 that comes by default with Windows 2012 R2

Prerequisites

  • A Windows 2012 R2 server.
  • An administrative account.

1- Enable Web Server (IIS) role and FTP Server role service.

  1. Log in to the server by using an administrative account
  2. Open Server Manager
  3. Go to Manage > Add Roles and Features
  4. Click Next
  5. Select Role-based or feature-based installation
  6. Click Next
  7. Select Select a server from the server pool, and select your server
  8. Click Next.
  9. Scroll down and put a check mark in Web Server (IIS)
  10. An Add features window pops up. Put a check mark in the Include management tools (if applicable) option
  11. Click Add Features button
  12. Click Next
  13. Click Next
  14. Click Next
  15. Scroll down and put a check mark in: FTP serverFTP Service and FTP Extensibility.
  16. Click Next
  17. Click Install
  18. When installation is finished, click Close

2- Create FTP users

You need to create users in Windows in order to be able to use FTP services.
You can use either local or domain users.
In this case, I will create some local users.
The only thing that changes if you use domain users is, when you log in to FTP, you must use the domain/account format.

  1. In Server Manager go to Tools
  2. Click Computer Management
  3. Click Local Users and Groups
  4. Click Users
  5. In the center pane, right-click a blank area and then select New User…
  6. Enter the username information and click the Create button
  7. Create as many usernames you need here.

Optionally, you can create a group that contains all the FTP users in the Groups folder and add the users you created above.

3- Configuring FTP global IIS settings.

You need to configure some global settings for your IIS server before creating your FTP site.
It is very easy, follow the steps below:

  1. In Server Manager go to Tools
  2. Click Internet Information Services (IIS) manager.
  3. In the left pane, double-click the server icon (in the tree below the option Start Page)
  4. If a window pops up asking about Microsoft Web Platform, select Do not show this message, and click the No button
  5. In the center pane, double-click the FTP Authentication icon
  6. If you want to allow anonymous users,right-click Anonymous Authentication and set it to Enable.
  7. To allow access to the windows users you created in Part Two above, right-click Basic Authentication and set it to Enable.
  8. In the left pane, double-click the server icon.
  9. Double click the FTP Authorization Rules option
  10. Delete all rules in the center pane.
  11. After all rules have been deleted, right-click a blank area in the center pane and select the option Add Allow Rule…
  12. Click the option Specified users.
  13. In the text box type the usernames (separated by commas) you created in Part Two above.
  14. Check either the boxes Read or Write depending the access you want to grant to the user or group of users you are adding.
  15. Click the OK button
  16. Repeat steps 8 to 15 if you want to add more users with different Read / Write permissions.

4- Creating FTP site.

  1. Open Windows Explorer
  2. Navigate to C:\inetpub\ftproot
  3. This is the default local folder where the FTP directory tree will be saved
  4. You can create your own folder in another directory or hard drive if you want.
  5. Create your own folder at this point if it is desired.
  6. Open Server Manager
  7. Go to Tools
  8. Click on Internet Information Services (IIS) Manager
  9. In the left pane, right-click the server icon (in the tree below the option Start Page)
  10. Click Add FTP Site
  11. In FTP site name type a friendly name for your site. (My FTP Site  for example)
  12. In Physical path browse to the folder you creates in steps 2 to 5
  13. Click Next
  14. In IP Address, click the drop down menu, and select the server’s IP address you want to assign to the site
  15. Port remains as 21 by default. You can change it if you want.
  16. Ensure the option Start FTP site automatically is checked
  17. Select the No SSL option if you are nor required to use certificates. Otherwise, select one of the other options.
  18. Click Next
  19. In the Authentication section, put a check mark in Anonymous If you want to allow anonymous users.
  20. Put a check mark also in Basic to allow access to users created in Part Two.
  21. In the Allow access to: drop down menu, select: Specified Users
  22. In the text box type the usernames of the users you created in Part Two.
  23. Check the box Read to grant read access to users.
  24. Check the box Write to grant write access to users.
  25. Click Finish

5- IIS Firewall setup.

  1. In Server Manager go to Tools
  2. Click Internet Information Services (IIS) manager.
  3. In the left pane, double-click the server icon (in the tree below the option Start Page)
  4. In the center pane, double-click the FTP Firewall Support icon
  5. In the Data Channel Port Range box, make sure the value is 0-0 to use the default port range.
  6. Or, you can change it if you want by your own set of ports.
  7. Click Apply
  8. Close Internet Information Services (IIS) Manager

6- Windows Firewall setup.

By default, all exceptions needed for FTP are added to the Windows Firewall at the time you enable the FTP Server role.
Anyway, for troubleshooting purposes, I will show the configuration that needs to be in place in order to allow FTP traffic in your server.

  1. Open Server Manager
  2. In the left pane, click Local Server
  3. In the right pane, click the hyperlink beside the Windows Firewall option. It should say Public:On  (or Off).
  4. The Windows firewall window opens. In the left pane click Advanced Settings
  5. The Windows Firewall with Advanced Security window opens. In the left pane click Inbound Rules.
  6. In the right pane, verify there’s a rule called FTP Server (FTP Traffic-In)
  7. Double click this rule.
  8. In the General tab, verify the option Enabled is checked.
  9. Go to the Protocols and Ports tab.
  10. Verify the Protocol type is TCP and the Local port value is 21.
  11. Go to the Advanced tab
  12. Make sure the profiles: DomainPrivate and Public are checked.
  13. Click OK button
  14. Execute the same validation in steps 7-13 for the FTP Server Passive (FTP Passive Traffic-In)rule. Except that the local port value in this rule should be1024-65535
  15. Execute the same validation in steps 7-13 for the FTP Server Secure (FTP SSL Traffic-In) rule.Except that the local port value in this rule should be 990
  16. In the left pane, click Outbound Rules
  17. Execute the same validation in steps 7-13 for the FTP Server (FTP Traffic-Out) rule. Except that the local port value in this rule should be 20
  18. Execute the same validation in steps 7-13 for the FTP Server Secure (FTP SSL Traffic-Out) rule. Except that the local port value in this rule should be 989
  19. Close all windows.

 7- Testing

  • The last part is to test your work.
  • Make sure you can connect to the FTP service, first from the local machine and then form a remote computer.
  • Try to log in, put files, get files, show folder contents, etc

The remote session was disconnected because there are no Remote Desktop License Servers available to provide a license

It could be that a session was left connected. If thats the case I’ll try using the admin console command and see if I can get connected with it.

On you local computer, go to Start -> Run then paste this and hit enter

mstsc.exe /admin

It’ll prompt for IP and then user/pass. It looks like it opens Remote Desktop Connection, but really its the “admin console”

A network-related or instance-specific error occurred while establishing a connection to SQL Server.

Windows 2008 R2

1) SQL Server should be up and running.

All Programs >> Microsoft SQL Server 2008 >> Configuration Tools >> SQL Server Configuration Manager >> SQL Server Services, and check if SQL Server service status is “Running”.

Run “sqlcmd -L” in your command prompt to ascertain if your server is included in your network list.

2) Enable TCP/IP in SQL Server Configuration

When two or more SQL Servers are connected across network they do all communication using TCP/IP. The default port of SQL Server installation is 1433. This port can be changed through SQL Server Configuration Manager. TCP/IP should be enabled for SQL Server to be connected.

Go to All Programs >> Microsoft SQL Server 2008 >> Configuration Tools >> SQL Server Configuration Manager >> Select TCP/IP >> right click and enable

3) Open Port in Windows Firewall

Go to Control Panel >> Windows Firewall >> Change Settings >> Exceptions >> Add Port

Make the following entries in popup “Add a Port” and click OK.
Name : SQL
Port Number: 1433
Protocol: Select TCP

1) SQL Server should be up and running.

Go to All Programs >> Microsoft SQL Server 2008 >> Configuration Tools >> SQL Server Configuration Manager >> SQL Server Services, and check if SQL Server service status is “Running”.

2) Enable TCP/IP in SQL Server Configuration

Go to All Programs >> Microsoft SQL Server 2008 >> Configuration Tools >> SQL Server Configuration Manager >> Select TCP/IP >>Right Click on TCP/IP >> Click on Enable

restart SQL Server Services

3) Open Port in Windows Firewall

Go to Control Panel >> Windows Firewall >> Change Settings >> Exceptions >> Add Port

Make the following entries in popup “Add a Port” and click OK.
Name : SQL
Port Number: 1433
Protocol: Select TCP

4) Enable Remote Connection

All Programs >> Microsoft SQL Server 2008 >> Configuration Tools >> SQL Server Configuration Manager
Right click on the server node and select Properties.
Go to Left Tab of Connections and check “Allow remote connections to this server”

5) Enable SQL Server Browser Service
Go to All Programs >> Microsoft SQL Server 2008 >> Configuration Tools >> SQL Server Configuration Manager >> SQL Server Browser