Topic "Valid hostname is expected"

Author Message
sumdumgai
[View user's profile]

Joined: 2010-05-21
Posts: 8
I'm trying to FTPS a file using scripting and I'm getting this error occasionally and do not understand why. I'm using the following open syntax:
open ftps://userid:password@hostname:21 -passive=on -explicitssl

I've also tried the following with no success:
open ftps://hostname|userid:password@hostname:21 -passive=on -explicitssl

When the error occurs, I get the same error when I manually sign on and execute a stored session using same parameters. Then, all of a sudden, the script starts working. Very frustrating. Any help would be much appreciated.
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25014
Location: Prague, Czechia
It's likely some temporary routing or DNS issue on your network. When the problem occurs, can you connect using any other client?
_________________
Martin Prikryl
sumdumgai
[View user's profile]

Joined: 2010-05-21
Posts: 8
Very inconsistent, or at least what I percieve. I signed on to remote server and run script - okay. I go back to my laptop and run same script - invalid host name. I sign on manually from laptop - okay. Go back to server - okay. Problem is I can't rely on script working 100% of time.

It looks like some kind of timing or some other conflict issue.

I'm using this to start Winscp:
%pathName%WinSCP.com /log=%pathName%%logfName% /script=%pathName%%scriptName% >>%pathName%%confName%

and this as script:
option batch on
option confirm off
session
open savedSession (note this is same session that I use to manually sign on)

Thanks for responding and for your help.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25014
Location: Prague, Czechia
Retry: When the problem occurs, can you connect using any other client?
_________________
Martin Prikryl
Guest




I was able to login with my desktop earlier. All of a sudden, 'invalid host name' keeps reoccurring. I immediately went to my laptop and executed the same saved session (this saved session is on a networked drive that can be accessed by both laptop and desktop). The first attempt on the laptop failed. I tried again and it worked. I repeated the log-in very quickly (exiting the session each time). I found that it sometimes worked and sometimes did not, as if something on the server to which I am logging on has to be cleared or refreshed. My desktop, however, still does not allow me to log in. Is there some command that I need to include in my log in script to make sure the exit is done properly? It looks like there is some kind of timing or sharing issue. Thanks.
Guest




A few minutes later and my desktop is able to log in. Any suggestions? This has got to be fixed so that it works consistently. Thanks.
sumdumgai
[View user's profile]

Joined: 2010-05-21
Posts: 8
Last two posts were by me. Wasn't logged in.
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License