In out cluster we have five nodes composite of:
2 seed nodes (backend)
1 worker
2 webapi on IIS
The cluster is joined, up and running; but the second IIS when perform the first message to the cluster via router make all cluster unreachable and dissociated.
In addition the second IIS can't deliver any message.
Here is my IIS config:
<hocon>
<![CDATA[
akka.loglevel = INFO
akka.log-config-on-start = off
akka.stdout-loglevel = INFO
akka.actor {
provider = "Akka.Cluster.ClusterActorRefProvider, Akka.Cluster"
deployment {
/Process {
router = round-robin-group
routees.paths = ["/user/Process"] # path of routee on each node
# nr-of-instances = 3 # max number of total routees
cluster {
enabled = on
allow-local-routees = off
use-role = Process
}
}
}
debug {
receive = on
autoreceive = on
lifecycle = on
event-stream = on
unhandled = on
}
}
akka.remote {
helios.tcp {
# transport-class = "Akka.Remote.Transport.Helios.HeliosTcpTransport, Akka.Remote"
# applied-adapters = []
# transport-protocol = tcp
port = 0
hostname = 172.16.1.8
}
log-remote-lifecyclo-events = DEBUG
}
akka.cluster {
seed-nodes = [
"akka.tcp://ClusterActorSystem#172.16.1.8:2551",
"akka.tcp://ClusterActorSystem#172.16.1.8:2552"
]
roles = [Send]
auto-down-unreachable-after = 10s
# how often should the node send out gossip information?
gossip-interval = 1s
# discard incoming gossip messages if not handled within this duration
gossip-time-to-live = 2s
}
# http://getakka.net/docs/persistence/at-least-once-delivery
akka.persistence.at-least-once-delivery.redeliver-interval = 300s
# akka.persistence.at-least-once-delivery.redelivery-burst-limit =
# akka.persistence.at-least-once-delivery.warn-after-number-of-unconfirmed-attempts =
akka.persistence.at-least-once-delivery.max-unconfirmed-messages = 1000000
akka.persistence.journal.plugin = "akka.persistence.journal.sql-server"
akka.persistence.journal.publish-plugin-commands = on
akka.persistence.journal.sql-server {
class = "Akka.Persistence.SqlServer.Journal.SqlServerJournal, Akka.Persistence.SqlServer"
plugin-dispatcher = "akka.actor.default-dispatcher"
table-name = EventJournal
schema-name = dbo
auto-initialize = on
connection-string-name = "HubAkkaPersistence"
refresh-interval = 1s
connection-timeout = 30s
timestamp-provider = "Akka.Persistence.Sql.Common.Journal.DefaultTimestampProvider, Akka.Persistence.Sql.Common"
metadata-table-name = Metadata
}
akka.persistence.snapshot-store.plugin = ""akka.persistence.snapshot-store.sql-server""
akka.persistence.snapshot-store.sql-server {
class = "Akka.Persistence.SqlServer.Snapshot.SqlServerSnapshotStore, Akka.Persistence.SqlServer"
plugin-dispatcher = ""akka.actor.default-dispatcher""
connection-string-name = "HubAkkaPersistence"
schema-name = dbo
table-name = SnapshotStore
auto-initialize = on
}
]]>
</hocon>
inside the global.asax we create a new router to the cluster:
ClusterActorSystem = ActorSystem.Create("ClusterActorSystem");
var backendRouter =
ClusterActorSystem.ActorOf(
Props.Empty.WithRouter(FromConfig.Instance), "Process");
Send = SistemiHubClusterActorSystem.ActorOf(
Props.Create(() => new Common.Actors.Send(backendRouter)),
"Send");
and here is our backend config:
<hocon><![CDATA[
akka.loglevel = INFO
akka.log-config-on-start = on
akka.stdout-loglevel = INFO
akka.actor {
provider = "Akka.Cluster.ClusterActorRefProvider, Akka.Cluster"
debug {
receive = on
autoreceive = on
lifecycle = on
event-stream = on
unhandled = on
}
}
akka.remote {
helios.tcp {
# transport-class = "Akka.Remote.Transport.Helios.HeliosTcpTransport, Akka.Remote"
# applied-adapters = []
# transport-protocol = tcp
#
# seed-node ports 2551 and 2552
# non-seed-node port 0
port = 2551
hostname = 172.16.1.8
}
log-remote-lifecyclo-events = INFO
}
akka.cluster {
seed-nodes = [
"akka.tcp://ClusterActorSystem#172.16.1.8:2551",
"akka.tcp://ClusterActorSystem#172.16.1.8:2552"
]
roles = [Process]
auto-down-unreachable-after = 10s
}
]]></hocon>
The issue in present using Akka 1.1 and Akka 1.2
UPDATE
I have found that the issue is related to our LoadBalancer (NetScaler) if I call each IIS directly is working fine. If called by the balancer I face the reported issue; the balancer is trasparent (it only add some headers to the request). What can I check to solve this issue?
Finally I found the problem, we are using akka.persistence that requires a specific value declination for the PersistenceId for each IIS.
Related
I'm having this code:
terraform {
required_providers {
proxmox = {
source = "telmate/proxmox"
version = "2.8.0"
}
}
}
provider "proxmox" {
pm_api_url = "https://url/api2/json"
pm_user = "user"
pm_password = "pass"
pm_tls_insecure = true
}
resource "proxmox_vm_qemu" "test" {
count = 1
name = "test-${count.index + 1}"
target_node = "prm01"
clone = "image-here"
guest_agent_ready_timeout = 60
os_type = "cloud-init"
cores = 2
sockets = 1
cpu = "host"
memory = 4048
scsihw = "virtio-scsi-pci"
bootdisk = "scsi0"
disk {
slot = 0
size = "32G"
type = "scsi"
storage = "local-lvm"
iothread = 1
}
network {
model = "virtio"
bridge = "vmbr0"
}
lifecycle {
ignore_changes = [
network,
]
}
}
output "proxmox_ip_address_default" {
description = "Current IP Default"
value = proxmox_vm_qemu.test.*.default_ipv4_address
}
This is created via Ansible playbook. What I'm trying to find is the IP assigned to the machine as I'm running then another playbook to provision that machine. The problem is that I didn't found any solution on how to find the assigned IP address of that machine
Output it is empty!
Any help?
collector.conf
collector {
interface = "0.0.0.0"
interface = ${?COLLECTOR_INTERFACE}
port = 8181
port = ${?COLLECTOR_PORT}
# optional SSL/TLS configuration
ssl {
enable = false
enable = ${?COLLECTOR_SSL}
# whether to redirect HTTP to HTTPS
redirect = false
redirect = ${?COLLECTOR_SSL_REDIRECT}
port = 9543
port = ${?COLLECTOR_SSL_PORT}
}
paths {
# "/com.acme/track" = "/com.snowplowanalytics.snowplow/tp2"
# "/com.acme/redirect" = "/r/tp2"
# "/com.acme/iglu" = "/com.snowplowanalytics.iglu/v1"
}
# Configure the P3P policy header.
p3p {
policyRef = "/w3c/p3p.xml"
CP = "NOI DSP COR NID PSA OUR IND COM NAV STA"
}
crossDomain {
enabled = false
# Domains that are granted access, *.acme.com will match http://acme.com and http://sub.acme.com
enabled = ${?COLLECTOR_CROSS_DOMAIN_ENABLED}
domains = [ "*" ]
domains = [ ${?COLLECTOR_CROSS_DOMAIN_DOMAIN} ]
# Whether to only grant access to HTTPS or both HTTPS and HTTP sources
secure = true
secure = ${?COLLECTOR_CROSS_DOMAIN_SECURE}
}
cookie {
enabled = true
enabled = ${?COLLECTOR_COOKIE_ENABLED}
expiration = "365 days"
expiration = ${?COLLECTOR_COOKIE_EXPIRATION}
# Network cookie name
name = zanui_collector_cookie
name = ${?COLLECTOR_COOKIE_NAME}
domains = [
"{{cookieDomain1}}" # e.g. "domain.com" -> any origin domain ending with this will be matched and domain.com will be returned
"{{cookieDomain2}}" # e.g. "secure.anotherdomain.com" -> any origin domain ending with this will be matched and secure.anotherdomain.com will be returned
# ... more domains
]
domains += ${?COLLECTOR_COOKIE_DOMAIN_1}
domains += ${?COLLECTOR_COOKIE_DOMAIN_2}
fallbackDomain = ""
fallbackDomain = ${?FALLBACK_DOMAIN}
secure = false
secure = ${?COLLECTOR_COOKIE_SECURE}
httpOnly = false
httpOnly = ${?COLLECTOR_COOKIE_HTTP_ONLY}
sameSite = "{{cookieSameSite}}"
sameSite = ${?COLLECTOR_COOKIE_SAME_SITE}
}
doNotTrackCookie {
enabled = false
enabled = ${?COLLECTOR_DO_NOT_TRACK_COOKIE_ENABLED}
# name = {{doNotTrackCookieName}}
name = zanui-collector-do-not-track-cookie
# value = {{doNotTrackCookieValue}}
value = zanui-collector-do-not-track-cookie-value
}
cookieBounce {
enabled = false
enabled = ${?COLLECTOR_COOKIE_BOUNCE_ENABLED}
name = "n3pc"
name = ${?COLLECTOR_COOKIE_BOUNCE_NAME}
fallbackNetworkUserId = "00000000-0000-4000-A000-000000000000"
fallbackNetworkUserId = ${?COLLECTOR_COOKIE_BOUNCE_FALLBACK_NETWORK_USER_ID}
forwardedProtocolHeader = "X-Forwarded-Proto"
forwardedProtocolHeader = ${?COLLECTOR_COOKIE_BOUNCE_FORWARDED_PROTOCOL_HEADER}
}
enableDefaultRedirect = true
enableDefaultRedirect = ${?COLLECTOR_ALLOW_REDIRECTS}
redirectMacro {
enabled = false
enabled = ${?COLLECTOR_REDIRECT_MACRO_ENABLED}
# Optional custom placeholder token (defaults to the literal `${SP_NUID}`)
placeholder = "[TOKEN]"
placeholder = ${?COLLECTOR_REDIRECT_REDIRECT_MACRO_PLACEHOLDER}
}
rootResponse {
enabled = false
enabled = ${?COLLECTOR_ROOT_RESPONSE_ENABLED}
statusCode = 302
statusCode = ${?COLLECTOR_ROOT_RESPONSE_STATUS_CODE}
# Optional, defaults to empty map
headers = {
Location = "https://127.0.0.1/",
Location = ${?COLLECTOR_ROOT_RESPONSE_HEADERS_LOCATION},
X-Custom = "something"
}
# Optional, defaults to empty string
body = "302, redirecting"
body = ${?COLLECTOR_ROOT_RESPONSE_BODY}
}
cors {
accessControlMaxAge = 5 seconds
accessControlMaxAge = ${?COLLECTOR_CORS_ACCESS_CONTROL_MAX_AGE}
}
# Configuration of prometheus http metrics
prometheusMetrics {
enabled = false
}
streams {
# Events which have successfully been collected will be stored in the good stream/topic
good = snowplow-collected-good-events-stream
good = ${?COLLECTOR_STREAMS_GOOD}
# Events that are too big (w.r.t Kinesis 1MB limit) will be stored in the bad stream/topic
bad = snowplow-collected-bad-events-stream
bad = ${?COLLECTOR_STREAMS_BAD}
useIpAddressAsPartitionKey = false
useIpAddressAsPartitionKey = ${?COLLECTOR_STREAMS_USE_IP_ADDRESS_AS_PARTITION_KEY}
sink {
enabled = kinesis
enabled = ${?COLLECTOR_STREAMS_SINK_ENABLED}
# Region where the streams are located
region = ap-southeast-2
region = ${?COLLECTOR_STREAMS_SINK_REGION}
threadPoolSize = 10
threadPoolSize = ${?COLLECTOR_STREAMS_SINK_THREAD_POOL_SIZE}
aws {
accessKey = env
accessKey = ${?COLLECTOR_STREAMS_SINK_AWS_ACCESS_KEY}
secretKey = env
secretKey = ${?COLLECTOR_STREAMS_SINK_AWS_SECRET_KEY}
}
# Minimum and maximum backoff periods, in milliseconds
backoffPolicy {
#minBackoff = {{minBackoffMillis}}
minBackoff = 10
#maxBackoff = {{maxBackoffMillis}}
maxBackoff = 10
}
}
buffer {
byteLimit = 4500000
byteLimit = ${?COLLECTOR_STREAMS_BUFFER_BYTE_LIMIT}
recordLimit =500 # Not supported by Kafka; will be ignored
recordLimit = ${?COLLECTOR_STREAMS_BUFFER_RECORD_LIMIT}
timeLimit = 5000
timeLimit = ${?COLLECTOR_STREAMS_BUFFER_TIME_LIMIT}
}
}
}
akka {
loglevel = DEBUG # 'OFF' for no logging, 'DEBUG' for all logging.
loglevel = ${?AKKA_LOGLEVEL}
loggers = ["akka.event.slf4j.Slf4jLogger"]
loggers = [${?AKKA_LOGGERS}]
http.server {
remote-address-header = on
remote-address-header = ${?AKKA_HTTP_SERVER_REMOTE_ADDRESS_HEADER}
raw-request-uri-header = on
raw-request-uri-header = ${?AKKA_HTTP_SERVER_RAW_REQUEST_URI_HEADER}
# Define the maximum request length (the default is 2048)
parsing {
max-uri-length = 32768
max-uri-length = ${?AKKA_HTTP_SERVER_PARSING_MAX_URI_LENGTH}
uri-parsing-mode = relaxed
uri-parsing-mode = ${?AKKA_HTTP_SERVER_PARSING_URI_PARSING_MODE}
}
}
}
Run Command:
java -Dcom.amazonaws.sdk.disableCbor -jar snowplow-stream-collector-kinesis-1.0.0.jar --config collector.conf
enricher.conf
enrich {
streams {
in {
# Stream/topic where the raw events to be enriched are located
raw = snowplow-collected-good-events-stream
raw = ${?ENRICH_STREAMS_IN_RAW}
}
out {
# Stream/topic where the events that were successfully enriched will end up
enriched = snowplow-collected-good-events-stream
# Stream/topic where the event that failed enrichment will be stored
bad = snowplow-collected-bad-events-stream
bad = ${?ENRICH_STREAMS_OUT_BAD}
# Stream/topic where the pii tranformation events will end up
# pii = {{outPii}}
# pii = ${?ENRICH_STREAMS_OUT_PII}
partitionKey = event_id
partitionKey = ${?ENRICH_STREAMS_OUT_PARTITION_KEY}
}
sourceSink {
enabled = kinesis
enabled = ${?ENRICH_STREAMS_SOURCE_SINK_ENABLED}
region = ap-southeast-2
aws {
accessKey = env
accessKey = ${?ENRICH_STREAMS_SOURCE_SINK_AWS_ACCESS_KEY}
secretKey = env
secretKey = ${?ENRICH_STREAMS_SOURCE_SINK_AWS_SECRET_KEY}
}
maxRecords = 10000
initialPosition = TRIM_HORIZON
initialTimestamp = "2020-09-10T10:00:00Z"
backoffPolicy {
minBackoff = 1000
minBackoff = ${?ENRICH_STREAMS_SOURCE_SINK_BACKOFF_POLICY_MIN_BACKOFF}
maxBackoff = 5000
maxBackoff = ${?ENRICH_STREAMS_SOURCE_SINK_BACKOFF_POLICY_MAX_BACKOFF}
}
}
buffer {
byteLimit = 1000000000
byteLimit = ${?ENRICH_STREAMS_BUFFER_BYTE_LIMIT}
recordLimit = 10 # Not supported by Kafka; will be ignored
recordLimit = ${?ENRICH_STREAMS_BUFFER_RECORD_LIMIT}
timeLimit = 5000
timeLimit = ${?ENRICH_STREAMS_BUFFER_TIME_LIMIT}
}
appName = "zanui-enricher-app"
appName = ${?ENRICH_STREAMS_APP_NAME}
}
}
Run Command:
java -jar snowplow-stream-enrich-kinesis-1.0.0.jar --config enricher.conf --resolver file:resolver.json
S3 Loader Config
source = "kinesis"
sink = "kinesis"
aws {
accessKey = "env"
secretKey = "env"
}
# Config for NSQ
nsq {
channelName = "nsqSourceChannelName"
# Host name for NSQ tools
host = "127.0.0.1"
# HTTP port for nsqd
port = 4150
# HTTP port for nsqlookupd
lookupPort = 4161
}
kinesis {
initialPosition = "TRIM_HORIZON"
initialTimestamp = "2017-05-17T10:00:00Z"
maxRecords = 10000
region = "ap-southeast-2"
appName = "zanui-enricher-app"
}
streams {
inStreamName = "snowplow-collected-good-events-stream"
outStreamName = "snowplow-collected-bad-events-stream"
buffer {
byteLimit = 1000000000 # Not supported by NSQ; will be ignored
recordLimit = 10
timeLimit = 5000 # Not supported by NSQ; will be ignored
}
}
s3 {
region = "ap-southeast-2"
bucket = "snowplow-enriched-good-events"
partitionedBucket = "snowplow-enriched-good-events/partitioned"
dateFormat = "{YYYY}/{MM}/{dd}/{HH}"
outputDirectory = "zanui-enriched/good"
filenamePrefix = "zanui-output"
format = "gzip"
# Maximum Timeout that the application is allowed to fail for (in milliseconds)
maxTimeout = 300000 # 5 minutes
}
Run Command:
java -jar snowplow-s3-loader-0.6.0.jar --config my.conf
But this Snowplow S3 Loader not doing anything so i used Data Fireshose to transfer stream to S3 bucket.
When i try to use Aws Lambda in Data Fireshose, it give error
{"attemptsMade":4,"arrivalTimestamp":1600154159619,"errorCode":"Lambda.FunctionError","errorMessage":"The Lambda function was successfully invoked but it returned an error result.","attemptEndingTimestamp":1600154235846,"rawData":"****","lambdaArn":"arn:aws:lambda:ap-southeast-2:573188294151:function:snowplow-json-transformer-lambda:$LATEST"}
{"attemptsMade":4,"arrivalTimestamp":1600154161523,"errorCode":"Lambda.FunctionError","errorMessage":"The Lambda function was successfully invoked but it returned an error result.","attemptEndingTimestamp":1600154235846,"rawData":"*****=","lambdaArn":"arn:aws:lambda:ap-southeast-2:573188294151:function:snowplow-json-transformer-lambda:$LATEST"}
If i dont use lambda, log is created in S3 Good Enriched Bucket for page view event, but at the same time, log is created in S3 bad Enriched Bucket for the same page view event saying
{"schema":"iglu:com.snowplowanalytics.snowplow.badrows/collector_payload_format_violation/jsonschema/1-0-0","data":{"processor":{"artifact":"snowplow-stream-enrich","version":"1.0.0"},"failure":{"timestamp":"2020-09-15T07:16:02.488Z","loader":"thrift","message":{"error":"error deserializing raw event: Cannot read. Remote side has closed. Tried to read 2 bytes, but only got 1 bytes. (This is often indicative of an internal error on the server side. Please check your server logs.)"}},"payload":"****="}}
I have followed the documentation repeatedly but i am confused in the setup for stream enrich. What i did not understand is that , do we need to setup database for stream enrich if we are not using custom schema ? Because since i am trying to test with Page View event from Javascript Tracker, I have not setup any database. But i have provided access for DynamoDb create, edit for IAM role.
Please help me to setup snowplow if anyone has done before. Please :(
I had written a blog on how to setup Snowplow Analytics in AWS.
Here is the link, hope this helps you.
It seems the HTTP health check is not occurring, I've come to this conclusion due to the HTTP debug log not showing any regular periodic requests.
Is there any additional configuration request for a health check to occur?
job "example" {
datacenters = ["dc1"]
type = "service"
update {
max_parallel = 1
min_healthy_time = "10s"
healthy_deadline = "3m"
progress_deadline = "10m"
auto_revert = false
canary = 0
}
migrate {
max_parallel = 1
health_check = "checks"
min_healthy_time = "10s"
healthy_deadline = "5m"
}
group "app" {
count = 1
restart {
attempts = 2
interval = "30m"
delay = "15s"
mode = "fail"
}
ephemeral_disk {
size = 300
}
task "app" {
driver = "docker"
config {
image = "localhost:5000/myhub:latest"
command = "python"
args = [
"manage.py",
"runserver",
"0.0.0.0:8001"
]
port_map {
app = 8001
}
network_mode = "host"
}
resources {
cpu = 500
memory = 256
network {
mbits = 10
port "app" {}
}
}
service {
name = "myhub"
port = "app"
check {
name = "alive"
type = "http"
port = "app"
path = "/"
interval = "10s"
timeout = "3s"
}
}
}
}
}
It seems Consul must be installed for this to occur.
Also make sure to install Consul v1.4.2 or later as v1.4.1 seems to have a bug: https://github.com/hashicorp/consul/issues/5270
i have error with starting sharding
version of tarantool and os:
main/101/tarantoolctl C> version 1.6.8-654-ge91080f on ubuntu-16.04 LTS
in configuration file
roman#zotac-pc:~$ egrep -v "^[[:space:]]*--|^$" /etc/tarantool/instances.enabled/test.lua
box.cfg {
listen = 3301;
slab_alloc_arena = 0.5;
slab_alloc_minimal = 16;
slab_alloc_maximal = 1048576;
slab_alloc_factor = 1.06;
snapshot_period = 0;
snapshot_count = 6;
panic_on_snap_error = true;
panic_on_wal_error = true;
rows_per_wal = 5000000;
snap_io_rate_limit = nil;
wal_mode = "none";
wal_dir_rescan_delay = 2.0;
io_collect_interval = nil;
readahead = 16320;
log_level = 5;
logger_nonblock = true;
too_long_threshold = 0.5;
}
local function bootstrap()
local space = box.schema.create_space('test')
space:create_index('primary')
box.schema.user.grant('guest', 'read,write,execute', 'universe')
box.schema.user.create('test', { password = 'test' })
box.schema.user.grant('test', 'replication')
box.schema.user.grant('test', 'read,write,execute', 'universe')
end
box.once('test-1.0', bootstrap)
local shard = require('shard')
local shards = {
servers = {
{ uri = [[127.0.0.1:3301]]; zone = [[0]]; };
{ uri = [[127.0.0.1:3302]]; zone = [[1]]; };
};
login = 'test';
password = 'test';
redundancy = 1;
binary = '127.0.0.1:3301';
monitor = false;
}
shard.init(cfg)
roman#zotac-pc:~$
sample error in log file:
main/101/test I> Sharding initialization started...
main/101/test tarantoolctl:422 E> Start failed: /usr/share/tarantool/connpool.lua:316: attempt to index field 'configuration' (a nil value)
main C> entering the event loop
in /etc/tarantool/../example.lua from ubuntu package function shard.init(cfg) need replase shard.init(shards)
below code is working fine:
local shard = require('shard')
local shards = {
servers = {
{ uri = [[127.0.0.1:3301]]; zone = [[0]]; };
{ uri = [[127.0.0.1:3302]]; zone = [[1]]; };
};
login = 'test';
password = 'test';
redundancy = 1;
binary = '127.0.0.1:3301';
monitor = false;
}
shard.init(shards)
I am starting to use VACaMobil in a project. However, I am having a problem.
I don't know if I am wrong, but I understand that TraCIScenarioManagerLaunchd
(ant therefore, VACaMobil) creates dynamically the nodes representing each vehicle, i. e.
the car module isn't defined in the network file, but it's declared in the omnetpp.ini file, in
parameters ".manager.moduleType" and ".manager.moduleName". In my case, the module
type is a custom car module based in the Car module of inet/examples/VACaMobil/Cars, and
the module name is "coche".
Here is the omnetpp.ini file:
[General]
network = Cars
cmdenv-express-mode = true
cmdenv-autoflush = true
cmdenv-status-frequency = 10000000s
repeat = 10
tkenv-plugin-path = ../../../etc/plugins
tkenv-image-path = bitmaps
#sim-time-limit = 6000s
check-signals = true
**.manager.**.scalar-recording = true
**.manager.**.vector-recording = true
**.manetrouting.**.scalar-recording = true
**.movStats.**.scalar-recording = true
**.movStats.**.vector-recording = true
**.mac.**.scalar-recording = true
**.mac.**.vector-recording = true
**.scalar-recording = true
**.vector-recording = true
*.channelControl.carrierFrequency = 2.4GHz
*.channelControl.pMax = 2mW
*.channelControl.sat = -110dBm
*.channelControl.alpha = 2
*.channelControl.numChannels = 1
# TraCIScenarioManagerLaunchd
*.manager.updateInterval = 1s
*.manager.host = "localhost"
*.manager.port = 9999
*.manager.moduleType = "rcdp9.TAdhocHost"
*.manager.moduleName = "coche"
*.manager.moduleDisplayString = ""
*.manager.autoShutdown = true
*.manager.margin = 25
*.manager.doNothing = false
# nic settings
**.wlan.bitrate = 24Mbps
**.wlan.opMode = "g"
**.wlan.mgmt.frameCapacity = 10
**.wlan.mgmtType = "Ieee80211MgmtAdhoc"
**.wlan.mac.basicBitrate = 24Mbps
**.wlan.mac.controlBitrate = 24Mbps
**.wlan.mac.address = "auto"
**.wlan.mac.maxQueueSize = 14
**.wlan.mac.rtsThresholdBytes = 3000B
**.wlan.mac.retryLimit = 7
**.wlan.mac.cwMinData = 7
**.wlan.radio.transmitterPower = 2mW
**.wlan.radio.thermalNoise = -110dBm
**.wlan.radio.sensitivity = -85dBm
**.wlan.radio.pathLossAlpha = 2
**.wlan.radio.snirThreshold = 4dB
**.getStatistics = true
**.statFiles = "${resultdir}/${configname}-${runnumber}-"
**.channelNumber = 0
[Config RCDP]
**.coche[0..49].app1.localPort = 1000
**.coche[0..49].app1.destPort = 1000
**.coche[0..49].app1.messageLength = ${50000000B ! length}
**.coche[0..49].app1.burstSize = 10
**.coche[0..49].app1.bandWidth = 147200bps
**.coche[0..49].app1.alpha = 0.5
**.coche[0..49].app1.beta = 0.8
**.coche[0..49].app1.destAddresses = moduleListByPath("**.coche[50..99]")
**.coche[0..49].networkLayer.configurator.networkConfiguratorModule = "configurator"
**.coche[50..99].app2.localPort = 1000
**.coche[50..99].app2.messageLength = ${length = 50000000B}
**.coche[50..99].app2.bandWidth = 147200bps
**.coche[50..99].app2.maxBandWidth = 24Mbps
#**.meanNumberOfCars = ${100, 200, 300, 400}
**.meanNumberOfCars = 100
**.warmUpSeconds = 0s
**.autoShutdown = false
*.manager.launchConfig = xmldoc("VACaMobil/Milan/downtown.launch.xml")
# manet routing
**.routingProtocol = ${"AODVUU", "DYMO", "OLSR"}
[Config TCP]
**.coche[0..49].app3.localPort = 1000
**.coche[0..49].app3.startTime = 0s
**.coche[0..49].app3.stopTime = 100s
**.coche[0..49].app3.thinkTime = 1s
**.coche[0..49].app3.idleInterval =3s
**.coche[0..49].app3.requestLength = 50000000B
**.coche[0..49].app3.numRequestsPerSession = 100
**.coche[0..49].app3.connectAddress = moduleListByPath("**.coche[50..99]")
**.coche[0..49].networkLayer.configurator.networkConfiguratorModule = "configurator"
**.coche[50..99].app4.dataTransferMode = "object"
#carGRCnator
**.getStatistics = true
**.statFiles = "${resultdir}/${configname}-${runnumber}-"
#**.meanNumberOfCars = ${100, 200, 300, 400}
**.meanNumberOfCars = 100
**.warmUpSeconds = 0s
**.autoShutdown = false
*.manager.launchConfig = xmldoc("VACaMobil/Milan/downtown.launch.xml")
# manet routing
**.routingProtocol = ${"AODVUU", "DYMO", "OLSR"}
Here is the car module (TAdhocHost.ned):
package rcdp9;
import inet.base.NotificationBoard;
import inet.networklayer.autorouting.ipv4.HostAutoConfigurator;
import inet.networklayer.common.InterfaceTable;
import inet.mobility.single.TraCIMobility;
import inet.networklayer.ipv4.RoutingTable;
import inet.transport.tcp.TCP;
import inet.transport.udp.UDP;
import inet.nodes.inet.NetworkLayer;
import inet.linklayer.ieee80211.Ieee80211Nic;
import inet.networklayer.IManetRouting;
module TAdhocHost
{
parameters:
#node();
string routingProtocol #enum("AODVUU","DYMOUM","DYMO","DSRUU","OLSR","OLSR_ETX","DSDV_2","Batman") = default("");
gates:
input radioIn #directIn;
submodules:
notificationBoard: NotificationBoard {
parameters:
#display("p=60,160");
}
interfaceTable: InterfaceTable {
parameters:
#display("p=60,240");
}
app1: RCDPClient {
parameters:
#display("p=304,56");
}
app2: RCDPServer {
parameters:
#display("p=210,56");
}
app3: TCPClient {
parameters:
#display("p=378,56");
}
app4: TCPServer {
parameters:
#display("p=147,56");
}
mobility: TraCIMobility {
parameters:
#display("p=60,459");
}
routingTable: RoutingTable {
parameters:
IPForward = true;
routerId = "";
routingFile = "";
#display("p=60,326");
}
udp: UDP {
parameters:
#display("p=304,192");
}
tcp: TCP {
parameters:
#display("p=219,192");
}
networkLayer: NetworkLayer {
parameters:
proxyARP = false;
#display("p=304,327;q=queue");
gates:
ifIn[1];
ifOut[1];
}
manetrouting: <routingProtocol> like IManetRouting if routingProtocol != "" {
#display("p=522,307");
}
wlan: Ieee80211Nic {
parameters:
#display("p=304,461;q=queue");
}
ac_wlan: HostAutoConfigurator {
#display("p=60,401");
}
connections allowunconnected:
udp.appOut++ --> app1.udpIn;
udp.appIn++ <-- app1.udpOut;
udp.appOut++ --> app2.udpIn;
udp.appIn++ <-- app2.udpOut;
udp.ipOut --> networkLayer.transportIn++;
udp.ipIn <-- networkLayer.transportOut++;
tcp.appOut++ --> app3.tcpIn;
tcp.appIn++ <-- app3.tcpOut;
tcp.appOut++ --> app4.tcpIn;
tcp.appIn++ <-- app4.tcpOut;
tcp.ipOut --> networkLayer.transportIn++;
tcp.ipIn <-- networkLayer.transportOut++;
wlan.upperLayerOut --> networkLayer.ifIn[0];
wlan.upperLayerIn <-- networkLayer.ifOut[0];
networkLayer.transportOut++ --> manetrouting.from_ip if routingProtocol != "";
networkLayer.transportIn++ <-- manetrouting.to_ip if routingProtocol != "";
radioIn --> wlan.radioIn;
}
Here is the network file (Cars.ned):
package rcdp9;
import inet.world.VACaMobil.VACaMobil;
import inet.networklayer.autorouting.ipv4.IPv4NetworkConfigurator;
import inet.nodes.inet.AdhocHost;
import inet.world.radio.ChannelControl;
import inet.world.traci.TraCIScenarioManagerLaunchd;
network Cars
{
submodules:
configurator: IPv4NetworkConfigurator {
#display("p=396,221");
}
channelControl: ChannelControl {
#display("p=396,310");
}
manager: VACaMobil {
#display("p=322,405");
}
connections allowunconnected:
}
The problem is that in the omnetpp.ini, OMNeT++ gives the following warning
in lines beginning in ".channelNumber", ".wlan.", ".coche", and ".routingProtocol":
"Warning: Unused entry (does not match any parameters) Does not match any module parameters."
Apparently, OMNeT++ complains because the module TAdhocHost, whose name is "coche",
isn't defined in Cars.ned, but isn't assumed that OMNeT++ automatically recognizes that "coche"
is created by VACaMobil? I am doing something wrong? I would appreciate any help.
In the simplest case (all modules are created via appropriate statements in a simulation's .ned files) the IDE can simply parse all .ned files to know what modules exist.
However, the Veins TraCIScenarioManager directly uses the OMNeT++ C++ API to create additional modules at runtime. Before the simulation is run, the OMNeT++ IDE has no way of knowing that this will happen.
Without understanding what your C++ code does, it cannot know that the module parameters in your .ini file will (not at the start, but at a later point in the simulation) refer to a module that will exist.
There might be ways around this (declaring in a .ned file that a module should not be created automatically, but can be assumed to exist anyway), but I don't recall any that is not a hack.