# Problem running Shiny app example: module 'resty.session' not found

**URL:** <https://discourse.openondemand.org/t/problem-running-shiny-app-example-module-resty-session-not-found/2088>\
**Category:** Get Help\
**Tags:** question\
**Created:** [May 27, 2022, 5:38pm UTC](https://discourse.openondemand.org/t/problem-running-shiny-app-example-module-resty-session-not-found/2088 "2022-05-27T17:38:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dtenenba](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/dtenenba/32/1075_2.png) [@dtenenba](https://discourse.openondemand.org/u/dtenenba)\
**Post date:** [May 27, 2022, 5:38pm UTC](https://discourse.openondemand.org/t/problem-running-shiny-app-example-module-resty-session-not-found/2088/1 "2022-05-27T17:38:33Z")

</div>

Hi,

I am trying to run an example interactive Shiny app in OOD, using this repo:

> **[GitHub - CHPC-UofU/bc\_osc\_example\_shiny: Batch Connect - Example Shiny App...](https://github.com/CHPC-UofU/bc_osc_example_shiny)**
>
> Batch Connect - Example Shiny App that runs on OSC OnDemand - GitHub - CHPC-UofU/bc\_osc\_example\_shiny: Batch Connect - Example Shiny App that runs on OSC OnDemand

The app launches, but when I click on “Connect to Shiny” I get a 500 Internal Server Error. Looking at the output.log file, I see this:

```nohighlight
2022/05/27 16:52:08 [error] 304#304: *2 lua entry thread aborted: runtime error: content_by_lua(nginx.conf:34):5: module 'resty.session' not found:
	no field package.preload['resty.session']
	no file '/usr/local/openresty/site/lualib/resty/session.ljbc'
	no file '/usr/local/openresty/site/lualib/resty/session/init.ljbc'
	no file '/usr/local/openresty/lualib/resty/session.ljbc'
	no file '/usr/local/openresty/lualib/resty/session/init.ljbc'
	no file '/usr/local/openresty/site/lualib/resty/session.lua'
	no file '/usr/local/openresty/site/lualib/resty/session/init.lua'
	no file '/usr/local/openresty/lualib/resty/session.lua'
	no file '/usr/local/openresty/lualib/resty/session/init.lua'
	no file './resty/session.lua'
	no file '/usr/local/openresty/luajit/share/luajit-2.1.0-beta3/resty/session.lua'
	no file '/usr/local/share/lua/5.1/resty/session.lua'
	no file '/usr/local/share/lua/5.1/resty/session/init.lua'
	no file '/usr/local/openresty/luajit/share/lua/5.1/resty/session.lua'
	no file '/usr/local/openresty/luajit/share/lua/5.1/resty/session/init.lua'
	no file '/usr/local/openresty/site/lualib/resty/session.so'
	no file '/usr/local/openresty/lualib/resty/session.so'
	no file './resty/session.so'
	no file '/usr/local/lib/lua/5.1/resty/session.so'
	no file '/usr/local/openresty/luajit/lib/lua/5.1/resty/session.so'
	no file '/usr/local/lib/lua/5.1/loadall.so'
	no file '/usr/local/openresty/site/lualib/resty.so'
	no file '/usr/local/openresty/lualib/resty.so'
	no file './resty.so'
	no file '/usr/local/lib/lua/5.1/resty.so'
	no file '/usr/local/openresty/luajit/lib/lua/5.1/resty.so'
	no file '/usr/local/lib/lua/5.1/loadall.so'
stack traceback:
coroutine 0:
	[C]: in function 'require'
	content_by_lua(nginx.conf:34):5: in main chunk, client: 192.168.144.3, server: , request: "POST /auth HTTP/1.1", host: "slurmnode1:35756", referrer: "https://redacted.org/pun/sys/dashboard/batch_connect/sessions"

```

Then I saw the `Singularity` file in the `ext` directory of the above linked repo, and it looks like it takes the openresty image and updates it to install the module that is missing above.

I don’t have much experience with Singularity. So I tried to create a new image like this:

```nohighlight
singularity build ./openresty_alpine-amd64-modified.sif /home/admin/ondemand/dev/bc_osc_example_shiny/ext

```

Then I modified `template/script.sh.erb` to point to that new sif file, restarted my dev server and relaunched the shiny app, and now I get this in output.log after the Singularity command:

```nohighlight
WARNING: passwd file doesn't exist in container, not updating
WARNING: group file doesn't exist in container, not updating
FATAL: failed to open /bin/sh for inspection: failed to open elf binary /bin/sh: open /bin/sh: no such file or directory
Script used to launch NGINX server exited early!
Cleaning up...

```

Any advice for getting this running? Alternatively, is there a way to run a shiny app without using Singularity, as I noticed there seems to be for RStudio Server?

Thanks.

---

<div class="post-metadata">

**Author:** ![dtenenba](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/dtenenba/32/1075_2.png) [@dtenenba](https://discourse.openondemand.org/u/dtenenba)\
**Post date:** [May 30, 2022, 6:20pm UTC](https://discourse.openondemand.org/t/problem-running-shiny-app-example-module-resty-session-not-found/2088/2 "2022-05-30T18:20:31Z")

</div>

Solved this by building the singularity container as root outside the docker container.

---

<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:** [November 26, 2022, 6:20pm UTC](https://discourse.openondemand.org/t/problem-running-shiny-app-example-module-resty-session-not-found/2088/3 "2022-11-26T18:20:59Z")

</div>

Closed on November 26, 2022, 6:20pm UTC

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