No deployment content with hash error - Have to re-deploy every time I restart Wildfly

2,200 views
Skip to first unread message

Carlos Uribe

unread,
Oct 3, 2017, 4:56:58 PM10/3/17
to dcm4che
Hello, 

I have been succesful deploying the secured version of dcm4chee 5.10.5.

Everything works fine, I'm able to push and retrieve files.

What I want to do now is to be able to start wildfly as a service so that the archive is always there even if I reboot the computer.

To test, I terminated wildfly and started it again running the following command:

sudo ./standalone.sh -c dcm4chee-arc.xml


However, I get an error saying 

 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([("deployment" => "dcm4chee-arc-ear-5.10.5-mysql-secure-ui.ear")]) - failure description: "WFLYSRV0137: No deployment content with hash 58279e3f40b79ccf06ab614d1536dc4d496efe1a is available in the deployment content repository for deployment 'dcm4chee-arc-ear-5.10.5-mysql-secure-ui.ear'. This is a fatal boot error. To correct the problem, either restart with the --admin-only switch set and use the CLI to install the missing content or remove it from the configuration, or remove the deployment from the xml configuration file and restart."
13:44:54,848 FATAL [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0056: Server boot has failed in an unrecoverable manner; exiting. See previous messages for details.

I have to go to the dcm4chee-arc.xml file and delete the last lines that include

<deployments>
.....
</deployments>

After this I'm able to succesfully start wildfly again 

sudo ./standalone.sh -c dcm4chee-arc.xml

Then in another window, inside the wildfly/bin directory I run

sudo ./jboss-cli.sh -c

and I deploy dcm4che again

[standalone@localhost:9990 /] deploy /opt/dcm4chee-arc-5.10.5-mysql-secure-ui/deploy/dcm4chee-arc-ear-5.10.5-mysql-secure-ui.ear


and everything starts working again with all the settings that I had.

How can I configure this so that wildfly can start as a service and I don't have to re-deploy everytime?

thank you in advance for any help





gunterze

unread,
Oct 4, 2017, 3:31:07 AM10/4/17
to dcm4che
Why you run Wildfly and jboss-cli as root?!

Wildfly stores the deployed ear in its data directory using the hash as directory path. E.g.

$ grep sha1 ~/wildfly-10.1.0.Final/standalone/configuration/dcm4chee-arc.xml
            <content sha1="18f24d0a711ef5099df00ac07294fb0d3fb597b8"/>
$ unzip -l ~/wildfly-10.1.0.Final/standalone/data/content/18/f24d0a711ef5099df00ac07294fb0d3fb597b8/content
Archive:  /home/gunter/wildfly-10.1.0.Final/standalone/data/content/18/f24d0a711ef5099df00ac07294fb0d3fb597b8/content
  Length      Date    Time    Name
---------  ---------- -----   ----
      132  2017-10-04 08:47   META-INF/MANIFEST.MF
        0  2017-10-04 08:47   META-INF/
        0  2017-10-03 15:32   lib/
        0  2017-10-04 08:47   META-INF/maven/
        0  2017-10-04 08:47   META-INF/maven/org.dcm4che.dcm4chee-arc/
        0  2017-10-04 08:47   META-INF/maven/org.dcm4che.dcm4chee-arc/dcm4chee-arc-ear/
     8459  2017-10-03 15:32   dcm4chee-arc-mpps-scu-5.10.5.jar
:

Carlos Uribe

unread,
Oct 4, 2017, 12:11:18 PM10/4/17
to dcm4che
@gunterze  thank you very much for your reply.  Let me give you a little bit more info:

I have wildfly in /opt with the following permissions

drwxr-xr-x. 12 wildfly  wildfly         271 Sep 28 15:39 wildfly-10.1.0.Final

If I don't run it as root I get the error 

Directory /opt/wildfly/standalone/data/content is not writable

That's why I'm running wildfly as root 

If I don't run jbos-cli as root I get the error

Authenticating against security realm: ManagementRealm
Username:

I type my root credentials there and get 

Failed to connect to the controller: Unable to authenticate against controller at localhost:9990: Authentication failed: all available authentication mechanisms failed:
   JBOSS
-LOCAL-USER: javax.security.sasl.SaslException: Failed to read server challenge [Caused by java.io.FileNotFoundException: /opt/wildfly-10.1.0.Final/standalone/tmp/auth/local4538395480916100493.challenge (Permission denied)]
   DIGEST
-MD5: Server rejected authentication

When I use sudo everything works fine


I have inspected the folder 

/wildfly-10.1.0.Final/standalone/data/content



When I just deploy dcm4che, I see a folder being created there.  Then everything works.  After a copule of minutes though, it gets deleted and the /content folder is empty.  As long as I don't close wildfly everything works, but I cannot restart it without a problem.

I guess that's why I have to end up re-deploying.  

Based on this info, do you have any idea on how I can fix it?

Really appreciate your help.

Thank you

gunterze

unread,
Oct 4, 2017, 3:10:23 PM10/4/17
to dcm4che
Verify the ownership of all files and sub-directories below /opt/wildfly

Carlos Uribe

unread,
Oct 4, 2017, 6:07:09 PM10/4/17
to dcm4che
I'll check that but who should be the owner?

I have 'wildfly' for most of them but a couple are root.

I have now made everything belong to the 'wildfly' user and the group 'wildfly'

Which one should be the user? my current user or widlfly?

Also, some files are  
drwxr-xr-x

and some are

-rw-r--r--.


Gunter Zeilinger

unread,
Oct 5, 2017, 2:59:14 AM10/5/17
to dcm...@googlegroups.com
The user which runs standalone.sh, jboss-cli.sh, add-user.sh, ....

--
You received this message because you are subscribed to the Google Groups "dcm4che" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dcm4che+unsubscribe@googlegroups.com.
To post to this group, send email to dcm...@googlegroups.com.
Visit this group at https://groups.google.com/group/dcm4che.
For more options, visit https://groups.google.com/d/optout.

Carlos Uribe

unread,
Oct 5, 2017, 12:36:22 PM10/5/17
to dcm4che
I think I found the real problem but not sure how to solve it.  It seems to not be related to user permissions but rather wildfly itself.

This is what is shown in the logs

INFO  [org.jboss.as.repository] (ServerService Thread Pool -- 34) WFLYDR0009: Content /opt/wildfly-10.1.0.Final/standalone/data/content/58/279e3f40b79ccf06ab614d1536dc4d496efe1a is obsolete and will be removed
WFLYDR0002: Content removed from location /opt/wildfly-10.1.0.Final/standalone/data/content/58/279e3f40b79ccf06ab614d1536dc4d496efe1a/content

So I can deploy, everything works, as long as I don't stop the server it keeps working but at some point wildfly considers the deployment obsolete and removes it.  So the next time I try to launch it it complains because the deployment is not present anymore.

Have you encountered this?  I have googled and seem ppl having this issue but so far I haven't found any way of solving it
To unsubscribe from this group and stop receiving emails from it, send an email to dcm4che+u...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages