# App needs initializing before use

**URL:** <https://discourse.openondemand.org/t/app-needs-initializing-before-use/1993>\
**Category:** Get Help\
**Tags:** question\
**Created:** [April 1, 2022, 1:19pm UTC](https://discourse.openondemand.org/t/app-needs-initializing-before-use/1993 "2022-04-01T13:19:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rsand](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/rsand/32/743_2.png) [@rsand](https://discourse.openondemand.org/u/rsand)\
**Post date:** [April 1, 2022, 1:19pm UTC](https://discourse.openondemand.org/t/app-needs-initializing-before-use/1993/1 "2022-04-01T13:19:05Z")

</div>

We have an Open Ondemand portal set up as a stateless image and in the image we have an app written in ruby that displays filesystem quota information on a page for the user. I have noticed that after a reboot when I use this app it says it need to be initialized before being used. Is there a way to get around this after a reboot and rebuild of the server?

---

<div class="post-metadata">

**Author:** ![jeff.ohrstrom](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/jeff.ohrstrom/32/136_2.png) [@jeff.ohrstrom](https://discourse.openondemand.org/u/jeff.ohrstrom)\
**Post date:** [April 8, 2022, 2:37pm UTC](https://discourse.openondemand.org/t/app-needs-initializing-before-use/1993/2 "2022-04-08T14:37:59Z")

</div>

> [@rsand](#):
>
> Is there a way to get around this after a reboot and rebuild of the server?

These should persist through reboots. Though not rebuilds.

When you initialize a system app, files are being written here. Clicking ‘initialize’ on that page essentially will write a new file here, to give more routes for Nginx.

/var/lib/ondemand-nginx/config/apps/sys

If you’re _rebuilding_ then you have to re-initialize this app programmatically like how the RPM installs do.

First touch the file you want

> <https://github.com/OSC/ondemand/blob/1d4a0355e11fef26fa81240cf0aa87c5d36796b5/packaging/rpm/ondemand.spec#L198>

Then run `update_nginx_stage` and it should produce `/var/lib/ondemand-nginx/config/apps/sys/my_cool_app.conf`

> <https://github.com/OSC/ondemand/blob/1d4a0355e11fef26fa81240cf0aa87c5d36796b5/packaging/rpm/ondemand.spec#L241-L242>

---

<div class="post-metadata">

**Author:** ![rsand](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/rsand/32/743_2.png) [@rsand](https://discourse.openondemand.org/u/rsand)\
**Post date:** [April 8, 2022, 2:56pm UTC](https://discourse.openondemand.org/t/app-needs-initializing-before-use/1993/3 "2022-04-08T14:56:34Z")

</div>

Thanks I will give this a try. I appreciate the help with this.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex015/uploads/osc/original/2X/b/bae70bd0ed39a3ae769c2108155f4cb3e9da8385.png) [@system](https://discourse.openondemand.org/u/system)\
**Post date:** [October 5, 2022, 2:57pm UTC](https://discourse.openondemand.org/t/app-needs-initializing-before-use/1993/4 "2022-10-05T14:57:12Z")

</div>

Closed on October 5, 2022, 2:57pm UTC

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
