Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

Re: Spurious ? character introduced

DaveR wrote:

I am also using an SSIS package which OCCASIONALLY inserts a '?' into the first winscp> command causing 'Unknown command'. This causes the package to technically fail (although the file is still downloaded from a remote server successfully). The scheduled SQL job (run each evening) marks it as a fail which is a pain as we have to check it just in case the failure is for a different reason. If there is any pattern in when the ? is inserted it always seems to be on a Sunday when some weekly database admin tasks Including on the SSISDB) take place earlier in the day. But this could be a complete red herring.

In the last 2.5 years since the problem was first reported, Did you ever get to the bottom of why this '?' character is SOMETIMES introduced and how to rectify it? I'm on WinSCP 5.9.2 Build 6958. Thanks.

It does not look like WinSCP question. You should probably ask on SSIS-related forum.
DaveR

Spurious ? character introduced

I am also using an SSIS package which OCCASIONALLY inserts a '?' into the first winscp> command causing 'Unknown command'. This causes the package to technically fail (although the file is still downloaded from a remote server successfully). The scheduled SQL job (run each evening) marks it as a fail which is a pain as we have to check it just in case the failure is for a different reason. If there is any pattern in when the ? is inserted it always seems to be on a Sunday when some weekly database admin tasks Including on the SSISDB) take place earlier in the day. But this could be a complete red herring.

In the last 2.5 years since the problem was first reported, Did you ever get to the bottom of why this '?' character is SOMETIMES introduced and how to rectify it? I'm on WinSCP 5.9.2 Build 6958. Thanks.
martin

paultp1 wrote:

I already have the regular Winscp program that the production server is using ( where the random error happens); shall I install the debug version on the same box? It seems like so. But, on to the point of reproducing the error, will the debug automatically capture the traces when the actual production process using the "production Winscp" runs and eventually errors? Or do I have to change my production Winscp to point to the debug release version?

You have to replace the production WinSCP with the debug one.
paultp1

Hi Martin,

I am trying to install the debug, but have a question before I do:

I already have the regular Winscp program that the production server is using ( where the random error happens); shall I install the debug version on the same box? It seems like so. But, on to the point of reproducing the error, will the debug automatically capture the traces when the actual production process using the "production Winscp" runs and eventually errors? Or do I have to change my production Winscp to point to the debug release version?

Thanks so much.
Paul
paultp1

Hi Martin,

I sent you an email as per your note.

I will work on putting the work around.

Thank you again.

Paul
martin

Can you send me an email, so I can send you back a debug version of WinSCP to track the problem? Please include link back to this topic in your email. Also note in this topic that you have sent the email. Thanks.

You will find my address (if you log in) in my forum profile.


As a workaround, can you try to assemble a command-line string using your code rather than the standard input string?
Guest

martin wrote:

How do you provide commands to WinSCP? Are you redirecting a standard input? (I do not see any /command or /script parameters)


Hi Martin,

Thanks. I am using through an SSIS SQL package. Using a StandardInputVariable, and the variable has the command script like:

"option batch abort " + "\n" + "option confirm off" + "\n" + "open CloudBrickFTPS " + "\n" + " Get " + @[User::FTPDirectory] + @[User::BakFileName] + " " + @[User::ReceivePath] +"\n" + " close " + "\n" + " exit"

And the executable is pointing to: C:\Program Files (x86)\WinSCP\WinSCP.com

This issue happened again, and immediately after the failure, I re-ran , and it ran successfully. I am a little stumped! I am also attaching the log (with both failure and the following success).

We are going live in 2 days. Appreciate your help.

Thanks again.

Paul
martin

How do you provide commands to WinSCP? Are you redirecting a standard input? (I do not see any /command or /script parameters)
paultp

Re: unknown command '?option'

Anonymous wrote:

Anonymous wrote:

paultp wrote:

martin wrote:

The ? may stand for UTF-8 BOM at the beginning of the file. Though WinSCP should be able to strip it, if present. Can you attach a complete log files from a run it succeeds and a run it fails?


Attached is the log for a successful operation.

It is interesting that it happens randomly. Any help would be appreciated, as we will be going live in few days.

Thanks Martin.


Adding the success attachment next.


Sorry the one that is attached is the error log again. Now attaching the success log.


One more thing to note in this issue is that the error never happens during the upload of the file (SFTP via Winscp to a remote location always is going well), but the problem happens during the download (Receive the file SFTP with WinSCP from the remote location to a local machine)
Guest

Re: unknown command '?option'

Anonymous wrote:

paultp wrote:

martin wrote:

The ? may stand for UTF-8 BOM at the beginning of the file. Though WinSCP should be able to strip it, if present. Can you attach a complete log files from a run it succeeds and a run it fails?


Attached is the log for a successful operation.

It is interesting that it happens randomly. Any help would be appreciated, as we will be going live in few days.

Thanks Martin.


Adding the success attachment next.


Sorry the one that is attached is the error log again. Now attaching the success log.
Guest

Re: unknown command '?option'

paultp wrote:

martin wrote:

The ? may stand for UTF-8 BOM at the beginning of the file. Though WinSCP should be able to strip it, if present. Can you attach a complete log files from a run it succeeds and a run it fails?


Attached is the log for a successful operation.

It is interesting that it happens randomly. Any help would be appreciated, as we will be going live in few days.

Thanks Martin.


Adding the success attachment next.
paultp

Re: unknown command '?option'

martin wrote:

The ? may stand for UTF-8 BOM at the beginning of the file. Though WinSCP should be able to strip it, if present. Can you attach a complete log files from a run it succeeds and a run it fails?


Attached is the log for a successful operation.

It is interesting that it happens randomly. Any help would be appreciated, as we will be going live in few days.

Thanks Martin.
paultp

Re: unknown command '?option'

martin wrote:

The ? may stand for UTF-8 BOM at the beginning of the file. Though WinSCP should be able to strip it, if present. Can you attach a complete log files from a run it succeeds and a run it fails?


Thank you Martin. I've attached the log file.
martin

Re: unknown command '?option'

The ? may stand for UTF-8 BOM at the beginning of the file. Though WinSCP should be able to strip it, if present. Can you attach a complete log files from a run it succeeds and a run it fails?
paultp

unknown command '?option'

Hello,

I have a strange error that happens once in a while, the Winscp commad runs just fine almost all of the times, but on few occassions, it throws this error in (see it from the log files):

2014-10-23 04:34:08.800 Script: Retrospectively logging previous script records:
> 2014-10-23 04:34:08.800 Script: ?option batch abort
< 2014-10-23 04:34:08.800 Script: Unknown command '?option'.
. 2014-10-23 04:34:08.800 Script: Failed
> 2014-10-23 04:34:08.800 Script: option confirm off
< 2014-10-23 04:34:08.800 Script: confirm off
> 2014-10-23 04:34:08.800 Script: open CloudBrickFTPS


This is the actual script commad that runs just fine all the time except on couple of these ocassions where it is failing:

***
option batch abort
option confirm off
open CloudBrickFTPS
Get /folder1/ C:\Receive\
close
exit
***

Why is the "?" mark being introduced in the script sometimes just "randomly?"

Thank you for any ideas.
Paul