1.0 502 Bad Gateway
After the update of Linux on the web server, the website would not open in the browser. Instead the following error was displayed.
502 Bad Gateway
First we check the nginx server.
$ systemctl status nginx
● nginx.service - A high performance web server and a reverse proxy server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2019-03-21 15:16:47 UTC; 16h ago
Main PID: 1354 (nginx)
Tasks: 8 (limit: 1158)
├─1354 nginx: master process /usr/sbin/nginx -g daemon on; master_process on;
└─1355 nginx: worker process
Warning: Journal has been rotated since unit was started.
… Read more
1.0 Datagram sockets
There are two major types of network sockets, viz. Stream sockets (SOCK_STREAM) and Datagram sockets (SOCK_DGRAM). The socket type defines the semantics of communication between this socket and its remote counterpart. Stream sockets provide full-duplex reliable sequenced data streams.… Read more
1.0 Client-server model
Client server model is a software architecture paradigm prevalent in distributed applications. A server has information resources and processes that provide answers to queries and other services to remote clients over the network. Some of the examples of these services are booking an airline ticket and/or a room in a hotel, sending a file to a client, sending a mail message to another person (client), etc.… Read more
systemd is the newer init system used in most Linux distributions since 2015. The first widely used init system was the System V init process, sysvinit. Ubuntu introduced the Upstart init system with Ubuntu 6.10 in 2006. Ubuntu fully migrated to systemd with Ubuntu 15.04 in 2015.… Read more
1. ss command
The ss command gives the socket statistics. It gives information about the network connections. ss is a replacement for the netstat command.
By default, the ss command gives information about non-listening sockets.
Netid State Recv-Q Send-Q Local Address:Port Peer Address:Port
u_str ESTAB 0 0 * 4482 * 4481
u_str ESTAB 0 0 * 4285 * 3631
… Read more