Request timeout when pinging aws Linux instance - linux

So i m trying to install a jenkins server on the free instance provided by aws, so I can test things out, problem is that I can connect via ssh using putty to the public ip and my key, but when I try to access the jenkins portal using the public DNS address and the port a timeout is returned
Also if i try to ping the machine from my laptop it returns "Request time out" every time.
Also jenkins server seems to be running and active:
[ec2-user#ip-1235 ~]$ sudo systemctl status jenkins
● jenkins.service - LSB: Jenkins Automation Server
Loaded: loaded (/etc/rc.d/init.d/jenkins; bad; vendor preset: disabled)
Active: active (running) since Mon 2021-11-22 16:14:42 UTC; 7min ago
Docs: man:systemd-sysv-generator(8)
Process: 3693 ExecStart=/etc/rc.d/init.d/jenkins start (code=exited, status=0/SUCCESS)
CGroup: /system.slice/jenkins.service
└─3697 /etc/alternatives/java -Djava.awt.headless=true -DJENKINS_H...
Nov 22 16:14:42 ip-1234.us-east-2.compute.internal systemd[1]: Start...
Nov 22 16:14:42 ip-1234.us-east-2.compute.internal jenkins[3693]: St...
Nov 22 16:14:42 ip-1234.us-east-2.compute.internal systemd[1]: Start...
Hint: Some lines were ellipsized, use -l to show in full.

Related

RabbitMQ server won't start anymore after assigning username/password

I installed a rabbitmq server and it was active and running fine until I entered:
echo "[{loopback_users, []}]}]." > /etc/rabbitmq/rabbitmq.config
I also assigned a username and password and also assigned the user as administrator. I tried to restart the server after that and it wouldn't restart. Checked the status and it was no longer running. Any idea what I did wrong? Still a rookie, any tips would be great.
[root#rmq01 ~]# systemctl status rabbitmq-server.service -l
● rabbitmq-server.service - RabbitMQ broker
Loaded: loaded (/usr/lib/systemd/system/rabbitmq-server.service; enabled; vendor preset: disabled)
Active: activating (auto-restart) (Result: exit-code) since Fri 2022-08-12 05:47:22 UTC; 1s ago
Process: 1807 ExecStop=/usr/sbin/rabbitmqctl shutdown (code=exited, status=0/SUCCESS)
Process: 7026 ExecStart=/usr/sbin/rabbitmq-server (code=exited, status=1/FAILURE)
Main PID: 7026 (code=exited, status=1/FAILURE)
Status: "Standing by"
Aug 12 05:47:22 rmq01 systemd[1]: rabbitmq-server.service: main process exited, code=exited, status=1/FAILURE
Aug 12 05:47:22 rmq01 systemd[1]: Failed to start RabbitMQ broker.
Aug 12 05:47:22 rmq01 systemd[1]: Unit rabbitmq-server.service entered failed state.
Aug 12 05:47:22 rmq01 systemd[1]: rabbitmq-server.service failed.
I'm sure the answer is right in front of me but I can't seem to pin point it.
please use the new format file config:
https://github.com/rabbitmq/rabbitmq-server/blob/v3.8.x/deps/rabbit/docs/rabbitmq.conf.example
## Related doc guide: https://rabbitmq.com/access-control.html.
## The default "guest" user is only permitted to access the server
## via a loopback interface (e.g. localhost).
## {loopback_users, [<<"guest">>]},
##
# loopback_users.guest = true

SSH File Transfer from Mint to RPi works not bidirectional

I am new to Linux and RPi. I want to transfer a file from my Pi to my PC.
With ...
scp hello pi#192.168.1.101:/home/pi
.. I am able to transfer my file "hell" to my Pi.
But when I try to send the file "elle" with ...
scp elle mirco#192.168.1.104:/home/mirco
i get
ssh: connect to host 192.168.1.104 port 22: Connection timed out lost connection
I read the ssh service status from the pi and my Computer:
Pi:
● ssh.service - OpenBSD Secure Shell server
Loaded: loaded (/lib/systemd/system/ssh.service; disabled; vendor preset: enabled)
Active: active (running) since Wed 2020-04-08 14:38:18 CEST; 6s ago
Docs: man:sshd(8)
man:sshd_config(5)
Process: 14004 ExecStartPre=/usr/sbin/sshd -t (code=exited, status=0/SUCCESS)
Main PID: 14006 (sshd)
Tasks: 1 (limit: 4915)
Memory: 804.0K
CGroup: /system.slice/ssh.service
└─14006 /usr/sbin/sshd -D
Apr 08 14:38:18 raspberrypi systemd[1]: Starting OpenBSD Secure Shell server...
Apr 08 14:38:18 raspberrypi sshd[14006]: Server listening on 0.0.0.0 port 22.
Apr 08 14:38:18 raspberrypi sshd[14006]: Server listening on :: port 22.
Apr 08 14:38:18 raspberrypi systemd[1]: Started OpenBSD Secure Shell server.
My Computer:
● ssh.service - OpenBSD Secure Shell server
Loaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2020-04-08 14:52:26 CEST; 6min ago
Process: 9224 ExecReload=/bin/kill -HUP $MAINPID (code=exited, status=0/SUCCESS)
Process: 9216 ExecReload=/usr/sbin/sshd -t (code=exited, status=0/SUCCESS)
Process: 8934 ExecStartPre=/usr/sbin/sshd -t (code=exited, status=0/SUCCESS)
Main PID: 8935 (sshd)
Tasks: 1 (limit: 4578)
CGroup: /system.slice/ssh.service
└─8935 /usr/sbin/sshd -D
Apr 08 14:52:26 ComputerMirco systemd[1]: Stopping OpenBSD Secure Shell server...
Apr 08 14:52:26 ComputerMirco systemd[1]: Stopped OpenBSD Secure Shell server.
Apr 08 14:52:26 ComputerMirco sshd[8935]: Server listening on 0.0.0.0 port 22.
Apr 08 14:52:26 ComputerMirco systemd[1]: Starting OpenBSD Secure Shell server...
Apr 08 14:52:26 ComputerMirco systemd[1]: Started OpenBSD Secure Shell server.
Apr 08 14:58:12 ComputerMirco systemd[1]: Reloading OpenBSD Secure Shell server.
Apr 08 14:58:12 ComputerMirco sshd[8935]: Received SIGHUP; restarting.
Apr 08 14:58:12 ComputerMirco sshd[8935]: Server listening on 0.0.0.0 port 22.
Can someone help me?
Thank you!
Mirco
Am I correct in thinking you're running the second SCP command on your Pi? If so, your Pi isn't authorized to connect to your PC. You can add it's public key to your authorized_keys file and your Pi will be able to connect to your PC.
You could also pull the file in from your Pi. This is safer because you don't really want your Pi to be able to connect to your PC.
SCP copy to host example
scp pi#192.168.1.101:/home/pi/elle /home/mirco
My guess is that your PC doesn't have ssh enabled.
Install openssh-server on your PC using
sudo apt install openssh-server
After installing this, a system service called ssh should have become active.
You can test this using
sudo systemctl status ssh
Your output should look something like this
● ssh.service - OpenBSD Secure Shell server
Loaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2020-04-08 10:05:07 IST; 13h ago
If it doesn't show active(running), try executing
sudo systemctl enable ssh
If you still are not able to ssh, enable the ssh port through your firewall.
In Ubuntu this can be done by
sudo ufw allow ssh

Not able to reload Nginx

$ systemctl status nginx.service
● nginx.service - A high performance web server and a reverse proxy server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
Drop-In: /etc/systemd/system/nginx.service.d
└─override.conf
Active: active (running) since Wed 2020-01-22 15:34:55 IST; 18min ago
Process: 51312 ExecStop=/sbin/start-stop-daemon --quiet --stop --retry QUIT/5 --pidfile /run/nginx.pid (code=exited, status=0/SUCCESS)
Process: 51324 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
Jan 22 15:34:55 beta-app2 systemd[1]: Starting A high performance web server and a reverse proxy server...
Jan 22 15:34:55 beta-app2 systemd[1]: Started A high performance web server and a reverse proxy server.
Jan 22 15:48:48 beta-app2 systemd[1]: Reloading A high performance web server and a reverse proxy server.
Jan 22 15:50:18 beta-app2 systemd[1]: nginx.service: Reload operation timed out. Killing reload process.
Jan 22 15:50:18 beta-app2 systemd[1]: Reload failed for A high performance web server and a reverse proxy server.
Please find the logs we are not able to reload Nginx. As we checked the file with the command "sudo nginx -t" and getting successful logs.But still we are getting this error. Please assist me to fix this.

httpd/apachectl service fails to start on RHEL 7

I'm having some trouble launching my Apache server from RHEL 7 (Amazon ec2). My larger goal is to host a Flask application from the ec2 instance using an Anaconda environment, but right now I'm just concerned with getting the httpd service started properly.
I've found a number of similar questions posted here, here, here, etc., but none seem to address the exact problem I'm experiencing.
I'm following this tutorial down to the last > character, but the commands
sudo apachectl restart
and
sudo service httpd restart
both result in errors and direct me to examine systemctl status httpd.service for more information. The output of that file is as follows:
httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Fri 2018-04-06 21:00:42 UTC; 4s ago
Docs: man:httpd(8)
man:apachectl(8)
Process: 32166 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE)
Process: 32165 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=0/SUCCESS)
Main PID: 32165 (code=exited, status=0/SUCCESS)
[long ec2 ip address] systemd[1]: Starting The Apache HTTP Server...
[long ec2 ip address] httpd[32165]: httpd (pid 28220) already running
[long ec2 ip address] kill[32166]: kill: cannot find process ""
[long ec2 ip address] systemd[1]: httpd.service: control process exited, code=exited status=1
[long ec2 ip address] systemd[1]: Failed to start The Apache HTTP Server.
[long ec2 ip address] systemd[1]: Unit httpd.service entered failed state.
[long ec2 ip address] systemd[1]: httpd.service failed.
The output of journalctl -xe returns the same.
Some information about my system (don't know whether or not any of this will be helpful, but I figured it would be best to include it):
Apache Version: Apache/2.4.6 (Red Hat Enterprise Linux) configured
$ /usr/bin/python -V
Python 2.7.5
$ sudo yum install mod_wsgi
Package mod_wsgi-3.4-12.el7_0.x86_64 already installed and latest version
$ service httpd configtest
Syntax OK
$ sudo chkconfig --levels 235 httpd on
Note: Forwarding request to 'systemctl enable httpd.service'
The command sudo netstat -lnp | grep :80 returns tcp 0 0 :::0 :::* LISTEN 28220/httpd
I am now noticing that the file /etc/init.d/httpd does not exist.
Anybody have a hint? If this question has been asked before, please direct me to it. I've searched all over, with no luck thus far.
Cheers.
Try killing the old pid. Looks like something is still running under httpd. Try doing a ps -ef | grep httpd to see what is running and kill it using sudo kill -9 processid (e.g. sudo kill -9 13254).

cant connect to Datastax OpsCenter after brand new install

Can anyone help, I did a fresh install of Datastax OpsCenter/Lifecylce Manager, installed via apg-get on clean Ubuntu VMs. But, I can not connect via browser, "site not found", on port 8888.
ps returns a running process and Status seems started. Any ideas?
root#unigmadevdse1:/var/log/opscenter# ps -ef | grep opscenter root
19381 1890 0 20:49 pts/0 00:00:00 grep --color=auto opscenter
root#unigmadevdse1:/var/log/opscenter# service opscenterd status ●
opscenterd.service - LSB: Cassandra cluster manager Loaded: loaded
(/etc/init.d/opscenterd; bad; vendor preset: enabled) Active:
active (exited) since Tue 2017-03-07 20:39:54 UTC; 9min ago
Docs: man:systemd-sysv-generator(8) Process: 18848 ExecStart=/etc/init.d/opscenterd start (code=exited, status=0/SUCCESS)
Mar 07 20:39:53 unigmadevdse1.unigmagroup.com systemd[1]: Starting
LSB: Cassandra cluster manager...
Mar 07 20:39:54 unigmadevdse1.unigmagroup.com systemd[1]: Started LSB: >Cassandra cluster manager.
Have a look in the opscenter.log file for any error messages [if you are not sure, run a find / -iname opscenter.log
or try a service opscenter start -f [will output to screen]

Resources