0

I have installed PCFDev in a corporate environment behind proxy. All proxy environments are setup and able to get to maven repos from commandline. in SCDF server however doesn't seem to reach to maven repo. System provided environment variables are set correctly

{
  "staging_env_json": {
    "HTTP_PROXY": "XXX",
    "HTTPS_PROXY": "XXX",
    "NO_PROXY": "localhost,127.0.0.1,192.168.11.1,192.168.11.11,local.pcfdev.io,.local.pcfdev.io",
    "http_proxy": "XXXX",
    "https_proxy": "XXX",
    "no_proxy": "localhost,127.0.0.1,192.168.11.1,192.168.11.11,local.pcfdev.io,.local.pcfdev.io"
  },
  "running_env_json": {
    "HTTP_PROXY": "XXX",
    "HTTPS_PROXY": "XXX",
    "NO_PROXY": "localhost,127.0.0.1,192.168.11.1,192.168.11.11,local.pcfdev.io,.local.pcfdev.io",
    "http_proxy": "XXX",
    "https_proxy": "XXX",
    "no_proxy": "localhost,127.0.0.1,192.168.11.1,192.168.11.11,local.pcfdev.io,.local.pcfdev.io"
  },

I have also tried to set environment variable SPRING_APPLICATION_JSON and also provided

aether:
    proxy: 
    host: XXX
    port: XXX

in menifest-scdf.yml file which use to push dataflow server.

when I do app import from dataflow client cli it fails (or from dashboard)

Command failed java.lang.IllegalArgumentException: java.net.ConnectException: Connection timed out: connect

What are the correct ways to set proxy in pcfdev environment ?

mpromonet
  • 11,326
  • 43
  • 62
  • 91
gamepop
  • 424
  • 2
  • 13

3 Answers3

0

This sounds more like a problem with the proxy IP perhaps not routable from within PCFDev VM. I found this section in the PCFDev docs and I thought it would be useful in either configuring the VM settings correctly or even bypass it altogether.

Sabby Anandan
  • 5,636
  • 2
  • 12
  • 21
  • Thanks for the response, I have made these settings, everything works fine as far as outside the scdf cli is concerened , in scdf cli, it is not able to get to app import url. – gamepop Jan 07 '17 at 23:07
0

Check whether you have set the proxy properties correctly. A sample config would look like this:

$ java -jar SCDF.jar 
 --maven.remote-repositories.repo1.url=https://repo1
 --maven.remote-repositories.repo1.auth.username=user1
 --maven.remote-repositories.repo1.auth.password=pass1
 --maven.remote-repositories.repo2.url=https://repo2 --maven.proxy.host=proxy1
 --maven.proxy.port=9010 --maven.proxy.auth.username=proxyuser1
 --maven.proxy.auth.password=proxypass1
Ilayaperumal Gopinathan
  • 4,099
  • 1
  • 13
  • 12
  • This might probably help if I run data flow server locally, I am running data flow server on PCFdev , I tried running client with these settings but didn't help. – gamepop Jan 09 '17 at 22:29
  • These properties are at deployer level and hence applicable to all the data flow server implementations. Not sure why you think these can not be used on PCFDev. – Ilayaperumal Gopinathan Jan 10 '17 at 07:12
  • I understand that, I am not doing Java -jar on PCFDev , I am doing cf push and have defined environment variables based on documentation, which allows cf cli to work and get to network, but the dataflow cli and server are not able to see outside network. May be i am configuring it incorrectly , so I am looking at right way to setup of proxy for data flow server to use proxy. – gamepop Jan 11 '17 at 19:40
0

You can try to add http.proxyHost and http.proxyPort to the command to start the shell. For example:

java -Dhttp.proxyHost=your.proxy.com -Dhttp.proxyPort=XXXX -jar spring-cloud-dataflow-shell-1.1.3.RELEASE.jar
Khoa Nguyen
  • 280
  • 4
  • 14