Hi Tim,
I went over the troubleshooting guide, but this doesn't help as I don't get 
any content in the browser, so nothing to see. In the apache logs, I can 
see, that the host is reached: 
"GET / HTTP/1.1" 502 6753
but it hrows an error and the following is displayed in my browser:
    The proxy server received an invalid response from an upstream server.
    The proxy server could not handle the request
    Reason: *Error reading from remote server*
So no way to see any errors in the browser's Developer Tools.
I tried all the suggested steps in the troubleshooting section
I can reach my backend  wget -v 
"https://<my-backends-server-name>/server/api" and get an answer similar to 
the one when calling wget -v "https://api7.dspace.org/server/api";
I did yarn test:rest as suggested in "

   1. From [dspace-angular], run yarn test:rest This script will attempt a 
   basic Node.js connection to the REST API that is configured in your 
   "config.prod.yml" file and validate the response."

and it went well.

If I stop the app with pm2 and start it with
node ./dist/server/main.js
I get:
   Building production app config
   Overriding app config with /dspace-ui-deploy/config/config.yml
   Overriding app config with /dspace-ui-deploy/config/config.prod.yml
  Angular config.json file generated correctly at 
/dspace-ui-deploy/dist/browser/assets/config.json 

  Environment extended with app config

  dspace-angular
  Version: 7.5.0
  Environment: Production

  [HPM] Proxy created: /  -> 
https://<my-backends-server-name>/server/sitemaps
  [10:35:15 GMT+0200 (Mitteleuropäische Sommerzeit)] Listening at 
http://localhost:4000/

But if I try to reach the site in the browser - same as before. 
console where I started main.js shows:
GET / - - ms - -
1 rules skipped due to selector errors:
  .custom-file-input:lang(en)~.custom-file-label -> unmatched pseudo-class 
:lang
GET /favicon.ico 404 2723.419 ms - -
I get no answer and I get nothing on the console to get a hint what is 
wrong.
netstat -taupe | grep 4000 
shows
tcp        0      0 localhost:4000          0.0.0.0:*               LISTEN 
     dspace     119606     6143/node           
tcp        0      0 localhost:60110         localhost:4000         
 VERBUNDEN   www-data   119839     5984/apache2        
tcp        0      0 localhost:4000          localhost:60110         
VERBUNDEN   dspace     119840     6143/node

I tried the suggestion from Michael. But this doesn't change anything as 
the system still knows that localhost is 127.0.0.1 
In the output of netstat nothing is changed. I even changed the value in 
the apache config. Same. 

ipv6 is disabled on the system.
If I try
wget -v "http://localhost:4000";
I get:
--2023-05-10 10:59:16--  http://localhost:4000/
Auflösen des Hostnamens localhost (localhost) … 127.0.0.1, ::1
Verbindungsaufbau zu localhost (localhost)|127.0.0.1|:4000 … verbunden.
HTTP-Anforderung gesendet, auf Antwort wird gewartet … Lesefehler (Die 
Wartezeit für die Verbindung ist abgelaufen) beim Vorspann (header).
Erneuter Versuch.

I tried enabling mod_headers and put 
  RequestHeader set X-Forwarded-Proto https
in the default-ssl.conf of my apache. No change of behavior.

So I am completely stuck.
Kind Regards
Christiane

DSpace Technical Support schrieb am Mittwoch, 10. Mai 2023 um 20:33:06 
UTC+2:

Hi Cristiane,

In order to help, we'd need you to look for the underlying error message 
when you attempt to access the User Interface (or backend, depending on the 
problem).  Here's a troubleshooting guide with details on finding the 
underlying error: 
https://wiki.lyrasis.org/display/DSPACE/Troubleshoot+an+error#Troubleshootanerror-DSpace7.x(orabove)

We also have a list of common installation issues at the bottom of the 
install instructions. It's very likely you may be hitting one of these 
common problems (but it'd be easier to tell which one after you look for 
underlying errors): 
https://wiki.lyrasis.org/display/DSDOC7x/Installing+DSpace#InstallingDSpace-CommonInstallationIssues

If you can find more information about the underlying error, it'll be 
easier to help.

You also could try initially running the User Interface manually (not in 
PM2) just to verify your other configs are correct.  That would at least 
help ensure you have a correct configuration between the frontend & 
backend.  This is documented in step 6 of the Installation for the UI.

Tim

On Wednesday, May 10, 2023 at 11:11:57 AM UTC-5 [email protected] 
wrote:

Hi there,

I installed dspace-7.5 angular frontend on a different server, than the 
backend. It is a ubuntu 22.04 and I did it as outlined in the Installing 
the frontend section in <
https://wiki.lyrasis.org/display/DSDOC7x/Installing+DSpace#InstallingDSpace-InstallingtheFrontend(UserInterface)
>
I set up a apache proxy like it says in the documentation. Backend 
(server/api) ist reachable. 
I set up the config.prod.yml by taking the config.example.yml and changing 
the value for 
host: api7.dspace.org to the name of the backend server. HAL-Browser 
answers at https://backend-server-name/server. So this is not the problem.
I set up pm2 (like stated in the documentation) to get more logs, started 
the application and gave https://angular-server-name-as configured in 
local.cfg on Backend and apache config on angular-server-name. DNS is 
working.
In the browser I get an error after waiting for minutes "The proxy server 
received an invalid response from an upstream server.

The proxy server could not handle the request

Reason: *Error reading from remote server"*

and in the pm2 logs this error message shows up.

0|dspace-ui  | GET / - - ms - -

0|dspace-ui  | 1 rules skipped due to selector errors:

0|dspace-ui  |   .custom-file-input:lang(en)~.custom-file-label -> 
unmatched pseudo-class :lang

Can somebody tell me what is misconfigured? in config.prod.yml language is 
set to:
defaultLanguage: en
That is the entry in the original config.example.yml and I didn't changed 
it.

Kind regards
Christiane

-- 
All messages to this mailing list should adhere to the Code of Conduct: 
https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx
--- 
You received this message because you are subscribed to the Google Groups 
"DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dspace-tech/abfcedad-234f-490b-8e19-9037855f0543n%40googlegroups.com.

Reply via email to