Is anyone resolving this issue? 

On Friday, 18 August 2023 at 10:03:43 am UTC+11 Elaine Ding wrote:

> I have the similar issue  502 proxy error like this, it happens 
> intermittently like one of ten tries.  I would like to know the solution 
> too. Thanks
>
>
> On Wednesday, August 16, 2023 at 3:56:28 PM UTC-4 catorce_CL wrote:
>
>> Hi Andrew, how do you solve it?
>>
>>
>>
>> El miércoles, 9 de agosto de 2023 a las 16:34:48 UTC-4, DSpace Technical 
>> Support escribió:
>>
>>> Hi Andrew,
>>>
>>> I'm not an expert with Nginx.  So, I'm hoping someone else on this list 
>>> might provide some advice to you.  However, I did notice that the 
>>> "error.log" you shared has a ton of errors that say:
>>>
>>> connect() failed (10061: No connection could be made because the target 
>>> machine actively refused it)
>>>
>>> This makes me suspect that Nginx may not be able to find the DSpace user 
>>> interface running on localhost:4000?  Or somehow the DSpace UI isn't 
>>> running on http://localhost:4000/ (or is on a different port)?  I'm not 
>>> sure offhand where the problem lies as I'm not an Nginx expert.  But I know 
>>> others on this list may be able to help better than I.
>>>
>>> Tim
>>> On Friday, August 4, 2023 at 6:43:13 PM UTC-5 abys...@gmail.com wrote:
>>>
>>>> Hi Tim,
>>>>
>>>> I followed as per front end installation 
>>>> <https://wiki.lyrasis.org/display/DSDOC7x/Installing+DSpace#InstallingDSpace-FrontendInstallation>
>>>>  
>>>> step *8.1.iii*, only changed the URL to match ours.
>>>> ###
>>>> # HTTPS server
>>>> server {
>>>> listen       443 ssl;
>>>> server_name repository.bionicsinstitute.org;
>>>> ssl_certificate      C:/nginx-1.25.1/cert/wildcardChain.crt;
>>>> ssl_certificate_key  C:/nginx-1.25.1/cert/domain.rsa;
>>>>
>>>> # Proxy all HTTPS requests to "/server" from NGinx to Tomcat on port 
>>>> 8080
>>>> location /server {
>>>> proxy_set_header X-Forwarded-Proto https;
>>>> proxy_set_header X-Forwarded-Host $host;
>>>> proxy_pass http://localhost:8080/server;
>>>> }
>>>>
>>>> # For UI
>>>> # proxy all HTTPS requests from NGinx to PM2 on localhost, port 4000
>>>> # URL must match the "ui" settings in config.prod.yml
>>>> location / {
>>>> proxy_pass http://localhost:4000/;
>>>> }
>>>> }
>>>> ###
>>>>
>>>>
>>>> I thought of matching the "location /" code block with the other one 
>>>> by adding below but no luck.
>>>> ###
>>>> proxy_set_header X-Forwarded-Proto https;
>>>> proxy_set_header X-Forwarded-Host $host; 
>>>> ###
>>>>
>>>>
>>>> I did look around in the logs folder but not sure what to look for.
>>>> attached are the 2 log files from \nginx\*logs* folder.
>>>> F12 on Edge shows below.
>>>> [image: image.png]
>>>>
>>>> I also tried adding below (bold) in \DSpace\config\*local.cfg* but 
>>>> still no luck (found some old post about CORS issue 
>>>> <https://github.com/DSpace/dspace-angular/issues/1036>). 
>>>> At least due to the highlighted part I can access http://localhost:4000 
>>>> from the server again.
>>>> ###
>>>> dspace.server.url = https://repository.bionicsinstitute.org/server
>>>> dspace.ui.url = https://repository.bionicsinstitute.org
>>>>
>>>> *rest.cors.allowed-origins = ${dspace.ui.url}, http://localhost:4000 
>>>> <http://localhost:4000>, https://repository.bionicsinstitute.org:443 
>>>> <https://repository.bionicsinstitute.org:443>proxies.trusted.ipranges = 
>>>> 192.168.110.6*
>>>> ###
>>>>
>>>>
>>>> Not sure if it cause issue, I've added a manual entry in 
>>>> C:\Windows\System32\drivers\etc\*hosts* file:
>>>> ###
>>>> 192.168.110.6 repository.bionicsinstitute.org
>>>> ###
>>>>
>>>> I have yet to try Apache HTTPD, will explore that next week.
>>>>
>>>>
>>>> Regards,
>>>> Andrew
>>>>
>>>>
>>>>
>>>> On Sat, Aug 5, 2023 at 3:14 AM DSpace Technical Support <
>>>> dspac...@googlegroups.com> wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> It sounds like your Nginx setup isn't working properly... but it's 
>>>>> hard to say exactly *why*.  You may want to check the Nginx logs, as it 
>>>>> could be a simple misconfiguration or similar. 
>>>>>
>>>>> Port 4000 (or any "localhost" style URLs) won't be available from a 
>>>>> different host.  This is why you need Nginx (or Apache) to turn that 
>>>>> localhost URL into an actual hostname/domain (like "demo.dspace.org").  
>>>>> The localhost URLs will only work from the same machine that site is 
>>>>> on... 
>>>>> so they are really only useful for development/quick testing.
>>>>>
>>>>> Tim
>>>>>
>>>>> On Thursday, August 3, 2023 at 6:16:26 AM UTC-5 abys...@gmail.com 
>>>>> wrote:
>>>>>
>>>>>> Hi there,
>>>>>>
>>>>>> I followed the instruction here: 
>>>>>> https://wiki.lyrasis.org/display/DSDOC7x/Installing+DSpace#InstallingDSpace-FrontendRequirements
>>>>>>
>>>>>> I used NGinx and on frontend installation:
>>>>>>
>>>>>>    - step 5; used YAML configuration
>>>>>>    - step 6: run via PM2
>>>>>>    
>>>>>> Everything went well but after finishing up the last part (step 8, 
>>>>>> add HTTPS support):
>>>>>>
>>>>>>    - accessing https://host.domain.com shows: 502 Bad Gateway
>>>>>>    can still access backend (https://host.domain.com/server)
>>>>>>    - can't access http://localhost:4000 anymore, shows: 500 Service 
>>>>>>    Unavailable
>>>>>>    if I revert the *dspace.ui.url* back to default (
>>>>>>    http://localhost:4000), it works
>>>>>>
>>>>>> Also, seems like port 4000 is not accessible from different host.
>>>>>> Not sure where to go from here so really appreciate any 
>>>>>> help/hint/anything.
>>>>>>
>>>>>> Thank you in advance.
>>>>>>
>>>>> -- 
>>>>> 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...@googlegroups.com.
>>>>> To view this discussion on the web visit 
>>>>> https://groups.google.com/d/msgid/dspace-tech/ed8dbaa5-1704-4b32-a3aa-8fb32886b5d8n%40googlegroups.com
>>>>>  
>>>>> <https://groups.google.com/d/msgid/dspace-tech/ed8dbaa5-1704-4b32-a3aa-8fb32886b5d8n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>> .
>>>>>
>>>>

-- 
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/a84b0c89-61f4-455a-a3f7-04732f2cfa56n%40googlegroups.com.

Reply via email to