ProcessOne SiteCustomer Helpdesk and FeedbackFollow us on Twitter
 
   
 
How get connected to the CEAN server from a proxy on windows ?
Posted: 01 December 2009 06:59 PM   [ Ignore ]
Newbie
Rank
Total Posts:  9
Joined  2009-12-01

Hello,
I download the CEAN installer for windows, execute start.bat, and in the console

I wrote:

“cean:available().”

and I get:

“error: conn_failed
[]
” I dont have direct connection to internet, I use a http proxy, so there are some way I can configure CEAN to take this in consideration ???

Thanks

Profile
 
 
Posted: 01 December 2009 10:29 PM   [ Ignore ]   [ # 1 ]
Newbie
Rank
Total Posts:  25
Joined  2007-03-20

Greetings,

If you do:
cean:help(proxy_user).
you will see:
cean:proxy_user( User, Password ). => ok
Will make requests towards the cean archive use a firewall proxy user/password. Both arguments should be strings, not atoms.

So, after calling proxy_user/2 the subsequent calls to available/0 will go via your proxy. Please try this. It has been tested on Unix, but I do not have Windows.


bengt

Profile
 
 
Posted: 01 December 2009 10:50 PM   [ Ignore ]   [ # 2 ]
Newbie
Rank
Total Posts:  25
Joined  2007-03-20

I forgot:

Before fiddling with proxy user et al (which you might not need) you have to make the proxy itself available as an environment variable. On a Unix system that is achieved by adding the following lines to cean/start.sh (please substitute your own proxy and port):

HTTP_PROXY=my.proxy.com:12345
export HTTP_PROXY

I presume that there is something similar for windows? That you can add to start.bat?


bengt

Profile
 
 
Posted: 02 December 2009 05:59 PM   [ Ignore ]   [ # 3 ]
Newbie
Rank
Total Posts:  9
Joined  2009-12-01

well I edit cean.cfg file and set HTTP_PROXY=”[put my proxy here]:[my port here]”, then in the shell, do cean:proxy_user(“my username”,“my password”), then when I write cean:available(), get the same result, error: conn_failed

Profile
 
 
Posted: 02 December 2009 09:21 PM   [ Ignore ]   [ # 4 ]
Newbie
Rank
Total Posts:  25
Joined  2007-03-20

Greetings,

Again I apologise for not having Windows, so this might not be correct advice.


If I change values in my cean.cgf file these values are not made available to the Erlang node. Could you do my the favour of trying the following command in the Erlang shell:
os:getenv(“HTTP_PROXY”).

Are you getting the values you set in cean.cfg? Or are you just getting false? That means no value.

To avoid trying to set these values from start.bat, a feat I do not know how to perform, I have the following suggestion. In the Erlang shell do:
os:putenv(“HTTP_PROXY”, “[put my proxy here]:[my port here]”).

That should do the trick.

If this works I think I will create a cean:http_proxy/2 to do this. For those that have the same problem in the future.


bengt

Profile
 
 
Posted: 03 December 2009 07:09 PM   [ Ignore ]   [ # 5 ]
Newbie
Rank
Total Posts:  9
Joined  2009-12-01

I just did what you said, and it work great, thank you very much bengt

Profile