I have created a Service Fabric cluster in Azure portal by following below url.
https://learn.microsoft.com/en-us/azure/service-fabric/service-fabric-cluster-creation-via-portal
After creating the Service fabric cluster I am not able to browse the "Client connection endpoint" or "Service Fabric Explorer". I am getting Access denioed - HTTP ERROR 403.
I also installed the default certificate on my machine which is creating at the time of Service fabric cluster creation.
When I tried to publish from visual studio I got below errors
Connect-ServiceFabricCluster : Cannot bind parameter 'StoreLocation'. Cannot convert value "" to type
"System.Security.Cryptography.X509Certificates.StoreLocation". Error: "The identifier name cannot be processed
because it is either too similar or identical to the following enumerator names: CurrentUser, LocalMachine. Use a more
specific identifier name."
At C:\CODE\DotNetCode\SFSample\SFSample\Scripts\Deploy-FabricApplication.ps1:185 char:45
... [void](Connect-ServiceFabricCluster #ClusterConnectionParameters)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Connect-ServiceFabricCluster], ParameterBindingException
+ FullyQualifiedErrorId : CannotConvertArgumentNoMessage,Microsoft.ServiceFabric.Powershell.ConnectCluster
WARNING: Unable to verify connection to Service Fabric cluster.
Test-ServiceFabricClusterConnection : Cluster connection instance is null
On you SF project, you have a Publish profile called Cloud.xml
You should set the configuration of your cluster in there to tell the thumbprint of the certificate and where you stored it.
Something like:
<?xml version="1.0" encoding="utf-8"?>
<PublishProfile xmlns="http://schemas.microsoft.com/2015/05/fabrictools">
<ClusterConnectionParameters ConnectionEndpoint="mycluster.westus.cloudapp.azure.com:19000"
X509Credential="true"
ServerCertThumbprint="0123456789012345678901234567890123456789"
FindType="FindByThumbprint"
FindValue="9876543210987654321098765432109876543210"
StoreLocation="CurrentUser"
StoreName="My" />
<ApplicationParameterFile Path="..\ApplicationParameters\Cloud.xml" />
<CopyPackageParameters CompressPackage="true" />
</PublishProfile>
You probably didn't configure it or did in incorrect.
Related
When running gcloud init on PowerShell, the scripts seems to stop short and won't keep running.
gcloud init
What it shows:
python.exe : Welcome! This command will take you through the configuration of gcloud.
At C:\Users\minh.tran\AppData\Local\Google\Cloud SDK\google-cloud-sdk\bin\gcloud.ps1:117 char:3
+ & "$cloudsdk_python" $run_args_array
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (Welcome! This c...tion of gcloud.:String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError
Settings from your current configuration [dev-finops] are:
accessibility:
screen_reader: 'False'
core:
account: minh.tran#hireright.com
disable_usage_reporting: 'True'
project: prj-d-finops
proxy:
address: 10.35.2.194
password: HireR1ght2022!
port: '8080'
type: http
username: corp\minh.tran
Pick configuration to use:
[1] Re-initialize this configuration [dev-finops] with new settings
[2] Create a new configuration
[3] Switch to and re-initialize existing configuration: [default]
gcloud init running on cloud shell or cmd will return the following and wait for user input:
Welcome! This command will take you through the configuration of gcloud.
Settings from your current configuration [dev-finops] are:
accessibility:
screen_reader: 'False'
core:
account: minh.tran#hireright.com
disable_usage_reporting: 'True'
project: prj-d-finops
proxy:
address: 10.35.2.194
password: HireR1ght2022!
port: '8080'
type: http
username: corp\minh.tran
Pick configuration to use:
[1] Re-initialize this configuration [dev-finops] with new settings
[2] Create a new configuration
[3] Switch to and re-initialize existing configuration: [default]
Please enter your numeric choice:
How do I get gcloud init to run on PowerShell? What issue do I have here?
Please see the below requirement:
Cloud SDK requires Python; supported versions are Python 3 (3.5 to 3.9). By default, the Windows version of Cloud SDK comes bundled with Python 3. To use Cloud SDK, your operating system must be able to run a supported version of Python.
In order to install python 3.9 on windows, just use this installer https://www.python.org/ftp/python/3.9.13/python-3.9.13-amd64.exe.
Be sure to close and reopen the powershell prompt after installation in order to load the new PATH where python executable is added.
I am running Rundeck 3.0.20-20190408 in Red Hat Enterprise Linux 8 and I am connecting the node using pem key.
resource.xml
<?xml version="1.0" encoding="UTF-8"?>
<project>
<node name="10.10.101.100" description="MyServer" tags="" hostname="10.10.101.100" osArch="amd64" osFamily="unix" osName="Linux" osVersion="3.10.0-693.2.2.el7.x86_64" username="rundeckuser" ssh-keypath="/home/username#domain.com/rundeckuser.pem" />
</project>
Getting below error while executing the commands
Execution failed: 3138 in project test_default: [Workflow result: ,
step failures: {1=Dispatch failed on 1 nodes: [10.10.101.100:
ConfigurationFailure: SSH Keyfile does not exist:
/home/username#domain.com/rundeckuser.pem +
{dataContext=MultiDataContextImpl(map={}, base=null)} ]}, Node
failures: {10.10.101.100=[ConfigurationFailure: SSH Keyfile does not
exist: /home/username#domain.com/rundeckuser.pem +
{dataContext=MultiDataContextImpl(map={}, base=null)} ]}, status:
failed]
ssh-keypath must be defined with a local path reachable by rundeck user (or the user that launches Rundeck if you're using a WAR based installation), like this example.
But the best approach is to use the Rundeck's key storage (adding the rundeck server public key to your target servers to access it, follow this if you like). Also, you can see the best practices here (it's using Rundeck 2.11 but is the same principle for all versions.
We got a Service Fabric cluster in our development environment using 2 VMs. I was trying to upgrade the Application deployed in SF using the following command:
Start-ServiceFabricApplicationUpgrade -ApplicationName "fabric:/ApplicationName" -ApplicationTypeVersion "3.7.2625.0" -UnMonitoredAuto
I get the following error as a result:
Start-ServiceFabricApplicationUpgrade : Application type and version not found
At line:1 char:1
+ Start-ServiceFabricApplicationUpgrade -ApplicationName "fabric:/ApplicationName" ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (Microsoft.Servi...usterConnection:ClusterConnection) [Start-ServiceFabricApplicationUpgrade], FabricElementNotFoundException
+ FullyQualifiedErrorId : UpgradeApplicationErrorId,Microsoft.ServiceFabric.Powershell.StartApplicationUpgrade
I would like to know whether there are any configurations I need to change at the ClusterConfiguration level. Any help would be appreciated.
Thanks.
There are 3 simple steps to upgrade an application:
Copy-ServiceFabricApplicationPackage
Register-ServiceFabricApplicationType
Start-ServiceFabricApplicationUpgrade
By the message you posted, the error is likely because you missed the step 2.
If you have executed the step 1, 2 and 3, certify that:
The application package has been registered correctly
The application version you registered is correct, both match, the package and the Upgrade command
The existing application and the registered one are from same type
Check this doc for more info: Service Fabric application upgrade using PowerShell
I have two main symptoms of a larger problem.
If I'm debugging an application in visual studio every once in a while I'll have it on a breakpoint and the service will just close. Here is the log when it "crashes"
WARNING: Failed to contact Naming Service. Attempting to contact Failover Manager Service...
WARNING: Failed to contact Failover Manager Service, Attempting to contact FMM...
WARNING: Failed to contact Failover Manager Service, Attempting to contact FMM...
Connect-ServiceFabricCluster : Could not ping any of the provided Service Fabric gateway endpoints.
At line:1 char:8
+ [void](Connect-ServiceFabricCluster); Import-Module 'C:\Program Files ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [Connect-ServiceFabricCluster], FabricTransientException
+ FullyQualifiedErrorId : TestClusterConnectionErrorId,Microsoft.ServiceFabric.Powershell.ConnectCluster
WARNING: Unable to Verify connection to Service Fabric cluster.
Test-ServiceFabricClusterConnection : Cluster connection instance is null
At C:\Program Files\Microsoft SDKs\Service
Fabric\Tools\PSModule\ServiceFabricSDK\Get-ServiceFabricApplicationStatus.ps1:27 char:16
+ [void](Test-ServiceFabricClusterConnection)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ResourceUnavailable: (:) [Test-ServiceFabricClusterConnection], NullReferenceException
+ FullyQualifiedErrorId : GetClusterConnectionErrorId,Microsoft.ServiceFabric.Powershell.TestClusterConnection
Finished executing script 'Get-ServiceFabricApplicationStatus'.
Time elapsed: 00:02:04.7891918
The program '[27216] program.exe' has exited with code 0 (0x0).
Connect-ServiceFabricCluster : Could not ping any of the provided Service Fabric gateway endpoints.
At line:1 char:8
+ [void](Connect-ServiceFabricCluster); Import-Module 'C:\Program Files ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [Connect-ServiceFabricCluster], FabricTransientException
+ FullyQualifiedErrorId : TestClusterConnectionErrorId,Microsoft.ServiceFabric.Powershell.ConnectCluster
WARNING: Unable to Verify connection to Service Fabric cluster.
Test-ServiceFabricClusterConnection : Cluster connection instance is null
At C:\Program Files\Microsoft SDKs\Service
Fabric\Tools\PSModule\ServiceFabricSDK\Get-ServiceFabricApplicationStatus.ps1:27 char:16
+ [void](Test-ServiceFabricClusterConnection)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ResourceUnavailable: (:) [Test-ServiceFabricClusterConnection], NullReferenceException
+ FullyQualifiedErrorId : GetClusterConnectionErrorId,Microsoft.ServiceFabric.Powershell.TestClusterConnection
Finished executing script 'Get-ServiceFabricApplicationStatus'.
Time elapsed: 00:02:04.7166263
After maybe an hour or two of having service fabric open the cluster becomes unresponsive and I'm unable to deploy any application until I reset the cluster. The logs just constantly say:
Started executing script 'Get-ServiceFabricApplicationStatus'.
Finished executing script 'Get-ServiceFabricApplicationStatus'.
I am also unable to open the service fabric manager via the icon in the task bar but the url http://localhost:19080/Explorer still works.
Running: C:\Program Files\Microsoft SDKs\Service Fabric\ClusterSetup\CleanCluster.ps1 seems to reset it just fine and it works again for a couple of hours. Until (presumably) it gets to a point below where it runs out of connections and everything goes wrong.
The only logs I can seem to find on this are:
thousands of lines of this:
localhost:19000-127.0.0.1:59598: failed to locate connection 1eedf052ba0 to update instance
exceeded client connection limit: target=127.0.0.1:59598 max=1000
localhost:19000-127.0.0.1:59597: failed to locate connection 1eedf055db0 to update instance
Warning 2/26/2018 12:27:11 PM Microsoft-Service Fabric 57089 EntreeServiceProxy
Warning 2/26/2018 12:27:11 PM Microsoft-Service Fabric 4097 Transport
exceeded client connection limit: target=127.0.0.1:59596 max=1000
localhost:19000-127.0.0.1:59595: failed to locate connection 1eedf0536c0 to update instance
exceeded client connection limit: target=127.0.0.1:59595 max=1000
exceeded client connection limit: target=127.0.0.1:59595 max=1000
exceeded client connection limit: target=127.0.0.1:59594 max=1000
localhost:19000-127.0.0.1:59593: failed to locate connection 1eedf052ba0 to update instance
exceeded client connection limit: target=127.0.0.1:59593 max=1000
And my dns service seems to be in an unhealthy state:
Unhealthy event: SourceId='System.RA', Property='ReplicaOpenStatus',
HealthState='Warning', ConsiderWarningAsError=false.
Replica had multiple failures during open on _Node_0. -2147467259
For more information see: http://aka.ms/sfhealth
Any advice on how to troubleshoot this service fabric issue?
I am trying to use the SetPassword method on a DirectoryEntry.
$Root = New-Object System.DirectoryServices.DirectoryEntry("LDAP://dc.ourdomain.com/OU=Users,DC=dc,DC=ourdomain,DC=com", $ldapusername, $ldappassword, "Secure")
$objUser = $Root.Create("user","CN=$DisplayName")
$objUser.Put("sAMAccountName", "$username")
$objUSer.Put("userPrincipalName","$userPrincipalName")
$objUser.Put("givenName", "$firstname")
$objUser.Put("sn", "$lastname")
$objUser.Put("description", "$description")
$objUser.Put("displayName", "$DisplayName")
$objUser.Put("mail", "$email")
$objUser.Put("company", "$Company")
$objUser.SetInfo()
$ObjUser.psbase.Invoke("SetPassword","qW12eR34")
$objUser.psbase.InvokeSet(“AccountDisabled”,$false)
$objUser.SetInfo()
Whenever I run this, I keep getting the following error:
Exception calling "Invoke" with "2" argument(s): "The RPC server is unavailable. (
Exception from HRESULT: 0x800706BA)"
At E:\Untitled1.ps1:27 char:23 + $ObjUser.psbase.Invoke <<<< ("SetPassword","qW12eR34")
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : DotNetMethodTargetInvocation
I am able to reset the password through Set-ADAccountPassword just fine, but I need to be able to do it through this way.. This function creates the user just fine, and it also sets the AccountDisable to false as it should do.
But it keeps failing on SetPassword..
I read around here that some people mentioned it could be due to blocked ports etc (Everything is open between the two servers) and some mentioned the AuthenticationType has to be set to Secure.. But I am setting it to Secure, and I am still having the same problem.
Thanks in advance..
Ok so i am pretty sure i found out why this is, i was trying to do something the same, and confirmed all ports (this works on port 135), are open, but port 135 never was able to recieve traffic from the world, called my ISP and yes, most ISP's these days, and with more to follow WILL block all traffic incoming on this port, so that's what your error is telling you.
It is trying to perform the actions but the requests are never reaching the server.
Call your provider and confirm, else check port 135 in your firewall rules on your incoming server (temporarily disabling firewall for testing will tell you)