500. Service Unavailable. The server is temporarily unable to service your request due to maintenance downtime or capacity problems

85 views
Skip to first unread message

PROTOS tecnologia (PROTOS TECNOLOGIA)

unread,
May 5, 2023, 12:38:04 PM5/5/23
to DSpace Technical Support
Hi everyone, i hope you are well.  i am facing with a problem to access to dspace front end 7.5.

i have a dspace server runing properly accessing through http://localhost:4000
and everything works fine.

Now the goal is to access the UI through a local IP (LAN) of the computer that contains both the front end and the back end. For example, to enter the UI I would like to put: http://192.168.1.10:4000 (where 192.168.1.10 is the IP address of the computer that contains the front end and the back end)

As default in the backend  (in local.cfg)  UI set as:
dspace.ui.url = http://localhost:4000

I would like the UI URL to have address:  http://192.168.1.10:4000

so i open the local.cfg and i edit it, now the ip address for my UI is:
dspace.ui.url = http://192.168.1.10:4000

After making changes to the local.cfg file, i have to re-run mvn package command in the ~/dspace-backend directory as well as the ant update command
in the ~/dspace-backend/dspace/target/dspace-installer directory.

then, i go to cd ~/dspace-frontend/config
and i edit the config.prod.yml

the file looks like this:
ui:
  ssl: false
  host:  192.168.1.10
  port: 4000
  # NOTE: Space is capitalized because 'namespace' is a reserved string in TypeScript
  nameSpace: /
  # The rateLimiter settings limit each IP to a 'max' of 500 requests per 'windowMs' (1 minute).
  rateLimiter:
    windowMs: 60000 # 1 minute
    max: 500 # limit each IP to 500 requests per windowMs
  # Trust X-FORWARDED-* headers from proxies (default = true)
  useProxies: true
------------------------------------------

------------------------------------------
# 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: true
  host: localhost
  port: 8080
  # NOTE: Space is capitalized because 'namespace' is a reserved string in TypeScript
  nameSpace: /server
------------------------------------------


after edit this file, i have to restart the yarn trhough:
yarn build:prod

everything goes well and completes succesfully.

then start the pm2 with:
pm2 start dspace-ui.json

and when i try to access to the front end through
i get the error:
500. Service Unavailable. The server is temporarily unable to service your request due to maintenance downtime or capacity problems.

maybe the error is something in the config on the back or the front end?

Any kind of help is welcome. thank you very much

DSpace Technical Support

unread,
May 5, 2023, 1:01:14 PM5/5/23
to DSpace Technical Support
Hi,

The REST API must be available via a public IP address if you plan to make the User Interface available via a public IP address.  Keep in mind the user interface runs in a user's browser... which means the user's browser MUST be able to contact your REST API.  In other words, if the UI is public then the REST API must be public.  The REST API can only use localhost if the UI is also using localhost.

A 500 error generally means the frontend cannot communicate with the backend. See our common installation issues: https://wiki.lyrasis.org/display/DSDOC7x/Installing+DSpace#InstallingDSpace-CommonInstallationIssues

You also should be aware of the troubleshooting guide, as it's a good way to debug issues and determine what the cause may be: 

Tim



Reply all
Reply to author
Forward
0 new messages