Running LS in two user sessions of the same server

Hi everybody,

I'm trying to run LS in two user sessions of the same server.
No problem to run the first LS instance in the first session.
No problem to run the first AND second LS instances in the first session.
But impossible to run the first LS instance in the first session AND the second instance LS in the second session.
We do not use the same Config file or the same logs or data directory for each instance.
What's wrong?

Here is how i try to launch my second LS instance in the second user session :
bin\logstash.bat --path.config C:/logstash-6.2.1/CheckJobs/CheckJobs.conf --path.logs C:/CheckJobs/logs --path.data C:/CheckJobs/data --pipeline.id two --node.name TEST002

And here is the result shown in the Cmd.exe terminal :
C:\logstash-6.2.1>bin\logstash.bat --path.config C:/logstash-6.2.1/CheckJobs/CheckJobs.conf --path.logs C:/CheckJobs/logs --path.data C:/CheckJobs/data --pipeline.id two --node.name TEST002
Sending Logstash's logs to C:/CheckJobs/logs which is now configured via log4j2.properties
[2018-03-16T14:31:13,679][INFO ][logstash.modules.scaffold] Initializing module {:module_name=>"fb_apache", :directory=>"C:/logstash-6.2.1/modules/fb_apache/configuration"}
[2018-03-16T14:31:13,710][INFO ][logstash.modules.scaffold] Initializing module {:module_name=>"netflow", :directory=>"C:/logstash-6.2.1/modules/netflow/configuration"}
[2018-03-16T14:31:16,382][INFO ][logstash.modules.scaffold] Initializing module {:module_name=>"arcsight", :directory=>"C:/logstash-6.2.1/vendor/bundle/jruby/2.3.0/gems/x-pack-6.2.1-java/modules/arcsight/configuration"}
[2018-03-16T14:31:16,882][WARN ][logstash.config.source.multilocal] Ignoring the 'pipelines.yml' file because modules or command line options are specified
[2018-03-16T14:31:18,742][INFO ][logstash.runner ] Starting Logstash {"logstash.version"=>"6.2.1"}
[2018-03-16T14:31:19,476][INFO ][logstash.agent ] Successfully started Logstash API endpoint {:port=>9601}
[2018-03-16T14:31:23,085][WARN ][logstash.outputs.elasticsearch] You are using a deprecated config setting "document_type" set in elasticsearch. Deprecated settings will continue to work, but are scheduled for removal from logstash in the future. Document types are being deprecated in Elasticsearch 6.0, and removed entirely in 7.0. You should avoid this feature If you have any questions about this, please visit the #logstash channel on freenode irc. {:name=>"document_type", :plugin=><LogStash::Outputs::ElasticSearch hosts=>[https://AGORA-KCE01.agora.france:9200/], bulk_path=>"/_xpack/monitoring/_bulk?system_id=logstash&system_api_version=2&interval=1s", manage_template=>false, document_type=>"%{[@metadata][document_type]}", sniffing=>false, user=>"logstash_system", password=>, ssl=>true, cacert=>"C:\logstash-6.2.1\config\certs\agora_ca.crt", id=>"6e5eb7cc0c5e9bbbf44268947f9b2ee2e7d58934971ccbbcca789b71d3feaf5e", enable_metric=>true, codec=><LogStash::Codecs::Plain id=>"plain_b32aec4a-586e-44c7-a51f-7cef80189c80", enable_metric=>true, charset=>"UTF-8">, workers=>1, template_name=>"logstash", template_overwrite=>false, doc_as_upsert=>false, script_type=>"inline", script_lang=>"painless", script_var_name=>"event", scripted_upsert=>false, retry_initial_interval=>2, retry_max_interval=>64, retry_on_conflict=>1, action=>"index", ssl_certificate_verification=>true, sniffing_delay=>5, timeout=>60, pool_max=>1000, pool_max_per_route=>100, resurrect_delay=>5, validate_after_inactivity=>10000, http_compression=>false>}
[2018-03-16T14:31:23,288][INFO ][logstash.pipeline ] Starting pipeline {:pipeline_id=>".monitoring-logstash", "pipeline.workers"=>1, "pipeline.batch.size"=>2, "pipeline.batch.delay"=>50}
[2018-03-16T14:31:24,273][INFO ][logstash.outputs.elasticsearch] Elasticsearch pool URLs updated {:changes=>{:removed=>[], :added=>[https://logstash_system:xxxxxx@AGORA-KCE01.agora.france:9200/]}}
[2018-03-16T14:31:24,335][INFO ][logstash.outputs.elasticsearch] Running health check to see if an Elasticsearch connection is working {:healthcheck_url=>https://logstash_system:xxxxxx@AGORA-KCE01.agora.france:9200/, :path=>"/"}
[2018-03-16T14:31:24,992][WARN ][logstash.outputs.elasticsearch] Restored connection to ES instance {:url=>"https://logstash_system:xxxxxx@AGORA-KCE01.agora.france:9200/"}
[2018-03-16T14:31:25,179][INFO ][logstash.outputs.elasticsearch] ES Output version determined {:es_version=>nil}
[2018-03-16T14:31:25,195][WARN ][logstash.outputs.elasticsearch] Detected a 6.x and above cluster: the type event field won't be used to determine the document _type {:es_version=>6}
[2018-03-16T14:31:25,257][INFO ][logstash.outputs.elasticsearch] New Elasticsearch output {:class=>"LogStash::Outputs::ElasticSearch", :hosts=>["https://AGORA-KCE01.agora.france:9200/"]}
[2018-03-16T14:31:25,492][INFO ][logstash.licensechecker.licensereader] Elasticsearch pool URLs updated {:changes=>{:removed=>[], :added=>[https://logstash_system:xxxxxx@AGORA-KCE01.agora.france:9200/]}}
[2018-03-16T14:31:25,492][INFO ][logstash.licensechecker.licensereader] Running health check to see if an Elasticsearch connection is working {:healthcheck_url=>https://logstash_system:xxxxxx@AGORA-KCE01.agora.france:9200/, :path=>"/"}
[2018-03-16T14:31:25,554][WARN ][logstash.licensechecker.licensereader] Restored connection to ES instance {:url=>"https://logstash_system:xxxxxx@AGORA-KCE01.agora.france:9200/"}
[2018-03-16T14:31:25,570][INFO ][logstash.licensechecker.licensereader] ES Output version determined {:es_version=>nil}
[2018-03-16T14:31:25,570][WARN ][logstash.licensechecker.licensereader] Detected a 6.x and above cluster: the type event field won't be used to determine the document _type {:es_version=>6}
[2018-03-16T14:31:25,867][INFO ][logstash.pipeline ] Pipeline started succesfully {:pipeline_id=>".monitoring-logstash", :thread=>"#<Thread:0x217dbb87 run>"}
[2018-03-16T14:31:26,070][INFO ][logstash.agent ] Pipelines running {:count=>1, :pipelines=>[".monitoring-logstash"]}
[2018-03-16T14:31:26,101][INFO ][logstash.inputs.metrics ] Monitoring License OK
[2018-03-16T14:31:28,295][INFO ][logstash.pipeline ] Pipeline has terminated {:pipeline_id=>".monitoring-logstash", :thread=>"#<Thread:0x217dbb87 run>"}

Could you help me?

Best regards,
Loïc --

logstash will exit when the only pipeline running is the monitoring pipeline. It looks like your configuration did not start a pipeline. What does the config look like?

Hi Badger,

Thank you for your fast answer.

Here is my .conf file (very basic, for testing) :

input
{
tcp
{
port => 7002
}
}

output {
stdout {
codec => rubydebug
}
}

And here is my .yml file (only the node.name is different form the .yml of the first LS instance) :

http.host: AGORA-LST01.agora.france
node.name: AGORALST01_Two
xpack.monitoring.elasticsearch.url: "https://AGORA-KCE01.agora.france:9200/"
xpack.monitoring.elasticsearch.username: "logstash_system"
xpack.monitoring.elasticsearch.password: "*******"
xpack.monitoring.elasticsearch.ssl.ca: C:\logstash-6.2.1\config\certs\agora_ca.crt

Loïc --

I would expect you to also get

[INFO ] 2018-03-16 10:03:52.965 [Ruby-0-Thread-1: /usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/stud-0.0.23/lib/stud/task.rb:22] pipeline - Starting pipeline {:pipeline_id=>"two", "pipeline.workers"=>2, "pipeline.batch.size"=>125, "pipeline.batch.delay"=>50}
[INFO ] 2018-03-16 10:03:53.006 [[two]-pipeline-manager] tcp - Starting tcp input listener {:address=>"0.0.0.0:7002", :ssl_enable=>"false"}
[INFO ] 2018-03-16 10:03:53.185 [Ruby-0-Thread-1: /usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/stud-0.0.23/lib/stud/task.rb:22] pipeline - Pipeline started succesfully {:pipeline_id=>"two", :thread=>"#"}
[INFO ] 2018-03-16 10:03:53.196 [Ruby-0-Thread-1: /usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/stud-0.0.23/lib/stud/task.rb:22] agent - Pipelines running {:count=>2, :pipelines=>[".monitoring-logstash", "two"]}

I do not know what is happening. Is the second session running under the same user?

I don't understand what to do.
We launch the LS instance in administrator mode on the two sessions.

Here is some informations (in my 2nd user session) if that can help you.

[2018-03-16T14:29:14,236][DEBUG][logstash.runner ] -------- Logstash Settings (* means modified) ---------
[2018-03-16T14:29:14,236][DEBUG][logstash.runner ] *node.name: "TEST002" (default: "AGORA-LST01")
[2018-03-16T14:29:14,236][DEBUG][logstash.runner ] *path.config: "C:/logstash-6.2.1/CheckJobs/CheckJobs.conf"
[2018-03-16T14:29:14,236][DEBUG][logstash.runner ] *path.data: "C:/CheckJobs/data" (default: "C:/logstash-6.2.1/data")
[2018-03-16T14:29:14,236][DEBUG][logstash.runner ] modules.cli:
[2018-03-16T14:29:14,236][DEBUG][logstash.runner ] modules:
[2018-03-16T14:29:14,236][DEBUG][logstash.runner ] modules_setup: false
[2018-03-16T14:29:14,236][DEBUG][logstash.runner ] *config.test_and_exit: true (default: false)
[2018-03-16T14:29:14,236][DEBUG][logstash.runner ] config.reload.automatic: false
[2018-03-16T14:29:14,236][DEBUG][logstash.runner ] config.reload.interval: 3000000000
[2018-03-16T14:29:14,236][DEBUG][logstash.runner ] config.support_escapes: false
[2018-03-16T14:29:14,236][DEBUG][logstash.runner ] metric.collect: true
[2018-03-16T14:29:14,236][DEBUG][logstash.runner ] *pipeline.id: "two" (default: "main")
[2018-03-16T14:29:14,236][DEBUG][logstash.runner ] pipeline.system: false
[2018-03-16T14:29:14,236][DEBUG][logstash.runner ] pipeline.workers: 8
[2018-03-16T14:29:14,236][DEBUG][logstash.runner ] pipeline.output.workers: 1
[2018-03-16T14:29:14,236][DEBUG][logstash.runner ] pipeline.batch.size: 125
[2018-03-16T14:29:14,236][DEBUG][logstash.runner ] pipeline.batch.delay: 50
[2018-03-16T14:29:14,236][DEBUG][logstash.runner ] pipeline.unsafe_shutdown: false
[2018-03-16T14:29:14,251][DEBUG][logstash.runner ] pipeline.java_execution: false
[2018-03-16T14:29:14,251][DEBUG][logstash.runner ] pipeline.reloadable: true
[2018-03-16T14:29:14,251][DEBUG][logstash.runner ] path.plugins:
[2018-03-16T14:29:14,251][DEBUG][logstash.runner ] config.debug: false
[2018-03-16T14:29:14,267][DEBUG][logstash.runner ] *log.level: "trace" (default: "info")
[2018-03-16T14:29:14,267][DEBUG][logstash.runner ] version: false
[2018-03-16T14:29:14,267][DEBUG][logstash.runner ] help: false
[2018-03-16T14:29:14,267][DEBUG][logstash.runner ] log.format: "plain"
[2018-03-16T14:29:14,267][DEBUG][logstash.runner ] *http.host: "AGORA-LST01.agora.france" (default: "127.0.0.1")
[2018-03-16T14:29:14,267][DEBUG][logstash.runner ] http.port: 9600..9700
[2018-03-16T14:29:14,267][DEBUG][logstash.runner ] http.environment: "production"
[2018-03-16T14:29:14,267][DEBUG][logstash.runner ] queue.type: "memory"
[2018-03-16T14:29:14,267][DEBUG][logstash.runner ] queue.drain: false
[2018-03-16T14:29:14,267][DEBUG][logstash.runner ] queue.page_capacity: 67108864
[2018-03-16T14:29:14,267][DEBUG][logstash.runner ] queue.max_bytes: 1073741824
[2018-03-16T14:29:14,267][DEBUG][logstash.runner ] queue.max_events: 0
[2018-03-16T14:29:14,267][DEBUG][logstash.runner ] queue.checkpoint.acks: 1024
[2018-03-16T14:29:14,267][DEBUG][logstash.runner ] queue.checkpoint.writes: 1024
[2018-03-16T14:29:14,267][DEBUG][logstash.runner ] queue.checkpoint.interval: 1000
[2018-03-16T14:29:14,267][DEBUG][logstash.runner ] dead_letter_queue.enable: false
[2018-03-16T14:29:14,267][DEBUG][logstash.runner ] dead_letter_queue.max_bytes: 1073741824
[2018-03-16T14:29:14,283][DEBUG][logstash.runner ] slowlog.threshold.warn: -1
[2018-03-16T14:29:14,298][DEBUG][logstash.runner ] slowlog.threshold.info: -1
[2018-03-16T14:29:14,298][DEBUG][logstash.runner ] slowlog.threshold.debug: -1
[2018-03-16T14:29:14,298][DEBUG][logstash.runner ] slowlog.threshold.trace: -1
[2018-03-16T14:29:14,298][DEBUG][logstash.runner ] keystore.classname: "org.logstash.secret.store.backend.JavaKeyStore"
[2018-03-16T14:29:14,298][DEBUG][logstash.runner ] keystore.file: "C:/logstash-6.2.1/config/logstash.keystore"
[2018-03-16T14:29:14,298][DEBUG][logstash.runner ] *path.queue: "C:/CheckJobs/data/queue" (default: "C:/logstash-6.2.1/data/queue")
[2018-03-16T14:29:14,298][DEBUG][logstash.runner ] *path.dead_letter_queue: "C:/CheckJobs/data/dead_letter_queue" (default: "C:/logstash-6.2.1/data/dead_letter_queue")
[2018-03-16T14:29:14,298][DEBUG][logstash.runner ] path.settings: "C:/logstash-6.2.1/config"
[2018-03-16T14:29:14,298][DEBUG][logstash.runner ] *path.logs: "C:/CheckJobs/logs" (default: "C:/logstash-6.2.1/logs")
[2018-03-16T14:29:14,298][DEBUG][logstash.runner ] xpack.monitoring.enabled: true
[2018-03-16T14:29:14,298][DEBUG][logstash.runner ] *xpack.monitoring.elasticsearch.url: ["https://AGORA-KCE01.agora.france:9200/"] (default: ["http://localhost:9200"])
[2018-03-16T14:29:14,314][DEBUG][logstash.runner ] xpack.monitoring.collection.interval: 10000000000
[2018-03-16T14:29:14,408][DEBUG][logstash.runner ] xpack.monitoring.collection.timeout_interval: 600000000000

[2018-03-16T14:29:14,408][DEBUG][logstash.runner ] xpack.monitoring.elasticsearch.username: "logstash_system"
[2018-03-16T14:29:14,408][DEBUG][logstash.runner ] *xpack.monitoring.elasticsearch.password: "Agora01"
[2018-03-16T14:29:14,423][DEBUG][logstash.runner ] *xpack.monitoring.elasticsearch.ssl.ca: "C:\logstash-6.2.1\config\certs\agora_ca.crt"
[2018-03-16T14:29:14,423][DEBUG][logstash.runner ] xpack.monitoring.elasticsearch.ssl.verification_mode: "certificate"
[2018-03-16T14:29:14,423][DEBUG][logstash.runner ] xpack.monitoring.elasticsearch.sniffing: false
[2018-03-16T14:29:14,423][DEBUG][logstash.runner ] xpack.monitoring.collection.pipeline.details.enabled: true
[2018-03-16T14:29:14,423][DEBUG][logstash.runner ] xpack.monitoring.collection.config.enabled: true
[2018-03-16T14:29:14,423][DEBUG][logstash.runner ] node.uuid: ""
[2018-03-16T14:29:14,423][DEBUG][logstash.runner ] xpack.management.enabled: false
[2018-03-16T14:29:14,423][DEBUG][logstash.runner ] xpack.management.logstash.poll_interval: 5000000000
[2018-03-16T14:29:14,423][DEBUG][logstash.runner ] xpack.management.pipeline.id: ["main"]
[2018-03-16T14:29:14,423][DEBUG][logstash.runner ] xpack.management.elasticsearch.username: "logstash_system"
[2018-03-16T14:29:14,423][DEBUG][logstash.runner ] xpack.management.elasticsearch.url: ["https://localhost:9200"]
[2018-03-16T14:29:14,423][DEBUG][logstash.runner ] xpack.management.elasticsearch.sniffing: false
[2018-03-16T14:29:14,423][DEBUG][logstash.runner ] --------------- Logstash Settings -------------------

Loïc --

The things which change between the two configurations (one for each of the LS instance) :

  • Node.name
  • Pipeline.id

Loïc --

Somehow you are passing -t or --test_and_exit to logstash. I would triple-check your command line.

Hi,

I'm sorry i really don't understand what you want me to do in this case.
Indeed, i've passed --test_and_exit to logstash, but it was only to show you all the details (in DEBUG mode).
In the beggining of this topic, i've shown you the result without this paramater.
Is it a pipeline problem?

Loïc --

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.