Hi I'm mointoring web page that is run by a Tomcat server running in a docker container. If the app crashes I want to restart the Tomcat server by connecting to the server and issue an ssh script. I'm running my ssh server on port 23. I have set up ssh credentials that BTW works when it comes to monitoring the server. But my script isn't being executed on server and I can't see why. I have tried to run the operation ssh connect to server and what I can see is that it connects on port 22 and not port 23. But I can't see in log files whether the service tries to run ssh script at all. Best, Rune |
Hi Rune - We updated the latest build to log the port being used when SSH connections are being made. Google for "PA Server Monitor Release Candidate" to get to the download page (I would give you the URL but we block them on the forum because of spam). EDIT: Sorry, I forgot to tell you how to find it in the log. Search for: connected to or [port I cannot find the port, but the connection now works! What should I look for in the log?
(20 Mar, 09:47)
run66
|
Hi Rune - Great question. Let's say you have PA Server Monitor installed on server MON and you are trying to monitor server WEB. You would have a Web Page monitor on server WEB checking your page. You'll need to right-click on server WEB and choose Type & Credentials > Set Server Type. There you can indicate SSH can be used with this host and give a port and credentials to use. When the Execute Script action (that is using SSH) runs, it knows it is being called from a monitor on WEB, so it will use WEB's SSH connection information. If you turn on Debug Logging (a check box near the bottom of Settings > System Settings) you'll see something like "SSH final/complete received data" in the service log file at: C:Program FilesPA Server MonitorLogsPA Server Monitor_Service_Log.txt You should also see: SCRIPT_ACT: Action Script finished. and the line will also contain the name of your Execute Script action. Thanks - I did all that already but to no avail. See log below. When I use the ssh monitor I have no issues. What I can't see is what port is used for the connection attempt. See my below "answer" that is actually a question but too long to add as comment.
(14 Mar, 02:35)
run66
|
Hi Doug Thanks - I did all that already but to no avail. See log below. When I use the ssh monitor I have no issues. What I can't see is what port is used for the connection attempt. Best, Rune 03-13-2025, 08:46:50.856, TID:08820, PID:03024, ERROR: SSH Auth Result: Failed to login to WWW.KLE-ONLINE2.DK via SSH as user root Authentication failed (username/password) (err=-18) 03-13-2025, 08:46:50.882, TID:08820, PID:03024, ERROR: GetAuthedSSHSession result: Failed to login to WWW.KLE-ONLINE2.DK via SSH as user root Authentication failed (username/password) (err=-18) 03-13-2025, 08:46:50.898, TID:08820, PID:03024, SCRIPT_ACT: Action Script finished. Stats: RunTime=3760ms, ScriptTime=3759ms, #InProc=1, #StrColl=0, #NotVar=0, #ScrNot=0. E=Failed to login to WWW.KLE-ONLINE2.DK via SSH as user root Authentication failed (username/password) (err=-18), Calling MID 589, name=Action Restart tomcat - docker container (274) |