Agent can't write to last_state file

Bug #904162 reported by makeijan
26
This bug affects 3 people
Affects Status Importance Assigned to Milestone
OCS Inventory: Windows Agent
Fix Released
Medium
eguillory

Bug Description

After agent upgrade, I've found some agents are not sending inventory updates. Agent log shows:

AGENT => Inventory successfully sent
 INVENTORY => Writing new inventory state
 WARNING *** INVENTORY => Failed to write new inventory state to file <C:\Documents and Settings\All Users\Datos de programa\OCS Inventory NG\Agent\last_state>

It could be fixed by stopping agent removing last_state file and starting agent, but I think that this should be fixed soon as it affects main agent functionality.

It's been around for a while: http://forums.ocsinventory-ng.org/viewtopic.php?pid=45017

Revision history for this message
Derry Birse (derry-birse) wrote :

Suffering this bug with agent version 2.0.3. Agents have undergone an upgrade process. To clear the problem we stop service, remove last_state file and then restart the service. Appears as if the service is locking the last_state file.

makeijan (makeijan)
description: updated
Revision history for this message
Derry Birse (derry-birse) wrote :
Revision history for this message
Derry Birse (derry-birse) wrote :
Revision history for this message
Tof006 (cgirardy) wrote :

I have the same problem
This is preventing my computers from being listed in the inventory
This is also preventing my computers that are already in the inventory to be updated
Thanks for fixing this as soon as possible.

Revision history for this message
Tof006 (cgirardy) wrote :

Hi again,
I have tested the following :
1) I tried stopping and restarting the account : it doesn't work
2) I changed the service log on account to a local admin account... stop and start : it doesn't work
3) I changed the service log on account back to Local System Account : it works 1 time then doesn't work anymore.
That's what I have found up to now

Revision history for this message
ElNounch (elnounch) wrote :

Most likely duplicate of bug #901270 : Service doesn't wait Agent's end.

Revision history for this message
sylvain35 (sylvain-bodin29) wrote :

Hi,
I wrote this topic when i cencountered this bug : http://forums.ocsinventory-ng.org/viewtopic.php?id=9912

The only way I found to make my project work, is to write the "done" file in my installation script (instead of the agent), then my installation script restart the download.exe process.
It is not a good way to proceed but it works fine.

I hope this bug will be fixed soon.

Changed in ocsinventory-windows-agent:
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → eguillory (emmanuel-guillory)
Revision history for this message
Didier Liroulet (dliroulet) wrote :

Hi,

ElNounch, You're right in your Diag.

Emmanuel, your patch solve the problem here, but does not fix the error in wait function :-(

But, I've also located the problem, and applied patch from ElNounch for wait function.

I'm checking some test scripts, and I will release agent in 2 or 3 days.

Cheers

Revision history for this message
Didier Liroulet (dliroulet) wrote :
Changed in ocsinventory-windows-agent:
status: In Progress → Fix Committed
Revision history for this message
makeijan (makeijan) wrote :

Hi,

I've deployed the new agent and tested teledeploy. Now the log is plain clean :-)

Thank you

Revision history for this message
Didier Liroulet (dliroulet) wrote :

Many thanks makeijan

Regards

Revision history for this message
Tof006 (cgirardy) wrote :

I've just tested agent v2.0.3.1 by upgrading agent v2.0.3.0 but I keep on having the same problem.
Did I miss something ?
Thanks

Revision history for this message
Didier Liroulet (dliroulet) wrote :

Hi.

Check with agent 2.0.4.0.

Cheers

Changed in ocsinventory-windows-agent:
status: Fix Committed → Fix Released
Revision history for this message
Tof006 (cgirardy) wrote : Re: [Bug 904162] Re: Agent can't write to last_state file

Hi
I have deployed it already ;)
Thanks

Sent using my iPhone

Le 22 févr. 2012 à 16:31, "Didier Liroulet" <email address hidden> a écrit :

> Hi.
>
> Check with agent 2.0.4.0.
>
> Cheers
>
> ** Changed in: ocsinventory-windows-agent
> Status: Fix Committed => Fix Released
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/904162
>
> Title:
> Agent can't write to last_state file
>
> Status in OCS Inventory NG Agent for Windows:
> Fix Released
>
> Bug description:
> After agent upgrade, I've found some agents are not sending inventory
> updates. Agent log shows:
>
> AGENT => Inventory successfully sent
> INVENTORY => Writing new inventory state
> WARNING *** INVENTORY => Failed to write new inventory state to file <C:\Documents and Settings\All Users\Datos de programa\OCS Inventory NG\Agent\last_state>
>
> It could be fixed by stopping agent removing last_state file and
> starting agent, but I think that this should be fixed soon as it
> affects main agent functionality.
>
> It's been around for a while: http://forums.ocsinventory-
> ng.org/viewtopic.php?pid=45017
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/ocsinventory-windows-agent/+bug/904162/+subscriptions

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.