Skip to content
This repository has been archived by the owner on Jul 28, 2020. It is now read-only.

Unable to login PCF Dev #376

Open
JoseWhiteHawk opened this issue Jun 19, 2019 · 24 comments
Open

Unable to login PCF Dev #376

JoseWhiteHawk opened this issue Jun 19, 2019 · 24 comments

Comments

@JoseWhiteHawk
Copy link

JoseWhiteHawk commented Jun 19, 2019

Hello,

I am not able to login as I am getting the next error:

C:\Users\Jose Lara\Downloads>cf login -a https://api.dev.cfdev.sh --skip-ssl-validation
API endpoint: https://api.dev.cfdev.sh
FAILED
Error performing request: Get https://api.dev.cfdev.sh/v2/info: dial tcp 10.144.0.34:443: connectex: No se puede establecer una conexión ya que el equipo de destino denegó expresamente dicha conexión.
TIP: If you are behind a firewall and require an HTTP proxy, verify the https_proxy environment variable is correctly set. Else, check your network connection.

In any case, I am able to start the dev:

C:\Users\Jose Lara\Downloads>cf dev start -f pcfdev-v1.2.0-windows.tgz
Downloading Resources...
Progress: |====================>| 100.0%
Setting State...
Creating the VM...
Starting VPNKit...
Starting the VM...
Waiting for the VM...
Deploying the BOSH Director...
Deploying PAS...
  Done (11m29s)
Deploying Apps-Manager...
  Done (35s)

         ██████╗  ██████╗███████╗██████╗ ███████╗██╗   ██╗
         ██╔══██╗██╔════╝██╔════╝██╔══██╗██╔════╝██║   ██║
         ██████╔╝██║     █████╗  ██║  ██║█████╗  ██║   ██║
         ██╔═══╝ ██║     ██╔══╝  ██║  ██║██╔══╝  ╚██╗ ██╔╝
         ██║     ╚██████╗██║     ██████╔╝███████╗ ╚████╔╝
         ╚═╝      ╚═════╝╚═╝     ╚═════╝ ╚══════╝  ╚═══╝
                     is now running!

        To begin using PCF Dev, please run:
            cf login -a https://api.dev.cfdev.sh --skip-ssl-validation

        Admin user => Email: admin / Password: admin
        Regular user => Email: user / Password: pass

        To access Apps Manager, navigate here: https://apps.dev.cfdev.sh

        To deploy a particular service, please run:
            cf dev deploy-service <service-name> [Available services: mysql,redis,rabbitmq,scs]

I read about adding in the hosts:

192.168.11.11 api.local.pcfdev.io
192.168.11.11 login.local.pcfdev.io

But this is also not working.

My computer is a i9-9900K with 32GB of RAM, so resources should not be a problem as well...

Any idea about what may be the issue? I am not able to find any solution.

Cheers!

@cf-gitbot
Copy link

We have created an issue in Pivotal Tracker to manage this. Unfortunately, the Pivotal Tracker project is private so you may be unable to view the contents of the story.

The labels on this github issue will be updated when the story is started.

@JoseWhiteHawk
Copy link
Author

Hello, is there someone taking a look to this? Cheers!

@aemengo
Copy link
Contributor

aemengo commented Jun 24, 2019

Unfortunately it is hard to understand what is happening given the information that you've presented. It looks like CF Dev is no longer up and running if nothing is listening on 10.144.0.34.

Are you able to see the vpnkit process in the Task Manager?

Did your machine perhaps go to sleep before you tried the cf login ... steps?

@JoseWhiteHawk
Copy link
Author

JoseWhiteHawk commented Jun 25, 2019

Hello @aemengo

I have tried both the CloudFoundry-Incubator guide (https://github.com/cloudfoundry-incubator/cfdev) with only cf dev start and the steps in the documentation (https://docs.pivotal.io/pcf-dev/install-windows.html) with cf dev start -f FILEPATH/FILE

Deployment of CF is fine:

C:\>cf dev start
Downloading Resources...
Progress: |====================>| 100.0%
Setting State...
Creating the VM...
Starting VPNKit...
Starting the VM...
Waiting for the VM...
Deploying the BOSH Director...
Deploying CF...
  Done (6m59s)

But everytime that I try to login I get the same error that I mentioned before.

About the questions you asked before:

  • Are you able to see the vpnkit process in the Task Manager? In my windows task manager I cannot see the "vpnkit" process after deploying CF.

  • Did your machine perhaps go to sleep before you tried the cf login ... steps? I am sure not. It takes no long to deploy and I try to login just after that.

Cheers

@aemengo
Copy link
Contributor

aemengo commented Jun 25, 2019

What happens when you perform ping 10.144.0.34? Is there anything present?

What cf dev version are you running? You can perform cf dev version to find out.

@JoseWhiteHawk
Copy link
Author

JoseWhiteHawk commented Jun 26, 2019

Good morning,

When I try to ping:

C:\Users\Jose Lara\Downloads
λ ping 10.144.0.34

Haciendo ping a 10.144.0.34 con 32 bytes de datos:
Respuesta desde 10.144.0.34: bytes=32 tiempo<1m TTL=128
Respuesta desde 10.144.0.34: bytes=32 tiempo<1m TTL=128
Respuesta desde 10.144.0.34: bytes=32 tiempo<1m TTL=128
Respuesta desde 10.144.0.34: bytes=32 tiempo<1m TTL=128

Estadísticas de ping para 10.144.0.34:
    Paquetes: enviados = 4, recibidos = 4, perdidos = 0
    (0% perdidos),
Tiempos aproximados de ida y vuelta en milisegundos:
    Mínimo = 0ms, Máximo = 0ms, Media = 0ms

About my cf version:

`C:\Users\Jose Lara\Downloads
λ cf dev version
CLI: 0.0.16
BUILD: 5 (412e0d8)

cf: v9.0.0
cf-mysql: 36.19.0`

I can see there is a similar open issue: #372

Could be something wrong with the last version of the tgz (pcfdev-v1.2.0-windows.tgz)?

Cheers!

@aemengo
Copy link
Contributor

aemengo commented Jun 26, 2019

@JoseWhiteHawk I suspected that the problem with the issue you mentioned was that something was already occupying the ip of 10.144.0.34. The fact that a 404 was being returned confirmed my suspicions.

Although there's doesn't seem to be an http response in this case, the same phenomenon could be happening. Is it possible that your network is occupying/overlapping with the 10.144.x.x address space? Would you happen to need to set PROXY variables to reach that address?

@JoseWhiteHawk
Copy link
Author

Hello, I am not under any firewall and that IP should be available, so I don't understand why I would need a PROXY variable. In any case, how it should look?
Thank you for your replies!
Cheers!

@aemengo
Copy link
Contributor

aemengo commented Jun 28, 2019

@JoseWhiteHawk Unfortunately there isn't much to go on here. I would try the same steps in a different machine (on a different network) and see if you fall into the same error. There must be something particular about the workstation that you're currently on.

@JoseWhiteHawk
Copy link
Author

Hello @aemengo Let's see if I can try soon, but I don't have another machine with enought resources right now...
I just bough my computer with high resources, so it is really strange...

@ublink
Copy link

ublink commented Aug 8, 2019

Same exact issue as @JoseWhiteHawk. Same IPs, versions, and errors. Is there any resolution to this?

@JoseWhiteHawk
Copy link
Author

Hello @ublink I continue having the same issue... =/ If you find out something, please let me know.
Cheers!

@ublink
Copy link

ublink commented Sep 27, 2019

When looking at the VM running under the Hyper-V Manager, there is no network adapter for cfdev? Could that be the problem?

@mohdejaz
Copy link

hello - did this get resolved? I'm having same problem. I bought new machine

@JoseWhiteHawk
Copy link
Author

No, I was not able to fix it... Did someone found any solution? Because we are so many people having the same trouble... And with new machines... Doen't make any sense

@aemengo
Copy link
Contributor

aemengo commented Nov 22, 2019

How long does it take before your machine enters sleep/standby mode?

@slindenberg
Copy link

slindenberg commented Jan 14, 2020

I am having that problem too:

Error performing request: Get https://api.dev.cfdev.sh/v2/info: dial tcp 10.144.0.34:443: connectex: No connection could be made because the target machine actively refused it.

I have tried it on different Win10 PCs now, same result. Is there a chance to downgrade the cli or the plugin maybe?

  • cf.exe version 6.44.1+c3b20bfbe.2019-05-08
  • Plugin cfdev 0.0.17 found in: CF-Community

Thanks!

@JoseWhiteHawk
Copy link
Author

I tried also in another PC and is the same issue...
I cannot understand how is possible that people who are maintaining it are no taking a look... Not the better way to give a chance to PCF and move from AWS or Google Cloud..

@slindenberg
Copy link

slindenberg commented Jan 14, 2020

In the vpnkit.err.log file are several errors:

vpnkit.exe: [INFO] Setting handler to ignore all SIGPIPE signals
vpnkit.exe: [INFO] Version is bbedcf42d9e6ba0afba65aca18dd5fc087192b13
vpnkit.exe: [INFO] System SOMAXCONN is 2147483647
vpnkit.exe: [INFO] Will use a listen backlog of 2147483647
vpnkit.exe: [INFO] No periodic Gc.compact enabled
vpnkit.exe: [INFO] Starting port forwarding server on port_control_url:"hyperv-connect://c365c99c-bc62-49b2-b4b2-6729cd158382/cc2a519a-fb40-4e45-a9f1-c7f04c5ad7fa" vsock_path:""
vpnkit.exe: [INFO] Removed connection limit
vpnkit.exe: [INFO] Connecting to c365c99c-bc62-49b2-b4b2-6729cd158382:cc2a519a-fb40-4e45-a9f1-c7f04c5ad7fa
vpnkit.exe: [INFO] Starting port forwarding server on port_control_url:"hyperv-connect://c365c99c-bc62-49b2-b4b2-6729cd158382/e3ae8f06-8c25-47fb-b6ed-c20702bcef5e" vsock_path:""
vpnkit.exe: [INFO] Removed connection limit
vpnkit.exe: [INFO] Connecting to c365c99c-bc62-49b2-b4b2-6729cd158382:e3ae8f06-8c25-47fb-b6ed-c20702bcef5e
vpnkit.exe: [WARNING] There is no database: using hardcoded network configuration values
vpnkit.exe: [INFO] DNS server configured with no builtin DNS names; everything will be forwarded
vpnkit.exe: [INFO] 2 upstream DNS servers are configured
vpnkit.exe: [INFO] Disabling transparent HTTP redirection
vpnkit.exe: [INFO] Updating resolvers to use upstream DNS servers
vpnkit.exe: [INFO] Secure random number generator is available
vpnkit.exe: [INFO] Add(3): DNS configuration changed to: use upstream DNS servers
vpnkit.exe: [INFO] DNS server configured with builtin DNS names [ gateway.internal -> 192.168.65.1, host.cfdev.sh -> 192.168.65.2, vm.internal -> 192.168.65.3 ]
vpnkit.exe: [INFO] 0 upstream DNS servers are configured
vpnkit.exe: [INFO] DNS configuration file C:\Users\stefa.cfdev\state\vpnkit\resolv.conf has changed
vpnkit.exe: [INFO] Reading DNS configuration from C:\Users\stefa.cfdev\state\vpnkit\resolv.conf
vpnkit.exe: [INFO] Watching DNS configuration file C:\Users\stefa.cfdev\state\vpnkit\resolv.conf for changes
vpnkit.exe: [INFO] Transparent HTTP redirection configuration file C:\Users\stefa.cfdev\state\vpnkit\http_proxy.json has changed
vpnkit.exe: [INFO] Reading transparent HTTP redirection from C:\Users\stefa.cfdev\state\vpnkit\http_proxy.json
vpnkit.exe: [INFO] Watching transparent HTTP redirection configuration file C:\Users\stefa.cfdev\state\vpnkit\http_proxy.json for changes
vpnkit.exe: [INFO] DHCP configuration file C:\Users\stefa.cfdev\state\vpnkit\dhcp.json has changed
vpnkit.exe: [INFO] Reading DHCP configuration file from C:\Users\stefa.cfdev\state\vpnkit\dhcp.json
vpnkit.exe: [INFO] Watching DHCP configuration file C:\Users\stefa.cfdev\state\vpnkit\dhcp.json for changes
vpnkit.exe: [INFO] Configuration server_macaddr = f6:16:36:bc:f9:c6; max_connection = None; dns_path = C:\Users\stefa.cfdev\state\vpnkit\resolv.conf; dns = ; resolver = Upstream; domain = None; allowed_bind_addresses = 0.0.0.0; gateway_ip = 192.168.65.1; host_ip = 192.168.65.2; lowest_ip = 192.168.65.3; highest_ip = 192.168.65.254; dhcp_json_path = C:\Users\stefa.cfdev\state\vpnkit\dhcp.json; dhcp_configuration = None; mtu = 1500; http_intercept = None; http_intercept_path = C:\Users\stefa.cfdev\state\vpnkit\http_proxy.json; port_max_idle_time = 300; host_names = host.cfdev.sh; gateway_names = gateway.internal; vm_names = vm.internal; udpv4_forwards = ; pcap_snaplen = 128
vpnkit.exe: [INFO] Connecting to c365c99c-bc62-49b2-b4b2-6729cd158382:7207f451-2ca3-4b88-8d01-820a21d78293
vpnkit.exe: [ERROR] While watching /etc/resolv.conf: ENOENT
vpnkit.exe: [INFO] Updating transparent HTTP redirection: {
"exclude": "IP 10.144.0.2 IP 10.144.0.34 Subdomain *.dev.cfdev.sh IP 192.168.65.2",
"transparent_http_ports": [
80
],
"transparent_https_ports": [
443
]
}
vpnkit.exe: [INFO] Update DHCP configuration to { searchDomains = fritz.box; domainName = fritz.box }
vpnkit.exe: [ERROR] Failed to parse address 'host.docker.internal' from hosts file
vpnkit.exe: [ERROR] Failed to parse address 'gateway.docker.internal' from hosts filehost.docker.internal gateway.docker.internal kubernetes.docker.internal
vpnkit.exe: [INFO] Updating DNS configuration to nameserver 192.168.178.1#53
order 0
vpnkit.exe: [INFO] Updating resolvers to use upstream DNS servers nameserver 192.168.178.1#53
order 0
vpnkit.exe: [INFO] Secure random number generator is available
vpnkit.exe: [INFO] Remove(3): DNS configuration changed to: use upstream DNS servers nameserver 8.8.8.8#53
timeout 2000
order 0
nameserver 8.8.4.4#53
timeout 2000
order 0
vpnkit.exe: [INFO] Add(3): DNS configuration changed to: use upstream DNS servers nameserver 192.168.178.1#53
order 0
vpnkit.exe: [INFO] DNS server configured with builtin DNS names [ gateway.internal -> 192.168.65.1, host.cfdev.sh -> 192.168.65.2, vm.internal -> 192.168.65.3 ]
vpnkit.exe: [INFO] 1 upstream DNS servers are configured
vpnkit.exe: [INFO] AF_HVSOCK connected successfully
vpnkit.exe: [INFO] Using protocol TwoThousand msize 4096
vpnkit.exe: [ERROR] Socket.TCPv4.bind: Socket.TCPv4.bind(10.144.0.2, 8443): address not available
vpnkit.exe: [ERROR] Socket.TCPv4.bind: Socket.TCPv4.bind(10.144.0.2, 22): address not available
vpnkit.exe: [ERROR] Socket.TCPv4.bind: Socket.TCPv4.bind(10.144.0.2, 8844): address not available
vpnkit.exe: [ERROR] Socket.TCPv4.bind: Socket.TCPv4.bind(10.144.0.2, 6868): address not available
vpnkit.exe: [ERROR] Socket.TCPv4.bind: Socket.TCPv4.bind(10.144.0.34, 80): address not available
vpnkit.exe: [ERROR] Socket.TCPv4.bind: Socket.TCPv4.bind(10.144.0.34, 2222): address not available
vpnkit.exe: [INFO] AF_HVSOCK connected successfully
vpnkit.exe: [ERROR] Socket.TCPv4.bind: Socket.TCPv4.bind(10.144.0.2, 25555): address not available
vpnkit.exe: [ERROR] Socket.TCPv4.bind: Socket.TCPv4.bind(10.144.0.34, 1024): address not available
vpnkit.exe: [ERROR] Socket.TCPv4.bind: Socket.TCPv4.bind(10.144.0.34, 443): address not available
vpnkit.exe: [ERROR] Socket.TCPv4.bind: Socket.TCPv4.bind(10.144.0.34, 1029): address not available
vpnkit.exe: [ERROR] Socket.TCPv4.bind: Socket.TCPv4.bind(10.144.0.34, 1025): address not available
vpnkit.exe: [ERROR] Socket.T...
.....
vpnkit.exe: [INFO] AF_HVSOCK connected successfully
vpnkit.exe: [INFO] Vmnet.Server.negotiate: received { magic = VMN3T; version = 22; commit = }
vpnkit.exe: [INFO] Generated UUID on behalf of client: 60538f05-6236-430d-90c9-2d6510ecc273
vpnkit.exe: [INFO] Vmnet.Server.negotiate: received Ethernet 60538f05-6236-430d-90c9-2d6510ecc273
vpnkit.exe: [INFO] Vmnet.Server.negotiate: sending { mtu = 1500; max_packet_size = 1550; client_macaddr = 02:50:00:00:00:01 }
vpnkit.exe: [INFO] Vmnet.Server.listen: rebinding the primary listen callback
vpnkit.exe: [INFO] Vmnet.Server.listen: starting event loop
vpnkit.exe: [INFO] Connected Ethernet interface f6:16:36:bc:f9:c6
vpnkit.exe: [INFO] Client mac: 02:50:00:00:00:01 server mac: f6:16:36:bc:f9:c6
vpnkit.exe: [INFO] TCP/IP ready
vpnkit.exe: [INFO] TCP/IP stack connected
vpnkit.exe: [INFO] BOOTREQUEST from 02:50:00:00:00:01
vpnkit.exe: [INFO] BOOTREPLY to 02:50:00:00:00:01 yiddr 192.168.65.3 siddr 192.168.65.1 dns 192.168.65.1 router 192.168.65.1 domain fritz.box
vpnkit.exe: [INFO] Connected Ethernet interface f6:16:36:bc:f9:c6
vpnkit.exe: [INFO] UDP interface connected on 192.168.65.1
vpnkit.exe: [INFO] Connected Ethernet interface f6:16:36:bc:f9:c6
vpnkit.exe: [INFO] UDP interface connected on 136.243.7.20
vpnkit.exe: [INFO] Connected Ethernet interface f6:16:36:bc:f9:c6
...

@slindenberg
Copy link

slindenberg commented Jan 15, 2020

Could it be a VpnKit problem? Since my local network should be 192.168.178.0:

vpnkit.exe: [WARNING] There is no database: using hardcoded network configuration values
vpnkit.exe: [INFO] DNS server configured with no builtin DNS names; everything will be forwarded
vpnkit.exe: [INFO] 2 upstream DNS servers are configured
vpnkit.exe: [INFO] Disabling transparent HTTP redirection
vpnkit.exe: [INFO] Updating resolvers to use upstream DNS servers
vpnkit.exe: [INFO] Secure random number generator is available
vpnkit.exe: [INFO] Add(3): DNS configuration changed to: use upstream DNS servers
vpnkit.exe: [INFO] DNS server configured with builtin DNS names [ gateway.internal -> 192.168.65.1, host.cfdev.sh -> 192.168.65.2, vm.internal -> 192.168.65.3 ]

@LitschiW
Copy link

So, I basically have the same problem. And can confirm that I have the same err log output as @slindenberg. Except that my hosts file contains the bindings for host.docker.internal, ...etc.
Changing these IP addresses that seem wrong afterwards with vpnkit did not seem to help either.
(I ran the vpn command seen in org.cloudfoundry.cfdev.vpnkit.wrapper.log and changed the state files accordingly. So adding 192.168.178.* as http_proxy exclude, did not help.)

I was recommended kubecf as an alternative. And for some reason, after installing most of its dependencies, the cfdev login worked!
Unfortunately, after a restart of my machine the login was broken again. I could not reproduce it either.

Does anyone else have any updates on this?

@JoseWhiteHawk
Copy link
Author

@LitschiW No, no new update. I am not able to make it work with a really powerful computer...

@rogalv
Copy link

rogalv commented Jun 30, 2020

I am experiencing the same issue. pcfdev started, but cannot be connected to. Ping is successful for api.dev.cfdev.sh, but cf login fails with 'actively refused' error. Error log shows same vpnkit messages: "address not available".
Any ideas about what to investigate?

@LitschiW
Copy link

LitschiW commented Jun 30, 2020

@rogalv you just reminded me to post an update here...

I got cf-dev working for some weeks now. For me, it turned out, that the resources it was taking by default were just not enough and made it unstable. As you can see here, pivotal even recommends to give cf dev more resources.
You can start cf dev with the -c (cpu cores) and -m (memory in MB) switch to give it more resources. I usually use 20 cores and 20GB of RAM. With that configuration most things ran smoothly.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

8 participants