500 Error is showing in UI

235 views
Skip to first unread message

AFA

unread,
Feb 8, 2023, 8:02:52 AM2/8/23
to DSpace Technical Support
Dear team,

I install the DSpace 7.4  Backend successfully in AWS ubuntu 22.04 server and It is accessible through MYIP:8080/server

and I install the UI also and I did the test run it is also successful but I unable to access it through myIP:4000

root@ip-XX-XXX-XX-X:/opt/dspace-7-angular/config# yarn test:rest
yarn run v1.22.19
$ ts-node --project ./tsconfig.ts-node.json scripts/test-rest.ts
Building production app config
Overriding app config with /opt/dspace-7-angular/config/config.yml
Overriding app config with /opt/dspace-7-angular/config/config.prod.yml
...Testing connection to REST API at http://localhost:8080/server/api...

RESPONSE: 200

Checking JSON returned for validity...
        "dspaceVersion" = DSpace 7.4
        "dspaceUI" = http://localhost:4000
        "dspaceServer" = http://localhost:8080/server
        "dspaceServer" property matches UI's "rest" config? true
        Does "/api" endpoint have HAL links ("_links" section)? true
Done in 4.33s.


then I install the nginx and I paste this in /etc/nginx/sites-enabled/default :--

server { listen 80; 
              server_name localhost; 
              access_log /var/log/nginx/dspace-access.log; 
              error_log /var/log/nginx/dspace-error.log; 
     location / { 
                       proxy_set_header X-Forwarded-Host $host; 
                       proxy_set_header X-Forwarded-Server $host; 
                       proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                       proxy_pass http://localhost:4000/
                 } 
          }

then it is accessible by myIP:80 but it through 500 error, Please help me to solve this issue

Thanks,
AFA

Tim Donohue

unread,
Feb 8, 2023, 10:48:58 AM2/8/23
to DSpace Technical Support
Hi,

Please follow our troubleshooting guide to find the details behind the 500 error.  It's not easy to provide any help without the error details. 


Once you locate the error details, if you cannot figure out how to solve the problem, you may wish to see if the error is one of the "common installation issues" listed here: https://wiki.lyrasis.org/display/DSDOC7x/Installing+DSpace#InstallingDSpace-CommonInstallationIssues   If you still cannot find the solution, feel free to send the error messages to this list and hopefully someone here can provide support.

Tim

Mohammad S. AlMutairi

unread,
Feb 9, 2023, 6:06:43 PM2/9/23
to DSpace Technical Support
On Wednesday, February 8, 2023 at 4:02:52 PM UTC+3 AFA wrote:
I install the DSpace 7.4  Backend successfully in AWS ubuntu 22.04 server and It is accessible through MYIP:8080/server

and I install the UI also and I did the test run it is also successful but I unable to access it through myIP:4000

then it is accessible by myIP:80 but it through 500 error, Please help me to solve this issue
You don't need a web server or a reverse proxy for this unrecommended or unsupported configuration. If you have to have it you can stop the webserver or disable it and change your configs as you see it below. (For this to work you must have dspace version 7.3 or above).

# In local.cfg or dspace.cfg
dspace.server.url = http://myIP:8080/server
dspace.ui.url =  http://myIP

# In config.prod.yml
ui:
  ssl: false
  host: myIP
  port: 80

rest:
  ssl: false
  host: myIP
  port: 8080
  nameSpace: /server

1) yarn test:rest
2) yarn start:prod
3) Access DSpace at http://myIP

BR

AFA

unread,
Feb 10, 2023, 6:58:35 AM2/10/23
to DSpace Technical Support
I try but it UI is not opening but back-end is working fine


$ ts-node --project ./tsconfig.ts-node.json scripts/test-rest.ts
Building production app config
Overriding app config with /opt/dspace-ui/config/config.yml
Overriding app config with /opt/dspace-ui/config/config.prod.yml
...Testing connection to REST API at http://52.15.74.25:8080/server/api...


RESPONSE: 200

Checking JSON returned for validity...
        "dspaceVersion" = DSpace 7.4
        "dspaceUI" = http://52.15.74.25:80
        "dspaceServer" = http://52.15.74.25:8080/server

        "dspaceServer" property matches UI's "rest" config? true
        Does "/api" endpoint have HAL links ("_links" section)? true
Done in 3.40s.

Mohammad S. AlMutairi

unread,
Feb 10, 2023, 8:12:29 AM2/10/23
to DSpace Technical Support
Stop Nginx or Apache and try:


# In local.cfg or dspace.cfg
dspace.server.url = http://52.15.74.25:8080/server
dspace.ui.url =  http://52.15.74.25


# In config.prod.yml
ui:
  ssl: false
  host: Server-IP (Server Private IP)

  port: 80

rest:
  ssl: false
  host: 52.15.74.25

  port: 8080
  nameSpace: /server

1) yarn test:rest
2) yarn start:prod
3) Access DSpace at http://myIP

AFA

unread,
Apr 20, 2023, 1:49:53 AM4/20/23
to DSpace Technical Support
I have successfully installed DSpace 7.5 in the AWS Ubuntu instance

I have followed the below mention things:
###############################
IN   local.cfg file
after edit this file restart the tomcat server
###############################
dspace.server.url = http://IP:8080/server
dspace.ui.url = http://IP:4000




###############################
###############################
IN config.prod.yml
after edit  the below lines and then run again the build command 
                        yarn run build:prod
###############################

ui:
  ssl: false
  host: 0.0.0.0
  port: 4000
.......

# The REST API server settings
# NOTE: these settings define which (publicly available) REST API to use. They are usually
# 'synced' with the 'dspace.server.url' setting in your backend's local.cfg.
rest:
  ssl: false
  host: IP
  port: 8080
  # NOTE: Space is capitalized because 'namespace' is a reserved string in TypeScript
  nameSpace: /server




###############################
###############################
dspace-ui.json
after edit the below lines then run 
pm2 start dspace-ui.json
###############################
   "DSPACE_REST_HOST": "IP",
   "DSPACE_REST_PORT": "8080",
   "DSPACE_REST_NAMESPACE": "/server"
###############################


Thanks,
Abid Fakhre Alam
Reply all
Reply to author
Forward
0 new messages