Bug 7052 - scans failing / unable to create/write temp file
: scans failing / unable to create/write temp file
Status: RESOLVED INVALID
Product: Logitech Media Server
Classification: Unclassified
Component: Database
: 7.0
: PC Windows (legacy)
: -- major (vote)
: 7.x
Assigned To: Michael Herger
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-02-08 17:36 UTC by Bob Koure
Modified: 2009-07-31 10:16 UTC (History)
1 user (show)

See Also:
Category: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bob Koure 2008-02-08 17:36:19 UTC
Since I jumped from the 01-31 build to the 02-05 build my scans have not been completing.
I looked through scanner.log, key line seems to be
execute failed: Can't create/write to file 'C:\WINNT\TEMP\#sql_e18_0.MYI' (Errcode: 13)
I thought it was anti-virus or permissions.
Completely removed A/V, made sure all users had create/read/write permissions to C:\WINNT\TEMP.
Full scan fails - same error.
I've been running SC as a service, logged in as the "anon" user, tried full scans logged in as me (in administrators group), and not as a service (still as me). Both full scans failed.
I used a text editor to create/write to file C:\WINNT\TEMP\#sql_e18_0.MYI

Removed almost all the links to music directories, scan succeeds (possibly temp MYI file no longer needed?)

Uninstalled SC7, installed SlimServer_6.5_v2008-01-30, rescanned all my music (all links to music folders back in place - and it seems to have worked. (all music present, only error in log was "Warning: Migrating from 6.3.x used with MySQL!"

Updated to 02-08 SC - scan failed (again). Same error (Can't create/write to file) in scanner.log

Server is a Win2KServer (as opposed to Win2KPro) PC, 2G memory.
other apps running at failure (and during successful scan with SS)
- mail server (smtp, pop3, imap) macallan mail solution
- spam assassin (runs under mail server)
- windows task manager
note *no* anti-virus (removed as possible suspect)

Security settings for C:\WINNT\TEMP
adminstrators : full control
system : full control
users : modify/read&execute/list folder options/read/write

folder ownership : administrators
Comment 1 Blackketter Dean 2008-02-10 21:06:56 UTC
Michael: any idea what this could be?
Comment 2 Michael Herger 2008-02-11 00:14:35 UTC
Very likely not a bug, but unlucky configuration: What's that "anon" user? If this is a user of yours, does it have write permission to the temp folder? By default users can't write inside the Windows folder, can they? I don't remember the details in w2k, but either giving that user write permission to Windows and Windows\Temp, or moving the temp folder to c:\temp should imho fix this issue.

Would SC run if you made it run _without_ setting a user, thus running it under the default SYSTEM user?
Comment 3 Michael Herger 2008-02-11 07:29:20 UTC
> Is SC (or MySql) using %temp% to figure out where to create a temporary
> file? I could just change -that-...

In this case it's MySQL. Yes, please try changing this value (you'll probably have to reboot your machine, as it's a system wide value).
Comment 4 Bob Koure 2008-02-12 04:49:47 UTC
I've
- created directory C:\TMP
- set both %TEMP% and %TMP% to point to C:\TMP
- dl/'ed and installed the 8/11 build of SC
- rebooted
- set to run as service, left username/password fields blank (clicked OK on the warning that the service would run as the "anonymous user")
- waited while the service started and initiated a scan

This scan also fails, with the same error, the only difference being that MySQL can't create/write a file to C:\TMP

Here's the line from scanner.log, with most of the long select/left join/order-by set of statements replaced with [...]
Slim::Schema::throw_exception (217) Error: Carp::Clan::__ANON__(): Error executing 'SELECT me.id, me.url,[...]execute failed: Can't create/write to file 'C:\TMP\#sql_ac4_0.MYD' (Errcode: 13) at C:\PROGRA~1\SQUEEZ~1\server\CPAN/DBIx/Class/Storage/DBI.pm line 771.

Comment 5 Michael Herger 2008-02-13 04:09:05 UTC
As I can't reproduce the issue (tested on W2K, with default settings for temp/tmp), there must something be wrong with your machine: temporary folder full? Disk full? Still some antivirus program you didn't know about? 

That's the only reasons I've found googling around for that error message. It's a MySQL issue.
Comment 6 Bob Koure 2008-02-13 13:52:02 UTC
I've just made sure Symantic Corp AntiVirus was completely uninstalled (files and registry entries deleted)
and still get the same problem.
The disk has 698G free, so I wouldn't expect a disk-free issue.
The only other thing I can think of is that Symantic A/V installed some kind of filesystem driver.
I don't see one, but they're pretty hide-able (was a win nt driver developer for a couple of years).
So... I'd guess a re-install of the OS (and everything else) is in order.
I'll update this bug with whether I get the same error afterwards or not - but this could take me
a couple of days as I have to find a time where I won't annoy my wife by not having an email server available.
Comment 7 Michael Herger 2008-02-14 00:40:18 UTC
You shouldn't need to reinstall your system. 

You said you can install 6.5 and it would run, but not SC7? That's odd, as this seems to be a MySQL issue. Are you using the MySQL instance installed by SC? Is it run as SYSTEM, too? The binary has not changed in 20 months. Thus 6.5 is using the exactly same version as SC7. 
Comment 8 Bob Koure 2008-02-14 11:17:49 UTC
Yes, I can run 6.54 and 6.55 and both work fine.
It's possible, though, that they either aren't creating a MySQL temp file or the MySQL temp file isn't triggering -whatever- is causing my problem.

In any case, I did a fresh install of Win2K server, then SP4 (needed so I could access large drives), downloaded and installed the most recent SC c2008-02-14, and did a full scan.

It worked fine.

I -suspect- that the issue was some part of Symantec Corp anti-virus deciding that it was going to "protect" me against whatever nasty-bit-pattern it was finding in that temp file, even though I'd set it to ignore the temp directory and files with that extension.
I spent quite some time researching all the different ways that this particular A/V might not uninstall, and then making sure those "bits" were either not present or not deleted - and scans were still failing, so maybe it wasn't the A/V.
On the other hand, the "sudden" onset of this problem where the only thing I'd done was "up" a SC version could easily be explained by the A/V getting a new definition file.

So... I dunno.

I now plan to install the apps I'd had on the server previously (SMTP/POP3/IMAP, HTTP, and FTP services), and will re-run a full SC scan after I've done that.

It -might- be appropriate to leave this bug open until I can update that info (so I'm not resolving it) - but if I've figured that wrong, please feel free to close it - and Thanks!


Comment 9 Michael Herger 2008-02-15 10:27:51 UTC
So you've reinstalled Windows _2000_ and the issue's gone? Thanks for reporting!
Comment 10 Bob Koure 2008-02-15 12:29:26 UTC
Yes.
And thanks for the help!
Without that "unable to replicate", I probably would have gotten to the point of reinstalling the OS - but it would have taken me a lot longer to get there.
I've since installed just about all the apps I'd had on that server when I was having the problem - *except* for Synamtec AntiVirus - and no problems, so I'd -guess- that Symantec A/V, even though "uninstalled" was the culprit. Maybe something for SD tech support?

I've also followed-up to the forum thread, so folks there can tell that it's dealt with.
Comment 11 Chris Owens 2009-07-31 10:16:52 UTC
Reduce number of active targets for SC