Log File Locked
Posted 29 June 2010 - 03:30 PM
Posted 30 June 2010 - 05:15 AM
I'm under the impression that you're using SSH on Windows. Is that correct? There could be several reasons for this:
-- If you're trying to access the log file through SFTP (ie, through the SSH server) be sure to select 'Via SFTP' in 'Log Settings' and not 'Local Path'.
-- Ensure that the SSH user credentials that you're using has sufficient privileges to access the log file.
-- If MONyog is running on a Windows system and the log file also is on a remote Windows system, I suggest you read FAQ #31 in MONyog's help doc (I'll paste the contents of the FAQ at the end).
To answer your question, MONyog opens the log file in read-only mode; never in write or read/write mode.
FAQ #31. MONyog cannot identify if destination of the log file is on a "Mapped Network Drive". Why?
A: By default MONyog service runs under Local System Account. If you are having Slow query or General query log in a Mapped Network Drive, MONyog will not be able to reach it. If MONyog has to access the file present in a Mapped Network Drive, you have to convert the path into shared path (accessed with UNC notation: \\system\share) and then follow these steps:
- Click on Start menu, then click on run and then type,
- After this 'Services' window pops up with list of all services running in your system.
- Search for MONyog and then right click --> Properties.
- Click on "Log On" tab and then you can see that MONyog is using "Local System Account".
- You need to use "This account" option and then give the credentials that you use to log on to the system with "Administrative" privilege.
- Save the settings, restart MONyog service.
NOTE: The shared path should be accessed with UNC notation (\\system\share). MONyog cannot identify if destination of the log file is on a Mapped Network Drive (this is a restriction with services on Windows and not with MONyog).
Posted 30 June 2010 - 02:57 PM
Yes, I am running under windows, using ssh via SFTP to connect to and access the remote windows machine. The user has sufficient privileges to access the file. I switched to using the Share path but get the same results. Below is a log message from my SSH server when MonYog attempts to access the log file (using Test Path). The file can be opened by Notepad. It sure seems like MonYog is attempting write access. Is there some other explanation? Thanks.
Session channel 1: FlowSfsWin: Opening file '\\IP-0AF8D634\MySqlData\slow_query.log' failed with LockConflict. CreateFile() failed: Windows error 32: The process cannot access the file because it is being used by another process.
Posted 30 June 2010 - 03:11 PM
I just double-checked the code... MONyog tries to open the file in read-only mode, that's for sure. It would help me a lot more if you could try and reproduce the case with the latest GA release of MONyog (ie, 3.76)... 2.8.2 is so old, and there have been so many changes since then including *several* major memory leak fixes. So I'd advise you to upgrade in any case. If that's not an option, then give me a couple of days and I'll set-up a similar environment as yours here and try and reproduce the case here, in our dev environment.
Posted 30 June 2010 - 03:37 PM
Posted 30 June 2010 - 04:09 PM
Posted 30 June 2010 - 04:35 PM
Posted 01 July 2010 - 05:12 AM
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users