ETExamTower
Q41Infrastructure and Automation

Users report that they can no longer process transactions through the online ordering application, and the logging dashboard displays these messages. ```text Fri Jan 10 19:37:31.123 EST 2020 [FRONTEND] INFO: Incoming request to add item to cart from user 45834534858 Fri Jan 10 19:37:31.247 EST 2020 [BACKEND] INFO: Attempting to add item to cart Fri Jan 10 19:37:31.250 EST 2020 [BACKEND] ERROR: Failed to add item: MYSQLDB ERROR: Connection refused ``` What is causing the problem shown in these log messages?

← → navigate · a answer
Community votes
A
73% (8)
C
27% (3)
B
0% (0)
D
0% (0)
Discussion · 19
9
A The phrase 'Connection Refused' usually has two main causes: Nothing is listening on the IP:Port you are trying to connect to. The port is blocked by a firewall. Source - https://serverfault.com/questions/725262/what-causes-the-connection-refused-message
4
I'll go with A here. Explanation If you get the error message Can't connect to MySQL server on some_hostname, you can try the following things to find out what the problem is: Check if the server is up by doing telnet your-host-name tcp-ip-port-number and press Enter a couple of times. If there is a MySQL server running on this port you should get a response that includes the version number of the running MySQL server. If you get an error like telnet: Unable to connect to remote host: Connection refused, there is no server running on the given port.
C 4
Selected Answer: C Connection refused suggests that the DB is UP, like a 403 error code, not like the 500 range(A)
3
B. If the system is down you get a request timeout, not 'Connection Refused'
C 3
Selected Answer: C IF THE CONTAINER HAS CRASHED THE ERROR MESSAGE WOULD NOT SAY REFUSED
C 3
Selected Answer: C C Its not A. Connection refused means that the server was able to answer back to you. If you try to open a TCP connection to another host and see the error "Connection refused," it means that You sent a TCP SYN packet to the other host. Then you received a TCP RST packet in reply. RST is a bit on the TCP packet which indicates that the connection should be reset. Usually it means that the other host has received your connection attempt and is actively refusing your TCP connection, but sometimes an intervening firewall may block your TCP SYN packet and send a TCP RST back to you.
A 2
Selected Answer: A A. The database server container has crashed. and C. The backend is not authorized to commit to the database. Are correct answers (and B also can be correct at certain circumstate ) If You troubleshoot Connection refused error - first step check the configuration and credentials But also important - is it works before? Yes it works fine before - "User report that they can no longer able" So question - what happened? And for this perspective A is more preferable. And finally from DevCore study guide 350-901 p 34 : If a log indicated “Connection refused” or “Connection timeout,” quite often Linux admins would blame the network (which could be true), but in reality (or highly likely), some service on a server did not start or some container crashed. Another possible reason could be a server overload.
1
Strange question... the least bad option is A indeed.
1
I agree with A, but I really hate this kind of question
A 1
Selected Answer: A A looks like the right choice.
1
If a container crashes, the system is still up and has no more process which listens on the port, you will get the Connection Refused error. I would go for A
1
It is C. Not A, since MySql will not respond if the container fails. Not B, because this would be a “Too many connections” error Not D, because this would be “Access denied for ..."
A 1
Selected Answer: A A common cause for this error is that the database server is down or not responding, which could be due to a crash or some problem with the database server container.
1
Actually, it's A: https://googlecloudcommunity.com/gc/Databases/ERROR-SQLSTATE-HY000-2002-Connection-refused/m-p/631473#:~:text=This%20can%20be%20caused%20by,access%20to%20the%20database%20server.
A 1
Selected Answer: A A makes more sense, the DB is not accepting connections
1
B Not A because that would be a timeout and not a refusal. Not C because it's the connection that is refused and not the transaction B is caused either by some limit on concurrent tcp connections or a db-level limit.
A 1
Selected Answer: A correct A, the other ones are authorization and timeout errors.
A 1
Selected Answer: A The log message shows an error when the backend attempts to add an item to the cart: MYSQLDB ERROR: Connection refused This means the backend application cannot make a connection to the database server. This error is often caused when the database server (in this case, likely running in its own container) is unavailable or has crashed. So, the correct answer is: A. The database server container has crashed.
A 1
Selected Answer: A Log is coming from the backend. I have seen this issue many times.