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.

Azure PowerShell Script Sample – Create a Linux VM

This script creates an Azure Virtual Machine with an Ubuntu operating system. After running the script, you can access the virtual machine over SSH.

If needed, install the Azure PowerShell module using the instructions found in the Azure PowerShell guide, and then run Login-AzureRmAccount to create a connection with Azure. Also, you need to have an SSH public key named id_rsa.pub in the .ssh directory of your user profile.

# Variables for common values
$resourceGroup = "myResourceGroup"
$location = "westeurope"
$vmName = "myVM"

# Definer user name and blank password
$securePassword = ConvertTo-SecureString ' ' -AsPlainText -Force
$cred = New-Object System.Management.Automation.PSCredential ("azureuser", $securePassword)

# Create a resource group
New-AzureRmResourceGroup -Name $resourceGroup -Location $location

# Create a subnet configuration
$subnetConfig = New-AzureRmVirtualNetworkSubnetConfig -Name mySubnet -AddressPrefix 192.168.1.0/24

# Create a virtual network
$vnet = New-AzureRmVirtualNetwork -ResourceGroupName $resourceGroup -Location $location `
  -Name MYvNET -AddressPrefix 192.168.0.0/16 -Subnet $subnetConfig

# Create a public IP address and specify a DNS name
$pip = New-AzureRmPublicIpAddress -ResourceGroupName $resourceGroup -Location $location `
  -Name "mypublicdns$(Get-Random)" -AllocationMethod Static -IdleTimeoutInMinutes 4

# Create an inbound network security group rule for port 22
$nsgRuleSSH = New-AzureRmNetworkSecurityRuleConfig -Name myNetworkSecurityGroupRuleSSH  -Protocol Tcp `
  -Direction Inbound -Priority 1000 -SourceAddressPrefix * -SourcePortRange * -DestinationAddressPrefix * `
  -DestinationPortRange 22 -Access Allow

# Create a network security group
$nsg = New-AzureRmNetworkSecurityGroup -ResourceGroupName $resourceGroup -Location $location `
  -Name myNetworkSecurityGroup -SecurityRules $nsgRuleSSH

# Create a virtual network card and associate with public IP address and NSG
$nic = New-AzureRmNetworkInterface -Name myNic -ResourceGroupName $resourceGroup -Location $location `
  -SubnetId $vnet.Subnets[0].Id -PublicIpAddressId $pip.Id -NetworkSecurityGroupId $nsg.Id

# Create a virtual machine configuration
$vmConfig = New-AzureRmVMConfig -VMName $vmName -VMSize Standard_D1 | `
Set-AzureRmVMOperatingSystem -Linux -ComputerName $vmName -Credential $cred -DisablePasswordAuthentication | `
Set-AzureRmVMSourceImage -PublisherName Canonical -Offer UbuntuServer -Skus 14.04.2-LTS -Version latest | `
Add-AzureRmVMNetworkInterface -Id $nic.Id

# Configure SSH Keys
$sshPublicKey = Get-Content "$env:USERPROFILE\.ssh\id_rsa.pub"
Add-AzureRmVMSshPublicKey -VM $vmconfig -KeyData $sshPublicKey -Path "/home/azureuser/.ssh/authorized_keys"

# Create a virtual machine
New-AzureRmVM -ResourceGroupName $resourceGroup -Location $location -VM $vmConfig

Courier service can not be started: courierlogger dead but pid file exists

Courier cannot start:

Courier service can not be started: courierlogger dead but pid file exists
#service courier-pop3s status

In the Plesk Control Panel/Tools and Settings/ Services all of the ‘Courier’ entries show they are not running.

The usual fix of grep the courierlogger process and killing it does not work. Here is what does:

This is caused by hung processes, but not courierlogger was hung, but couriertcpd processes, one of them was running since April 3:


# ps aux | grep couriertcpd
root 3784 0.0 0.0 11976 1796 ? S 11:05 0:04 /usr/lib64/couriertcpd -address=0 -maxprocs=40 -maxperip=4 -nodnslookup -noidentlookup 110 /usr/sbin/pop3login /usr/lib64/plesk-9.0/pop3login Maildir
root 3907 0.0 0.0 11972 1884 ? S 11:05 0:00 /usr/lib64/couriertcpd -address=0 -maxprocs=40 -maxperip=4 -nodnslookup -noidentlookup 143 /usr/sbin/imaplogin /usr/bin/imapd Maildir
root 3973 0.0 0.0 11972 1776 ? S 11:05 0:00 /usr/lib64/couriertcpd -address=0 -maxprocs=40 -maxperip=4 -nodnslookup -noidentlookup 993 /usr/bin/couriertls -server -tcpd /usr/sbin/imaplogin /usr/bin/imapd Maildir
root 26808 0.0 0.0 103396 2080 pts/2 S+ 19:53 0:00 grep couriertcpd
root 26951 0.0 0.0 11976 1704 ? S Apr03 0:49 /usr/lib64/couriertcpd -address=0 -maxprocs=80 -maxperip=10 -nodnslookup -noidentlookup 995 /usr/bin/couriertls -server -tcpd /usr/sbin/pop3login /usr/lib64/plesk-9.0/pop3login Maildir
[root@216-55-187-88 ~]# ps aux | grep courierlogger
root 13394 0.0 0.0 4124 1432 ? S 18:08 0:00 /usr/sbin/courierlogger -name=courier-authdaemon -pid=/var/run/courier-authdaemon.pid -lockfile=/var/lock/subsys/courier-authdaemon -start /usr/lib64/courier-authlib/authdaemond


Kill all those processes and after that you are able to start the service successfully:


# service courier-imapd status
courierlogger (pid 29099) is running...

Plesk Commands

Here are some Plesk commands that are useful:

How to re-patch

 # plesk installer update --repatch

https://support.plesk.com/hc/en-us/articles/360002264953-How-to-reinstall-Plesk-micro-updates-MU-

This is related to an issue for Courier

How To Create SSH Keys With PuTTY to Connect to CentOS7

Generating OpenSSH-compatible Keys for Use with PuTTY

To generate a set of RSA keys with PuTTYgen:

  1. Start the PuTTYgen utility, by double-clicking on its .exe file;
  2. For Type of key to generate, select RSA;
  3. In the Number of bits in a generated key field, specify either 2048 or 4096 (increasing the bits makes it harder to crack the key by brute-force methods);
  4. Click the Generate button;
  5. Move your mouse pointer around in the blank area of the Key section, below the progress bar (to generate some randomness) until the progress bar is full;
  6. A private/ public key pair has now been generated;
  7. In the Key comment field, enter any comment you’d like, to help you identify this key pair, later (e.g. your e-mail address; home; office; etc.) — the key comment is particularly useful in the event you end up creating more than one key pair;
  8. Optional: Type a passphrase in the Key passphrase field & re-type the same passphrase in the Confirm passphrase field (if you would like to use your keys for automated processes, however, you should not create a passphrase);
  9. Click the Save public key button & choose whatever filename you’d like (some users create a folder in their computer named my_keys);
  10. Click the Save private key button & choose whatever filename you’d like (you can save it in the same location as the public key, but it should be a location that only you can access and that you will NOT lose! If you lose your keys and have disabled username/password logins, you will no longer be able log in!);
  11. Right-click in the text field labeled Public key for pasting into OpenSSH authorized_keys file and choose Select All;
    Right-click again in the same text field and choose Copy.
  12. NOTE: PuTTY and OpenSSH use different formats for public SSH keys. If the SSH Key you copied starts with “—- BEGIN SSH2 PUBLIC KEY …”, it is in the wrong format. Be sure to follow the instructions carefully. Your key should start with “ssh-rsa AAAA ….”
  13. Save The Public Key On The Server

Read moreHow To Create SSH Keys With PuTTY to Connect to CentOS7

Categories SSH

Install vmware tools on CentOS 7 VM

Install the opem-vm-tools:

# yum install open-vm-tools
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: repos.dfw.quadranet.com
 * epel: mirrors.develooper.com
 * extras: mirror.chpc.utah.edu
 * updates: mirror.chpc.utah.edu
Resolving Dependencies
--> Running transaction check
---> Package open-vm-tools.x86_64 0:10.1.5-3.el7 will be installed
--> Processing Dependency: xmlsec1-openssl for package: open-vm-tools-10.1.5-3.el7.x86_64
--> Processing Dependency: pciutils for package: open-vm-tools-10.1.5-3.el7.x86_64
--> Processing Dependency: net-tools for package: open-vm-tools-10.1.5-3.el7.x86_64
--> Processing Dependency: libfuse.so.2(FUSE_2.6)(64bit) for package: open-vm-tools-10.1.5-3.el7.x86_64
--> Processing Dependency: libfuse.so.2(FUSE_2.5)(64bit) for package: open-vm-tools-10.1.5-3.el7.x86_64
--> Processing Dependency: fuse for package: open-vm-tools-10.1.5-3.el7.x86_64
--> Processing Dependency: libxmlsec1.so.1()(64bit) for package: open-vm-tools-10.1.5-3.el7.x86_64
--> Processing Dependency: libmspack.so.0()(64bit) for package: open-vm-tools-10.1.5-3.el7.x86_64
--> Processing Dependency: libicuuc.so.50()(64bit) for package: open-vm-tools-10.1.5-3.el7.x86_64
--> Processing Dependency: libicui18n.so.50()(64bit) for package: open-vm-tools-10.1.5-3.el7.x86_64
--> Processing Dependency: libicudata.so.50()(64bit) for package: open-vm-tools-10.1.5-3.el7.x86_64
--> Processing Dependency: libfuse.so.2()(64bit) for package: open-vm-tools-10.1.5-3.el7.x86_64
--> Processing Dependency: libdnet.so.1()(64bit) for package: open-vm-tools-10.1.5-3.el7.x86_64
--> Running transaction check
---> Package fuse.x86_64 0:2.9.2-8.el7 will be installed
---> Package fuse-libs.x86_64 0:2.9.2-8.el7 will be installed
---> Package libdnet.x86_64 0:1.12-13.1.el7 will be installed
---> Package libicu.x86_64 0:50.1.2-15.el7 will be installed
---> Package libmspack.x86_64 0:0.5-0.5.alpha.el7 will be installed
---> Package net-tools.x86_64 0:2.0-0.22.20131004git.el7 will be installed
---> Package pciutils.x86_64 0:3.5.1-2.el7 will be installed
---> Package xmlsec1.x86_64 0:1.2.20-7.el7_4 will be installed
---> Package xmlsec1-openssl.x86_64 0:1.2.20-7.el7_4 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================================================================================
 Package                             Arch                       Version                                       Repository                   Size
================================================================================================================================================
Installing:
 open-vm-tools                       x86_64                     10.1.5-3.el7                                  base                        663 k
Installing for dependencies:
 fuse                                x86_64                     2.9.2-8.el7                                   base                         85 k
 fuse-libs                           x86_64                     2.9.2-8.el7                                   base                         93 k
 libdnet                             x86_64                     1.12-13.1.el7                                 base                         31 k
 libicu                              x86_64                     50.1.2-15.el7                                 base                        6.9 M
 libmspack                           x86_64                     0.5-0.5.alpha.el7                             base                         64 k
 net-tools                           x86_64                     2.0-0.22.20131004git.el7                      base                        305 k
 pciutils                            x86_64                     3.5.1-2.el7                                   base                         93 k
 xmlsec1                             x86_64                     1.2.20-7.el7_4                                updates                     177 k
 xmlsec1-openssl                     x86_64                     1.2.20-7.el7_4                                updates                      76 k

Transaction Summary
================================================================================================================================================
Install  1 Package (+9 Dependent packages)

Total download size: 8.4 M
Installed size: 29 M

Read moreInstall vmware tools on CentOS 7 VM