I setup a logserver on a Ubuntu machine. And I need to ship Windows Server 2012 Apache logs to logserver.
Now I am trying to setup filebeat on Windows server to ship logs to logserver: https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-getting-started.html
Version : filebeat-1.0.1-windows
But I failed to start filebeat on my server . It threw following error on power shell:
Start-Service : Service 'filebeat (filebeat)' cannot be started due to the following error: Cannot start service
filebeat on computer '.'.
At line:1 char:1
+ Start-Service filebeat
+ ~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OpenError: (System.ServiceProcess.ServiceController:ServiceController) [Start-Service],
ServiceCommandException
+ FullyQualifiedErrorId : CouldNotStartService,Microsoft.PowerShell.Commands.StartServiceCommand
Anyone have the solution?
I was having this problem with Windows 10. I ran the following in the command window and found I had a config error in my .yml file:
filebeat -c filebeat.yml -configtest
Once I cleaned that up, the service started.
Try opening an admin cmd and run the filebeat.exe, you should the errors that would prevent the service from starting.
Related
When using msdeploy to deploy an IIS app to a remote server, using the Web Deploy On Demand (tempagent) feature, I am getting this error:
./myApp.deploy.cmd : Error: Unable to get the remote environment variable 'WindowsDirectory' on the computer
'myserver.mydomain.com'.
At line:1 char:1
+ ./myApp.deploy.cmd /T /M:$target /U:$username /P:$ ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (Error: Unable t...com'.:String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError
Error: The object invoked has disconnected from its clients. (Exception from HRESULT: 0x80010108 (RPC_E_DISCONNECTED))
Error count: 1.
I'm using the auto-generated deploy script that gets created by the Package target in msbuild. I'm running in the directory that all those artifacts live. This is my script to run that script:
$target = 'myserver.mydomain.com'
$username = 'myusername'
$password = 'mypassword'
./myApp.deploy.cmd /T /M:$target /U:$username /P:$password /G:true
This is the script that is generated by the .cmd script, the same exact error happens if i run it directly:
SetParameters from:
"C:\Users\MaxCadmin\Desktop\Package\myApp.SetParameters.xml"
You can change IIS Application Name, Physical path, connectionString
or other deploy parameters in the above file.
-------------------------------------------------------
Start executing msdeploy.exe
-------------------------------------------------------
"C:\Program Files\IIS\Microsoft Web Deploy V3\msdeploy.exe" -source:package='C:\Users\MaxCadmin\Desktop\Package\myApp.zip' -dest:auto,computerName="myserver.mydomain.com",userName="myusername",password="mypassword",includeAcls="False",tempAgent="true" -verb:sync -disableLink:AppPoolExtension -disableLink:ContentExtension -disableLink:CertificateExtension -setParamFile:"C:\Users\MaxCadmin\Desktop\Package\myApp.SetParameters.xml" -whatif
Info: Using ID 'bce210a0-29f9-4859-8fc2-f308c6ce5e72' for connections to the remote server.
I'm using the tempagent feature so that I don't have to go install Web Deploy on all my targets, and keep them all updated to the same version. I much prefer the prospect of using the Temp Agent, removing the need for any special configuration of the targets at all. I've confirmed that my target in this case does not have Web Deploy installed on it.
I believe it's the Temp Agent that is throwing the disconnect error at the end of the error message. I'm more concerned about the error regarding the inability to get the remote variable.
For what it's worth, I went on the remote server and created that env variable, with the value matching
that of windir, which is C:\Windows, and proved to myself that it was present in a new shell. But it didn't change the error at all.
I'm trying to start a nested VM on Windows2016 VM deployed on azure ( Size used allows Nested Virtualization ) and after all guides followed I'm not sure what i could be missing since i Do have Hyper V installed:
Role manager:
Services:
Error when i try to start the VM:
Start-VM : 'sfm-azure-01' failed to start.
Failed to start the virtual machine 'sfm-azure-01' because one of the Hyper-V components is not running.
'sfm-azure-01' failed to start. (Virtual machine ID BA61E565-9B2B-4180-B79D-FD3F16882314)
The Virtual Machine Management Service failed to start the virtual machine 'sfm-azure-01' because one of the Hyper-V components is
not running (Virtual machine ID BA61E565-9B2B-4180-B79D-FD3F16882314).
At line:1 char:1
+ Start-VM -Name sfm-azure-01
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Start-VM], VirtualizationException
+ FullyQualifiedErrorId : OperationFailed,Microsoft.HyperV.PowerShell.Commands.StartVM
References used: https://learn.microsoft.com/azure/virtual-machines/windows/nested-virtualization
Did you try this script for enabling nest virtualisation.
It looks like it checks all the prerequisites.
https://github.com/charlieding/Virtualization-Documentation/tree/live/hyperv-tools/Nested
I have a Service Fabric standalone cluster where I can connect to it with Connect-ServiceFabricCluster just fine, but whenever I run other commands such as Start-ServiceFabricClusterConfigurationUpgrade, it keeps timing out. I've tried running commands with longer timeouts (as long as 10 min) with the same results. Any ideas what I might be doing wrong?
This works..
PS C:\WINDOWS\system32> Connect-ServiceFabricCluster -ConnectionEndpoint "localhost:19000"
True
ConnectionEndpoint : {localhost:19000}
...
But these commands time out...
PS C:\WINDOWS\system32> Get-ServiceFabricClusterConfiguration -TimeoutSec 300
Get-ServiceFabricClusterConfiguration : Operation timed out.
At line:1 char:1
+ Get-ServiceFabricClusterConfiguration -TimeoutSec 300
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OperationTimeout: (Microsoft.Servi...usterConnection:ClusterConnection) [Get-ServiceFabr
icClusterConfiguration], TimeoutException
+ FullyQualifiedErrorId : GetClusterConfigurationErrorId,Microsoft.ServiceFabric.Powershell.GetClusterConfiguratio
n
Start-ServiceFabricClusterConfigurationUpgrade -ClusterConfigPath ClusterConfig.Unsecure.DevCluster.v2.json
Start-ServiceFabricClusterConfigurationUpgrade : Operation timed out.
At line:1 char:1
+ Start-ServiceFabricClusterConfigurationUpgrade -ClusterConfigPath Clu ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OperationTimeout: (Microsoft.Servi...usterConnection:ClusterConnection) [Start-ServiceFa
...gurationUpgrade], TimeoutException
+ FullyQualifiedErrorId : StartClusterConfigurationUpgradeErrorId,Microsoft.ServiceFabric.Powershell.StartClusterC
onfigurationUpgrade
I believe this a single node dev cluster? If so, it can't be upgraded and needs to be recreated instead.
You can upgrade your cluster to the new version only if you're using a
production-style node configuration, where each Service Fabric node is
allocated on a separate physical or virtual machine. If you have a
development cluster, where more than one Service Fabric node is on a
single physical or virtual machine, you must re-create the cluster
with the new version.
To fix:
Create backups for all desired service partitions.
Update the client tooling using the web platform installer.
Remove the old cluster and recreate it using the Local Cluster Manager tool (in the tray, if on Windows).
Redeploy applications.
Restore service backups.
When I try to publish my Service Fabric application to a Azure cluster I get the following error message:
3>Copy-ServiceFabricApplicationPackage : Operation timed out.
3>At C:\Program Files\Microsoft SDKs\Service
3>Fabric\Tools\PSModule\ServiceFabricSDK\Publish-NewServiceFabricApplication.ps1:230 char:9
3>+ Copy-ServiceFabricApplicationPackage -ApplicationPackagePath ...
3>+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3> + CategoryInfo : OperationTimeout: (:) [Copy-ServiceFabricApplicationPackage], TimeoutException
3> + FullyQualifiedErrorId : CopyApplicationPackageErrorId,Microsoft.ServiceFabric.Powershell.CopyApplicationPackage
3>
3>Finished executing script 'Deploy-FabricApplication.ps1'.
3>Time elapsed: 00:12:45.2589165
Apperently there is a hard-coded 10 minute timeout in the publish script as you can read here: https://github.com/Azure/service-fabric-issues/issues/10
This timeout will be removed in an upcomming release, but in the mean time what are my options? Is there a way I can publish my application service by service?
Any suggestion is welcome!
I've solved this by having a virtual machine running in azure. I've installed Visual Studio 2015 community and the service fabric SDK.
I then use Visual Studio Online to host my code. I build and test locally, and when I'm happy, commit to visual studio online, then RDP onto my build machine and then pull, build and deploy from there.
I've actually gone one step further by creating build and deploy powershell scripts so I don't need to run visual studio.
This problem has been addressed in version 2.5.216 of the Service Fabric SDK.
In the publish profile schema, you can now:
Compress the package to speed up transfer
Set the timeout duration to a value greater than 10 minutes
Add the following line to the PublishProfiles\Cloud.xml file to enable compression and change the timeout from 10 minutes to 60 minutes:
<CopyPackageParameters CopyPackageTimeoutSec="3600" CompressPackage="true" />
I followed a similar approach to Andrew Shepherd suggestion. Edited the powershell deployment file located in <MyServiceFabricApp>\Scripts\Deploy-FabricApplication.ps1 and changed the $CopyPackageTimeoutSec variable to 3600. A code snippet is shown below :
Param
(
....
[int]
$CopyPackageTimeoutSec = 3600
)
...
I receive the following error when attempting to run the Desktop App Converter (Project Centennial):
Assert-RequiredFeatureEnabled: fatal error 1000: required feature is not installed or enabled. Please refer to machine setup instructions.
At C:\Users\%%%\Documents\DesktopAppConverter\converter_util\EnvironmentAssertions.ps1:40 char:9
+ throw "Assert-RequiredFeatureEnabled: fatal error 1000: requi ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OperationStopped: (Assert-Required...p instructions.:String) [], RuntimeException
+ FullyQualifiedErrorId : Assert-RequiredFeatureEnabled: fatal error 1000: required feature is not installed or enabled. Please refer to
machine setup instructions.
The relevant script is in EnvironmentAssertions.ps1:
$feature = Get-WindowsOptionalFeature -Online -FeatureName "Containers"
if (!$feature) {
throw "Assert-RequiredFeatureEnabled: fatal error 1000: required feature is not installed or enabled. Please refer to machine setup instructions."
}
I found no items in Windows Features that appear related to containers.
How can this error be resolved?
Windows 10 Pro insider preview (build 14316) and Desktop App Converter preview (0.1.8.release_2016-04-05_17-47_5aa8cc)
After looking around, it appears that the "Containers" feature is only on Enterprise versions of Windows 10 at the moment - perhaps they will extend this to Pro eventually, but I think that's why we can't get it working.