TM1.Server sf_Delete and sf_Rename failed

Post Reply
User avatar
macsir
MVP
Posts: 785
Joined: Wed May 30, 2012 6:50 am
OLAP Product: TM1
Version: PAL 2.0.9
Excel Version: Office 365
Contact:

TM1.Server sf_Delete and sf_Rename failed

Post by macsir »

Hi, All
I didn't have this issue before but recently I got it a little bit more frequently.
2014-07-23 19:00:52.970 TM1.Server sf_Delete: Error on file "e:\data\ABC.cub". Error = The process cannot access the file because it is being used by another process.
2014-07-23 19:00:52.970 TM1.Server sf_Rename: Failed to rename (e:\data\ABC.cub$) to (e:\data\ABC.cub). Error: Cannot create a file when that file already exists.

I have searched the forum for answer and everything on the server looks good to me. I also exclude TM1 installation folder and data/log folder for the Symantec's scan but this error still happens.
Can anyone have more suggestion?
In TM1,the answer is always yes though sometimes with a but....
http://tm1sir.blogspot.com.au/
User avatar
macsir
MVP
Posts: 785
Joined: Wed May 30, 2012 6:50 am
OLAP Product: TM1
Version: PAL 2.0.9
Excel Version: Office 365
Contact:

Re: TM1.Server sf_Delete and sf_Rename failed

Post by macsir »

Furthermore, the saving at 7:00 pm failed but another one at 9:45 pm succeeded. No server change between those two savings.
In TM1,the answer is always yes though sometimes with a but....
http://tm1sir.blogspot.com.au/
karkea
Posts: 18
Joined: Tue May 29, 2012 11:11 am
OLAP Product: TM1
Version: 9.5.2 10.1 10.2
Excel Version: 2007

Re: TM1.Server sf_Delete and sf_Rename failed

Post by karkea »

Which version are you running?

I've seen more problems with temporary files in 10.2.0.1 (similar error messages in log). I haven't checked whether it still is an issue in 10.2.2.

For example if you use AsciiOutput('','Test string') i.e. the file name is empty and TM1 creates temp file in Datafiles, it may crash your server in 10.2.0.1.
User avatar
macsir
MVP
Posts: 785
Joined: Wed May 30, 2012 6:50 am
OLAP Product: TM1
Version: PAL 2.0.9
Excel Version: Office 365
Contact:

Re: TM1.Server sf_Delete and sf_Rename failed

Post by macsir »

No, I am in 10.1
In TM1,the answer is always yes though sometimes with a but....
http://tm1sir.blogspot.com.au/
fleaster
Regular Participant
Posts: 167
Joined: Wed Mar 30, 2011 11:57 pm
OLAP Product: TM1
Version: 10.2.2
Excel Version: XL2010

Re: TM1.Server sf_Delete and sf_Rename failed

Post by fleaster »

Hi, just wondering if you ended up finding a solution for this problem?

...we are experiencing a similar error on v10.2.2 - for some reason it persists on 1 particular cube, even after bouncing the service :(

Matt

Code: Select all

8456   []   ERROR   2014-12-22 07:07:23.648   TM1.Server   sf_Rename: Failed to rename (\\apaustmp01\tm1\systemfiles\production\prod_data\Fin_GL.cub) to (\\apaustmp01\tm1\systemfiles\production\prod_data\Fin_GL.cub$$$).  Error: error code:32  reason:"The process cannot access the file because it is being used by another process.
User avatar
gtonkin
MVP
Posts: 1261
Joined: Thu May 06, 2010 3:03 pm
OLAP Product: TM1
Version: Latest and greatest
Excel Version: Office 365 64-bit
Location: JHB, South Africa
Contact:

Re: TM1.Server sf_Delete and sf_Rename failed

Post by gtonkin »

If you have ruled out anti-virus completely, try using resource manager or Process Explorer from SysInternals to track down what process has the file locked.

If it seems to be a momentary lock i.e. read-only when you save but you can delete manually later, I have found that IT rolls down some policy on McAfee, Symantec etc. which applies but is not visible within the front-end of the anti-virus. It took us a while to sort a similar issue where IT had somehow excluded the folder but not the files inside or sub-folders - missing slash or something.

http://www.tm1forum.com/viewtopic.php?f=3&t=6398 contains a list of file we normally ask to be explicitly excluded.
Last edited by gtonkin on Mon Dec 22, 2014 5:41 am, edited 2 times in total.
BR, George.

Learn something new: MDX Views
fleaster
Regular Participant
Posts: 167
Joined: Wed Mar 30, 2011 11:57 pm
OLAP Product: TM1
Version: 10.2.2
Excel Version: XL2010

Re: TM1.Server sf_Delete and sf_Rename failed

Post by fleaster »

thanks for the insight, will investigate further with our IT dept

cheers :)

M.
rmackenzie
MVP
Posts: 733
Joined: Wed May 14, 2008 11:06 pm

Re: TM1.Server sf_Delete and sf_Rename failed

Post by rmackenzie »

macsir wrote:Furthermore, the saving at 7:00 pm failed but another one at 9:45 pm succeeded. No server change between those two savings.
fleaster wrote:will investigate further with our IT dept
Smells like interference from a SAN backup, or something similar?
Robin Mackenzie
RJ!
Community Contributor
Posts: 219
Joined: Mon Jul 23, 2012 8:31 am
OLAP Product: TM1
Version: 10.2.2
Excel Version: 2010

Re: TM1.Server sf_Delete and sf_Rename failed

Post by RJ! »

Hi Robin,

That might explain 1 event with this issue per day but we get this consistantly for all 3 SaveData process that we have spread over the Day/Evening.
User avatar
macsir
MVP
Posts: 785
Joined: Wed May 30, 2012 6:50 am
OLAP Product: TM1
Version: PAL 2.0.9
Excel Version: Office 365
Contact:

Re: TM1.Server sf_Delete and sf_Rename failed

Post by macsir »

rmackenzie wrote: Smells like interference from a SAN backup, or something similar?
This has not happened for a long time and we don't have data folder in SAN backup. But that process explorer is a good idea. Will try it next time if happens.
In TM1,the answer is always yes though sometimes with a but....
http://tm1sir.blogspot.com.au/
MarenC
Regular Participant
Posts: 436
Joined: Sat Jun 08, 2019 9:55 am
OLAP Product: Planning Analytics
Version: Planning Analytics 2.0
Excel Version: Excel 2016

Re: TM1.Server sf_Delete and sf_Rename failed

Post by MarenC »

Hi all,

I have noticed in the data folder that there are 2 .cub files for the same cube (employees), one is employees.cub and the other is employees.cub$

The employees.cub$ is at a later date than the employees.cub.

I also have a few error messages (repeated each day), as follows (there are more but the others are just the same as the last error message below):
2488 [] ERROR 2019-11-01 02:02:39.240 TM1.Commit CommitActionLog::SaveFiles() - Failed to rename file Employees.cub$ to Employees.cub
2488 [] ERROR 2019-11-01 02:02:39.240 TM1.Server sr_renameTempToActual() could not rename file to intermediate file, "Employees.cub" to "Employees.cub$$$" after 10 retrys in 20 seconds
2488 [] ERROR 2019-11-01 02:02:39.240 TM1.Server sf_SafeRename() could not rename file, directory="e:\tm1 instances\Workforce\04 data\", "Employees.cub" to "Employees.cub$$$" after 10 retrys in 20 seconds. Operation Error: 2
2488 [] ERROR 2019-11-01 02:02:37.224 TM1.Server sf_Rename: Failed to rename (e:\tm1 instances\Workforce\04 data\Employees.cub.cub) to (e:\tm1 instances\Workforce\04 data\Employees.cub$$$). Error: error code:32 reason:"The process cannot access the file because it is being used by another process." file:"e:\tm1 instances\Workforce\04 data\Employees.cub" : "e:\tm1 instances\Workforce\04 data\Employees.cub$$$" "

I am just looking for guidance on how to resolve this, I am thinking I should:

Stop the server
Delete the employees.cub file
Rename the employees.cub$ to employees.cub
Restart the server

Are the above steps the correct way to resolve this?

Maren
tomok
MVP
Posts: 2836
Joined: Tue Feb 16, 2010 2:39 pm
OLAP Product: TM1, Palo
Version: Beginning of time thru 10.2
Excel Version: 2003-2007-2010-2013
Location: Atlanta, GA
Contact:

Re: TM1.Server sf_Delete and sf_Rename failed

Post by tomok »

MarenC wrote: Tue Nov 05, 2019 11:30 am Stop the server
Delete the employees.cub file
Rename the employees.cub$ to employees.cub
Restart the server

Are the above steps the correct way to resolve this?

Maren
Yes, but take a backup first to be safe.
Tom O'Kelley - Manager Finance Systems
American Tower
http://www.onlinecourtreservations.com/
User avatar
gtonkin
MVP
Posts: 1261
Joined: Thu May 06, 2010 3:03 pm
OLAP Product: TM1
Version: Latest and greatest
Excel Version: Office 365 64-bit
Location: JHB, South Africa
Contact:

Re: TM1.Server sf_Delete and sf_Rename failed

Post by gtonkin »

Once you have renamed and got the system back to where it should be, you should look at anti-virus, indexing software and other applications that may be locking the .cub, .dim and other files to prevent this in the future

Would recommend excluding files with extensions of:
• CUB, CUB$
• DIM, DIM$
• PRO, PRO$
• CHO, CHO$
• LOG, LOG$
• SUB, SUB$
• RUX, RUX$
• BLB, BLB$
• VUE, VUE$
BR, George.

Learn something new: MDX Views
User avatar
Steve Rowe
Site Admin
Posts: 2456
Joined: Wed May 14, 2008 4:25 pm
OLAP Product: TM1
Version: TM1 v6,v7,v8,v9,v10,v11+PAW
Excel Version: Nearly all of them

Re: TM1.Server sf_Delete and sf_Rename failed

Post by Steve Rowe »

As well as anti-virus I've managed to get two SaveDataAlls running concurrently before which has caused this issue....
Technical Director
www.infocat.co.uk
User avatar
gtonkin
MVP
Posts: 1261
Joined: Thu May 06, 2010 3:03 pm
OLAP Product: TM1
Version: Latest and greatest
Excel Version: Office 365 64-bit
Location: JHB, South Africa
Contact:

Re: TM1.Server sf_Delete and sf_Rename failed

Post by gtonkin »

Steve Rowe wrote: Wed Nov 06, 2019 2:17 pm As well as anti-virus I've managed to get two SaveDataAlls running concurrently before which has caused this issue....
And make sure the SaveDataAll is in Epilog - numerous funnies over the years where I have seen it in Prolog.
BR, George.

Learn something new: MDX Views
User avatar
macsir
MVP
Posts: 785
Joined: Wed May 30, 2012 6:50 am
OLAP Product: TM1
Version: PAL 2.0.9
Excel Version: Office 365
Contact:

Re: TM1.Server sf_Delete and sf_Rename failed

Post by macsir »

gtonkin wrote: Wed Nov 06, 2019 2:19 pm
Steve Rowe wrote: Wed Nov 06, 2019 2:17 pm As well as anti-virus I've managed to get two SaveDataAlls running concurrently before which has caused this issue....
And make sure the SaveDataAll is in Epilog - numerous funnies over the years where I have seen it in Prolog.
What is the difference for putting it in Epilog? I always put it in Prolog. :o To be clear, I only use savedataall in the Prolog of a separated process rather than mixing it with other processes together.
In TM1,the answer is always yes though sometimes with a but....
http://tm1sir.blogspot.com.au/
User avatar
gtonkin
MVP
Posts: 1261
Joined: Thu May 06, 2010 3:03 pm
OLAP Product: TM1
Version: Latest and greatest
Excel Version: Office 365 64-bit
Location: JHB, South Africa
Contact:

Re: TM1.Server sf_Delete and sf_Rename failed

Post by gtonkin »

macsir wrote: Thu Nov 07, 2019 8:14 pm ...
What is the difference for putting it in Epilog? I always put it in Prolog. :o To be clear, I only use savedataall in the Prolog of a separated process rather than mixing it with other processes together.
Had issues in the past where the TM1 instance would just hang up (cannot remember crashing) but I always use Epilog (even in child processes).
If you do a search on this site for SaveDataAll and Prolog, you will see some of the instances where other users had issues and moving to Epilog seemed to resolve.
BR, George.

Learn something new: MDX Views
User avatar
macsir
MVP
Posts: 785
Joined: Wed May 30, 2012 6:50 am
OLAP Product: TM1
Version: PAL 2.0.9
Excel Version: Office 365
Contact:

Re: TM1.Server sf_Delete and sf_Rename failed

Post by macsir »

thanks, that is interesting to know.
In TM1,the answer is always yes though sometimes with a but....
http://tm1sir.blogspot.com.au/
Post Reply