1. Logs are not splunk despite splunk showing as running:
2. Looking at the PID 13223, there is nothing specific to splunk running at this PID.
3. For some reasons, splunk PID remained hanged, so manually remove pid file from under "/opt/splunkforwarder/var/run/splunk" and start splunk.
4. This time everything fine and log files are splunked.
Saturday, August 20, 2016
Saturday, July 9, 2016
Solve java.net.BindException: Address already in use error messages
Ssh into the instance and check the port that is causing issues:
netstat -pan | grep ":4503 "
You should get exact pid of the process and status:
In this case the program is still busy in CLOSE_WAIT.
CLOSE_WAIT means your program is still running, and has not closed the socket.
You can get the java pid number and kill the program to clear the socket.
netstat -pan | grep ":4503 "
You should get exact pid of the process and status:
In this case the program is still busy in CLOSE_WAIT.
CLOSE_WAIT means your program is still running, and has not closed the socket.
You can get the java pid number and kill the program to clear the socket.
Friday, July 8, 2016
Linux RedHat 6.5 - Add Welcome Message when SSH log in
Message of the Day - Edit the below file and add your message here.
vi /etc/motd
If Not working you can check that under sshd_config PrintMotd is set to yes
cat /etc/ssh/sshd_config | grep Print
PrintMotd yes
Next time you login to the instance, you get the defined welcome message:
vi /etc/motd
If Not working you can check that under sshd_config PrintMotd is set to yes
cat /etc/ssh/sshd_config | grep Print
PrintMotd yes
Next time you login to the instance, you get the defined welcome message:
Wednesday, July 29, 2015
SSH Connect Script without prompting for password and automatically sudo su
#!/usr/bin/expect -f
spawn ssh user@hostname
expect "assword:"
send "mypassword"
send "sudo su -\r"
interact
Add read, write and execute permissions for the owner user in Linux
chmod 700 file.sh
Wednesday, June 3, 2015
Upload files to Amazon EC2 Linux instance
scp -i myAmazonKey.pem file.zip ec2-user@mec2-50-17-16-67.compute-1.amazonaws.com:~/.
Subscribe to:
Posts (Atom)