Count of CIDRs exceeds max limit: 0 in Oracle Cloud - oracle-cloud-infrastructure

I am always getting some wired error during the creation of VCN.
Count of CIDRs exceeds max limit: 0

It looks like you have exceeded your service quota limit for the VCN, you can refer this for details on how to request for the quota limit increase : https://docs.oracle.com/en-us/iaas/Content/General/Concepts/servicelimits.htm#Requesti
you can even try to create the VCN using CLI : https://docs.oracle.com/en-us/iaas/tools/oci-cli/2.16.0/oci_cli_docs/cmdref/network/vcn/create.html[enter link description here]2
Thanks,
Hemanth.

I used vcn wizard and it resolved. Configure VCN and Subnets VCN CIDR BLOCK xx.0.xx.0/yy If you plan to peer this VCN with another VCN, the VCNs must not have overlapping CIDRs. Learn more. PUBLIC SUBNET CIDR BLOCK xx.0.0.0/zz The subnet CIDR blocks must not overlap. PRIVATE SUBNET CIDR BLOCK x.0.xx.0/zz The subnet CIDR blocks must not overlap. –
Hint: that quota limit is coming from the compartment.

Related

InnoDB Buffer Pool Size % of Total RAM - (Buffer Pool Size of Total RAM) returning No Data

I have installed the prometheus node_exporter running on port 9100 and mysqld_exporterrunning in port 9104 and configured grafana to use prometheus as the default source.
From the grafana explorer, I can query the node_memory_MemTotal_bytes using something like:
node_memory_MemTotal_bytes{instance="10.0.0.4:9100"}
notice port 9100 (node_exporter)
And I can query also the innodb_buffer_pool_size using:
mysql_global_variables_innodb_buffer_pool_size{instance="10.0.0.4:9104"}
notice port 9104 (mysqld_exporter)
I would like to calculate the Buffer pool size of total RAM using:
(mysql_global_variables_innodb_buffer_pool_size{instance=~"$host"} * 100) / on (instance) node_memory_MemTotal_bytes{instance=~"$host"}
The problem I have is that $host is the IP and the port: 10.0.0.4:9104 and can only obtain the mysql_global_variables_innodb_buffer_pool_size from the mysqld_exporter and not the node_memory_MemTotal_bytes since is in port 9100 because of this I am getting No Data
Any ideas about how could I mix data the metrics from the node_exporter & the mysqld_exporter?
This is the prometheus configuration:
- job_name: test_mysql
scheme: http
static_configs:
- targets:
- 10.0.0.4:9104
- job_name: test_node
scheme: http
static_configs:
- targets:
- 10.0.0.4:9100
I just spent a whole afternoon to find a fix for it so I thought I would share it in case this can help somebody else.
I was finally able to make it work using the label_replace function.
I replaced the original query by the following one:
(label_replace(mysql_global_variables_innodb_buffer_pool_size{instance="$host"}, "nodename", "$1", "instance", "(.*):.*") * 100) / on(nodename) (label_replace(node_memory_MemTotal_bytes, "nodename", "$1", "instance", "(.*):.*"))
label_replace allows (among other things) to add a new label, which can be based on the value of an already existing one. In this case, we use it to add a new nodename label, which get the value of the instance label (hostname:port) from which we remove the :port part.
This thus allows to have metrics from different exporters instances sharing a label with the same value and thus use these together when needed (here, we wanted to use the mysql_global_variables_innodb_buffer_pool_size metric from the mysqld_exporter and the node_memory_MemTotal_bytes from the node_exporter in the same query, for a given host).
HTH.
Baptiste
Follow the steps to update buffer pool size-
Edit innodb_buffer_pool_size
MySQL Overview / Edit Panel, replace Metrics (mysql_global_variables_innodb_buffer_pool_size{instance="$host"} * 100) / on (instance) node_memory_MemTotal_bytes{instance="$host"}
into avg by (node_name) ((mysql_global_variables_innodb_buffer_pool_size{service_name=~""} * 100)) /on (node_name) (avg by (node_name) (node_memory_MemTotal_bytes{node_name=~""}))
Replace old metric as given below-
Save setting

Is it possible / common sense to change a CIDR prefix to meet a certain requirement of a network?

Say for example, you have an IP address with a CIDR prefix of /27 (mask of 255.255.255.224) and are required to create 4 subnets each with an equal amount of usable host addresses, would it be commonplace / accepted to adjust the prefix to /26 (using only 2 additional
bits, leaving 6 for the Host ID) to allow for 4 subnets, each with 62 (60 usable addresses ?
Or
Is just a case of when a prefix is already set (in this case /27) you simply “get what your given” and utilise only 4 of the possible 8 subnets that can be created with the additional 3 bits and have 4 subnets, each with 32 (30 usable addresses)?
I understand the prefix denotes how many bits are considered significant for the network address with the remainder allocated for the host / node.
Thanks in advance, I am quite new to networking but feel like common sense might apply in this case?
I haven to been able to find anything that confirms or denies the possibility of doing this when required.

Hive query does not begin MapReduce process after starting job and generating Tracking URL

I'm using Apache Hive.
I created a table in Hive (similar to external table) and loaded data into the same using the LOAD DATA LOCAL INPATH './Desktop/loc1/kv1.csv' OVERWRITE INTO TABLE adih; command.
While I am able to retrieve simple data from the hive table adih (e.g. select * from adih, select c_code from adih limit 1000, etc), Hive gives me errors when I ask for data involving slight computations (e.g. select count(*) from adih, select distinct(c_code) from adih).
The Hive cli output is as shown in the following link -
hive> select distinct add_user from adih;
Query ID = latize_20161031155801_8922630f-0455-426b-aa3a-6507aa0014c6
Total jobs = 1
Launching Job 1 out of 1
Number of reduce tasks not specified. Estimated from input data size: 1
In order to change the average load for a reducer (in bytes):
set hive.exec.reducers.bytes.per.reducer=
In order to limit the maximum number of reducers:
set hive.exec.reducers.max=
In order to set a constant number of reducers:
set mapreduce.job.reduces=
Starting Job = job_1477889812097_0006, Tracking URL = http://latize-data1:20005/proxy/application_1477889812097_0006/
Kill Command = /opt/hadoop-2.7.1/bin/hadoop job -kill job_1477889812097_0006
[6]+ Stopped $HIVE_HOME/bin/hive
Hive stops displaying any further logs / actions beyond the last line of "Kill Command"
Not sure where I have gone wrong (many answers on StackOverflow tend to point back to YARN configs (environment config detailed below).
I have the log as well but it contains more than 30000 characters (Stack Overflow limit)
My hadoop environment is configured as follows -
1 Name Node & 1 Data Node. Each has 20 GB of RAM with sufficient ROM. Have allocated 13 GB of RAM for the yarn.scheduler.maximum-allocation-mb and yarn.nodemanager.resource.memory-mb each with the mapreduce.map.memory.mb being set as 4 GB and the mapreduce.reduce.memory.mb being set as 12 GB. Number of reducers is currently set to default (-1). Also, Hive is configured to run with a MySQL DB (rather than Derby).
You should set the appropriate values to the properties show in your trace,
eg: Edit the properties in hive-site.xml
<property>
<name>hive.exec.reducers.bytes.per.reducer</name>
<value>67108864</value></property>
Looks like you have set mapred.reduce.tasks = -1, which makes Hive refer to its config to decide the number of reduce tasks.
You are getting an error as the number of reducers is missing in Hive config.
Try setting it using below command:
Hive> SET mapreduce.job.reduces=XX
As per official documentation: The right number of reduces seems to be 0.95 or 1.75 multiplied by (< no. of nodes > * < no. of maximum containers per node >).
I managed to get Hive and MR to work - increased the memory configurations for all the processes involved:
Increased the RAM allocated to YARN Scheduler and maximum RAM allocated to the YARN Nodemanager (in yarn-site.xml), alongside increasing the RAM allocated to the Mapper and Reducer (in mapred-site.xml).
Also incorporated parts of the answers by #Sathiyan S and #vmorusu - set the hive.exec.reducers.bytes.per.reducer property to 1 GB of data, which directly affects the number of reducers that Hive uses (through application of its heuristic techniques).

what is the equivalent to PostgereSQL's "ip <<"?

I have a large number of bind9 queries entered with a Perl Script into a simple
MySQL table, where the IP address is an integer which I can SELECT with
INET_NTOA(167772161) = '10.01.1.1'
I want to select addresses falling into a a particular CIDR Block like I can do
in PostgreSQL with something like
WHERE IP << '10.0.0.0/16'".
Now what I want is to find all addresses in the table that fall within for example 10.0.0.0/8 or whatever network block.
Any ideas?
greetings, el
You can use the bit shift operators in MySQL. Just a bit more work:
select 167772169 >> 16, inet_aton('10.0.0.0') >> 16
returns the same integer of the network address (shifted 16 bits to the right).

Only one node owns data in a Cassandra cluster

I am new to Cassandra and just run a cassandra cluster (version 1.2.8) with 5 nodes, and I have created several keyspaces and tables on there. However, I found all data are stored in one node (in the below output, I have replaced ip addresses by node numbers manually):
Datacenter: 105
==========
Address Rack Status State Load Owns Token
4
node-1 155 Up Normal 249.89 KB 100.00% 0
node-2 155 Up Normal 265.39 KB 0.00% 1
node-3 155 Up Normal 262.31 KB 0.00% 2
node-4 155 Up Normal 98.35 KB 0.00% 3
node-5 155 Up Normal 113.58 KB 0.00% 4
and in their cassandra.yaml files, I use all default settings except cluster_name, initial_token, endpoint_snitch, listen_address, rpc_address, seeds, and internode_compression. Below I list those non-ip address fields I modified:
endpoint_snitch: RackInferringSnitch
rpc_address: 0.0.0.0
seed_provider:
- class_name: org.apache.cassandra.locator.SimpleSeedProvider
parameters:
- seeds: "node-1, node-2"
internode_compression: none
and all nodes using the same seeds.
Can I know where I might do wrong in the config? And please feel free to let me know if any additional information is needed to figure out the problem.
Thank you!
If you are starting with Cassandra 1.2.8 you should try using the vnodes feature. Instead of setting the initial_token, uncomment # num_tokens: 256 in the cassandra.yaml, and leave initial_token blank, or comment it out. Then you don't have to calculate token positions. Each node will randomly assign itself 256 tokens, and your cluster will be mostly balanced (within a few %). Using vnodes will also mean that you don't have to "rebalance" you cluster every time you add or remove nodes.
See this blog post for a full description of vnodes and how they work:
http://www.datastax.com/dev/blog/virtual-nodes-in-cassandra-1-2
Your token assignment is the problem here. An assigned token are used determines the node's position in the ring and the range of data it stores. When you generate tokens the aim is to use up the entire range from 0 to (2^127 - 1). Tokens aren't id's like with mysql cluster where you have to increment them sequentially.
There is a tool on git that can help you calculate the tokens based on the size of your cluster.
Read this article to gain a deeper understanding of the tokens. And if you want to understand the meaning of the numbers that are generated check this article out.
You should provide a replication_factor when creating a keyspace:
CREATE KEYSPACE demodb
WITH REPLICATION = {'class' : 'SimpleStrategy', 'replication_factor': 3};
If you use DESCRIBE KEYSPACE x in cqlsh you'll see what replication_factor is currently set for your keyspace (I assume the answer is 1).
More details here