function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
carmantcarmant 

Ant / Force.com Migration Tool - Login

Hi all,

 

Trying to get the Force.com Migration Tool setup.

 

Running it on Ubuntu (on a Linode).

 

Whenever I try and deploy the sample package, I get the following error:

 

BUILD FAILED
/home/tcarman/Salesforce/Files/sample/build.xml:46: Failed to login: Failed to send request to https://login.salesforce.com/services/Soap/u/24.0

 

 

Checked, double checked, and triple checked the username/password/URL in build.properties. Even tried putting the values directly into the build.xml and bypassing the build.properties alltogether....no luck. Yep - I'm using the security token.

 

Given SFDC shows nothing in login history, I don't think its an issue with the credentials. 

 

Perhaps Proxy issue? I don't know if Linode boxes require any special settings - and if so I can't find anywhere.

 

Also I'm pretty new to linux, so could be something silly I have missed.

 

Any advice, hugely appreciated :)

 

 

AmitSahuAmitSahu

trying sandbox or production?

gaisergaiser

Not much help for you but just to confirm what you have already guessed - it is defenitely a conneciton problem, not login/pass/token problem.

 

I am not familiar with Linode but there is a high chance that your Ubuntu instance has firewall ON by default. So you may have to either disable the firewall (not such a good idea) or add a rule to allow outbound connections to *.salesforce.com.

 

Check Linode documentation with regards to what is their default Ubuntu config.

 

 

 

 

carmantcarmant

@j020 - I have tried both to dev org and a sandbox of a real org (using login.salesforce.com and test.salesforce.com respectively)

 

@gaiser - 

 

Thanks for this suggestion - but unfortunately I dont think its the issue -

 

ufw status gives me "Status: Inactive" - https://help.ubuntu.com/8.04/serverguide/C/firewall.html

 

ipatables -L gives me an empty looking list of IP rules - http://library.linode.com/security/firewalls/iptables

 

Also I can ping login.salesforce.com and get a response.

 

I will have a play around and try adding some rules to explicitly allow traffic to Salesforce, but I don't think thats the issue.

 

Thanks for your help so far - any other suggestions welcome :)

gaisergaiser

>>Also I can ping login.salesforce.com and get a response.

 

I guess that would mean that proxy is not an issue and you have direct visibility of the Internet.

 

Maybe something to do with 443 port not allowed for outgoing traffic ?

 

Have you tried to actually load login.salesforce.com page with a text browser (lynks, links, w3m, etc) or wget or curl?

I mean accessing https://login.salesforce.com

carmantcarmant

Yep - just tried wget on https://login.salesforce.com and it pulls down the index.html file.

 

Also tried enabling the firewall and adding rules to allow all trafic on 80, 443..

 

Still no luck!

somessomes

Hi

 

Even i had this issue, but as i am working from office firewall, i got this issue. Then i set the proxy credentials then my issue resolved..

if you are also working from any firewall, you have to set the proxy credentials to the connection Object. This proxy settings required to set up the Force.com IDE as well.

 please set the below info before obtaining the connection object.

 

config.setProxy(Proxy IP, Proxy Port);
config.setProxyUsername(userName);
config.setProxyPassword(password);
config.setUsername(userName);
config.setPassword(password);

 

hemantgarghemantgarg

I also run into same issue multiple times when login to data-loader and ANT-Migration Tool , It says "failed to send request" its a firewall issue in my case, when disabling Firewall it works perfectly.

sanket mahajan 1sanket mahajan 1
Hello All, 

Please go through my blog. I have setup with both Proxy and Non proxy settings.

https://sfdc-concepts.blogspot.com/2019/12/how-to-setup-ant-for-salesforce.html

Hope this will help!

Thanks,
Sanket