# MATLAB sbatch: error: invalid partition specified

**URL:** <https://discourse.openondemand.org/t/matlab-sbatch-error-invalid-partition-specified/3382>\
**Category:** Get Help\
**Tags:** question\
**Created:** [March 28, 2024, 4:44pm UTC](https://discourse.openondemand.org/t/matlab-sbatch-error-invalid-partition-specified/3382 "2024-03-28T16:44:38Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![SomePersonSomeWhereI](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/somepersonsomewherei/32/2147_2.png) [@SomePersonSomeWhereI](https://discourse.openondemand.org/u/SomePersonSomeWhereI)\
**Post date:** [March 29, 2024, 6:10pm UTC](https://discourse.openondemand.org/t/matlab-sbatch-error-invalid-partition-specified/3382/21 "2024-03-29T18:10:29Z")

</div>

> [@jeff.ohrstrom](#):
>
> > [@SomePersonSomeWhereI](#):
> >
> > `accounting_id: "<%= %>"`
> 
> This is why it’s blank. `auto_accounts` and `bc_account` already know how to submit the account, so if you’re using one of those you don’t need this line at all.

I’ve removed:  
`accounting_id: "<%= %>"`

Does all this stay the same?

```auto
batch_connect:
  template: vnc
script:
  native:
  <%- slurm_args.each do |arg| %>
    - "<%= arg %>"
  <%- end %>

```

I see in the latest `user_defined_context.json` the correct project, which you previously mentioned is equivalent to Slurm’s `-A` or `--account` option:

```auto
  "version": "matlab/2020b",
  "project": "rcs",

```

Slightly different error:

```auto
sbatch: error: Account must be specified.
sbatch: error: Batch job submission failed: Unspecified error

```

```auto
App 286549 output: [2024-03-29 13:54:25 -0400] INFO "execve = [\"git\", \"describe\", \"--always\", \"--tags\"]"
App 286549 output: [2024-03-29 13:54:25 -0400] INFO "method=POST path=/pun/sys/dashboard/batch_connect/dev/bc_my_center_matlab/session_context
s format=html controller=BatchConnect::SessionContextsController action=create status=200 duration=160.61 view=13.69"
[N 2024-03-29 13:59:24.9441 255682/T3 age/Cor/CoreMain.cpp:1147]: Checking whether to disconnect long-running connections for process 286549, 
application /var/www/ood/apps/sys/dashboard (production)
App 288147 output: [2024-03-29 13:59:50 -0400] INFO "execve = [{\"SLURM_CONF\"=>\"/cm/shared/apps/slurm/var/etc/slurm.conf\"}, \"/cm/shared/ap
ps/slurm/current/bin/sbatch\", \"-D\", \"/moto/home/rk3199/ondemand/data/sys/dashboard/batch_connect/dev/bc_my_center_matlab/output/8230f9d3-451
4-4140-a6f7-32d60a416bd5\", \"-J\", \"sys/dashboard/dev/bc_my_center_matlab\", \"-o\", \"/moto/home/rk3199/ondemand/data/sys/dashboard/batch_con
nect/dev/bc_my_center_matlab/output/8230f9d3-4514-4140-a6f7-32d60a416bd5/output.log\", \"-t\", \"01:00:00\", \"--export\", \"NONE\", \"--nodes\"
, \"1\", \"--ntasks-per-node\", \"1\", \"--parsable\", \"-M\", \"terremoto\"]"
App 288147 output: [2024-03-29 13:59:50 -0400] ERROR "ERROR: OodCore::JobAdapterError - sbatch: error: Account must be specified.\nsbatch: erro
r: Batch job submission failed: Unspecified error"
App 288147 output: [2024-03-29 13:59:50 -0400] INFO "execve = [\"git\", \"describe\", \"--always\", \"--tags\"]"
App 288147 output: [2024-03-29 13:59:50 -0400] INFO "method=POST path=/pun/sys/dashboard/batch_connect/dev/bc_my_center_matlab/session_context
s format=html controller=BatchConnect::SessionContextsController action=create status=200 duration=324.14 view=125.05"

```

I also noticed in `script.sh`:  
`module load xalt/latest **matlab** /2022b`

Not sure what this `xalt` is?

---

<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:** [March 29, 2024, 6:24pm UTC](https://discourse.openondemand.org/t/matlab-sbatch-error-invalid-partition-specified/3382/22 "2024-03-29T18:24:23Z")

</div>

> [@SomePersonSomeWhereI](#):
>
> `"project": "rcs",`

Is this the account you’re trying to use?

If you’re using a user defined name like `project`, then you need to set it here in the `submit.yml.erb.`

`accounting_id: "<%= project %>"`

That’s why we provide `auto_accounts` and `bc_account` fields, so that you don’t have to provide them in the submit.yml - they do this automatically. On the other hand - if you define a completely new field - then you need to use it in `submit.yml`.

> [@SomePersonSomeWhereI](#):
>
> `module load xalt/latest **matlab** /2022b`

xalt is something we use at OSC to track module usage. Feel free to remove what you find unnessecary.

---

<div class="post-metadata">

**Author:** ![SomePersonSomeWhereI](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/somepersonsomewherei/32/2147_2.png) [@SomePersonSomeWhereI](https://discourse.openondemand.org/u/SomePersonSomeWhereI)\
**Post date:** [March 29, 2024, 6:30pm UTC](https://discourse.openondemand.org/t/matlab-sbatch-error-invalid-partition-specified/3382/23 "2024-03-29T18:30:45Z")

</div>

Progress! Looks like 2 sessions were created and completed. I put the prerequisite software on 1 node to test, do I create a field in the form to pass `--nodelist` to?

```auto
MATLAB (18741081)Completed | 
Created at: 2024-03-29 14:26:11 EDT

Session ID: e37bca6b-aadd-4dce-8b0a-403501e8ec14

For debugging purposes, this card will be retained for 6 more days

MATLAB (18741080)Completed | 
Created at: 2024-03-29 14:26:06 EDT

Session ID: c3d62c47-a422-4e38-bc15-32eafbce149f

For debugging purposes, this card will be retained for 6 more days

```

---

<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:** [March 29, 2024, 6:39pm UTC](https://discourse.openondemand.org/t/matlab-sbatch-error-invalid-partition-specified/3382/24 "2024-03-29T18:39:56Z")

</div>

> [@SomePersonSomeWhereI](#):
>
> Progress! Looks like 2 sessions were created and completed. I put the prerequisite software on 1 node to test, do I create a field in the form to pass `--nodelist` to?

I would hard code it in the `submit.yml.erb` - it’s not something you’re going to keep right? If so, there’s no reason to expose the option in the form, and you’ll have only 1 place to edit when you’re finished testing.

---

<div class="post-metadata">

**Author:** ![SomePersonSomeWhereI](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/somepersonsomewherei/32/2147_2.png) [@SomePersonSomeWhereI](https://discourse.openondemand.org/u/SomePersonSomeWhereI)\
**Post date:** [March 29, 2024, 7:49pm UTC](https://discourse.openondemand.org/t/matlab-sbatch-error-invalid-partition-specified/3382/25 "2024-03-29T19:49:38Z")

</div>

Wow this is never ending:

```auto
Scanning VNC log file for user authentications...
Generating connection YAML file...
Restoring modules from user's default
Lmod has detected the following error: These module(s) exist but cannot be
loaded as requested: "matlab/2020b"
   Try: "module spider matlab/2020b" to see how to load the module(s).

No modules loaded
+ matlab -desktop
/path/to/me/ondemand/data/sys/dashboard/batch_connect/dev/bc_my_center_matlab/output/f477bea8-4110-4491-a17b-871648534f7e/script.sh: line 39: matlab: command not found
Cleaning up...
Killing Xvnc process ID 163765
+ xfwm4 --compositor=off --daemon --sm-client-disable

(xfwm4:163882): Gtk-WARNING **: 15:43:40.755: cannot open display: :1
+ xsetroot -solid '#D3D3D3'
xsetroot: unable to open display ':1'
+ xfsettingsd --sm-client-disable
+ xfce4-panel --sm-client-disable

(xfsettingsd:163885): xfsettingsd-ERROR **: 15:43:40.785: Unable to open display.
xfce4-panel: Cannot open display: .
Type "xfce4-panel --help" for usage.

```

MATLAB 2020b is definitely available:

```auto
--------------------------------------------------------------------------------------------------------------------------------------------
  matlab:
--------------------------------------------------------------------------------------------------------------------------------------------
     Versions:
        matlab/2017b
        matlab/2018b
        matlab/2019b
        matlab/2020b
        matlab/2022b

```

I even hard code a `module load matlab/2020b` cmd in `template/script.sh.erb`

```auto
module load slurm shared matlab/2020b
module list
set -x
vglrun matlab -desktop -nosoftwareopengl

```

---

<div class="post-metadata">

**Author:** ![SomePersonSomeWhereI](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/somepersonsomewherei/32/2147_2.png) [@SomePersonSomeWhereI](https://discourse.openondemand.org/u/SomePersonSomeWhereI)\
**Post date:** [March 29, 2024, 8:09pm UTC](https://discourse.openondemand.org/t/matlab-sbatch-error-invalid-partition-specified/3382/26 "2024-03-29T20:09:18Z")

</div>

So now it looks like it’s starting:

```auto
/output.log

Setting VNC password...

Starting VNC server...

Desktop 'TurboVNC: t001:1 (rk3199)' started on display t001:1

Log file is vnc.log

Successfully started VNC server on t001:5901...

Script starting...

Starting websocket server...

/cm/local/apps/slurm/var/spool/job18741102/slurm_script: line 190: /opt/websockify/run: No such file or directory

Scanning VNC log file for user authentications...

Generating connection YAML file...

dbus[169589]: Unable to set up transient service directory: XDG_RUNTIME_DIR "/run/user/547289" not available: No such file or directory

Restoring modules from user's default

+ xfwm4 --compositor=off --daemon --sm-client-disable

(xfwm4:169703): GLib-CRITICAL **: 16:03:18.141: g_str_has_prefix: assertion 'prefix != NULL' failed

(xfwm4:169703): xfwm4-WARNING **: 16:03:18.160: The property '/general/double_click_distance' of type int is not supported

Currently Loaded Modules:

1) shared 2) anaconda/3-2022.05 3) slurm/20.11.9 4) matlab/2022b

+ matlab -desktop

+ xsetroot -solid '#D3D3D3'

+ xfsettingsd --sm-client-disable

+ xfce4-panel --sm-client-disable

(xfsettingsd:169757): GLib-CRITICAL **: 16:03:18.489: g_str_has_prefix: assertion 'prefix != NULL' failed

(xfsettingsd:169757): GLib-GObject-CRITICAL **: 16:03:18.490: g_value_get_string: assertion 'G_VALUE_HOLDS_STRING (value)' failed

(xfsettingsd:169757): GLib-GObject-CRITICAL **: 16:03:18.492: g_value_get_string: assertion 'G_VALUE_HOLDS_STRING (value)' failed

MATLAB is selecting SOFTWARE OPENGL rendering./output.log 
Setting VNC password...
Starting VNC server...

Desktop 'TurboVNC: t001:1 (rk3199)' started on display t001:1

Log file is vnc.log
Successfully started VNC server on t001:5901...
Script starting...
Starting websocket server...
/cm/local/apps/slurm/var/spool/job18741102/slurm_script: line 190: /opt/websockify/run: No such file or directory
Scanning VNC log file for user authentications...
Generating connection YAML file...
dbus[169589]: Unable to set up transient service directory: XDG_RUNTIME_DIR "/run/user/547289" not available: No such file or directory
Restoring modules from user's default
+ xfwm4 --compositor=off --daemon --sm-client-disable

(xfwm4:169703): GLib-CRITICAL **: 16:03:18.141: g_str_has_prefix: assertion 'prefix != NULL' failed

(xfwm4:169703): xfwm4-WARNING **: 16:03:18.160: The property '/general/double_click_distance' of type int is not supported

Currently Loaded Modules:
  1) shared 2) anaconda/3-2022.05 3) slurm/20.11.9 4) matlab/2022b

+ matlab -desktop
+ xsetroot -solid '#D3D3D3'
+ xfsettingsd --sm-client-disable
+ xfce4-panel --sm-client-disable

(xfsettingsd:169757): GLib-CRITICAL **: 16:03:18.489: g_str_has_prefix: assertion 'prefix != NULL' failed

(xfsettingsd:169757): GLib-GObject-CRITICAL **: 16:03:18.490: g_value_get_string: assertion 'G_VALUE_HOLDS_STRING (value)' failed

(xfsettingsd:169757): GLib-GObject-CRITICAL **: 16:03:18.492: g_value_get_string: assertion 'G_VALUE_HOLDS_STRING (value)' failed
MATLAB is selecting SOFTWARE OPENGL rendering.

```

However click on MATLAB gets:  
`Failed to connect to server`  
and clicking on host:  
`Host "t001" not specified in allowlist or cluster configs.`

I also added:

```auto
cat /etc/ood/config/apps/shell/env

OOD_SSHHOST_ALLOWLIST="t[001-010]:t[001-010].cm.cluster"

```

---

<div class="post-metadata">

**Author:** ![SomePersonSomeWhereI](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/somepersonsomewherei/32/2147_2.png) [@SomePersonSomeWhereI](https://discourse.openondemand.org/u/SomePersonSomeWhereI)\
**Post date:** [April 1, 2024, 3:03pm UTC](https://discourse.openondemand.org/t/matlab-sbatch-error-invalid-partition-specified/3382/27 "2024-04-01T15:03:05Z")

</div>

What logs should I look at to trouble shoot this? Here’s a `ps` on the compute node where the job is runninb on:  
` /opt/TurboVNC/bin/Xvnc :1 -desktop TurboVNC: t052:1 (rk3199) -auth /path/to/me/.Xauthority -geometry 800x600 -depth 24 -rfbauth vnc.passwd -x509cert /path/to/me/.vnc/x509_cert.pem -x509key /path/to/me/.vnc/x509_private.pem -rfbport 5901 -fp catalogue:/etc/X11/fontpath.d -deferupdate 1 -registrydir /usr/lib64/xorg`

here is the output.log file on the server running OOD:

```auto
Setting VNC password...
Starting VNC server...

WARNING: t052:1 is taken because of /tmp/.X11-unix/X1
Remove this file if there is no X server t052:1
Killing Xvnc process ID 411417
Xvnc process ID 411417 already killed
Xvnc did not appear to shut down cleanly. Removing /tmp/.X11-unix/X1

Desktop 'TurboVNC: t052:1 (me)' started on display t052:1

Log file is vnc.log
Successfully started VNC server on t052:5901...
Script starting...
Starting websocket server...
WebSocket server settings:
  - Listen on :59405
  - Flash security policy server
  - No SSL/TLS support (no cert file)
  - Backgrounding (daemon)
Scanning VNC log file for user authentications...
Generating connection YAML file...
Restoring modules from user's default
+ xfwm4 --compositor=off --daemon --sm-client-disable

(xfwm4:426588): GLib-CRITICAL **: 10:46:14.255: g_str_has_prefix: assertion 'prefix != NULL' failed

(xfwm4:426588): xfwm4-WARNING **: 10:46:14.267: The property '/general/double_click_distance' of type int is not supported

Currently Loaded Modules:
  1) shared 2) anaconda/3-2022.05 3) slurm/20.11.9 4) matlab/2022b

 

+ matlab -desktop
+ xsetroot -solid '#D3D3D3'
+ xfsettingsd --sm-client-disable
+ xfce4-panel --sm-client-disable

(xfsettingsd:426652): GLib-CRITICAL **: 10:46:14.507: g_str_has_prefix: assertion 'prefix != NULL' failed

(xfsettingsd:426652): GLib-GObject-CRITICAL **: 10:46:14.507: g_value_get_string: assertion 'G_VALUE_HOLDS_STRING (value)' failed

(xfsettingsd:426652): GLib-GObject-CRITICAL **: 10:46:14.508: g_value_get_string: assertion 'G_VALUE_HOLDS_STRING (value)' failed
MATLAB is selecting SOFTWARE OPENGL rendering.

```

 ![Screenshot 2024-04-01 at 9.52.53 AM](https://us1.discourse-cdn.com/flex015/uploads/osc/original/2X/f/faad725f11315d35df049b7438c111b03719664f.png)

---

<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 1, 2024, 3:49pm UTC](https://discourse.openondemand.org/t/matlab-sbatch-error-invalid-partition-specified/3382/28 "2024-04-01T15:49:16Z")

</div>

OK it seems to be starting up correctly.

Now I’d check your `rnode_uri` and `node_uri` configs and if you’ve enabled them. Then I would ask to check your `host_regex` configuration to see if the host in the URL matches the host regex you’ve supplied.

---

<div class="post-metadata">

**Author:** ![SomePersonSomeWhereI](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/somepersonsomewherei/32/2147_2.png) [@SomePersonSomeWhereI](https://discourse.openondemand.org/u/SomePersonSomeWhereI)\
**Post date:** [April 1, 2024, 8:15pm UTC](https://discourse.openondemand.org/t/matlab-sbatch-error-invalid-partition-specified/3382/29 "2024-04-01T20:15:32Z")

</div>

> [@jeff.ohrstrom](#):
>
> Now I’d check your `rnode_uri` and `node_uri` configs and if you’ve enabled them

Both are commented out.

```auto
# Sub-uri used to reverse proxy to backend web server running on node that
# knows the full URI path
# Example:
# node_uri: '/node'
# Default: null (disable this feature)
#node_uri: null

# Sub-uri used to reverse proxy to backend web server running on node that
# ONLY uses *relative* URI paths
# Example:
# rnode_uri: '/rnode'
# Default: null (disable this feature)
#rnode_uri: null

```

> [@jeff.ohrstrom](#):
>
> Then I would ask to check your `host_regex` configuration

Also commented out:  
`#host_regex: '[^/]+'`

Still seeing:  
`Host "t052" not specified in allowlist or cluster configs.`

Even though `OOD_SSHHOST_ALLOWLIST` has been set:

```auto
echo $OOD_SSHHOST_ALLOWLIST

cm.cluster:t052:t052.cm.cluster

```

Edit: here is the URL string after the hostname, note we are using port 4443:  
`:4443/pun/sys/dashboard/noVNC-1.3.0/vnc.html?autoconnect=true&path=rnode%2Ft052%2F22277%2Fwebsockify&resize=remote&password=xxx&compression=6&quality=2&commit=Launch+MATLAB`

---

<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 1, 2024, 8:50pm UTC](https://discourse.openondemand.org/t/matlab-sbatch-error-invalid-partition-specified/3382/30 "2024-04-01T20:50:42Z")

</div>

> [@SomePersonSomeWhereI](#):
>
> Both are commented out.

> [@SomePersonSomeWhereI](#):
>
> Also commented out:  
> `#host_regex: '[^/]+'`

You need to enable all 3 of these. I’d also recommend that you actually set `host_regex` to something appropriate.

> [@SomePersonSomeWhereI](#):
>
> Even though `OOD_SSHHOST_ALLOWLIST` has been set:

That only affects the shell application.

---

<div class="post-metadata">

**Author:** ![SomePersonSomeWhereI](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/somepersonsomewherei/32/2147_2.png) [@SomePersonSomeWhereI](https://discourse.openondemand.org/u/SomePersonSomeWhereI)\
**Post date:** [April 1, 2024, 9:02pm UTC](https://discourse.openondemand.org/t/matlab-sbatch-error-invalid-partition-specified/3382/31 "2024-04-01T21:02:24Z")

</div>

I changed to this:

```auto
node_uri: "/node"
rnode_uri: "/rnode"
host_regex: '[\w.-]+\.cm\.cluster'

```

Still the same “Failed to connect to server” and I restarted the `httpd24-httpd.service`

---

<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 2, 2024, 1:47pm UTC](https://discourse.openondemand.org/t/matlab-sbatch-error-invalid-partition-specified/3382/32 "2024-04-02T13:47:55Z")

</div>

> [@SomePersonSomeWhereI](#):
>
> `host_regex: '[\w.-]+\.cm\.cluster'`

`t052` doesn’t seem to match this regular expression.

It seems the hostname needs to be the FQDN. You can use `set_host` configuration to issue a different command to find the hostname.

[https://osc.github.io/ood-documentation/latest/reference/files/submit-yml/basic-bc-options.html?highlight=set\_host](https://osc.github.io/ood-documentation/latest/reference/files/submit-yml/basic-bc-options.html?highlight=set_host)

---

<div class="post-metadata">

**Author:** ![SomePersonSomeWhereI](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/somepersonsomewherei/32/2147_2.png) [@SomePersonSomeWhereI](https://discourse.openondemand.org/u/SomePersonSomeWhereI)\
**Post date:** [April 2, 2024, 3:53pm UTC](https://discourse.openondemand.org/t/matlab-sbatch-error-invalid-partition-specified/3382/33 "2024-04-02T15:53:42Z")

</div>

> [@jeff.ohrstrom](#):
>
> `t052` doesn’t seem to match this regular expression.

According to [https://regex101.com/](https://regex101.com/) t052.cm.cluster does match.

 ![Screenshot 2024-04-02 at 11.52.09 AM](https://us1.discourse-cdn.com/flex015/uploads/osc/original/2X/4/4e6b6a49aeba7d9d4c52896b1894b336b7794ac3.png)

> [@jeff.ohrstrom](#):
>
> It seems the hostname needs to be the FQDN.

No all the compute nodes just have a t with a 3 digit number.

No matter what URL variation I try I get a 404:

```auto
# Not Found

The requested URL /node/t052.cm.cluster/5432 was not found on this 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 2, 2024, 3:58pm UTC](https://discourse.openondemand.org/t/matlab-sbatch-error-invalid-partition-specified/3382/34 "2024-04-02T15:58:58Z")

</div>

> [@SomePersonSomeWhereI](#):
>
> `:4443/pun/sys/dashboard/noVNC-1.3.0/vnc.html?autoconnect=true&path=rnode%2Ft052%2F22277%2Fwebsockify&resize=remote&password=xxx&compression=6&quality=2&commit=Launch+MATLAB`

I can tell from this URL here that `t052` is the host you’re trying to connect to. Not the FQDN `t052.cm.cluster`. You can see that `path` query parameter her is `rnode/t025/2277/websockify` where `t052` is the host.

I’d ask if you bounced httpd for the locations to take affect. You can do a spot check for these locations on the `ood-portal.conf` file in httd’s configuration directory.

---

<div class="post-metadata">

**Author:** ![SomePersonSomeWhereI](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/somepersonsomewherei/32/2147_2.png) [@SomePersonSomeWhereI](https://discourse.openondemand.org/u/SomePersonSomeWhereI)\
**Post date:** [April 2, 2024, 4:19pm UTC](https://discourse.openondemand.org/t/matlab-sbatch-error-invalid-partition-specified/3382/35 "2024-04-02T16:19:42Z")

</div>

> [@jeff.ohrstrom](#):
>
> I can tell from this URL here that `t052` is the host you’re trying to connect to. Not the FQDN `t052.cm.cluster`. You can see that `path` query parameter her is `rnode/t025/2277/websockify` where `t052` is the host.

I changed the reg ex to:  
`host_regex:'^([a-zA-Z]\d{3}|\d[a-zA-Z]\d{2}|\d{2}[a-zA-Z]\d|\d{3}[a-zA-Z])$'`

That matches ‘t052’ however still 404 errors:

`154.27.26.155 - - [02/Apr/2024:12:12:50 -0400] "GET /node/t052/5432 HTTP/1.1" 404 212 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36"`

> [@jeff.ohrstrom](#):
>
> I’d ask if you bounced httpd for the locations to take affect

A few times, yes.

> [@jeff.ohrstrom](#):
>
> You can do a spot check for these locations on the `ood-portal.conf` file in httd’s configuration directory.

Do you mean these?

```auto
node_uri: "/node"
rnode_uri: "/rnode"

```

Could this be an issue since we use 4443?

```auto
#Default: null (use default port 80 or 443 if SSL enabled)
port: 443

```

---

<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 2, 2024, 4:33pm UTC](https://discourse.openondemand.org/t/matlab-sbatch-error-invalid-partition-specified/3382/36 "2024-04-02T16:33:32Z")

</div>

> [@SomePersonSomeWhereI](#):
>
> > [@jeff.ohrstrom](#):
> >
> > You can do a spot check for these locations on the `ood-portal.conf` file in httd’s configuration directory.
> 
> Do you mean these?

No I mean look in the httpd conf file: `/etc/httpd/conf.d/ood-portal.conf` for the `Location` `/rnode` and `/node`.

---

<div class="post-metadata">

**Author:** ![SomePersonSomeWhereI](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/somepersonsomewherei/32/2147_2.png) [@SomePersonSomeWhereI](https://discourse.openondemand.org/u/SomePersonSomeWhereI)\
**Post date:** [April 2, 2024, 6:17pm UTC](https://discourse.openondemand.org/t/matlab-sbatch-error-invalid-partition-specified/3382/37 "2024-04-02T18:17:20Z")

</div>

> [@jeff.ohrstrom](#):
>
> `/etc/httpd/conf.d/ood-portal.conf` for the `Location` `/rnode` and `/node`.

Looks like ours is in:  
` /opt/rh/httpd24/root/etc/httpd/conf.d/ood-portal.conf`

So all this has to change? I take it` /etc/ood/config/ood_portal.yml` does not override `ood-portal.conf`?

```auto
 # Reverse proxy traffic to backend PUNs through Unix domain sockets:
  #
  # https://ouruni.edu:443/pun/dev/app/simulations/1
  # #=> unix:/path/to/socket|http://localhost/pun/dev/app/simulations/1
  #
  SetEnv OOD_PUN_URI "/pun"
  <Location "/pun">
    AuthType Basic
    AuthName "Ourserver"
    AuthBasicProvider socache external
    AuthExternal pwauth
    AuthExternalProvideCache On
    AuthnCacheProvideFor external
    AuthnCacheContext server
    AuthnCacheTimeout 300
    RequestHeader unset Authorization
    Require valid-user

    ProxyPassReverse "http://localhost/pun"

    # ProxyPassReverseCookieDomain implementation (strip domain)
    Header edit* Set-Cookie ";\s*(?i)Domain[^;]*" ""

    # ProxyPassReverseCookiePath implementation (less restrictive)
    Header edit* Set-Cookie ";\s*(?i)Path\s*=(?-i)(?!\s*/pun)[^;]*" "; Path=/pun"

    SetEnv OOD_PUN_SOCKET_ROOT "/var/run/ondemand-nginx"
    SetEnv OOD_PUN_MAX_RETRIES "5"
    LuaHookFixups pun_proxy.lua pun_proxy_handler

  </Location>

```

---

<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 2, 2024, 6:34pm UTC](https://discourse.openondemand.org/t/matlab-sbatch-error-invalid-partition-specified/3382/38 "2024-04-02T18:34:59Z")

</div>

> [@SomePersonSomeWhereI](#):
>
> So all this has to change? I take it` /etc/ood/config/ood_portal.yml` does not override `ood-portal.conf`?

It does or at least the things int he YML file are what’s used to populate & create the CONF file. It does this through the `/opt/ood/ood-portal-generator/sbin/update_ood_portal` script.

What version of OOD are you running? Bouncing `httpd` should be enough for I think versions 2.0 and higher. At some point we added the to the systemd unit file for httpd to run update\_ood\_portal when it bounces. Maybe you’re running a version that you need to run `update_ood_portal` manually. Or maybe there’s an error in update\_ood\_portal and it’s not writing new files - you can check the systemd logs (journalctl) for httpd for that output.

---

<div class="post-metadata">

**Author:** ![SomePersonSomeWhereI](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/somepersonsomewherei/32/2147_2.png) [@SomePersonSomeWhereI](https://discourse.openondemand.org/u/SomePersonSomeWhereI)\
**Post date:** [April 2, 2024, 6:55pm UTC](https://discourse.openondemand.org/t/matlab-sbatch-error-invalid-partition-specified/3382/39 "2024-04-02T18:55:42Z")

</div>

> [@jeff.ohrstrom](#):
>
> What version of OOD are you running?

` **ondemand** -3.0.3-1.el7.x86_64`

On that note the [upgrade instructions for 3.1](https://osc.github.io/ood-documentation/latest/release-notes/v3.1-release-notes.html#upgrade-directions) have some broken dependencies for RHEL 7. I read that 3.1 would be the last for OOD?

```auto
yum update ondemand
Loaded plugins: fastestmirror, priorities, product-id, search-disabled-repos, subscription-manager
Loading mirror speeds from cached hostfile
epel/x86_64/metalink | 19 kB 00:00:00     
 * cm-rhel7-8.1-updates: updates-us-east.brightcomputing.com
 * epel: mirror.pilotfiber.com
Globus-Connect-Server-5-Stable | 3.0 kB 00:00:00     
cm-rhel7-8.1-updates | 1.5 kB 00:00:00     
https://yum.osc.edu/ondemand/3.1/web/el7/x86_64/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found
Trying other mirror.

```

Looks like `el7` was removed (or not added) in Feb 2024?  
`https://yum.osc.edu/ondemand/3.1/web/`

 ![Screenshot 2024-04-02 at 2.47.59 PM](https://us1.discourse-cdn.com/flex015/uploads/osc/original/2X/2/2dba6e3b282eb5b9598d127d74a964a2599d0772.png)

> [@jeff.ohrstrom](#):
>
> Maybe you’re running a version that you need to run `update_ood_portal` manually. Or maybe there’s an error in update\_ood\_portal and it’s not writing new files

Yes I ran that the file is still out of sync so it creates a new version could there be some missing options? Yeah I’d say so based on this `diff` of `/opt/rh/httpd24/root/etc/httpd/conf.d/ood-portal.conf.new`

```auto
< # Reverse proxy traffic to backend webserver through IP sockets:
< #
< # https://ourserver.edu:443/node/HOST/PORT/index.html
< # #=> http://HOST:PORT/node/HOST/PORT/index.html
< #
< <LocationMatch "^/node/(?<host>[\w.-]+\.cm\.cluster)/(?<port>\d+)">
< AuthType Basic
< AuthName "OurServer"
< AuthBasicProvider socache external
< AuthExternal pwauth
< AuthExternalProvideCache On
< AuthnCacheProvideFor external
< AuthnCacheContext server
< AuthnCacheTimeout 300
< RequestHeader unset Authorization
< Require valid-user
< 
< # ProxyPassReverse implementation
< Header edit Location "^[^/]+//[^/]+" ""
144,182d111
< # ProxyPassReverseCookieDomain implemenation
< Header edit* Set-Cookie ";\s*(?i)Domain[^;]*" ""
< 
< # ProxyPassReverseCookiePath implementation
< Header edit* Set-Cookie ";\s*(?i)Path[^;]*" ""
< Header edit Set-Cookie "^([^;]+)" "$1; Path=/node/%{MATCH_HOST}e/%{MATCH_PORT}e"
< 
< LuaHookFixups node_proxy.lua node_proxy_handler
< </LocationMatch>
< 
< # Reverse "relative" proxy traffic to backend webserver through IP sockets:
< #
< # https://ourserver.edu:443/rnode/HOST/PORT/index.html
< # #=> http://HOST:PORT/index.html
< #
< <LocationMatch "^/rnode/(?<host>[\w.-]+\.cm\.cluster)/(?<port>\d+)(?<uri>/.*|)">
< AuthType Basic
< AuthName "Terremoto"
< AuthBasicProvider socache external
< AuthExternal pwauth
< AuthExternalProvideCache On
< AuthnCacheProvideFor external
< AuthnCacheContext server
< AuthnCacheTimeout 300
< RequestHeader unset Authorization
< Require valid-user
< 
< # ProxyPassReverse implementation
< Header edit Location "^([^/]+//[^/]+)|(?=/)|^([\./]{1,}(?<!/))" "/rnode/%{MATCH_HOST}e/%{MATCH_PORT}e"
< 
< # ProxyPassReverseCookieDomain implemenation
< Header edit* Set-Cookie ";\s*(?i)Domain[^;]*" ""
< 
< # ProxyPassReverseCookiePath implementation
< Header edit* Set-Cookie ";\s*(?i)Path[^;]*" ""
< Header edit Set-Cookie "^([^;]+)" "$1; Path=/rnode/%{MATCH_HOST}e/%{MATCH_PORT}e"
< 
< LuaHookFixups node_proxy.lua node_proxy_handler
< </LocationMatch>
202,203d130
< ProxyPreserveHost On
< ProxyAddHeaders On

```

---

<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 2, 2024, 7:11pm UTC](https://discourse.openondemand.org/t/matlab-sbatch-error-invalid-partition-specified/3382/40 "2024-04-02T19:11:56Z")

</div>

> [@SomePersonSomeWhereI](#):
>
> Yes I ran that the file is still out of sync so it creates a new version could there be some missing options? Yeah I’d say so based on this `diff` of `/opt/rh/httpd24/root/etc/httpd/conf.d/ood-portal.conf.new`

Did you edit the conf file yourself? The program won’t replace it if it’s been edited by hand outside of the program. Try running `/opt/ood/ood-portal-generator/sbin/update_ood_portal` with the `-f` option to force an update. But beyond that, don’t edit the conf file yourself. Put all the options you want in the YAML file and let the program create the conf file.

> [@SomePersonSomeWhereI](#):
>
> On that note the [upgrade instructions for 3.1](https://osc.github.io/ood-documentation/latest/release-notes/v3.1-release-notes.html#upgrade-directions) have some broken dependencies for RHEL 7. I read that 3.1 would be the last for OOD?

3.0 is the last version supported on EL 7 systems. To get 3.1 you’d need to upgrade your OS.

[Previous page](https://discourse.openondemand.org/t/matlab-sbatch-error-invalid-partition-specified/3382.md?page=1)

[Next page](https://discourse.openondemand.org/t/matlab-sbatch-error-invalid-partition-specified/3382.md?page=3)
