Thursday, 9 November 2017

Hmmm, Segmentation Fault 11 with Cloud Foundry

Whilst following this online course: -


I was tinkering ( man, I love that word ) with Cloud Foundry ( CF ).

Now it's been a while and I've been through a macOS upgrade from Sierra to High Sierra ( wonder if there's a clue there ? ).

So this time around, I'm seeing "Segmentation Fault: 11" : -

cf version

Segmentation fault: 11

cf login

Segmentation fault: 11

which cf

/usr/local/bin/cf

ls -al `which cf`

-rwxr-xr-x  1 root  wheel  23559164 11 Aug  2016 /usr/local/bin/cf

I tried downloading a new copy of the Bluemix CLI code from here: -


and, having installed the same, tried again, but alas with the same results.

Using this as inspiration: -


I tried this: -

Current platform is macOS. Downloading corresponding Bluemix CLI...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   100    0   100    0     0    127      0 --:--:-- --:--:-- --:--:--   126
100 13.2M  100 13.2M    0     0   372k      0  0:00:36  0:00:36 --:--:--  429k
Download complete. Executing installer...
Password:
installer: Package name is Bluemix Command Line Interface
installer: Upgrading at base path /
installer: The upgrade was successful.
Install complete.

but again to no avail.

So I dug further, and realised that, whilst I was upgrading the Bluemix code, the CF code was staying as-is, as evidenced: -

ls -al `which cf`

-rwxr-xr-x  1 root  wheel  23559164 11 Aug  2016 /usr/local/bin/cf

So, from here: -

The official command line client for Cloud Foundry http://docs.cloudfoundry.org/cf-cli


specifically this: -

which gave me this: -

-rwxr-xr-x     1 davidhay  staff  18472468  9 Nov 17:08 cf

which JUST WORKS !!

~/cf version

cf version 6.32.0+0191c33d9.2017-09-26

~/cf help

cf version 6.32.0+0191c33d9.2017-09-26, Cloud Foundry command line tool
Usage: cf [global options] command [arguments...] [command options]

Before getting started:
  config    login,l      target,t
  help,h    logout,lo    

Application lifecycle:
  apps,a        run-task,rt    events
  push,p        logs           set-env,se
  start,st      ssh            create-app-manifest
  stop,sp       app            
  restart,rs    env,e          
  restage,rg    scale          


~/cf login -sso

API endpoint: https://api.eu-gb.bluemix.net

One Time Code (Get one at https://login.eu-gb.bluemix.net/UAALoginServerWAR/passcode)> 

etc.

So, to finish off, all I needed to do was this: -

sudo mv ~/cf /usr/local/bin

and then validate: -

ls -al `which cf`

-rwxr-xr-x  1 davidhay  staff  18472468 26 Sep 22:44 /usr/local/bin/cf

cf version

cf version 6.32.0+0191c33d9.2017-09-26

and we're golden.

No comments: