Old 02-03-2013, 12:53 PM   #46
Yil
Too much time...
FlashFXP Beta Tester
ioFTPD Administrator
 
Join Date: May 2005
Posts: 1,194
Default

Just a note. I'm sure how jeza's outputting into the ioftpd.log file information but if you don't need to specify the location of the logs then it's probably through the EXEC module ! interface which is the probably the best way for a script to do it. However, if you run the script via window's scheduler (as I think you said) and not ioFTPD's internal scheduler it won't be able to output to the logfile and/or do anything else like set permissions, etc if it does any of that.
Yil is offline   Reply With Quote
Old 02-03-2013, 01:00 PM   #47
biggysmlz
Junior Member
 
Join Date: Dec 2012
Posts: 15
Default

Quote:
Originally Posted by Yil View Post
Just a note. I'm sure how jeza's outputting into the ioftpd.log file information but if you don't need to specify the location of the logs then it's probably through the EXEC module ! interface which is the probably the best way for a script to do it. However, if you run the script via window's scheduler (as I think you said) and not ioFTPD's internal scheduler it won't be able to output to the logfile and/or do anything else like set permissions, etc if it does any of that.
Seems You are right Yil, from what i see in the debug file, it does TRY to add the log to ioFTPD files, aswell as it adds it to jeza.ioFTPD.log, but whneever its ran by windows task scheduler, it ONLY adds it to jeza.ioFTPD.log, when i run it via site command, adds it fine to both.

Imo only option would be to make it add the line to ioFTPD.log the same way it does add it to jeza.ioFTPD.log. Ive even tried to change the jeza.ioFTPD.log files path in config to the ioFTPD.log, BUT the line that gets added is slightly different from what it should be ie:

Code:
[2013-02-03 17:00:01] ARCHIVE: "Archive" "Moving Gerard_Gil-Los_Pasos_Dobles-OST-2012-EiTheLMP3 from MP3 to ARCHIVE/MP3"
instead of:

Code:
02-03-2013 17:00:01 ARCHIVE: "Archive" "Moving Gerard_Gil-Los_Pasos_Dobles-OST-2012-EiTheLMP3 from MP3 to ARCHIVE/MP3"
Jeza: any chance to add the feature to specify ioFTPD path to configs and allow Your script to work fine, even if ran by Windows Task Scheduler?
biggysmlz is offline   Reply With Quote
Old 02-03-2013, 11:06 PM   #48
Yil
Too much time...
FlashFXP Beta Tester
ioFTPD Administrator
 
Join Date: May 2005
Posts: 1,194
Default

Is that error you were getting before when you ran it from ioFTPD's scheduler? If not then just run it from ioFTPD's scheduler else I'll be happy to help track down the issue so you can.

I'm not sure how C# handles writing to files if Jeza wants to write to it directly. Assuming it opens it for exclusive writes and can write whole lines at a time it should be ok, but it's not a great idea to write partial lines to the logfile as that tends to break simple scripts like eggdrop's which read it and get confused if lines aren't terminated.
Yil is offline   Reply With Quote
Old 02-04-2013, 05:11 AM   #49
biggysmlz
Junior Member
 
Join Date: Dec 2012
Posts: 15
Default

Quote:
Originally Posted by Yil View Post
Is that error you were getting before when you ran it from ioFTPD's scheduler? If not then just run it from ioFTPD's scheduler else I'll be happy to help track down the issue so you can.

I'm not sure how C# handles writing to files if Jeza wants to write to it directly. Assuming it opens it for exclusive writes and can write whole lines at a time it should be ok, but it's not a great idea to write partial lines to the logfile as that tends to break simple scripts like eggdrop's which read it and get confused if lines aren't terminated.
Yil, this is the error that occurs everytime its ran via Scheduler:

Code:
[2013-01-31 13:00:21] System.Runtime.InteropServices.COMException (0x80090006): Invalid Signature. (Exception from HRESULT: 0x80090006)
   at System.StubHelpers.InterfaceMarshaler.ConvertToManaged(IntPtr pUnk, IntPtr itfMT, IntPtr classMT, Int32 flags)
   at Microsoft.Win32.Win32Native.CreateAssemblyNameObject(IAssemblyName& ppEnum, String szAssemblyName, UInt32 dwFlags, IntPtr pvReserved)
   at Microsoft.Win32.Fusion.ReadCache(ArrayList alAssems, String name, UInt32 nFlag)
   at System.Reflection.RuntimeAssembly.EnumerateCache(AssemblyName partialName)
   at System.Reflection.RuntimeAssembly.LoadWithPartialNameInternal(AssemblyName an, Evidence securityEvidence, StackCrawlMark& stackMark)
   at System.Reflection.Assembly.LoadWithPartialName(String partialName, Evidence securityEvidence)
   at System.Xml.Serialization.TempAssembly.LoadGeneratedAssembly(Type type, String defaultNamespace, XmlSerializerImplementation& contract)
   at System.Xml.Serialization.XmlSerializer..ctor(Type type, String defaultNamespace)
   at jeza.ioFTPD.Framework.Extensions.Deserialize[T](T xmlObject, String fileName, String defaultNamespace)
   at jeza.ioFTPD.Framework.ConsoleAppTasks.ParseConfig()
   at jeza.ioFTPD.Archive.Program.Main()
biggysmlz is offline   Reply With Quote
Old 02-04-2013, 08:14 AM   #50
jeza
Senior Member
ioFTPD Scripter
 
jeza's Avatar
 
Join Date: May 2003
Posts: 530
Default

Yil
the script writes to ioFTPD.log via !putlog
Code:
Console.Write("!putlog {0}\n", message);
biggysmlz
i think it is the best if we wait if Yil comes with a solution,
else i can add an option that will write to ioFTPD.log and hope it will work
jeza is offline   Reply With Quote
Old 02-04-2013, 11:08 AM   #51
biggysmlz
Junior Member
 
Join Date: Dec 2012
Posts: 15
Default

Quote:
Originally Posted by jeza View Post
Yil
the script writes to ioFTPD.log via !putlog
Code:
Console.Write("!putlog {0}\n", message);
biggysmlz
i think it is the best if we wait if Yil comes with a solution,
else i can add an option that will write to ioFTPD.log and hope it will work
OK, well fixing Scheduler would be the best, so i dont have to trigger it via 3rd party programs
biggysmlz is offline   Reply With Quote
Old 02-04-2013, 07:03 PM   #52
Yil
Too much time...
FlashFXP Beta Tester
ioFTPD Administrator
 
Join Date: May 2005
Posts: 1,194
Default

I'm no C# guru, but it looks like System.Runtime.InteropServices.COMException is being thrown at a pretty low level in something I wouldn't think Jeza would be involved with.

I have no clue how to really tell the different C# runtimes apart easily but perhaps Jeza can tell us which he built against and you can double check you have it installed. For instance .NET 2, 3.0, 3.5, 4 and now 4.5 are all different and perhaps only the client vs full or whatever might matter as well.
Yil is offline   Reply With Quote
Old 02-04-2013, 07:09 PM   #53
biggysmlz
Junior Member
 
Join Date: Dec 2012
Posts: 15
Default

Quote:
Originally Posted by Yil View Post
I'm no C# guru, but it looks like System.Runtime.InteropServices.COMException is being thrown at a pretty low level in something I wouldn't think Jeza would be involved with.

I have no clue how to really tell the different C# runtimes apart easily but perhaps Jeza can tell us which he built against and you can double check you have it installed. For instance .NET 2, 3.0, 3.5, 4 and now 4.5 are all different and perhaps only the client vs full or whatever might matter as well.
jeza? let me know, and ill double check the system.
biggysmlz is offline   Reply With Quote
Old 02-05-2013, 12:46 AM   #54
jeza
Senior Member
ioFTPD Scripter
 
jeza's Avatar
 
Join Date: May 2003
Posts: 530
Default

it is build for .net Framework 4 (full version not client).

can you please show 2-3 more lines of debug file, before it throws the exception?
there should be something like 'Assembly.GetExecutingAssembly().Location...'
jeza is offline   Reply With Quote
Old 02-05-2013, 09:48 AM   #55
biggysmlz
Junior Member
 
Join Date: Dec 2012
Posts: 15
Default

Quote:
Originally Posted by jeza View Post
it is build for .net Framework 4 (full version not client).

can you please show 2-3 more lines of debug file, before it throws the exception?
there should be something like 'Assembly.GetExecutingAssembly().Location...'

Code:
Archive...
[2013-02-01 12:00:50] Assembly.GetExecutingAssembly().Location: ['c:\ioFTPD\scripts\jeza.ioFTPD.ArchiveScript\jeza.ioFTPD.Framework.dll']
[2013-02-01 12:00:51] System.Runtime.InteropServices.COMException (0x80090006): Invalid Signature. (Exception from HRESULT: 0x80090006)
   at System.StubHelpers.InterfaceMarshaler.ConvertToManaged(IntPtr pUnk, IntPtr itfMT, IntPtr classMT, Int32 flags)
   at Microsoft.Win32.Win32Native.CreateAssemblyNameObject(IAssemblyName& ppEnum, String szAssemblyName, UInt32 dwFlags, IntPtr pvReserved)
   at Microsoft.Win32.Fusion.ReadCache(ArrayList alAssems, String name, UInt32 nFlag)
   at System.Reflection.RuntimeAssembly.EnumerateCache(AssemblyName partialName)
   at System.Reflection.RuntimeAssembly.LoadWithPartialNameInternal(AssemblyName an, Evidence securityEvidence, StackCrawlMark& stackMark)
   at System.Reflection.Assembly.LoadWithPartialName(String partialName, Evidence securityEvidence)
   at System.Xml.Serialization.TempAssembly.LoadGeneratedAssembly(Type type, String defaultNamespace, XmlSerializerImplementation& contract)
   at System.Xml.Serialization.XmlSerializer..ctor(Type type, String defaultNamespace)
   at jeza.ioFTPD.Framework.Extensions.Deserialize[T](T xmlObject, String fileName, String defaultNamespace)
   at jeza.ioFTPD.Framework.ConsoleAppTasks.ParseConfig()
   at jeza.ioFTPD.Archive.Program.Main()
biggysmlz is offline   Reply With Quote
Old 02-21-2013, 03:28 PM   #56
MONGi
Member
 
Join Date: May 2012
Posts: 72
Default

Hello together,

i testing the first time at this evening "jeza.ioFTPD.ArchiveScript".

Have read the readme.txt and configure the files as wrote there.

Microsoft .net Framework 4 Client Profile & Extended are installed.
My System: Intel I3-3,3GHz - 8GB RAM - OS:Windows Server 2008 R2 x64

I get follow error in "jeza.ioFTPD.Archive.Debug":
[2013-02-21 20:58:09] --------------------------------------------------------------
[2013-02-21 20:58:09] Archive...
[2013-02-21 20:58:09] Assembly.GetExecutingAssembly().Location: ['D:\ioFTPD\scripts\jeza.ioFTPD.ArchiveScript\jeza. ioFTPD.Framework.dll']
[2013-02-21 20:58:09] System.Runtime.InteropServices.COMException (0x80090006): Ungültige Signatur (Ausnahme von HRESULT: 0x80090006)
bei System.StubHelpers.InterfaceMarshaler.ConvertToMan aged(IntPtr pUnk, IntPtr itfMT, IntPtr classMT, Int32 flags)
bei Microsoft.Win32.Win32Native.CreateAssemblyNameObje ct(IAssemblyName& ppEnum, String szAssemblyName, UInt32 dwFlags, IntPtr pvReserved)
bei Microsoft.Win32.Fusion.ReadCache(ArrayList alAssems, String name, UInt32 nFlag)
bei System.Reflection.RuntimeAssembly.EnumerateCache(A ssemblyName partialName)
bei System.Reflection.RuntimeAssembly.LoadWithPartialN ameInternal(AssemblyName an, Evidence securityEvidence, StackCrawlMark& stackMark)
bei System.Reflection.Assembly.LoadWithPartialName(Str ing partialName, Evidence securityEvidence)
bei System.Xml.Serialization.TempAssembly.LoadGenerate dAssembly(Type type, String defaultNamespace, XmlSerializerImplementation& contract)
bei System.Xml.Serialization.XmlSerializer..ctor(Type type, String defaultNamespace)
bei jeza.ioFTPD.Framework.Extensions.Deserialize[T](T xmlObject, String fileName, String defaultNamespace)
bei jeza.ioFTPD.Framework.ConsoleAppTasks.ParseConfig( )
bei jeza.ioFTPD.Archive.Program.Main()

Ok, i absolutly don`t understand this error-text.
What happened or what to do to fix it?

My configure:

jeza.ioFTPD.Archive.exe.config:
<?xml version="1.0"?>
<configuration>
<appSettings>
<add key="FileNameDebug" value="d:\\ioFTPD\\logs\\jeza.ioFTPD.Archive.Debug "/>
<add key="FileNameInternalLog" value="d:\\ioFTPD\\logs\\jeza.ioFTPD.log" />
<add key="FileNameConfiguration" value="archiveConfiguration.xml"/>
<add key="LogToConsole" value="true"/>

<add key="UpdateDupe" value="true"/>
<add key="DataSourceDupe" value="Data Source=d:\\ioFTPD\\scripts\\jeza.ioFTPD.Manager\\j eza.ioFTPD.Dupe.s3db"/>
<add key="DataSourceDupeUpdateCommand" value="UPDATE Folders SET PathReal = '{1}', PathVirtual = '{2}' WHERE ReleaseName = '{0}'"/>
</appSettings>
</configuration>

archiveConfiguration.xml: (all other tasks are disabled)
<task>
<status>Enabled</status>
<actionType>Delete</actionType>
<source>J:\\TEMP</source>
<destination>J:\\TEMP</destination>
<action id="TotalFolderCount">
<value>4</value>
<minFolderAction>3</minFolderAction>
</action>
</task>

Thanks for all answers
MONGi is offline   Reply With Quote
Old 02-21-2013, 05:40 PM   #57
MONGi
Member
 
Join Date: May 2012
Posts: 72
Default

I have update Microsoft .net Framework from 4.0 to 4.5.
(dotnetfx45_full_x86_x64)

But the error is is the same after scheduling.

Anybody a idea?
MONGi is offline   Reply With Quote
Old 02-22-2013, 07:21 AM   #58
xy0thep
Junior Member
 
Join Date: Nov 2012
Posts: 8
Default

Quote:
Originally Posted by xy0thep View Post
thx for ur reply.

im gonna test w/o that dupe update just to see if it works (dupedb update is essential for me concerning archiving).

about the log-format again: is this independant from the move function or didnt it log anything here because like u said its the update failure?

will report back when i'm done testing

concerning the nx update ill report back aswell. i took a look into the sql structure and tables of the nx .db files and i think its easy to get an adjusted dupe update command done.
hi there,

now i did some testing while setting up a tempory ioFTPD + all ur addons in a virtual environment.

i figured that the nxtools dupe db update on the archiver would be the following:

Code:
    <add key="DataSourceDupeUpdateCommand" value="UPDATE DupeDirs SET DirPath = '{2}' WHERE DirName = '{0}'"/>
nx db doesnt contain any info for physical path but thats not the problem.

while in your db ReleaseName equals DirName in nxtools there still is no problem.

now when we come to your PathVirtual it should equal DirPath in nxtools.

so far, so good... but now i encountered a problem i wasnt sure about before w/o testing your whole dupe script. while nxtools uses just /virtualpath/ in sql table you are using /virtualpath/releasename/.

this yields in a working update of the nx db but with the problem the updated entry is like:

/virtualpath/releasename/releasename/

i guess its hardcoded and i normally wouldnt dare to ask but since im in love with nxtools and your archive script... do you know any solution to fix this??

im no coder, so forgive me if its too much, but...

...isnt it possible to make a nxtools compatible version of your scripts' .exe?

i guess its not many lines of code to have ur virtual path sql entry in there changed from /virtualpath/releasename/ to /virtualpath/ only

you'd make me very happy!

greets

OT: why does a mod always have to approve my posts?
xy0thep is offline   Reply With Quote
Old 02-23-2013, 06:30 AM   #59
MONGi
Member
 
Join Date: May 2012
Posts: 72
Default

So, now i have deinstallation all .net framework components and install framework 4 full again, restart.
If the scheduler start the task, i get now only one error in the error.log:

02-23-2013 12:25:35 Scheduler event 'Archive' returned error.

I`ve check the scheduler path again, but no fault located.

Archive = 2 23 * * EXEC ..\scripts\jeza.ioFTPD.ArchiveScript\jeza.ioFTPD.A rchive.exe scheduler
##changed 2 23 * * to actually time for testing##
Attention, the space in the line of .exe don`t exist, copy and paste

What`s the problem now?

Thx for any answers

Greetings,
Mongi

Last edited by MONGi; 02-23-2013 at 06:48 AM.
MONGi is offline   Reply With Quote
Old 02-23-2013, 02:55 PM   #60
MxxCon
Super Duper
FlashFXP Beta Tester
 
Join Date: Oct 2001
Location: Brooklyn, NY
Posts: 3,881
Default

Quote:
Originally Posted by xy0thep View Post
OT: why does a mod always have to approve my posts?
System thinks your posts are spam so they have to be approved/rejected.
__________________
[Sig removed by Administrator: Signature can not exceed 20GB]
MxxCon is offline   Reply With Quote
Reply

Tags
jeza, manager, releases, script, zip

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 04:11 PM.

Parts of this site powered by vBulletin Mods & Addons from DragonByte Technologies Ltd. (Details)