NGINX Troubleshoot Free Sample Questions

Description

Covers stopping, starting, and reloading the NGINX binary, and troubleshooting common basic use cases along with TLS security settings within an NGINX deployment environment.

12 free sample questions150 in the full practice test

Try simulator

F5N4 Sample Questions

  1. Question 1

    Beginner

    Demonstrate how to stop, start, and reload NGINX binary · Describe how to send signals to the NGINX process

    An administrator needs to perform maintenance on an NGINX server and must shut down the service. However, they want to ensure that all currently active connections are fully processed before the worker processes terminate. Which command should the administrator use?

    Answer and explanation

    Correct answer: D

    The 'nginx -s quit' command sends a QUIT signal to the NGINX master process, which initiates a graceful shutdown. The master process instructs the worker processes to stop accepting new connections, finish servicing current requests, and then exit. The 'nginx -s stop' command sends a TERM signal, which causes a fast (immediate) shutdown, dropping active connections. 'nginx -s reload' is for configuration changes, not shutting down.

  2. Question 2

    Intermediate

    Demonstrate how to stop, start, and reload NGINX binary · Describe the difference between a reload and a stop/start

    A DevOps engineer has updated the nginx.conf file to add a new upstream server block. They need to apply the changes without dropping any of the thousands of active client connections currently being handled by the server. What is the most appropriate action?

    Answer and explanation

    Correct answer: D

    A reload ('nginx -s reload' or sending a HUP signal) is the correct procedure for applying configuration changes without downtime. The master process verifies the syntax, applies the new config, starts new worker processes, and sends a message to the old worker processes requesting them to shut down gracefully (draining existing connections). A full restart will drop active connections.

  3. Question 3

    Advanced

    Demonstrate how to stop, start, and reload NGINX binary · Describe how to test a new configuration before applying it

    A systems administrator is troubleshooting a complex NGINX configuration that includes dozens of separate files via the include directive. The administrator wants to dump the entire parsed configuration to standard output to verify exactly how NGINX is interpreting the combined files. Which command achieves this?

    Answer and explanation

    Correct answer: A

    The 'nginx -T' (capital T) command tests the configuration file and dumps the entire parsed configuration to standard output. This is extremely useful when troubleshooting complex setups with multiple 'include' directives, as it shows exactly what NGINX sees after merging all files. 'nginx -t' only tests the syntax and reports success or failure without dumping the config.

  4. Question 4

    IntermediateMultiple answers

    Demonstrate how to stop, start, and reload NGINX binary · Describe how to send signals to the NGINX process

    You are writing a custom bash script to manage NGINX via POSIX signals directly, without using the nginx -s wrapper. Which TWO signals will trigger a graceful stop and a configuration reload, respectively? (Select TWO)

    Answer and explanation

    Correct answers: A, D

    Sending a HUP signal to the NGINX master process triggers a configuration reload (equivalent to 'nginx -s reload').

    Sending a QUIT signal to the NGINX master process initiates a graceful shutdown (equivalent to 'nginx -s quit').

  5. Question 5

    Beginner

    Demonstrate how to stop, start, and reload NGINX binary · Describe the difference between a reload and a stop/start

    True or False: Executing nginx -s reload immediately terminates all active worker processes and drops in-flight client connections in order to quickly apply the new configuration.

    Answer and explanation

    Correct answer: B

    False. A reload is specifically designed to be graceful. The master process starts new worker processes with the new configuration and sends a message to the old worker processes to shut down gracefully. The old workers stop accepting new connections but will continue to service their existing in-flight connections until they are completed.

  6. Question 6

    Advanced

    Demonstrate how to stop, start, and reload NGINX binary · Describe how to send signals to the NGINX process

    A Senior Linux Engineer is managing a critical NGINX edge proxy. During a routine audit, an automated script mistakenly executed kill -9 against the NGINX master process PID.

    The master process is now dead, but the NGINX worker processes are still running and actively handling client traffic. The engineer needs to recover the environment so that a new master process can be started with the current configuration, without dropping the traffic currently being handled by the orphaned worker processes.

    Which sequence of actions represents the most appropriate troubleshooting step to resolve this specific state?

    Answer and explanation

    Correct answer: B

    If the master process is killed ungracefully (SIGKILL/-9), the worker processes become orphaned but continue to run and serve traffic. A new master process cannot adopt them, and 'nginx -s' commands will fail because the PID file points to a dead master. The correct recovery is to manually send SIGQUIT to the worker processes (allowing them to finish in-flight requests gracefully) and then start the NGINX service normally.

Register free for 6 more questions

Or unlock all 150 F5N4 questions with explanations, timed mode and flashcards.