Valid hostname is expected

Advertisement

sumdumgai
Joined:
Posts:
8

Valid hostname is expected

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.

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,442
Location:
Prague, Czechia

Re: Valid hostname is expected

It's likely some temporary routing or DNS issue on your network. When the problem occurs, can you connect using any other client?

Reply with quote

sumdumgai
Joined:
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.

Reply with quote

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.

Reply with quote

Advertisement

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.

Reply with quote

Advertisement

You can post new topics in this forum