failed to create service fabric cluster on win-server 2012 R2 - azure-service-fabric

I am trying to create a standalone service fabric cluster on on-prem environment, using Windows Server 2012R2. After I run the CreateServiceFabricCluster.ps, got the following error in the power shell windows
System.Fabric.FabricDeployer.ClusterManifestValidationException:
Cluster manifest validation failed with exception
System.ArgumentException: IP address is not allowed for credential
type 'Windows' when fabric runs as NetworkService, please use
hostnames.
How to update the json config file?

Had the same problem, the Microsoft documentation seems not to mention this. I fixxed it by modifying the JSON so the iPAddress properties are the same as the nodeName properties like this:
"nodes":[
{
"nodeName":"cl1m1",
"iPAddress":"cl1m1",
"nodeTypeRef":"NodeType0",
"faultDomain":"fd:/cl1",
"upgradeDomain":"UD0"
},
{
"nodeName":"cl1m2",
"iPAddress":"cl1m2",
"nodeTypeRef":"NodeType0",
"faultDomain":"fd:/cl1",
"upgradeDomain":"UD1"
},
{
"nodeName":"cl1m3",
"iPAddress":"cl1m3",
"nodeTypeRef":"NodeType0",
"faultDomain":"fd:/cl1",
"upgradeDomain":"UD2"
}
After modifying the config just running the cluster setup again worked for me.

Inside \SfDevCluster\Data directory, you have clusterManifest.xml file. There you could change IPAddressOrFQDN property for your nodes and put there hostnames.
On a development machine, you can go to C:\Program Files\Microsoft SDKs\Service Fabric\ClusterSetup\[particular folder], ClusterManifestTemplate.xml and have this setting the same every time you deploy a new cluster.

Related

Wildfly 26.1.3 Domain Batch JBeret WFLYCTL0030: No resource definition is registered for address

I am trying to run JBeret Batch on a Wildfly Domain Cluster locally, but I keep getting the error
"WFLYCTL0030: No resource definition is registered for address [ (\"deployment\" => \"ExampleJob.war\"), (\"subsystem\" => \"batch-jberet\") ]"
To host the cluster I tried to use the default configuration. I am using Wildfly 26.1.3 .
To run my setup I am using this commands on my windows machine to run the Master and Slave.
.\bin\domain.bat --host-config=host-master.xml -Djboss.domain.base.dir=domain1
and
.\bin\domain.bat --host-config=host-slave.xml -Djboss.domain.base.dir=host1 -Djboss.domain.master.address=127.0.0.1 -Djboss.management.http.port=9991
After That I deploy any batch application and try to run it in the adminpanel and get the error.
I tried also to use the cli, which didnt change anything.
I also tried to run it without the base.dir config so it uses the same folder but that did not change something.
I also tried to run different JDKs (I am now using JDK11).
To test that it is not working I tried this job from jberet directly. Also I tried other example Jobs like csv2json and keep getting the same error.
In Standalone the example jobs work.

Syndesis (Fuse-online) Integration build failed for unknown host "maven1.repo.org"

We installed fuse-online 7.4 on openshift 3.11. We created an integration containing an OpenApiProvider connection and an SQL connection.
When we publish the integration, the build fails with the following error:
"repo1.maven.org: Name or service not known: Unknown host repo1.maven.org: Name or service not known"
Openshift is installed behing an enterprise http proxy
The image registry.access.redhat.com/fuse7/fuse-ignite-s2i is pulled correctly since docker is configured with proxy.
syndesis-server DeploymentConfig has been set with proxies environment variables
I suppose that, since the buildconfig for the integration is created dynamically, is not possible to inject HTTP_PROXY,HTTPS_PROXY,NO_PROXY env variables to the build pod.
We read https://docs.openshift.com/container-platform/3.11/install_config/http_proxies.html#s2i-builds but since we don't have any rights to modify s2i image we cannot proceed.
Is there any way to provide proxy information during during fuse-online integration build?
Finally we succeeded to inject http proxy environment variables in dynamic created build pods.
We modified syndesis-server-config config map reporting proxy variables on mavenOptions key like this:
mavenOptions: "-XX:+UseG1GC -XX:+UseStringDeduplication -Xmx310m -Dhttp.proxyHost= -Dhttp.proxyPort= -Dhttps.proxyHost= -Dhttps.proxyPort= -Dhttp.nonProxyHosts="
Thanks for the support
Let me know if you have any other idea of resolving the issue
Can you check the DNS of your network connection? Not sure why but sometimes I have to use one of the "reliable" DNS on my machine (like the 8.8.8.8 from Google) to make sure repo1.maven.org is reachable.
You can check if this is the problem trying a simple
$ ping repo1.maven.org
If that doesn't work, you have to check your DNS.

Azure Service Fabric missing DLL on production server: FabricCommon.dll

I have created an actor service, which runs on a development cluster. An ASP.NET application (hosted separately via IIS), connects to the cluster and uses the actors. This works fine.
But when I deploy everything to the production environment, the ASP.NET application fails to connect to the cluster with the below exception. The cluster is hosted on-premise (Windows 2012 R2).
The type initializer for 'Microsoft.ServiceFabric.Services.ServiceTrace' threw an exception.
Stacktrace:
at Microsoft.ServiceFabric.Services.Common.FabricServiceConfig.TryGetConfigPackageObject(String configPackageName, ConfigurationPackage& package)
at Microsoft.ServiceFabric.Services.Common.FabricServiceConfig.GetSettingsFilePath(String configPackageName)
at Microsoft.ServiceFabric.Services.Common.FabricServiceConfig.GetConfig()
at Microsoft.ServiceFabric.Services.Common.FabricServiceConfigSection.Initialize()
at Microsoft.ServiceFabric.Services.Communication.FabricTransport.Common.FabricTransportSettings.LoadFrom(String sectionName, String filepath, String configPackageName)
at Microsoft.ServiceFabric.Services.Communication.FabricTransport.Common.FabricTransportSettings.TryLoadFrom(String sectionName, FabricTransportSettings& settings, String filepath, String configPackageName)
at Microsoft.ServiceFabric.Services.Communication.FabricTransport.Common.FabricTransportSettings.GetDefault(String sectionName)
at Microsoft.ServiceFabric.Actors.Remoting.FabricTransport.FabricTransportActorRemotingProviderAttribute.CreateServiceRemotingClientFactory(IServiceRemotingCallbackClient callbackClient)
at Microsoft.ServiceFabric.Actors.Client.ActorProxyFactory.CreateServiceRemotingClientFactory(Type actorInterfaceType)
at Microsoft.ServiceFabric.Actors.Client.ActorProxyFactory.GetOrCreateServiceRemotingClientFactory(Type actorInterfaceType)
at Microsoft.ServiceFabric.Actors.Client.ActorProxyFactory.CreateActorProxy[TActorInterface](Uri serviceUri, ActorId actorId, String listenerName)
at Microsoft.ServiceFabric.Actors.Client.ActorProxy.Create[TActorInterface](ActorId actorId, Uri serviceUri, String listenerName)
Inner Exception:
innerExceptionType: System.DllNotFoundException
innerStacktrace:
at System.Fabric.Interop.NativeCommon.FabricGetConfigStore(Guid& riid, IFabricConfigStoreUpdateHandler updateHandler)
at System.Fabric.Common.NativeConfigStore.CreateHelper(IFabricConfigStoreUpdateHandler updateHandler)
at System.Fabric.Interop.Utility.WrapNativeSyncInvoke[TResult](Func`1 func, String functionTag, String functionArgs)
at System.Fabric.Interop.Utility.RunInMTA[TResult](Func`1 func)
at Microsoft.ServiceFabric.Common.Tracing.Trace.InitializeFromConfigStore()
at Microsoft.ServiceFabric.Services.ServiceTrace..cctor()
innerExceptionMessage: Unable to load DLL 'FabricCommon.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
exceptionType: System.TypeInitializationException
It seems that the FabricCommon.dll could not be found on the web server (which hosts the ASP.NET).
I found that this file is part of the cluster installation package. On the development machine and cluster machines, the file is located here: C:\Program Files\Microsoft Service Fabric\bin\Fabric\Fabric.Code\FabricCommon.dll. But it is apparently not a dependency installed via NuGet in the client application.
Do I missed to install any prerequisites on the web server? Do I have to include the DLL manually?
Add the following Service Fabric bin path to your PATH environment variable:
set PATH=%PATH%;C:\Program Files\Microsoft Service Fabric\bin\Fabric\Fabric.Code
Also set execution policy to unrestricted:
Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Force -Scope CurrentUser
I think you need to install Service Fabric SDK on the web server.
See the link below:
https://azure.microsoft.com/en-us/documentation/articles/service-fabric-get-started/
I have this happen at one point in my dev machine. All I did was to reinstall the Service Fabric SDK.
I had the same issue. Reboot my machine solved the issue.
For cases when you can't install Service Fabric SDK on target environment there is an option to use Service Fabric REST API.
Here is my repo with API client written in C# which can resolve service using this API

Azure Service Fabric - change config settings for a deployed Application

How do I change settings for a deployed application in Service Fabric?
I have a provisioned cluster and an application deployed to the cluster with two applications. I would like to be able to change my services' settings and have them pick up those changes, but I don't see how I can do that.
Previously, we've done all of our services with worker roles in Cloud Services, and the portal allows for changing configurations, but it does not appear to do so for Service Fabric. From the Service Fabric Explorer I can drill down to the service, go to MANIFEST and view the XML with the settings. I just don't see a way to edit or change it. I've struggled finding anything in the SF documentation addressing this.
The portal doesn't expose a way to do this. It needs to be done via an upgrade of the application. Just change the settings in your settings XML file and perform an upgrade. In the VS publish dialog for your application project, you can update your version numbers appropriately by changing the config package version which will automatically bubble up to update the containing service and application versions.
Building on Matt Thalman's answer, here's documentation on modifying the settings in the application or service manifest XML files, updating the version numbers, and performing an application upgrade: Service Fabric application upgrade tutorial using Visual Studio. You can also perform the app upgrade using PowerShell.
Additional to above answers, adding some powershell code..
we may use below powershell code to connect to Service Fabric from powershell and get the application parameters and then update specific parameter and re deploy..
### Change the connection here (from Profile-Cloud.xml
$ConnectArgs = #{
ConnectionEndpoint="devxxxxxx.westus.cloudapp.azure.com:19000"
X509Credential="true"
ServerCertThumbprint="52BFxxxxxxxxxx"
FindType="FindByThumbprint"
FindValue="EF3A2xxxxxxxxxxxxxx"
StoreLocation="CurrentUser"
StoreName="My"
}
Connect-ServiceFabricCluster #ConnectArgs
$myApplication = Get-ServiceFabricApplication -ApplicationName fabric:/ABC.MyService
$appParamCollection = $myApplication.ApplicationParameters
### Update your parameter here..
$applicationParameterMap.ElasticSearch_Username="sachin2"
$applicationParameterMap = #{}
foreach ($pair in $appParamCollection)
{
$applicationParameterMap.Add($pair.Name, $pair.Value);
}
### Start Udpating
Start-ServiceFabricApplicationUpgrade -ApplicationName $myApplication.ApplicationName.OriginalString -ApplicationTypeVersion $myApplication.ApplicationTypeVersion -ApplicationParameter $applicationParameterMap -Monitored -FailureAction Rollback -ForceRestart $true
### Check the status until it is Ready
(Get-ServiceFabricApplication -ApplicationName fabric:/ABC.MyService).ApplicationStatus
### Check the parameters to confirm those're updated
Get-ServiceFabricApplication -ApplicationName fabric:/ABC.MyService
You may change or remove the -ForceRestart as per your requriements

cannot create jms topic in jboss 6.0.1 using cli interface on cluster environment

I am trying to create the jms-topic in JBOSS 6.0.1 version using command line interface of jboss .
I am able to do it on standalone server but issues arises when i run command on cluster environment.
Here is what i do:
Standalone server command:
jms-topic add --topic-address=java:/com.matrix.jms.samp.imp.solution.topic.ReplyTopic --entries=java:/com.matrix.jms.samp.imp.solution.topic.ReplyTopic
Exectues succesfully
Now when i run same command on cluster environment of jboss it ask me to give profile. I give profile and execute this command:
jms-topic add --profile=hornetq-server --topic-address=java:/com.matrix.jms.samp.imp.solution.topic.ReplyTopic --entries=java:/com.matrix.jms.samp.imp.solution.topic.ReplyTopic
It gives me following error,
JBAS014766: Resource [("profile" => "hornetq-server")] does not exist; a resource at address [
("profile" => "hornetq-server"),
("subsystem" => "messaging"),
("hornetq-server" => "default"),
("jms-topic" => "java:/com.matrix.jms.samp.imp.solution.topic.ReplyTopic")
] cannot be created until all ancestor resources have been added
Is my profile name wrong . I am able to create topic from jboss management console.
Please suggest