Zookeeper ignores JVMFLAGS? - apache-zookeeper

Hi I setup my zookeeper cluster and it seems to be running fine. But I'm trying to setup the heap size and it doesn't seem to be respected. I created the java.env with export JVMFLAGS="-Xms3000m -Xmx3000m" file inside conf/...
When I ps -aux | grep java I can see -Xmx1000m -Xms3000m -Xmx3000m. But when I check with free -m I only see 200M used and 3.3G free.
I noticed that the default value is set regardless. Does this affects it?
Shouldn't Xms fill up the used RAM?

The file zkEnv.sh contains the following line:
export SERVER_JVMFLAGS="-Xmx${ZK_SERVER_HEAP}m $SERVER_JVMFLAGS"
and the "-Xmx${ZK_SERVER_HEAP}m" caused the trouble.

This is what finally worked for me.
In the conf/java.env
export SERVER_JVMFLAGS="-Xms6144m -Xmx6144m -XX:+AlwaysPreTouch"

If you are using /usr/bin/zookeeper-server-start from the confluent-kafka-* package, you might need to set KAFKA_HEAP_OPTS inside your systemd unit file.
Environment="KAFKA_HEAP_OPTS=-Xmx1024M -Xms1024M"

Related

Won't be precached. Configure maximumFileSizeToCacheInBytes to change this limit (PWA)

help me. I have a problem after running "npm run dev" warning appears :
WARNING in css/app.css is 4.13 MB, and won't be precached. Configure maximumFileSizeToCacheInBytes to change this limit.
What does the warning mean? Can anyone explain? And how to solve it? Thank you good people^^
sw-precache checks which files the service worker will cache (precache) immediately during registration. During build sw-precache sees that app.css is part of your application and wants to and it to the list of precached file.
But your app.css is 4.13 MB big, which is to big for the default configuration.
First advise is: Check is you really need that much CSS and if it is possible to reduce file size.
If this is not possible you can adjust maximumFileSizeToCacheInBytes:
I am unsure if you use sw-precache, because it is outdated, you should switch to use workbox-build.
For workbox-build use the following config by setting maximumFileSizeToCacheInBytes:
// build-sw.js
import {generateSW} from 'workbox-build';
generateSW({
swDest: './dist/sw.js',
maximumFileSizeToCacheInBytes: <yourMaxFileSizeInBytesGoesHere>
.....
});

varnish / docker-compose custom port and cache size

I'm trying to figure out how to pass custom port and cache size and vcl file in docker-compose.yml to varnish (I'm using the official varnish image https://hub.docker.com/_/varnish )
I Tried using environment variables by adding the following lines into my docker-compose.yml but it seems that they are not taken into consideration
environment:
- VARNISH_CONFIG="/etc/varnish/custom.vcl"
- CACHE_SIZE=512m
- VARNISH_PORT=8080
Any clue on how to pass these params to a varnish container ?
In case some one needs to achieve the same config, I ended up by creating a new image based on the official one and adding these params to the CMD instruction :
EXPOSE **8080**
CMD ["varnishd", "-F", "-f", "**/etc/varnish/custom.vcl**", "-s", "**malloc,2G**"]
The official Varnish Docker image is quite basic at this point. As you concluded in your second post, you can use our the image as the basis, and then customize the behavior in your own Dockerfile.
However, for Varnish Software, it's an iterative process, so we'll gradually add features to the image. In the end, you'll be able to configure most parameters through environment variables in your docker-compose.yml file.
We're working on it, thanks for your patience.

Setup and running examples in Oryx2

I have a CDH5.5 installation and I want to run some oryx2 examples within my virtual machine.
I've already downloaded and compiled oryx2 from github successfully. I've copied the example app to my ORYX_HOME/deploy/bin folder where oryx-run.sh is placed. I've also added the wordcount-example.conf and add a oryx.conf file from the als one (I pointed to my kafka-brokers and zk-servers within it).
I tried to setup Kafka and/or run some examples but I always get the same error:
> ./oryx-run.sh kafka-setup --layer-jar ../oryx-batch/target/oryx-batch-2.2.0-SNAPSHOT.jar
Can't find kafka scripts like kafka-topics
> ./oryx-run.sh batch --conf wordcount-example.conf --app-jar myapp.jar --layer-jar ../oryx-batch/target/oryx-batch-2.2.0-SNAPSHOT.jar
Can't find kafka scripts like kafka-topics
I've tried copying kafka script to the same oryx-run script folder but got the same errors unfortunately.
Any idea?
Regards.
export KAFKA_HOME=/opt/17173/kafka
export PATH=$HADOOP_HOME/bin:$SPARK_HOME/sbin:$KAFKA_HOME/bin:$PATH
The reason is kafka-topics can't be found in bin, you have to add it to PATH. For me, Kafka is in /Users/long/software/kafka_2.10-0.8.2.2, so I just
vim ~/.bashrc ,then add follow two lines in the end.
export KAFKA_HOME=/Users/long/software/kafka_2.10-0.8.2.2
export PATH=$KAFKA_HOME/bin:$PATH;
After add it, You must restart Shell.

Installing openTSDB on Ubuntu15.04

I have installed openTSDB(.deb package) on ubuntu 15.04 by following the guidelines stated in documentation. when I give this command "service opentsdb start" it is not starting and it is mentioned in documentation that we have to change some configuration files.can anyone please tell me what are the changes that we have to do and in which file the changes have to be done?
Thanks in advance
Regards
VHC
Check your logs in /var/log/opentsdb/opentsdb.log. You should have HBase up&running correctly (means i.e. you are able to create table and store some values)
Remember you have to create tables in HBase running
env COMPRESSION=NONE HBASE_HOME=path/to/hbase-X.XX.X /usr/share/opentsdb/tools/create_table.sh
http://opentsdb.net/docs/build/html/installation.html#create-tables

HOCON not substituting environment variables

I have read the documentation concerning falling back to environment variables at https://github.com/typesafehub/config/blob/master/HOCON.md#substitution-fallback-to-environment-variables. My understanding was that it would pickup any envars. So for instance, if from the shell I was able to do echo $HOSTNAME and see a non-empty response then HOCON should do that as well.
In my application.conf I have a line
akka.remote.netty.tcp.hostname = ${HOSTNAME}
However, my app is not happy with this and fails to start with.
/conf/application.conf: 9: Could not resolve substitution to a value: ${HOSTNAME}
Is this a user issue? A shell issue? I am able to login as the user and echo $HOSTNAME
Tagging this scala and akka since that userbase probably has the most exposure to HOCON
The reason for HOCON not picking up the envar is that my app runs as a linux service (Centos 6.5) which clears away most environment variables.
See https://unix.stackexchange.com/questions/44370/how-to-make-unix-service-see-environment-variables for a relevant description of the issue
this is a shot in the dark, but are you using an older version of typesafe-config? maybe its a newer-ish feature? the feature seems to be advertised as you describe, but if you are pulling in typesafe-config as a transient dependency (say from akka), maybe you are getting an older version.
what happens if you remove the substitution in your .conf file (so parsing is successful) and then print out the contents of ConfigFactory.systemEnvironment()? for reference: http://typesafehub.github.io/config/latest/api/com/typesafe/config/ConfigFactory.html#systemEnvironment--
HOSTNAME isn't an environment variable. It's a bash internal variable. See https://superuser.com/questions/132489/hostname-environment-variable-on-linux for more details.