Page 1 of 2

The process cannot access the file 'C:\CumulusMX\web\trends.htm'

Posted: Sun 17 Jan 2021 1:25 am
by stefanbagnato
Recently, I started receiving The process cannot access the file 'C:\CumulusMX\web\trends.htm' over and over in the cmd window. I run the CumulusMX exe at startup (as opposed to a service). My entire setup is local, so I am not FTP'ing files anywhere. Cumulus processes the template files every minute, and then I use a combination of "Include standard files" and "Extra web files" to move the .htm files from Cumulus/web into my IIS site folder. I can only assume this issue started when I started actively working on transitioning to my Cumulus website. There is nothing else "using" this file besides that process. I confirmed it doesn't matter if I happen to open it in Notepad++ or not (I don't, I only have the templates up at any given time. Reviewing the diag log, I can see that it is stating that a previous update is still in progress, and that after a second attempt, it aborts and throws the exception. However, why is it taking 3+minutes to process the TrendsT file? And why did it just start? And finally, since it does appear that it just fixes itself after a few minutes, is there any way to increase the retry count so it stops erroring?

Re: The process cannot access the file 'C:\CumulusMX\web\trends.htm'

Posted: Mon 18 Jan 2021 12:27 pm
by mcrossley
First odd thing is I cannot find where an unhandled exception would occur in this process, afaics every error should be caught.

Could you please enable debug logging for me please and capture another occurrence of the error?

Also you have an error in your dayfile.txt - LoadDayFile: Error at line 748 of data\dayfile.txt : Hour, Minute, and Second parameters describe an un-representable DateTime.

Re: The process cannot access the file 'C:\CumulusMX\web\trends.htm'

Posted: Tue 19 Jan 2021 12:53 am
by stefanbagnato
Took forever for another error to be thrown, but sure enough, a couple are in there. In addition, I attached the dayfile. I am not sure what the issue with line 748 is, as its syntax is the same as all other lines around it...

Re: The process cannot access the file 'C:\CumulusMX\web\trends.htm'

Posted: Tue 19 Jan 2021 8:09 am
by freddie
stefanbagnato wrote: Tue 19 Jan 2021 12:53 am I am not sure what the issue with line 748 is, as its syntax is the same as all other lines around it...
The problem with line 748 is the time of the low dew point (39th column). You have 26:16 which is an impossible time, as there are only 24 hours in a day.

Re: The process cannot access the file 'C:\CumulusMX\web\trends.htm'

Posted: Tue 19 Jan 2021 8:17 am
by freddie
Also, Mark said:
Could you please enable debug logging for me
. It wasn't enabled:

Code: Select all

2021-01-18 08:49:25.298 Debug logging is disabled
2021-01-18 08:49:25.299 Data logging is disabled
Is some other process on your system accessing these files? Perhaps a text editor, or maybe a script running in the background?

Re: The process cannot access the file 'C:\CumulusMX\web\trends.htm'

Posted: Tue 19 Jan 2021 4:53 pm
by stefanbagnato
It is on. Or it was. I restarted Cumulus last night so now it is off since it is per session. However, this log starts at 8:49am, and it was off then. I next went into Settings -> Program Settings and turned it on. I can confirm that many more lines are/were written each minute to the log. I watched it live via Powershell's Get-content 'logpath' -wait

Since I restarted Cumulus last night, debug is off. I just turned it back on and I see the log now being written to many more times. I can zip up mxdiags and post it again when the error next occurs.

Regarding the question about anything else accessing, nope, nothing. I closed Notepad ++ to make sure that wasn't it. The only program that touches it is Cumulus moving it from the /web folder over to the IIS www folder.

Regarding the dayfile, thank you for catching that. Even looking at it 100 times, I kept glossing over the issue.

Re: The process cannot access the file 'C:\CumulusMX\web\trends.htm'

Posted: Wed 20 Jan 2021 3:56 pm
by stefanbagnato
As an update, debug is still on. The error is also still, randomly, happening. After thinking about it, the only process that could touch the file(s) is the server backup. However, each instance of the error has not been while the backup is running, so that is not it either. Latest diag file attached.

Re: The process cannot access the file 'C:\CumulusMX\web\trends.htm'

Posted: Thu 21 Jan 2021 2:18 pm
by mcrossley
Got any anti-virus software installed (Windows Defender even). You may want to exclude the Cumulus folders that get written to.

Re: The process cannot access the file 'C:\CumulusMX\web\trends.htm'

Posted: Fri 22 Jan 2021 1:42 pm
by stefanbagnato
Ah no luck. I thought that was a good idea, as it went a longer period of time without the exceptions. Debug was off so I just turned it back on. I'll upload another log when the issue happens again (it'll be today...)

Re: The process cannot access the file 'C:\CumulusMX\web\trends.htm'

Posted: Sat 23 Jan 2021 1:51 am
by stefanbagnato
Another file attached. Crash happened around 0845 this morning. 'IF' there is no clear fix for this, might I suggest removing the error logging to the CMX cmd window for those of us who are still running it as a Windows app and not a service? The error gets logged to MXDiags anyway. Logging the full dump clutters that window and the only way to clear it is to restart CMX.

Re: The process cannot access the file 'C:\CumulusMX\web\trends.htm'

Posted: Sat 23 Jan 2021 5:00 pm
by mcrossley
The error isn't being logged to the console, it is an unhandled error so Windows is dumping it there. The next release catches the error so that will not happen then, it will only be logged to the log file.

I really don't understand what you are trying to do though.

For instance you have a load of files that are copied from the /web folder to your web server folder (C:\inetpub\wwwroot\) every real time interval. But some of those file are only processed at your logging interval and placed in the /web folder.

Why would you not just have them set to process at your logging interval, and have that place them directly in your web server folder C:\inetpub\wwwroot\ ?

Then you have realtimegauges.txt is only processed at the logging interval but copied in real time.

The real time and interval file processes are independent of each other, so they could occur at the same time.

You need to sort out which files need to processed and copied in real time (not many!) and those that don't. Then process and copy them in one step.

Some files like trends.htm and history.htm really only need to be processed and copied once just to populate your site name etc.

Re: The process cannot access the file 'C:\CumulusMX\web\trends.htm'

Posted: Sat 23 Jan 2021 6:56 pm
by stefanbagnato
I am guessing I just having something misconfigured then. Or I misunderstood at least some of the instructions on setting the basic settings for the website. Attached are my Internet -> Web/FTP Settings and Extra Web File settings.

Re: The process cannot access the file 'C:\CumulusMX\web\trends.htm'

Posted: Mon 25 Jan 2021 3:31 pm
by mcrossley
I don't think you are actually FTPing anything are you? So you can disable the "Realtime.txt FTP" and "Realtimegauges.txt FTP" options.

You don't show it, but also disable "Include standard files" - you will do everything in Extra Files.

So for each of the "standard web files" index.htm, etc.
- Set the local filenames = C:\CumulusMX\web\indexT.htm etc
- Remote filename = C:\inetpub\wwwroot\dev\index.htm
- Tick Process
- Do not tick Realtime

Your moon.png is good.

For realtimegaugesT.txt
- Local filename is good already
- Remote filename = C:\inetpub\wwwroot\dev\realtimegauges.txt
- Tick Process
- Tick Realtime


For realtime.txt
- Local filename = C:\CumulusMX\realime.txt
- Remote filename = C:\inetpub\wwwroot\dev\realtime.txt
- Do not tick Process
- Tick Realtime


For all your graphdata files
- Local filename = C:\CumulusMX\web\alldailyhumdata.json (etc)
- Remote filename = C:\inetpub\wwwroot\dev\alldailyhumdata.json (etc)
- Do not tick Process
- Do not tick Realtime

Re: The process cannot access the file 'C:\CumulusMX\web\trends.htm'

Posted: Mon 25 Jan 2021 9:45 pm
by stefanbagnato
Mark, first off, thank you for the help. I really appreciate it.

I am not FTP'ing anything since everything is local. So, I disabled "Realtime.txt FTP" and "Realtimegauges.txt FTP". I also disabled "Include standard files".

This is my current Extra Web Files config. It looks correct now, right?
Capture.PNG
However, I need to add the json files. Before I do, I need to add each and every one of the below, right?
Capture.PNG

Re: The process cannot access the file 'C:\CumulusMX\web\trends.htm'

Posted: Tue 26 Jan 2021 10:54 am
by mcrossley
Correct apart for realtime.txt, that is generated in the root CumulusMX folder not the /web folder.

And yes you need to add all those json files.