Question
Oliver Wilms · Aug 22, 2021

Web Gateway Error "Invalid Request : Cannot identify application path"

I want to try SAM in AWS. I followed these steps:

docker pull store/intersystems/sam:1.0.0.115

git clone intersystems-community/sam: System Alerting and Monitoring (SAM) (github.com)

git clone https://github.com/intersystems-community/sam

 

tar zpxvf sam-<version>.tar.gz

tar zpxvf sam-1.0.0.115-unix.tar.gz

 

$ cd sam-<version>

cd /home/ec2-user/git/sam/sam-1.0.0.115-unix/

$ ./start.sh

 

In your browser, visit:
http://<ip-address-of-host-where-SAM-runs>:8080/api/sam/app/index.csp
You'll be prompted to login. You can use standard InterSystems IRIS credentials like _SYSTEM/SYS. You'll be prompted to change the password.

 

I was able to visit http://10.2ab.1cd.xxx:8080/api/sam/app/index.csp and it prompted me to change my password.

Whenever I return to index.csp I only see a blank white screen. I see in console this:

I do not know if my AWS Windows instance has browser restrictions preventing SAM index.csp to display. I attempted to create my own SAM image with webserver so I can connect from outside AWS on port 443.

cd /efs/ICS/oliver/git

git clone https://github.com/oliverwilms/sam.git

docker build --no-cache --ulimit nofile=8192:8192 -t sam .

Next I updated docker-compose.yml and I started sam again.

I tried to pull up https://10.2ab.1cd.xxx/api/sam/app/index.csp or https://10.2ab.1cd.xxx/csp/sys/UtilHome.csp and I get 500 Internal Server Error and I see:

Web Gateway Version 2020.2.0.211.0


Systems Management

Invalid Request : Cannot identify application path

Product version: IRIS 2020.2
$ZV: 2020.2.0.211.0
00
1 0 7 117
Log in or sign up to continue

Check the permissions/ownership on:

<IRIS>/csp/bin/CSP.ini

Most likely irisusr is unable to access this file.

docker exec -it sam_iris_1 bash
root@IRIS:/tmp# cd /usr/irissys/csp/bin/
root@IRIS:/usr/irissys/csp/bin# ls
CSP.ini  CSP.log  CSPRT.ini  CSPa24.so  CSPa24Sys.so  CSPx.so  libz.so  temp
root@IRIS:/usr/irissys/csp/bin# ls -lt
total 3244
-rw-rw-r-- 1 www-data  www-data     6063 Aug 22 15:56 CSP.log
-rw-rw---- 1 irisuser  irisuser      253 Aug 21 23:57 CSPRT.ini
-rw-rw---- 1 irisuser  irisuser      606 Jun 26  2020 CSP.ini
-rwxrwxr-x 1 irisowner irisowner 1169384 Jun 26  2020 CSPa24.so
-rwxrwxr-x 1 irisowner irisowner  869720 Jun 26  2020 CSPa24Sys.so
-rwxrwxr-x 1 irisowner irisowner 1135208 Jun 26  2020 CSPx.so
-rwxr-xr-x 1 irisowner irisowner  117168 Jun 26  2020 libz.so
dr-xr-x--- 1 irisuser  irisuser     4096 Jun 26  2020 temp

in the durable place I see:

root@IRIS:/dur/iconfig/csp/bin# ls -lt
total 16
-rw-rw-r-- 1 irisuser irisuser 5943 Aug 21 23:57 CSP.log
-rw-rw---- 1 irisuser irisuser  257 Aug 21 23:57 CSPRT.ini
-rw-rw---- 1 irisuser irisuser  745 Aug 21 23:57 CSP.ini
 

For a test try to give R to others on CSP.ini  and restart Apache.

did not work. still get the same error

Add one point I edited CSP.ini file (on another similar project). Cannot remember why I had tried to add

[SYSTEM]
  System_Manager=*.*.*.*

By default, only clients local to the Web Gateway’s hosting computer are allowed access to the Web Gateway Management pages. The browser through which the management forms are accessed must be running on the same machine as the web server and Web Gateway. For example:

http://localhost:<port_no>/csp/bin/Systems/Module.cxw

You can add additional clients to the list of authorized administrators by adding the client IP addresses to the System_Manager parameter in the SYSTEM section in CSP.ini (in install-dir\CSP\bin). The System_Manager parameter represents a comma- or plus-separated list of clients (by IP address) who may access the Web Gateway Management pages. The directive shown below grants access to three remote clients in addition to the default local access.

[SYSTEM]
System_Manager=190.8.7.6, 190.8.7.5, 190.8.7.4