Can the reverseProxyEndpointPort on local dev cluster run? - azure-service-fabric

I am attempting to enable the reverse proxy functionality of service fabric on a local 5 node dev cluster. This functionality seems to work fine on a deployed cluster, but not on the dev cluster?
Both the deployed and the local dev cluster are on 5.4.145.9494.
The local dev is on vs 2015, service fabric sdk 2.4.145.9494
I have referenced How to configure and enable Azure Service Fabric Reverse Proxy for an existing on-premises cluster?
but the clustermanifesttemplate, specifically w7 in my case, doesn't seem to reference these values. Only the "older" ApplicationGateway/Http.
If I enable
<Section Name="ApplicationGateway/Http">
<Parameter Name="IsEnabled" Value="true" />
</Section>
and then deploy an application, after a few minutes my (local)cluster crashes.
Current node type example for reference:
<NodeType Name="NodeType0">
<Endpoints>
<ClientConnectionEndpoint Port="19000" />
<LeaseDriverEndpoint Port="19001" />
<ClusterConnectionEndpoint Port="19002" />
<HttpGatewayEndpoint Port="19080" Protocol="http" />
<ServiceConnectionEndpoint Port="19006" />
<HttpApplicationGatewayEndpoint Port="19081" Protocol="http" />
<ApplicationEndpoints StartPort="30001" EndPort="31000" />
</Endpoints>
</NodeType>
Additional information:
Windows event viewer is showing
HostedService: _Node_0 on node id bf865279ba277deb864a976fbf4c200e terminated unexpectedly with code 3221225781 and process name FabricApplicationGateway.exe
port usage:
netstat -anob | find "19081"
<no return>

Check your other node types. On a local cluster, each endpoint needs a unique port on each node type because it's all running on one machine. I'm guessing something else is already using port 19081 on another node type.

Related

TFSMigrator Validate command giving custom type errors

We are using Data Migration tool to migrate devop server 2020 to devops service. During the validation process we got the error messages mentioned below.
There is no process mentioned against each projects in our collections. I believe we can’t set any process for our existing collection if one is not already there.
I have gone through the link mentioned below but it is talking about running feature wizard which is not available in Devop Server 2020.
Which process xml file i need to update?
https://learn.microsoft.com/en-us/azure/devops/migrate/migration-processtemplates?view=azure-devops#update-to-a-system-process
Here are the error messages;
Errors from the log file
Here are the version details;
Data Migration Tool Version: DataMigrationTool_AzureDevOps2020.1RTW_18.181.17017273
Devop Server Version: 18.181.31230.2 (Azure DevOps Server 2020 Update 1)
For error TF402574, you can edit the ProcessConfiguration.xml file to add the missing named TypeField element.
You can review ProcessConfiguration XML element reference for required TypeField elements.
For the example process specifies the following TypeField elements. If any of these are missing, you'll receive error TF402574.
<TypeFields>
<TypeField refname="System.AreaPath" type="Team" />
<TypeField refname="Microsoft.VSTS.Scheduling.RemainingWork" type="RemainingWork" format="format h" />
<TypeField refname="Microsoft.VSTS.Common.BacklogPriority" type="Order" />
<TypeField refname="Microsoft.VSTS.Scheduling.Effort" type="Effort" />
<TypeField refname="Microsoft.VSTS.Common.Activity" type="Activity" />
<TypeField refname="Microsoft.VSTS.Feedback.ApplicationStartInformation" type="ApplicationStartInformation" />
<TypeField refname="Microsoft.VSTS.Feedback.ApplicationLaunchInstructions" type="ApplicationLaunchInstructions" />
<TypeField refname="Microsoft.VSTS.Feedback.ApplicationType" type="ApplicationType">
<TypeFieldValues>
<TypeFieldValue value="Web application" type="WebApp" />
<TypeFieldValue value="Remote machine" type="RemoteMachine" />
<TypeFieldValue value="Client application" type="ClientApp" />
</TypeFieldValues>
</TypeField>
</TypeFields>

Infinispan cluster nodes only see themself and not the other instances running in Kubernetes nodes

I try to set up an infinispan cache in my application that is running on several nodes on google-cloud-platform with Kubernetes and Docker.
Each of these caches shall share their data with the other node chaches so they all have the same data available.
My problem is that the JGroups configuration doesn't seem to work the way I want and the nodes don't see any of their siblings.
I tried several configurations but the nodes always see themselves and do not build up a cluster with the other ones.
I've tried some configurations from GitHub examples like https://github.com/jgroups-extras/jgroups-kubernetes or https://github.com/infinispan/infinispan-simple-tutorials
Here my jgroups.xml
<config xmlns="urn:org:jgroups"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:org:jgroups http://www.jgroups.org/schema/jgroups-4.0.xsd">
<TCP bind_addr="${jgroups.tcp.address:127.0.0.1}"
bind_port="${jgroups.tcp.port:7800}"
enable_diagnostics="false"
thread_naming_pattern="pl"
send_buf_size="640k"
sock_conn_timeout="300"
bundler_type="no-bundler"
logical_addr_cache_expiration="360000"
thread_pool.min_threads="${jgroups.thread_pool.min_threads:0}"
thread_pool.max_threads="${jgroups.thread_pool.max_threads:200}"
thread_pool.keep_alive_time="60000"
/>
<org.jgroups.protocols.kubernetes.KUBE_PING
port_range="1"
namespace="${KUBERNETES_NAMESPACE:myGoogleCloudPlatformNamespace}"
/>
<MERGE3 min_interval="10000"
max_interval="30000"
/>
<FD_SOCK />
<!-- Suspect node `timeout` to `timeout + timeout_check_interval` millis after the last heartbeat -->
<FD_ALL timeout="10000"
interval="2000"
timeout_check_interval="1000"
/>
<VERIFY_SUSPECT timeout="1000"/>
<pbcast.NAKACK2 xmit_interval="100"
xmit_table_num_rows="50"
xmit_table_msgs_per_row="1024"
xmit_table_max_compaction_time="30000"
resend_last_seqno="true"
/>
<UNICAST3 xmit_interval="100"
xmit_table_num_rows="50"
xmit_table_msgs_per_row="1024"
xmit_table_max_compaction_time="30000"
/>
<pbcast.STABLE stability_delay="500"
desired_avg_gossip="5000"
max_bytes="1M"
/>
<pbcast.GMS print_local_addr="false"
join_timeout="${jgroups.join_timeout:5000}"
/>
<MFC max_credits="2m"
min_threshold="0.40"
/>
<FRAG3 frag_size="8000"/>
</config>
And how I initalize the Infinispan Cache (Kotlin)
import org.infinispan.configuration.cache.CacheMode
import org.infinispan.configuration.cache.ConfigurationBuilder
import org.infinispan.configuration.global.GlobalConfigurationBuilder
import org.infinispan.manager.DefaultCacheManager
import java.util.concurrent.TimeUnit
class MyCache<V : Any>(private val cacheName: String) {
companion object {
private var cacheManager = DefaultCacheManager(
GlobalConfigurationBuilder()
.transport().defaultTransport()
.addProperty("configurationFile", "jgroups.xml")
.build()
)
}
private val backingCache = buildCache()
private fun buildCache(): org.infinispan.Cache<CacheKey, V> {
val cacheConfiguration = ConfigurationBuilder()
.expiration().lifespan(8, TimeUnit.HOURS)
.clustering().cacheMode(CacheMode.REPL_ASYNC)
.build()
cacheManager.defineConfiguration(this.cacheName, cacheConfiguration)
log.info("Started cache with name $cacheName. Found cluster members are ${cacheManager.clusterMembers}")
return cacheManager.getCache(this.cacheName)
}
}
Here what the logs says
INFO o.i.r.t.jgroups.JGroupsTransport - ISPN000078: Starting JGroups channel ISPN
INFO o.j.protocols.kubernetes.KUBE_PING - namespace myNamespace set; clustering enabled
INFO org.infinispan.CLUSTER - ISPN000094: Received new cluster view for channel ISPN: [myNamespace-7d878d4c7b-cks6n-57621|0] (1) [myNamespace-7d878d4c7b-cks6n-57621]
INFO o.i.r.t.jgroups.JGroupsTransport - ISPN000079: Channel ISPN local address is myNamespace-7d878d4c7b-cks6n-57621, physical addresses are [127.0.0.1:7800]
I expect that on startup a new node finds the already existing ones and gets the date from them.
Currently, on startup every node only sees themselves and nothing is shared
Usually the first thing to do when you need help with JGroups/Infinispan is setting trace-level logging.
The problem with KUBE_PING might be that the pod does not run under proper serviceaccount, and therefore it does not have the authorization token to access Kubernetes Master API. That's why currently preferred way is using DNS_PING, and registering a headless service. See this example.
Also, bind_addr is set to 127.0.0.1. This means, members on different hosts won't be able to find each other. I suggest set bind_addr, e.g. <TCP bind_addr="site_local".../>.
See [1] for details.
[1] http://www.jgroups.org/manual4/index.html#Transport

Jboss5.01GA RMI EJB3.0

I have a cloud instance where i have installed Jboss5.0.1GA server. Server instance contains a Public ip and a natted Ip Address. I have run Jboss server using -b with ip(natted) address and web url is working fine. Now i am creating Java external client to access EJB3 bean which is deployed in Jboss server where i am getting the exception and trying solution using google which is not helped my case. Find below code which tells what i am using in external client to access EJB3.
properties = new Properties();
properties.load(stream);
// Set the context
Hashtable ht = new Hashtable();
ht.put(Context.INITIAL_CONTEXT_FACTORY,
"org.jnp.interfaces.NamingContextFactory");
ht.put(Context.PROVIDER_URL,"public ip address");
ht.put(Context.URL_PKG_PREFIXES,
"org.jboss.naming:org.jnp.interfaces");
// Find and create a reference to the bean using JNDI
context = new InitialContext(ht);
While executing it localhost its working fine. While connecting remote throwing below exception. "javax.naming.CommunicationException [Root exception is java.rmi.ConnectException: Connection refused to host: ". Can anyone help me on the same.
`This is my connector file(ejb3-connectors-jboss-beans.xml).
EJB3 Connectors
-->
JBoss Remoting Connector
Note: Bean Name "org.jboss.ejb3.RemotingConnector" is used
as a lookup value; alter only after checking java references
to this key.
-->
<property name="invokerLocator">
<value-factory bean="ServiceBindingManager"
method="getStringBinding">
<parameter>
jboss.remoting:type=Connector,name=DefaultEjb3Connector,handler=ejb3
</parameter>
<parameter>
<null />
</parameter>
<parameter>socket://${jboss.bind.address}:${port}</parameter>
<parameter>
<null />
</parameter>
<parameter>3873</parameter>
</value-factory>
</property>
<property name="serverConfiguration">
<inject bean="ServerConfiguration" />
</property>
AOP
org.jboss.aspects.remoting.AOPRemotingInvocationHandler
`
Do a telnet to the ip and port you are trying to connect on the jboss from the remote server instance. If that's not working then you have to solve networking issues first. (Let me know, so I can guide you on how to do it)
Also check your EJB3 binding settings and check networking. Out of the box config looks looks this..
<mbean code="org.jboss.remoting.transport.Connector"
xmbean-dd="org/jboss/remoting/transport/Connector.xml"
name="jboss.remoting:type=Connector,name=DefaultEjb3Connector,handler=ejb3">
<depends>jboss.aop:service=AspectDeployer</depends>
<attribute name="InvokerLocator">socket://0.0.0.0:3873</attribute>
<attribute name="Configuration">
<handlers>
<handler subsystem="AOP">org.jboss.aspects.remoting.AOPRemotingInvocationHandler</handler>
</handlers>
</attribute>
</mbean>
Thanks!
#leo.
To my case below 2 things worked for me.
1. Running Jboss server using run.bat -b **public ip(not nat ip)** -Djboss.bind.address=0.0.0.0
2. Enabling my **local** machine hosts file to point remote ip to hostname ie remoteip remotehostname.
Hope it will help to others as well.

IISExpress 8 with custom configuration file - web service won't load

When I develop a WCF service or website solution, I always use IISExpress with a custom configuration file so I can share the setup with other developers in the team. Basically, I run a batch file with the following command in it:
"C:\Program Files (x86)\IIS Express\iisexpress.exe" /config:service-hosts.config
Where service-hosts.config is the path to my custom configuration file.
This method has been working perfectly fine, and still works fine in other solutions on my PC (each with their own service-hosts.config file). However, I've just started having a problem loading a WCF service using this method. I'm getting the following error when trying to browse to the service root dir, or any of the built in help endpoints:
HTTP Error 500.19 - Internal Server Error
The requested page cannot be accessed because the related configuration data for the page is invalid.
Detailed Error Information:
Module IIS Web Core
Notification Unknown
Handler Not yet determined
Error Code 0x80070003
Config Error Cannot read configuration file
Config File \?\D:\Projects\MyProject\WCFSite\web.config
Requested URL http:// localhost:80/
Physical Path
Logon Method Not yet determined
Logon User Not yet determined
Request Tracing Directory C:\Users\Spikeh\Documents\IISExpress\TraceLogFiles\
Config Source:
-1:
0:
More Information:
This error occurs when there is a problem reading the configuration file for the Web server or Web application. In some cases, the event logs may contain more information about what caused this error.
If you see the text "There is a duplicate 'system.web.extensions/scripting/scriptResourceHandler' section defined", this error is because you are running a .NET Framework 3.5-based application in .NET Framework 4. If you are running WebMatrix, to resolve this problem, go to the Settings node to set the .NET Framework version to ".NET 2". You can also remove the extra sections from the web.config file.
View more information »
I've been debugging for hours and can't get this error to change, let alone fix it.
I've tried overwriting my service-hosts.config file with a few different versions of applicationHosts.config, running IISExspress in 64bit, replacing the web.config file with a very basic version, setting permissions on the directory (to the point where every user on my PC has access), and changing the app pool, but still no change.
The weird thing is... when I change the WCF project to use "IISExpress" in the Web section of project properties, then subsequently debug the project, everything works fine... even with all of my web.config settings in place.
This points to how I'm running IISExpress, or my service-hosts.config file... though the service-hosts.config file (with slight modifications for the sites involved) is exactly the same as it is in my other projects.
One thing to note (might be a red herring), but I did downgrade the solution from VS2012 to VS2010, and changed the framework target to .Net 4.0... not sure if something might be configured funny due to that?
Does anyone have any ideas? I'm at the point of jumping off the roof...
UPDATE:
Here's the debug information from IISExpress (running with /trace:e):
Running IIS...
Starting IIS Express ...
Initializing the W3 Server Started CTC = 5514916
PreInitSitesThread: Premature Exit Occured ( hr = 80070003 )
W3 Server initializing WinSock. CTC = 5514916
W3 Server WinSock initialized. CTC = 5514916
W3 Server ThreadPool initialized (ipm has signalled). CTC = 5514916
Start listenerChannel http:0
Successfully registered URL "http://*:80/" for site "MyWebsite" application "/"
Registration completed for site "MyWebsite"
AppPool 'MyCustomAppPool' initialized
InitComplete event signalled
IIS Express is running.
Enter 'Q' to stop IIS Express
IncrementMessages called
Request ended: http://localhost:80/ with HTTP status 500.19
And here's the important part of my service-hosts.config:
<applicationPools>
<add name="Clr4IntegratedAppPool" managedRuntimeVersion="v4.0" managedPipelineMode="Integrated" CLRConfigFile="%IIS_BIN%\config\templates\PersonalWebServer\aspnet.config" autoStart="true" />
<add name="Clr4ClassicAppPool" managedRuntimeVersion="v4.0" managedPipelineMode="Classic" CLRConfigFile="%IIS_BIN%\config\templates\PersonalWebServer\aspnet.config" autoStart="true" />
<add name="Clr2IntegratedAppPool" managedRuntimeVersion="v2.0" managedPipelineMode="Integrated" CLRConfigFile="%IIS_BIN%\config\templates\PersonalWebServer\aspnet.config" autoStart="true" />
<add name="Clr2ClassicAppPool" managedRuntimeVersion="v2.0" managedPipelineMode="Classic" CLRConfigFile="%IIS_BIN%\config\templates\PersonalWebServer\aspnet.config" autoStart="true" />
<add name="UnmanagedClassicAppPool" managedRuntimeVersion="" managedPipelineMode="Classic" autoStart="true" />
<add name="IISExpressAppPool" managedRuntimeVersion="v4.0" managedPipelineMode="Integrated" CLRConfigFile="%IIS_BIN%\config\templates\PersonalWebServer\aspnet.config" autoStart="true" />
<add name="MycustomAppPool" managedRuntimeVersion="v4.0" managedPipelineMode="Integrated" CLRConfigFile="%IIS_USER_HOME%\config\aspnet.config" autoStart="true" />
<applicationPoolDefaults managedRuntimeLoader="v4.0" >
<processModel/>
</applicationPoolDefaults>
</applicationPools>
<listenerAdapters>
<add name="http" />
</listenerAdapters>
<sites>
<site name="MyWebsite" id="1">
<application path="/" applicationPool="MyCustomAppPool">
<virtualDirectory path="/" physicalPath="D:\Projects\MyProject\WCFSite\" />
</application>
<bindings>
<binding protocol="http" bindingInformation="*:80:" />
</bindings>
</site>
<siteDefaults>
<logFile logFormat="W3C" directory="%IIS_USER_HOME%\Logs" />
<traceFailedRequestsLogging directory="%IIS_USER_HOME%\TraceLogFiles" enabled="true" maxLogFileSizeKB="1024" />
</siteDefaults>
<applicationDefaults applicationPool="Clr4IntegratedAppPool" />
<virtualDirectoryDefaults allowSubDirConfig="true" />
</sites>
<webLimits />
Seems that the service-hosts.config file was pointing to something it shouldn't have been pointing to. I replaced my service-hosts.config with an copy from an older project (and therefore an older version of IISExpress / .Net Framework) and everything works fine.
Sounds like it was to do with my 4.5 -> 4.0 downgrade after all.

Publishing MVC3 webapp to Azure: Busy - Cycling

I have a MVC3 web application consisting Bing Translate API. Everything works fine on the emulator, but when I deploy it to Windows Azure, I encounter this issue again and again ( I retry more than twice):
Instance 0 of role Website is busy
Instance 0 of role Website is cycling
It stops at cycling for very long.
And in portal, I see this message:
Waiting for role to start... System is initializing
I already selected the "Add deployable assemblies", and check true all the reference Copy Local = true
I also checked connection string to my Account Storage, I set my project to work on cloud through an Account Storage.
And here my web.config for Bing Translate API
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_LanguageService" closeTimeout="00:25:00"
openTimeout="00:25:00" receiveTimeout="00:25:00" sendTimeout="00:25:00"
allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
useDefaultWebProxy="true">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<security mode="None">
<transport clientCredentialType="None" proxyCredentialType="None"
realm="" />
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>
</binding>
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://api.microsofttranslator.com/V2/soap.svc"
binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_LanguageService"
contract="BingTranslator.LanguageService" name="BasicHttpBinding_LanguageService" />
</client>
</system.serviceModel>
I have searched for a long time but nothing works for me. Please give me your help.
Best Regards
I can hit your something about how to translate these error to some information:
Case One: You status is looping within the Web Role:
WebRole Starting
WebRole Busy
WebRole Cycling
WebRole Unknown State
WebRole Restarting
This is potentially a role specific problem and Your best bet is to RDP to your instances and look for several things i.e. Azure Diagnostics Log for potential exception, Event Logs, Azure BootStrapper Logs, IIS Configurator Logs, etc. This will help you to find the problem faster then any other method, unless you can get Azure Diagnostics logs from Azure Storage having all the details about your potential problem.
Case Two: Your status is looping within the Full Machine:
Starting...
Initializing...
WebRole Starting
WebRole Busy
WebRole Cycling
WebRole Restarting
This could be a machine specific problem where the VM itself is cycling, this is good candidate to contact Windows Azure Support team to investigate for you.