Cloudfoundry's cf login yields a "connection refused" error message - cloud-foundry

I am experiencing issues with the latest bosh-lite virtual box machine. See here.
I have just downloaded the Vagrantfile and done a
vagrant up
Then a:
cf login -u admin -a 192.168.50.4 -p admin
But it give me a:
API endpoint: 192.168.50.4
FAILED
connection refused
Can anyone please help?

Get address of haproxy by logging to it (bosh ssh, then ifconfig). Use address of haproxy as api endpoint.

Related

Connecting to Tensorboard Logs on a Remote Server: The Connection was Reset

When trying to connect to tensorboard logs on a remote server and entering the address http://localhost:16006/ in chrome and firefox I get this message in the command line "channel 3: open failed: connect failed: Connection refused" multiple times and this message on the browser, "The Connection was Reset".
I ssh into the server like this: ssh -L 16006:127.0.0.1:6006 username#machine and then go one level up the log folder and write: tensorboard --logdir logs --port 16006
I tired:
tensorboard --logdir logs --port 16006 --bind-all
and also
tensorboard --logdir logs --host localhost, also
tensorboard --logdir logs --host 127.0.0.1
None of the above has wroked. I tried running the line above from another environment which didn't help. I went to the office and tried connecting to the logs from the server machine directly and it worked.
It used to work before when accessing remotely. Do you know what the problem is? any hint would be immensely appreciated.
I am having the same problem, but I think you should designate --port 6006 since it looks like you are forwarding remote port 6006 to the local port 16006.
Even so, since 6006 is the default port, the other commands should have worked, but you would have to go to http://127.0.0.1:16006 on your local machine, rather than the link it provides.
Some more in depth explanations can be found here how to run tensorboard on a remote server and how to see tensorboard over ssh
Even following this advice though I am still getting a 'channel 3: open failed: connect failed: Connection failed' error

Use Storybook server on AWS C9?

I'm trying to run a storybook server on AWS Cloud9 but the URL it gives doesn't load anything.
I'm starting the server with
start-storybook -h $HOST -p $PORT --ci
This runs through without error and gives me a "server started" message with a URL. But that URL doesn't connect to anything.
I do notice that the URL isn't secure, and I can imagine AWS having issue with that. There is an --https option on the start-storybook command, but it requires SSL information that I don't know how to source.
Anyone know how this I can get this working?
C9 only opens port 8080, 8081, 8082. So your server should be listening on one of three. Try:
start-storybook -p 8080 s public

cf create-service-broker fails with connection refused

I'm experimenting with CF in my local bosh-lite setup.
The apps that I deploy into if work well. I am now trying to follow the steps here
https://github.com/cf-platform-eng/cf-community-workshop/blob/master/demos/service-broker-lab.adoc
to try out the custom service broker setup.
The https://github.com/mstine/haash-broker application starts and is running fine:
$ cf apps
name requested state instances memory disk urls
haash-broker started 1/1 768M 1G haash-broker.vbox.mojito, haash-broker.192.168.50.6.xip.io
I can access it from my host machine browser well:
http://haash-broker.192.168.50.6.xip.io/v2/catalog
But when I execute the
cf create-service-broker haash-broker warreng natedogg http://haash-broker.192.168.50.6.xip.io
I get
$ cf create-service-broker haash-broker warreng natedogg http://haash-broker.192.168.50.6.xip.io
Creating service broker haash-broker as admin...
FAILED
Server error, status code: 502, error code: 10001, message: The service broker could not be reached: http://haash-broker.192.168.50.6.xip.io/v2/catalog
When I log in into the CC VM:
$ bosh -e vbox -f cf ssh api/eb4cec99-bab1-4513-a980-fb92775ac2d8
I can ping the hostname:
api/eb4cec99-bab1-4513-a980-fb92775ac2d8:~$ sudo ping haash-broker.192.168.50.6.xip.io
PING haash-broker.192.168.50.6.xip.io (192.168.50.6) 56(84) bytes of data.
64 bytes from 192.168.50.6: icmp_seq=1 ttl=64 time=0.080 ms
But wget connection gets refused:
api/eb4cec99-bab1-4513-a980-fb92775ac2d8:~$ wget http://warreng:natedogg#haash-broker.192.168.50.6.xip.io/v2/catalog
--2018-04-06 04:19:05-- http://warreng:*password*#haash-broker.192.168.50.6.xip.io/v2/catalog
Resolving haash-broker.192.168.50.6.xip.io (haash-broker.192.168.50.6.xip.io)... 192.168.50.6
Connecting to haash-broker.192.168.50.6.xip.io (haash-broker.192.168.50.6.xip.io)|192.168.50.6|:80... failed: Connection refused.
The firewall permits everything on that VM (sudo iptables -L).
The hostname gets resolved properly. The ping works and the 80 port is open on the target IP, since I can reach it from my host browser.
How can that be that the wget doesn't work in such situation?
This also seems to be the reason for me failing to create a service broker cf create-service-broker
UPDATE
I've managed to to execute the cf create-service-broker command with URL of an nginx reverse proxy running outside of my bosh-lite environment. The proxy redirects to the same initial URL http://haash-broker.192.168.50.6.xip.io
and the command succeeds in this way.
But the subsequent
cf create-service-broker haash-broker warreng natedogg http://haash-broker.192.168.50.1.xip.io:9999
cf enable-service-access haash
cf create-service HaaSh basic my-hash
(where haash-broker.192.168.50.1.xip.io:9999 is my nginx proxy) fails with
Server error, status code: 502, error code: 10001, message: The service broker rejected the request to http://haash-broker.192.168.50.1.xip.io:9999/v2/service_instances/4ef19154-d238-4cb3-8003-803fba53af3f?accepts_incomplete=true. Status Code: 400 Bad Request, Body: {"timestamp":1523008856993,"error":"Bad Request","status":400,"message":""}
I can see in both nginx and broker app logs that the the request reaches the broker and it answers with 400.
Debugging now why.
Can you post the result of --server-response option used with wget? Also what happens when you try to curl the broker?
Broker requires credentials, but it is interesting if it responds with 401 or 500 on the first request that wget makes without credentials.

Digital ocean on Laravel Forge - Unable to load key (navicat)

Im pulling my hair out with this one. I've managed to get a site running on Digital Ocean through Forge and also SSH into the server so I know that the SSH keys are setup correctly.
But when trying to connect via Navicat, I keep getting the error "Unable to load key". Does anyone know what this is in reference to or what the problem is.
regards
There is an answer from 2015 on Navicat forum, indicating there could be issue with ssh key support.
If you can connect via ssh, do an ssh tunnel to your server manually:
ssh -v servername -L 3306:127.0.0.1:3306 -N
Afterwards, you connect to remote mysql as it was on your localhost (you should not have one running on 3306, otherwise map to another local port)

Unable to login to https://api.cloudfoundry.com

despite the fact that i have setup everything i am still unable to login:
C:>vmc target
[https://api.cloudfoundry.com]
C:> vmc info
VMware's Cloud Application Platform
For support visit http://support.cloudfoundry.com
Target: https://api.cloudfoundry.com (v0.999)
Client: v0.3.23
C:>vmc login xxxxxxxxxxx -t
Attempting login to [https://api.cloudfoundry.com]
Password: **
Problem with login to 'https://api.cloudfoundry.com', A connection attempt failed because the connected party did not pr
operly respond after a period of time, or established connection failed because connected host has failed to respond. -
connect(2), try again or register for an account.
Has anyone an idea what I am possibly missing here?
Please update your vmc client
gem update vmc