Jump to content


Photo

Log File Locked


  • Please log in to reply
9 replies to this topic

#1 TuconsMike

TuconsMike

    Member

  • Members
  • PipPip
  • 28 posts

Posted 29 June 2010 - 03:30 PM

I am using MonYog 2.8.2 and have just started to try to analyze the log files of a remote server. However, when I enter the log file path I get an error from MonYog, invalid path. However on the server, the SSH server have an error message that the client tried to open a file that was locked. This file, the slow query log, can be opened in NotePad, so I know the lock is not exclusive. I believe that MonYog may be trying to open the file for read and write. Can you confirm that? Is there a workaround available?

#2 Sayan Chaliha

Sayan Chaliha

    Advanced Member

  • Members
  • PipPipPip
  • 73 posts
  • Gender:Male
  • Location:Bangalore

Posted 30 June 2010 - 05:15 AM

Hi Mike,

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,
    services.msc
  • 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.
After following the above steps try to access the file which is shared across network.

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).


Regards,

Sayan Chaliha
Webyog, Inc

#3 TuconsMike

TuconsMike

    Member

  • Members
  • PipPip
  • 28 posts

Posted 30 June 2010 - 02:57 PM

Hi Sayan,

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.


#4 Sayan Chaliha

Sayan Chaliha

    Advanced Member

  • Members
  • PipPipPip
  • 73 posts
  • Gender:Male
  • Location:Bangalore

Posted 30 June 2010 - 03:11 PM

Hey Mike,

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.
Regards,

Sayan Chaliha
Webyog, Inc

#5 Sayan Chaliha

Sayan Chaliha

    Advanced Member

  • Members
  • PipPipPip
  • 73 posts
  • Gender:Male
  • Location:Bangalore

Posted 30 June 2010 - 03:37 PM

BTW, I should've asked this first: What does MONyog's log say?
Regards,

Sayan Chaliha
Webyog, Inc

#6 TuconsMike

TuconsMike

    Member

  • Members
  • PipPip
  • 28 posts

Posted 30 June 2010 - 04:07 PM

Nothing in the log file at all.

#7 TuconsMike

TuconsMike

    Member

  • Members
  • PipPip
  • 28 posts

Posted 30 June 2010 - 04:09 PM

I'll try downloading the trial version and see if that works any differently. I'll let you know.

#8 TuconsMike

TuconsMike

    Member

  • Members
  • PipPip
  • 28 posts

Posted 30 June 2010 - 04:35 PM

I downloaded and installed the trial. When I try to run it, I get a message that the "Trial has expired". Huh? I just installed it. Could it have to do with the older 2.8.2 version I am using? I installed the trial into a new directory and modified the existing service to point to it.

#9 Sayan Chaliha

Sayan Chaliha

    Advanced Member

  • Members
  • PipPipPip
  • 73 posts
  • Gender:Male
  • Location:Bangalore

Posted 01 July 2010 - 05:12 AM

Yes, it has to do with the fact that you had 2.8.2 installed earlier. Even if you install both versions in different directories, it still uses the same directory for storing user data + the same registry keys. Mike, I'd suggest you create a ticket to continue this discussion because all forum posts are available for public viewing. We maintain complete privacy as far as our support system is concerned. You can create a support ticket here: http://www.webyog.com/support .
Regards,

Sayan Chaliha
Webyog, Inc

#10 kanchan

kanchan

    Newbie

  • Members
  • Pip
  • 1 posts

Posted 20 October 2011 - 07:37 AM

Thanks a lot sayan......




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users