Page 1 of 1
TM1.Server sf_Delete and sf_Rename failed
Posted: Wed Jul 23, 2014 11:00 pm
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?
Re: TM1.Server sf_Delete and sf_Rename failed
Posted: Wed Jul 23, 2014 11:07 pm
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.
Re: TM1.Server sf_Delete and sf_Rename failed
Posted: Thu Jul 24, 2014 10:07 am
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.
Re: TM1.Server sf_Delete and sf_Rename failed
Posted: Thu Jul 24, 2014 10:14 pm
by macsir
No, I am in 10.1
Re: TM1.Server sf_Delete and sf_Rename failed
Posted: Mon Dec 22, 2014 1:54 am
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.
Re: TM1.Server sf_Delete and sf_Rename failed
Posted: Mon Dec 22, 2014 4:46 am
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.
Re: TM1.Server sf_Delete and sf_Rename failed
Posted: Mon Dec 22, 2014 5:41 am
by fleaster
thanks for the insight, will investigate further with our IT dept
cheers
M.
Re: TM1.Server sf_Delete and sf_Rename failed
Posted: Mon Dec 22, 2014 9:45 am
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?
Re: TM1.Server sf_Delete and sf_Rename failed
Posted: Mon Dec 29, 2014 2:37 am
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.
Re: TM1.Server sf_Delete and sf_Rename failed
Posted: Sun Jan 04, 2015 10:45 pm
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.
Re: TM1.Server sf_Delete and sf_Rename failed
Posted: Tue Nov 05, 2019 11:30 am
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
Re: TM1.Server sf_Delete and sf_Rename failed
Posted: Tue Nov 05, 2019 12:03 pm
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.
Re: TM1.Server sf_Delete and sf_Rename failed
Posted: Tue Nov 05, 2019 4:11 pm
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$
Re: TM1.Server sf_Delete and sf_Rename failed
Posted: Wed Nov 06, 2019 2:17 pm
by Steve Rowe
As well as anti-virus I've managed to get two SaveDataAlls running concurrently before which has caused this issue....
Re: TM1.Server sf_Delete and sf_Rename failed
Posted: Wed Nov 06, 2019 2:19 pm
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.
Re: TM1.Server sf_Delete and sf_Rename failed
Posted: Thu Nov 07, 2019 8:14 pm
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.

To be clear, I only use savedataall in the Prolog of a separated process rather than mixing it with other processes together.
Re: TM1.Server sf_Delete and sf_Rename failed
Posted: Fri Nov 08, 2019 7:04 am
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.

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.
Re: TM1.Server sf_Delete and sf_Rename failed
Posted: Sun Nov 10, 2019 8:16 pm
by macsir
thanks, that is interesting to know.