On Tue, May 23, 2023 at 12:06:07AM -0700, Christiane Baier wrote:
> Before I posted my problem here I tried everything as as outlined in 
> https://wiki.lyrasis.org/display/DSDOC7x/Installing+DSpace#InstallingDSpace-FrontendInstallation
>  
> It is not working without pm2. 
> 
> */dspace-ui-deploy*$ node ./dist/server/main.js
> 
> 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://<nameOfMyServer>/server/sitemaps
> 
> [08:20:25 GMT+0200 (Mitteleuropäische Sommerzeit)] Listening at 
> http://localhost:4000/
> 
> If I do:
> 
> wget -v http://localhost:4000
> 
> --2023-05-23 08:33:09--  http://localhost:4000/
> 
> Auflösen des Hostnamens localhost (localhost) … ::1, 127.0.0.1
> 
> Verbindungsaufbau zu localhost (localhost)|::1|:4000 … fehlgeschlagen: 
> Verbindungsaufbau abgelehnt.
> 
> Verbindungsaufbau zu localhost (localhost)|127.0.0.1|:4000 … verbunden.
> 
> HTTP-Anforderung gesendet, auf Antwort wird gewartet … 
> 
> Then nothing happens. And I mean nothing. I can see the connection in 
> netstat
> tcp        0      0 localhost:4000          localhost:46794         
> VERBUNDEN   dspace     784425     44998/node
> 
> And I don't get an answer where I started wget. And I am patient. After 
> more then 15 minutes I get 
> 
> GET / - - ms - -
> on the console where I started node
> an other 15 minutes:
> 
> Lesefehler (Die Wartezeit für die Verbindung ist abgelaufen) beim Vorspann 
> (header).
> 
> Erneuter Versuch.

The problem may be due to the single-threaded nature of Node in
combination with Apache HTTPD default proxy behavior.  I think that
HTTPD will try to open multiple connections to Node and keep them
open, but Node serves them serially.  So HTTPD has several connections
open and tries to use them, but Node is waiting for the first
connection to be torn down before serving another one.

This is a proxy configuration that I have for my development
environment, which runs an Apache proxy in front of Node without PM2:

<Location "/">
    SetEnv      proxy-nokeepalive 1
    SetEnv      proxy-initial-not-pooled 1
</Location>
ProxyPassMatch  "^/(scholarworks7.5/ws)$" \
                ws://localhost:4075/scholarworks7.5/$1
ProxyPass       "/scholarworks7.5/" \
                "http://localhost:4075/scholarworks7.5/"; \
                disablereuse=On \
                max=1
ProxyPassReverse "/scholarworks7.5/" \
                "http://localhost:4075/scholarworks7.5/";

Executive summary:  open one connection to Node at a time and tear it
down after use.

I have Node running on port 4075 because I sometimes have multiple
versions running concurrently and need to spread them across different
ports.

I may not need *all* of those non-default settings, but for now I
don't want to experiment further with a working configuration.

-- 
Mark H. Wood
Lead Technology Analyst

University Library
Indiana University - Purdue University Indianapolis
755 W. Michigan Street
Indianapolis, IN 46202
317-274-0749
www.ulib.iupui.edu

-- 
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 dspace-tech+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dspace-tech/ZGzXsDs8tijSo1kD%40IUPUI.Edu.

Attachment: signature.asc
Description: PGP signature

Reply via email to