I installed and configured kibana in my local machine and I am getting event log from 3 different machine.
As log forwarder I am using nxlog which is lightweight so nice to install on production without affecting performance.
One thing I need is NSSM - the Non-Sucking Service Manager from http://nssm.cc/ which is blocked by MacAfee. I need it to install all component as window service.
Can anybody suggest Other alternative to install kibana - logstash as window service ?
Update - I try to user apache common daemon to install service but service failed to start saying error code 5 which I guess Access denied.
I am using following command to install
prunsrv //IS//logstash-shipper --DisplayName="logstash-shipper " --Install="C:\Jitendra\ELK\Apache_Commons_Daemon-1.0.15-windows\prunsrv.exe" --StartMode=exe --StopMode=exe --StartImage="C:\Jitendra\ELK\logstash\logstash-1.5.4\bin\logstash.bat agent -f logstash.conf" --LogPath="C:\Jitendra\ELK\logstash\logstash-1.5.4\bin" --PidFile="C:\Jitendra\ELK\logstash\logstash-1.5.4\bin\shipper.pid" --StopPath="C:\Jitendra\ELK\logstash\logstash-1.5.4\bin" --StopImage="shipper-stop.bat"
Can anyone used this component ?
Try this
"C:\Windows\Microsoft.NET\Framework\v4.0.30319\installutil.exe" "c:\"(path to bat files)
or
Allow exception in MacAfee for NSSM.exe
Related
I started with Grafana to monitor on-premise Linux Servers. I am using the Cloud Portal. On the Grafana Dashboard, I installed the Linux Server Integration using this tutorial -> https://grafana.com/docs/grafana-cloud/quickstart/agent_linuxnode/.
I used the command line on one server to setup the agent:
sudo ARCH=amd64 GCLOUD_STACK_ID="XXXXX" GCLOUD_API_KEY="xxxxx" GCLOUD_API_URL="https://integrations-api-eu-west.grafana.net" /bin/sh -c "$(curl -fsSL https://raw.githubusercontent.com/grafana/agent/release/production/grafanacloud-install.sh)"
sudo systemctl restart grafana-agent.service
It works perfectly with one server. However, when I added a new Remote Linux Server with the same command line, it replaced the previous server in the dashboard and I cannot select the other server. I feel I should not use the same command line, but I cannot find what parameters I should modify.
Did someone face the same issue and found a solution ?
Thank you in advance,
B.
PS: Ideally I would make it work using docker containers on each Linux Server, communicating to the Cloud Portal
Assume sudo systemctl restart grafana-agent.service is restarting a specific server with the execution command in /etc/systemd/system/grafana-agent.service
If you want to have another grafana-agent you need additional service file. For example: grafana-agent-2.service with different configuration.
I am trying to run the DelugeD.exe as a windows service. After installing Deluge and creating the services using NSSM, I try to start the service and get the following error:
Windows could not start the Deluged service on Local Computer. The service did not return an error. This could be and internal Windows error or and internal service error. If the problem persists, contact your system administrator.
I have created the Deluge-web-debug.exe as a Windows Service and it successfully starts. When I browse to http://localhost:8112 the web client appears, however the Connection Manager shows the Deluged daemon has not started.
No error, no logs, what could be the cause?
Thanks!
I thought I would start from scratch, reinstall deluge for windows, and try again. After this it still failed.
Using nssm, the error was:
deluged: Unexpected status SERVICE_PAUSED in response to START control.
This placed the service in a perpetual Paused state.
Finally, I decided to tear down the services using nssm remove, kill any running deluge processes, then delete the Config folder where deluged was pointing.
I am certain deleting the Config folder and all files was what solved the problem, and now it starts successfully.
I think I just solved this one by checking the "Allow service to interact with desktop" box under the LogOn tab for both the Deluge daemon and the WebUI services I created with nssm:
"Allow service to interact with desktop" in services.msc
my group and I are running a server that is based upon Django and uses mod_wsgi to run an Apache server. We will not be working on this project after it is over, so I am attempting to set up cronjob similar functionality to check if the apache server has shut down(system restart or power failure), and if it has, will restart the server for me. I've found documentation on how to check if an apache server is down and restart the server if it is, but our server uses https and thus our start command is pretty verbose.
Can I simply use the functionality provided in these examples:
https://askubuntu.com/questions/277389/cron-job-to-restart-apache
https://www.digitalocean.com/community/tutorials/how-to-use-a-simple-bash-script-to-restart-server-programs
Or do I need a much more complicated process to make this happen?
The command we use to initially start the server is
python manage.py runmodwsgi --host 0.0.0.0 --port 8001 --https-port 8000 --ssl-certificate (certificate Location) --server-name (Domain Name)
I'm pretty new to Linux and using both Mod-wsgi as well as Apache so any help is greatly appreciated.
I suppose it is not good way to resolve this problem.
I recommend you use monit (https://mmonit.com/). It is cool program for checking services.
apt-get install monit
Apache restart configuration directives:
check process httpd with pidfile /var/run/httpd.pid
group apache
start program = "/etc/init.d/httpd start"
stop program = "/etc/init.d/httpd stop"
if failed host 127.0.0.1 port 80
protocol http then restart
if 5 restarts within 5 cycles then timeout
You are better off using the --setup-only option to mod_wsgi-express or the Django integration for it, to generate the configuration but not run it. Then as others have mentioned, integrate it into the system service manager.
The two commands for starting and stopping the Apache/mod_wsgi instance would be apachectl start and apachectl stop, where apachectl is that which was generated when running with the additional --setup-only option.
When running it as a system service, also make sure you use the --server-root option to specify a more persistent location for the generated configuration. Do not use the default under /tmp if running for anything but temporary development sessions as some Linux systems will remove files under /tmp causing things to start failing after a while.
Also, since under a service manager it would generally be starting as root, particularly if listening on port 80 is a requirement, ensure you use the --user and --group options to specify what user/group your Python web application should run as.
Read:
https://pypi.python.org/pypi/mod_wsgi
for more details of the --setup-only option and start-server commands for generating the configuration. Because you are using the Django integration, you will need to use the --setup-only option.
For more informed helped, bring your issue to the mod_wsgi mailing list. The mod_wsgi-express way of running Apache/mod_wsgi is new enough that unlikely that anyone here is really going to know much about it.
There is no need to do this at all. There is no reason to start up Apache manually; once it's installed as a system service, Ubuntu will start it up automatically on restart or crash.
You should reflect on why you feel the need to do this for Apache specifically, and not any of the other system services you depend on, such as the database.
I installed single node cluster in my local dev box which is running Windows 7 and it was working fine. Due to some reason, I need to restart my desktop and then after that whenever I am doing like this on the command prompt, it always gives me the below exception-
S:\Apache Cassandra\apache-cassandra-1.2.3\bin>cassandra -f
Starting Cassandra Server
Error: Exception thrown by the agent : java.rmi.server.ExportException: Port already in use: 7199; nested exception is:
java.net.BindException: Address already in use: JVM_Bind
Meaning port being used somewhere. I have made some changes in cassandra.yaml file so I need to shutdown the Cassandra server and then restart it again.
Can anybody help me with this?
Thanks for the help.
in windows7, with apache cassandra, a pid.txt file gets created at the root folder of cassandra. Give following instruction to stop the server:
d:/cassandra/bin> stop-server -p ../pid.txt -f
Running -f starts the server as a service, you can stop it through the task manager.
It sounds like your Cassandra server starts on it's own as a service in the background when your machine boots. You can configure windows startup services. To run cassandra in the foreground on windows simply use:
> cassandra.bat
If your are using Cassandra bundled with DataStax Community Edition and running as a service on startup of your machine then you can execute following commands to start and stop Cassandra server.
Start command prompt with admin rights
run following commands
net start DataStax_Cassandra_Community_Server
net stop DataStax_Cassandra_Community_Server
I've installed MDEX version 6.2.1 and PlatformServices version 6.1.1. After I've restarted machine I had 2 service: Endeca JCD and EndecaHTTPservice. Problem is with second one as it fails each time I restart my machine or start service manually. Windows Logs System shows me next message: "The Endeca HTTP service service terminated unexpectedly. It has done this 3 time(s)." If somebody has some experience with this help me please! Thanks!
Endeca http service is build on top of the Apache Tomcat, if Tomcat fails to start with whatever reason you should be able to see the corresponding log files under endeca's %ENDECA_ROOT%\workspace\logs folder.
It's possible that the service launcher fails before the tomcat can even start logging anythign, in that case Windows event viewer may have some information.
The JCD in the version 6 is kept only for backward compatibility with v5 installs and shouldn't be used in the brand new v6 and above installations.