CF Push and case insensitive clients

So here’s a weird one that may save someone some time…..

Trying to perform a cf push with a .jar file. Get’s the following strange error!

[email protected] Downloads $ cf push test-tgs --path tgs-0.0.1-SNAPSHOT-jar-with-dependencies.jar
Instances> 1
 
1: 128M
2: 256M
3: 512M
4: 1G
Memory Limit> 1G
 
Creating test-tgs... OK
 
1: test-tgs
2: none
Subdomain> test-tgs
1: ft4.cpgpaas.net
2: none
Domain> ft4.DOMAINREMOVED
 
Creating route test-tgs.ft4.DOMAINREMOVED... OK
Binding test-tgs.ft4.DOMAINREMOVED to test-tgs... OK
 
Create services for application?> n
Save configuration?> y
 
Saving to manifest.yml... OK
Uploading test-tgs... FAILED
Upload failed. Try again with 'cf push'.
Errno::EEXIST: File exists - /var/folders/3z/lfrkq96s43d3f02g2mybkf280000gn/T/.cf_c01c12c8-50bb-45d5-9c7b-f73577d6ae27_files/META-INF/license
cat ~/.cf/crash # for more details
 
[email protected] Downloads $ cat ~/.cf/crash
Time of crash:
  2013-11-05 22:43:16 +0000
 
Errno::EEXIST: File exists - /var/folders/3z/lfrkq96s43d3f02g2mybkf280000gn/T/.cf_c01c12c8-50bb-45d5-9c7b-f73577d6ae27_files/META-INF/license
 
rubyzip-0.9.9/lib/zip/zip_entry.rb:600:in `mkdir'
rubyzip-0.9.9/lib/zip/zip_entry.rb:600:in `create_directory'
rubyzip-0.9.9/lib/zip/zip_entry.rb:184:in `extract'
cfoundry-4.3.6/lib/cfoundry/zip.rb:28:in `block in unpack'
rubyzip-0.9.9/lib/zip/zip_entry_set.rb:35:in `each'
rubyzip-0.9.9/lib/zip/zip_entry_set.rb:35:in `each'
rubyzip-0.9.9/lib/zip/zip_central_directory.rb:109:in `each'
rubyzip-0.9.9/lib/zip/zip_file.rb:132:in `block in foreach'
rubyzip-0.9.9/lib/zip/zip_file.rb:90:in `open'
rubyzip-0.9.9/lib/zip/zip_file.rb:131:in `foreach'
cfoundry-4.3.6/lib/cfoundry/zip.rb:24:in `unpack'
cfoundry-4.3.6/lib/cfoundry/upload_helpers.rb:58:in `prepare_package'
cfoundry-4.3.6/lib/cfoundry/upload_helpers.rb:42:in `upload'
cf-5.2.0/lib/cf/cli/app/push.rb:84:in `block in upload_app'
interact-0.5.2/lib/interact/progress.rb:98:in `with_progress'
cf-5.2.0/lib/cf/cli/app/push.rb:83:in `upload_app'
cf-5.2.0/lib/cf/cli/app/push.rb:67:in `setup_new_app'
cf-5.2.0/lib/cf/cli/app/push.rb:48:in `push'
mothership-0.5.1/lib/mothership/base.rb:66:in `run'
mothership-0.5.1/lib/mothership/command.rb:72:in `block in invoke'
cf-5.2.0/lib/manifests/plugin.rb:137:in `call'
cf-5.2.0/lib/manifests/plugin.rb:137:in `block in create_and_save_manifest'
mothership-0.5.1/lib/mothership/callbacks.rb:74:in `with_filters'
cf-5.2.0/lib/manifests/plugin.rb:136:in `create_and_save_manifest'
cf-5.2.0/lib/manifests/plugin.rb:73:in `wrap_push'
cf-5.2.0/lib/manifests/plugin.rb:25:in `block in <class:ManifestsPlugin>'
mothership-0.5.1/lib/mothership/command.rb:82:in `instance_exec'
mothership-0.5.1/lib/mothership/command.rb:82:in `block (2 levels) in invoke'
mothership-0.5.1/lib/mothership/command.rb:86:in `instance_exec'
mothership-0.5.1/lib/mothership/command.rb:86:in `invoke'
mothership-0.5.1/lib/mothership/base.rb:55:in `execute'
cf-5.2.0/lib/cf/cli.rb:187:in `block (2 levels) in execute'
cf-5.2.0/lib/cf/cli.rb:198:in `save_token_if_it_changes'
cf-5.2.0/lib/cf/cli.rb:186:in `block in execute'
cf-5.2.0/lib/cf/cli.rb:122:in `wrap_errors'
cf-5.2.0/lib/cf/cli.rb:182:in `execute'
mothership-0.5.1/lib/mothership.rb:45:in `start'
cf-5.2.0/bin/cf:16:in `<top (required)>'
ruby-1.9.3-p448/bin/cf:23:in `load'
ruby-1.9.3-p448/bin/cf:23:in `<main>'
ruby-1.9.3-p448/bin/ruby_executable_hooks:15:in `eval'
ruby-1.9.3-p448/bin/ruby_executable_hooks:15:in `<main>'

 

Lots of head scratching;

Looks like (and is) a local error, unpacking the JAR, we haven’t even touched the PaaS/cloudfoundry yet!

Also, unpacking the JAR manually seems to complain also, hmm.

You’re running MacOSX? … (Or maybe Windows?)

Looks like the issue is because the JAR has been built on a CASE-SENSITIVE OS (in our case, Jenkins on Linux)

… and you’re trying to run cf push on a CASE-INSENSITIVE OS (in our case, a 2013 Retina MacBookPro).

Workaround..

Run the same cf push from a linux box and it works fine.

This link put me onto the issue (as the error is more than a bit confusing!);

https://groups.google.com/forum/#!topic/selenium-users/f8OMertwzOY

Hope this helps someone!

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.