VoltDB JDBC Driver always crashes due to OutOfMemory error - voltdb

I was trying to connect to voltdb via JDBC API, but always get OutOfMemoryError. I know, i can get rid of it by increasing heap size, but i want to know, why it require large heap size? I already have 1028M set as Heap size.
Exception in thread "http-bio-8080-exec-206" java.lang.OutOfMemoryError: Java heap space
at java.nio.HeapByteBuffer.<init>(HeapByteBuffer.java:39)
at java.nio.ByteBuffer.allocate(ByteBuffer.java:312)
at org.voltdb.client.ConnectionUtil.getAuthenticatedConnection(ConnectionUtil.java:213)
at org.voltdb.client.ConnectionUtil.getAuthenticatedConnection(ConnectionUtil.java:143)
at org.voltdb.client.ConnectionUtil.getAuthenticatedConnection(ConnectionUtil.java:118)
at org.voltdb.client.Distributer.createConnectionWithHashedCredentials(Distributer.java:614)
at org.voltdb.client.ClientImpl.createConnectionWithHashedCredentials(ClientImpl.java:171)
at org.voltdb.client.ClientImpl.createConnection(ClientImpl.java:542)
at org.voltdb.jdbc.JDBC4ClientConnection.<init>(JDBC4ClientConnection.java:141)
at org.voltdb.jdbc.JDBC4ClientConnectionPool.get(JDBC4ClientConnectionPool.java:83)
at org.voltdb.jdbc.Driver.connect(Driver.java:91)
at java.sql.DriverManager.getConnection(DriverManager.java:582)
at java.sql.DriverManager.getConnection(DriverManager.java:207)
Deployment.xml
<?xml version="1.0"?>
<deployment>
<cluster hostcount="1" sitesperhost="2" kfactor="0" />
<httpd enabled="true" port="65534">
<jsonapi enabled="true" />
</httpd>
</deployment>

It looks like you're trying to connect to the wrong port on the server. The HTTP port is used for JSON procedure execution and for some monitoring and management. You should connect the client to the VoltDB client port, which is port 21212 by default.
The ports used by VoltDB and how to override them are documented in the Management Guide, Appendix A.5.

Related

No performanceCounters/Requests Data in azure Application Insights

I have a web app running on prem (IIS) and I am trying to collect performance counters from it, although I have everything setup on my local and I am seeing all other types of telemetry in my Azure resource (requests, exceptions, traces) performance Counters are just not there,
it is worth mentioning that I am running 2 more web applications (they all work together) under the same site and same applicationPool in IIS and they are collecting Performance counters just fine, they all use the same package that contains our Application Insights implementation. Something strange I have noticed is that, when I am serving the application from Visual Studio, all the telemetry goes through, even performance counters, but, when I try with an installed Instance of my webapplications (using our inhouse installer ) any request or perfCounter for this particular web application just won't work.
I don't know what else to check, all 3 web applications should be collecting performance counters the same way since they are pretty much alike, and running under the same AppPool, same goes for requests.
this is what my appInsights.config looks like:
<Add Type="Microsoft.ApplicationInsights.Extensibility.PerfCounterCollector.PerformanceCollectorModule, Microsoft.AI.PerfCounterCollector">
<Counters>
<Add PerformanceCounter="\Processor(_Total)\% Processor Time" ReportAs="Processor Total - % Processor Time"/>
<Add PerformanceCounter="\Process(??APP_W3SVC_PROC??)\% Processor Time" ReportAs="W3SVC - % Processor Time"/>
<Add PerformanceCounter="\Process(??APP_WIN32_PROC??)\% Processor Time" ReportAs="Win32 - % Processor Time"/>
<Add PerformanceCounter="\Process(??APP_CLR_PROC??)\% Processor Time" ReportAs="CLR - % Processor Time"/>
<Add PerformanceCounter="\Process(_Total)\Private Bytes" ReportAs="Process Total - Private Bytes"/>
<Add PerformanceCounter="\Process(??APP_W3SVC_PROC??)\Private Bytes" ReportAs="W3SVC - Private Bytes"/>
<Add PerformanceCounter="\Process(??APP_WIN32_PROC??)\Private Bytes" ReportAs="Win32 - Private Bytes"/>
<Add PerformanceCounter="\Process(??APP_CLR_PROC??)\Private Bytes" ReportAs="CLR - Private Bytes"/>
</Counters>
<!--
Use the following syntax here to collect additional performance counters:
<Counters>
<Add PerformanceCounter="\Process(??APP_WIN32_PROC??)\Handle Count" ReportAs="Process handle count" />
...
</Counters>
PerformanceCounter must be either \CategoryName(InstanceName)\CounterName or \CategoryName\CounterName
NOTE: performance counters configuration will be lost upon NuGet upgrade.
The following placeholders are supported as InstanceName:
??APP_WIN32_PROC?? - instance name of the application process for Win32 counters.
??APP_W3SVC_PROC?? - instance name of the application IIS worker process for IIS/ASP.NET counters.
??APP_CLR_PROC?? - instance name of the application CLR process for .NET counters.
-->
</Add>
few more details: AppInsights sdk 2.4
.NetFramework 4.6.1
Thanks, all help is welcome

ServiceFabric Warning "Endpoint with ExplicitPort is within application port range. This can cause port conflicts."

After updating my ServiceFabric cluster to version 6.5, a warning has started popping up for my applications.
Endpoint MyEndpoint with ExplicitPort 27000 is within application port range. This can cause port conflicts. Please select a port from outside application port range.
Why is this error happening and what do I need to do to fix it?
Starting with ServiceFabric 6.5CU2, ServiceFabric started to show warnings for these misconfigurations. These warnings might turn into errors in the future.
By design static ports should not overlap with application port range specified in the ClusterManifest. If you specify a static port, assign it outside of application port range, otherwise it will result in port conflicts. With release 6.5CU2 we will issue a Health Warning when we detect such a conflict but let the deployment continue in sync with the shipped 6.5 behaviour. However, we may prevent the application deployment from the next major releases.
(https://learn.microsoft.com/en-gb/azure/service-fabric/service-fabric-service-manifest-resources)
The application port range is cluster wide and is 20000-30000 by default.
You can change it e.g. via ARM template or https://resources.azure.com
"nodeTypes": [
{
"name": "nt",
...
"applicationPorts": {
"startPort": 20000,
"endPort": 30000
},
...
}
],
The static endpoint port can be configured in the servicemanifest.json of your service.
<?xml version="1.0" encoding="utf-8"?>
<ServiceManifest ...>
<Resources>
<Endpoints>
<!-- This endpoint is used by the communication listener to obtain the port on which to
listen. Please note that if your service is partitioned, this port is shared with
replicas of different partitions that are placed in your code. -->
<Endpoint Name="MyEndpoint" Protocol="http" Port="27000" PathSuffix="/xxx" UriScheme="http" Type="Input" />
</Endpoints>
</Resources>
</ServiceManifest>

Configuring a two node hazelcast cluster - avoiding multicast

The context
Two nodes of a Hazelcast cluster, each on a discrete subnet so multicast is not suitable nor working for node location.
I should like to employ the most minimal XML configuration file, say hazelcast.xml, to configure Hazelcast to use TCP/IP to connect the two nodes. Ideally a directory of the IP addresses of the two nodes.
The question
The Hazelcast docs do a good job of showing how this can be achieved programatically, and how hazelcast.jar/hazelcast-default.xml holds the (considerable) default configuration.
What is unclear is: is any XML configuration I supply overlaid upon the settings within hazelcast-default.xml - or simply used in its stead?
I have both my answers, and should like to share them
Just like the programatic API, the XML configuration overlays the defaults found in hazelcast.jar/hazelcast-default.xml, consequently ...
I can establish a very simple two-member cluster with this hazelcast.xml in the classpath
<hazelcast>
<network>
<join>
<multicast enabled="false"></multicast>
<tcp-ip enabled="true">
<member>192.168.100.001</member> <!-- server A -->
<member>192.168.102.200</member> <!-- server B, on separate subnet -->
</tcp-ip>
</join>
</network>
</hazelcast>
I'm not familiar with hazelcast.conf files.
Mostly used is XML or Programmatic api. For good examples see:
https://github.com/hazelcast/hazelcast-code-samples/tree/master/network-configuration
Example of programmatic:
public class Main {
public static void main(String[] args){
Config config = new Config();
config.getNetworkConfig().getJoin().getTcpIpConfig().addMember("localhost").setEnabled(true);
config.getNetworkConfig().getJoin().getMulticastConfig().setEnabled(false);
HazelcastInstance hz = Hazelcast.newHazelcastInstance(config);
}
}
--
What is unclear is: is any XML configuration I supply overlaid upon the settings within hazelcast-default.xml - or simply used in its stead?
What do you mean? If you use the programmatic API, the rest is not relevant. If you don't provide an explicit Config object while constructing the HazelcastInstance, a defaulting mechanism is used. And eventually it defaults to hazelcast-default.xml.

CXF Client Encryption , Decryption and Signing

I have developed the Web service client using CXF 3.0.0 .
When i am sending a WS request to the server i have to encrypt the header and body. The following is my cxf-client.xml configuration
<jaxws:client name="{http://batchtransfer.em.emm.ericsson.com}PushFromBankBindingPort" createdFromAPI="true">
<jaxws:properties>
<entry key="ws-security.callback-handler" value="com.ClientKeystorePasswordCallback"/>
<entry key="ws-security.encryption.properties" value="clientKeystore.properties"/>
<entry key="ws-security.signature.properties" value="clientKeystore.properties"/>
<entry key="ws-security.encryption.username" value="myservicekey"/>
</jaxws:properties>
</jaxws:client>
When i trying to run client i am getting an exception saying that
Caused by: org.apache.cxf.ws.policy.PolicyException: Security
configuration could not be detected. Potential cause: Make sure
jaxws:client element with name attribute value matching endpoint port
is defined as well as a ws-security.signature.properties element
within it
The following is my wsdl port definitions.
<service name="PushFromBankBindingService">
<port binding="iso:PushFromBankBinding" name="PushFromBankBindingPort">
<soap:address location="http://127.0.0.1:9001/PushFromBankBindingPortImpl"/>
</port>
</service>
And i have the clientKeystore.properties in a right place and keystore password also right.
But i don't know what is the problem. Please help

MaxBufferPoolSize and MaxBufferSize?

This is my first post to Stack Overflow so please apologies if there is any non-conformity in it.
Question
I have developed a Windows Azure based site (similar to eBay) and hosted it on Azure platform. I have deployed multiple instances of web role with Azure caching enabled. Till last week everything was going fine but suddenly product search page started freezing while loading the data from db. It hangs only for specific categories which returns huge amount of data.
I read somewhere that we should enable localCache and transportProperties if we are expecting large messages. Hence I modified datacache item in my web.config as below but no luck. The page still hangs for those categories!
Could somebody please tell me what is wrong in following and show me some pointers?
<dataCacheClient name="default" channelOpenTimeout="20000" maxConnectionsToServer="4" requestTimeout="30000">
<localCache isEnabled="true" sync="TimeoutBased" ttlValue="300" objectCount="10000"/>
<clientNotification pollInterval="300" maxQueueLength="10000"/>
<transportProperties connectionBufferSize="64000" maxBufferPoolSize="5242880"
maxBufferSize="1242880" maxOutputDelay="2" channelInitializationTimeout="60000"
receiveTimeout="600000"/>
<hosts>
<host name="<<AZURE CACHE URL>>" cachePort="22233" />
</hosts>
<securityProperties mode="Message">
<messageSecurity
authorizationInfo="<<KEY>>">
</messageSecurity>
</securityProperties>
</dataCacheClient>
<dataCacheClient name="SslEndpoint" channelOpenTimeout="20000" maxConnectionsToServer="4" requestTimeout="30000">
<localCache isEnabled="true" sync="TimeoutBased" ttlValue="300" objectCount="10000"/>
<clientNotification pollInterval="300" maxQueueLength="10000"/>
<transportProperties connectionBufferSize="64000" maxBufferPoolSize="15242880"
maxBufferSize="5242880" maxOutputDelay="2" channelInitializationTimeout="60000"
receiveTimeout="600000"/>
<hosts>
<host name="<<AZURE CACHE URL>>" cachePort="22243" />
</hosts>
<securityProperties mode="Message" sslEnabled="true">
<messageSecurity
authorizationInfo="<<KEY>>">
</messageSecurity>
</securityProperties>
</dataCacheClient>
My dev env,
Azure SDK 1.8 (Oct 12), SQL Server 2008 R2, ASP.Net MVC 3
UPDATE
Today I deployed a build with CustomerErrors off to see the if it throws any exception, and this is what I got.
Thanks in advance
ND
I would advice to first find out which component is truly causing your intermittent slowdowns. Is it cache or is it SQL Azure?
If it is indeed cache, and since you're using Azure Shared Cache (previously known as Azure AppFabric Cache)
I would suggest looking at Dedicated cache as a solution instead of Shared cache. Performance of Shared Cache can sometimes be... unpredictable since it is a multi-tenant service and data travels over a network.

Resources