Admin user with no privileges

410 views
Skip to first unread message

Douglas Eder Uno Silva

unread,
Mar 6, 2023, 1:41:28 PM3/6/23
to DSpace Technical Support
Hi everybody,

Anyone have the problem of the admin menu showing few items or not showing at all?

Deploy of DSpace 7.4 results in few items on menu and DSpace 7.5 menu displays nothing.

Backend and frontend seems to be fine. Database migrations returns Sucess on all items, can access HAL Browser, authentication, etc...

The user administrator created by `/dspace/bin/dspace create-administrator` is linked with a group named 'Administrator'

What am i could be doing wrong?

Thank you in advance for your attention and patience.

Douglas Eder Uno Silva

unread,
Mar 13, 2023, 8:19:16 AM3/13/23
to DSpace Technical Support
Hi again,

Nobody faced this type of problem before? Just me?
I don't know more what to do to make this adminisration menu shows.
Lost a month on this and the problem persists.

What am i could be doing wrong? Any ideia, guys? I need help please =(

Mohammad S. AlMutairi

unread,
Mar 13, 2023, 11:19:44 AM3/13/23
to DSpace Technical Support
Hi Douglas,

I'm suspecting you are mixing two different versions of DSpace backend and frontend. You need to provide more details about the OS and how you installed the backend and most importantly how the frontend requirements was installed for any to be able to help. 

You might need to start over the installation by downloading:

Hope it help & Good luck.

Mo.

Douglas Eder Uno Silva

unread,
Mar 13, 2023, 11:49:13 AM3/13/23
to DSpace Technical Support
Hi Mohammad! Thanks in advance for the response! I will share more details about my installation.

I created two Dockerfiles (attached), one for the frontend and another for the backend. Frontend and backend runs is separated containers.
Env vars are attached below too.

Database migrations returns 'Success' to all. Already make database clean and migrate again and problem persists.

I already checked and the version is 7.5.0 on both frontend and backend as can be seen on image below

I'm here if you need more information..

versao_backend_dspace.pngversao_frontend_dspace.png
Dockerfile
Dockerfile
env_dspace_backend
env_dspace_frontend

Mohammad S. AlMutairi

unread,
Mar 13, 2023, 5:14:53 PM3/13/23
to Douglas Eder Uno Silva, DSpace Technical Support
Hi Douglas,

For testing to isolate the cause of this issue. Can you try running the frontend on / instead of the subath /app you are running on and also bind it on the localhost adapter?. I'm suspecting the subpath is because of this old issue ( https://github.com/DSpace/dspace-angular/pull/1488 ). It could also be caused by the reverse proxy setup you have. Just try them to know for sure.

      DSPACE_UI_HOST: localhost
      DSPACE_UI_PORT: '4000'
      DSPACE_UI_NAMESPACE: /

---------------------Nginx Reverse Proxy setup-----------------------------
  location /server {

    proxy_set_header X-Forwarded-Proto https;
    proxy_set_header X-Forwarded-Host  $host;
    proxy_pass http://localhost:8080/server;

  }

  location / {

    proxy_pass http://localhost:4000;

  }
------------------End of Nginx Reverse Proxy setup------------------------

Hope it help

Mo.


--
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 a topic in the Google Groups "DSpace Technical Support" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/dspace-tech/CY2H2Qs6kVM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to dspace-tech...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dspace-tech/42fe793b-d356-42a6-9ddc-18af2f1b2524n%40googlegroups.com.

Mohammad S. AlMutairi

unread,
Mar 14, 2023, 5:34:41 AM3/14/23
to DSpace Technical Support
Hi Douglas,

In addition to the previous message, I noticed you are using a Squid Proxy in your network. You might need to bypass the proxy for the http/https traffic going from the frontend destined to the backend.

ENV http_proxy http://proxy.uefs.br:3128
ENV https_proxy http://proxy.uefs.br:3128
ENV NO_PROXY  localhost


BR, 

Mo.

Douglas Eder Uno Silva

unread,
Mar 14, 2023, 7:19:45 AM3/14/23
to Mohammad S. AlMutairi, DSpace Technical Support
Hi Mo,

I will test these changes and let you know what happens.

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/8d36ac26-401b-4baf-ab96-ad6e5760c7f0n%40googlegroups.com.


--
Douglas Silva
Analista Universitário (PORTARIA N° 92716 de 27 de agosto de 2019)

Universidade Estadual de Feira de Santana (UEFS)
Assessoria Especial de Informática (AEI)
Gerência de Suporte (GSUP)

Douglas Eder Uno Silva

unread,
Mar 14, 2023, 8:09:26 AM3/14/23
to Mohammad S. AlMutairi, DSpace Technical Support
Hi Mo,

Same behavior. Despite being logged in as an administrator, the administrative menu does not appear. No errors on browser console or in DSpace backend logs that could indicate clues of the problem.
image.png
The previous and updated nginx configuration file is attached.

I have this 'architecture' on the server. I removed some things to simplify the diagram. The server runs an NGinx, the DSpace backend and frontend are containers too. All containers are in the same network.
image.png

After configuring DSPACE_UI_HOST = localhost, the nginx container could not connect to the container of the frontend to forward the request.
Nginx could forward the request only after configuring DSPACE_UI_HOST with 0.0.0.0.
dspace.uefs.br.conf
dspace.uefs.br.updated.conf

Mohammad S. AlMutairi

unread,
Mar 17, 2023, 6:47:01 PM3/17/23
to DSpace Technical Support
Hi Douglas,

Thanks for the info. After getting into docker I see my suggestions won't work. Setting DSpace in Docker is a bit different than how it is on standalone servers. I'm setting a similar environment to yours here trying to help.

Do you get any clues when tailing the logs of angular? (docker logs -f dspace-angular-container-ID)

Mo.

Mohammad S. AlMutairi

unread,
Mar 18, 2023, 1:29:56 AM3/18/23
to DSpace Technical Support
Hi Douglas,

I was able to replicate the issue you have with the administrator menu here and saw there was no menu while logged as an administrator. I can confirm It's caused by how the reverse proxy is configured so try the attached config file instead (It's a working).

Cheers,

Mo.
dspace.uefs.br.conf

Douglas Eder Uno Silva

unread,
Mar 20, 2023, 1:47:53 PM3/20/23
to Mohammad S. AlMutairi, DSpace Technical Support
Hi Mo!

Man, it worked! Thanks a lot again for the help!

The problem is about the flag $query_string i used after the $request_uri on proxy_pass in the location for the backend. I use this on other applications that I deploy but it seems that for Java/Tomcat works differently.
When I set your configuration, I tried to debug the reason why it works and when I set the $query_string in the proxy_pass, the menu did not display any more. I never thought that this flag could be the source of this problem! I could not believe it when I saw!
The forwarding of the $query_string to the backend container makes the api omit the _embedded on requests like https://dspace.uefs.br/server/api/authz/authorizations/search/object?uri=https://dspace.uefs.br/server/api/core/sites/b7f0752f-d24f-43da-9eb8-37c5eca6c101&feature=isCommunityAdmin&embed=feature. That was the only difference between my installation and the demo https://demo7.dspace.org. Now we know why!

The working config is attached.

Do you think we can suggest something to improve the DSpace docs? I believe we can emphasize this in topic 17 of the backend installation and topic 8 of the frontend installation in the apache/nginx configuration section.

Thank you again very much for your time, attention and patience.

dspace.uefs.br.conf

Douglas Eder Uno Silva

unread,
Mar 20, 2023, 2:14:16 PM3/20/23
to Mohammad S. AlMutairi, DSpace Technical Support
Documented the solution on this issue i created on github recently: https://github.com/DSpace/DSpace/issues/8693

Mohammad S. AlMutairi

unread,
Mar 21, 2023, 7:52:02 AM3/21/23
to DSpace Technical Support
Hi Douglas,

You are most welcome. Happy you finally got it sorted out. I must thank you too for dragging me into the docker world :-). I had to build DSpace on docker thinking it could be part of the cause but it turned out I could've accomplished the final conclusion if the config file you sent was fed into any Nginx.DSpace 7 lacks any clear instructions or guidelines on how the Nginx web server reverse proxy should be set up for first-timers so I think it will help a lot of people if the Nginx reverse proxy is added besides the Apache example to give a hint of what to start with and to save someone else's time.

Accept my kindest regards,

Mo.

Tim Donohue

unread,
Mar 21, 2023, 1:08:17 PM3/21/23
to DSpace Technical Support
Hi all,

Thanks for the tips on the NGinx setup.  The only reason a sample config wasn't documented is because no one provided one :)  I've now updated the Install docs to provide a sample NGinx config based on Douglas' comments in https://github.com/DSpace/DSpace/issues/8693 

Please give a look, as I haven't tested the config.  Suggested updates are welcome:

Tim

Douglas Eder Uno Silva

unread,
Mar 21, 2023, 3:29:43 PM3/21/23
to DSpace Technical Support
Nice Tim! Seems fine to me.

Now the DSpace have an NGinx sample config.

Glad to know that all this resulted into something useful.

Thanks again guys for the support.

Reply all
Reply to author
Forward
0 new messages