Bug 1121775 - OpenShift: Can not deploy binary application on wildfly
Summary: OpenShift: Can not deploy binary application on wildfly
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Image
Version: 2.x
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Maciej Szulik
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-07-21 20:54 UTC by Harit Himanshu
Modified: 2015-05-15 00:44 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-10-10 00:49:16 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Harit Himanshu 2014-07-21 20:54:48 UTC
Description of problem:
OpenShift: Can not deploy binary application on wildfly

Version-Release number of selected component (if applicable):


How reproducible:

Everytime


Steps to Reproduce:
**What I did?**  
Created [application][1]

    rhc app create map https://cartreflect-claytondev.rhcloud.com/reflect?github=openshift-cartridges/openshift-wildfly-cartridge  

Configure it to be [binary][2] deployment  

     rhc app configure -a <your application's name> --deployment-type binary  

Then I did  

    mkdir binary-deployment && cd binary-deployment/ && mkdir -p build-dependencies/.m2 repo/deployments dependencies/jbosseap/deployments  

Copied war file  

    cp ~/code/IdeaProjects/others/tweetstream/target/tweetstream.war repo/deployments  

created `tar.gz`  

    tar -zcvf tweetstream-archive.tar.gz binary-deployment  

which can be seen as  

    drwxr-xr-x   5 harith  Y\Domain Users      170 Jul 20 18:26 binary-deployment
    -rw-r--r--   1 harith  Y\Domain Users  6124729 Jul 20 18:27 tweetstream-archive.tar.gz  

Now when I deploy it, I see  

    Deployment of file '/Users/harith/Downloads/tmp/tweetstream-archive.tar.gz' in progress for application map ...
    Starting deploy for binary artifact
    Stopping gear
    Stopping wildfly cart
    Creating new deployment directory
    Preparing deployment
    Preparing build for deployment
    /bin/tar: Ignoring unknown extended header keyword `SCHILY.dev'
    /bin/tar: Ignoring unknown extended header keyword `SCHILY.ino'
    /bin/tar: Ignoring unknown extended header keyword `SCHILY.nlink'
    /bin/tar: Ignoring unknown extended header keyword `SCHILY.dev'
    /bin/tar: Ignoring unknown extended header keyword `SCHILY.ino'
    /bin/tar: Ignoring unknown extended header keyword `SCHILY.nlink'
    /bin/tar: Ignoring unknown extended header keyword `SCHILY.dev'
    /bin/tar: Ignoring unknown extended header keyword `SCHILY.ino'
    /bin/tar: Ignoring unknown extended header keyword `SCHILY.nlink'
    /bin/tar: Ignoring unknown extended header keyword `SCHILY.dev'
    /bin/tar: Ignoring unknown extended header keyword `SCHILY.ino'
    /bin/tar: Ignoring unknown extended header keyword `SCHILY.nlink'
    /bin/tar: Ignoring unknown extended header keyword `LIBARCHIVE.creationtime'
    /bin/tar: Ignoring unknown extended header keyword `SCHILY.dev'
    /bin/tar: Ignoring unknown extended header keyword `SCHILY.ino'
    /bin/tar: Ignoring unknown extended header keyword `SCHILY.nlink'
    /bin/tar: Ignoring unknown extended header keyword `SCHILY.dev'
    /bin/tar: Ignoring unknown extended header keyword `SCHILY.ino'
    /bin/tar: Ignoring unknown extended header keyword `SCHILY.nlink'
    /bin/tar: Ignoring unknown extended header keyword `SCHILY.dev'
    /bin/tar: Ignoring unknown extended header keyword `SCHILY.ino'
    /bin/tar: Ignoring unknown extended header keyword `SCHILY.nlink'
    /bin/tar: Ignoring unknown extended header keyword `SCHILY.dev'
    /bin/tar: Ignoring unknown extended header keyword `SCHILY.ino'
    /bin/tar: Ignoring unknown extended header keyword `SCHILY.nlink'
    /bin/tar: Ignoring unknown extended header keyword `SCHILY.dev'
    /bin/tar: Ignoring unknown extended header keyword `SCHILY.ino'
    /bin/tar: Ignoring unknown extended header keyword `SCHILY.nlink'
    Deployment id is b7d53465
    Distributing deployment
    Distribution status: success
    Activating deployment
    Deploying WildFly
    Starting wildfly cart
    Timed out waiting for http listening port
    Activation status: failure
    Activation failed for the following gears:
    undefined method `values' for nil:NilClass
    Error deploying local file. You can try to deploy manually with:
    ssh -t 53cc68dfe0b8cd921f000035.com 'oo-binary-deploy'
    SSH command finished with exit status = 255

What am I doing wrong?

  [1]: https://github.com/openshift-cartridges/openshift-wildfly-cartridge
  [2]: https://www.openshift.com/kb/kb-e1088-how-to-deploy-pre-compiled-java-applications-war-and-ear-files-onto-your-openshift-gear

Actual results:


Expected results:


Additional info:

Comment 1 Maciej Szulik 2014-07-24 14:51:11 UTC
Harit it looks as if you have wrong tar version, see http://superuser.com/questions/318809/linux-os-x-tar-incompatibility-tarballs-created-on-os-x-give-errors-when-unt and let me know of the result.

The other thing I don't like in your steps is the packaging:

    tar -zcvf tweetstream-archive.tar.gz binary-deployment

I think that might create an archive with binary-deployment as your main directory, which is not the way it should be. Go inside the binary-deployment dir and from there call archiving:

    tar -zcvf tweetstream-archive.tar.gz *

The other thing I've discovered is that by default wildfly cartridge uses java6 which isn't enough, should be at least 7. So make sure to create java7 or java8 marker inside the archive (repo/.openshift/marker/java[7|8]). I'm working on making java8 the default for this cartridge.

Comment 2 Harit Himanshu 2014-07-24 15:53:59 UTC
➜  tweetstream  rhc app deploy -a map tweetstream.tar.gz
Deployment of file '/Users/harith/Downloads/tmp/tweetstream/tweetstream.tar.gz' in progress for application map ...
Starting deploy for binary artifact
Stopping gear
Stopping wildfly cart
Creating new deployment directory
Preparing deployment
Preparing build for deployment
/bin/tar: Ignoring unknown extended header keyword `SCHILY.dev'
/bin/tar: Ignoring unknown extended header keyword `SCHILY.ino'
/bin/tar: Ignoring unknown extended header keyword `SCHILY.nlink'
/bin/tar: Ignoring unknown extended header keyword `LIBARCHIVE.creationtime'
/bin/tar: Ignoring unknown extended header keyword `SCHILY.dev'
/bin/tar: Ignoring unknown extended header keyword `SCHILY.ino'
/bin/tar: Ignoring unknown extended header keyword `SCHILY.nlink'
/bin/tar: Ignoring unknown extended header keyword `SCHILY.dev'
/bin/tar: Ignoring unknown extended header keyword `SCHILY.ino'
/bin/tar: Ignoring unknown extended header keyword `SCHILY.nlink'
/bin/tar: Ignoring unknown extended header keyword `LIBARCHIVE.creationtime'
/bin/tar: Ignoring unknown extended header keyword `SCHILY.dev'
/bin/tar: Ignoring unknown extended header keyword `SCHILY.ino'
/bin/tar: Ignoring unknown extended header keyword `SCHILY.nlink'
/bin/tar: Ignoring unknown extended header keyword `SCHILY.dev'
/bin/tar: Ignoring unknown extended header keyword `SCHILY.ino'
/bin/tar: Ignoring unknown extended header keyword `SCHILY.nlink'
/bin/tar: Ignoring unknown extended header keyword `LIBARCHIVE.creationtime'
/bin/tar: Ignoring unknown extended header keyword `SCHILY.dev'
/bin/tar: Ignoring unknown extended header keyword `SCHILY.ino'
/bin/tar: Ignoring unknown extended header keyword `SCHILY.nlink'
/bin/tar: Ignoring unknown extended header keyword `LIBARCHIVE.creationtime'
/bin/tar: Ignoring unknown extended header keyword `SCHILY.dev'
/bin/tar: Ignoring unknown extended header keyword `SCHILY.ino'
/bin/tar: Ignoring unknown extended header keyword `SCHILY.nlink'
/bin/tar: Ignoring unknown extended header keyword `LIBARCHIVE.creationtime'
/bin/tar: Ignoring unknown extended header keyword `SCHILY.dev'
/bin/tar: Ignoring unknown extended header keyword `SCHILY.ino'
/bin/tar: Ignoring unknown extended header keyword `SCHILY.nlink'
/bin/tar: Ignoring unknown extended header keyword `SCHILY.dev'
/bin/tar: Ignoring unknown extended header keyword `SCHILY.ino'
/bin/tar: Ignoring unknown extended header keyword `SCHILY.nlink'
Deployment id is 7a870820
Distributing deployment
Distribution status: success
Activating deployment
Deploying WildFly
ls: cannot access /var/lib/openshift/53cc68dfe0b8cd921f000035/app-root/runtime/repo//deployments: No such file or directory
Starting wildfly cart
Application is already running
Activation status: success
Deployment status: success
Success


This works and I also see the app coming up now. Thank you very much


However, I see 3 versions of Java and Wildfly version 8.0.0 not 8.1.0, is there anything I should know about them?
OPENSHIFT_WILDFLY_JDK8=/var/lib/openshift/53cc68dfe0b8cd921f000035/wildfly/usr/lib/jvm/jdk1.8.0_05
OPENSHIFT_WILDFLY_JDK6=/etc/alternatives/java_sdk_1.6.0
OPENSHIFT_WILDFLY_JDK7=/etc/alternatives/java_sdk_1.7.0
OPENSHIFT_WILDFLY_IDENT=wildfly:wildfly:8:0.0.5


My my application is not working. Just asking if you may know about http://stackoverflow.com/questions/24938343/javascript-websocket-error-after-deploying-to-openshift
Thanks again

Comment 3 Maciej Szulik 2014-07-25 12:58:13 UTC
Here are the answers to your questions:

> I see 3 versions of Java
> OPENSHIFT_WILDFLY_JDK8=/var/lib/openshift/53cc68dfe0b8cd921f000035/wildfly/usr/lib/jvm/jdk1.8.0_05
> OPENSHIFT_WILDFLY_JDK6=/etc/alternatives/java_sdk_1.6.0
> OPENSHIFT_WILDFLY_JDK7=/etc/alternatives/java_sdk_1.7.0

Wildfly cartridge was based on jbossas cartridge, so historically the 6th java
was left there. Currently (see [1]) there will be only java7 and java8, the later
being the default one (again see [1]).

> and Wildfly version 8.0.0 not 8.1.0
> OPENSHIFT_WILDFLY_IDENT=wildfly:wildfly:8:0.0.5

This is not wildfly version but OpenShift's id, which is built from
cartridge's name, vendor, version and cartridge version (see [2]). The version
you're looking for can be found either in [3], although it's quite cumbersome
or in wildfly's log (grep "WildFly" $OPENSHIFT_WILDFLY_LOG_DIR/server.log).

> My my application is not working.

I guess that question was already answered in that thread, you just have to use
ws://map-tweetstream.rhcloud.com:8000/tweetstream/tweets address


[1] https://github.com/openshift-cartridges/openshift-wildfly-cartridge/pull/17
[2] https://github.com/openshift-cartridges/openshift-wildfly-cartridge/blob/master/metadata/manifest.yml
[3] https://github.com/openshift-cartridges/openshift-wildfly-cartridge/tree/master/versions/8

Comment 4 Meng Bo 2014-07-28 06:39:50 UTC
Checked on devenv_5011, binary deploy a pre-build war package can be succeeded.

Deployment of file '/root/openshifttest/binary-deployment/tweetstream-archive.tar.gz' in progress for application map ...
Starting deploy for binary artifact
Stopping gear
Stopping wildfly cart
Creating new deployment directory 
Preparing deployment
Preparing build for deployment
Deployment id is d3c8dafa
Distributing deployment
Distribution status: success
Activating deployment
Deploying WildFly
Starting wildfly cart
Found 127.1.249.1:8080 listening port
Found 127.1.249.1:9990 listening port
/var/lib/openshift/53d5fa223e00d2eef2000038/wildfly/standalone/deployments /var/lib/openshift/53d5fa223e00d2eef2000038/wildfly
/var/lib/openshift/53d5fa223e00d2eef2000038/wildfly
CLIENT_MESSAGE: Failed deployments: ./tweetstream.war
Activation status: success
Deployment status: success
Success


Move bug to verified.


Note You need to log in before you can comment on or make changes to this bug.