DSpace 7: 'Invalid email or password'

668 views
Skip to first unread message

Sean Carte

unread,
Aug 17, 2021, 9:22:00 AM8/17/21
to DSpace Technical Support
After installing DSpace 7, I created an administrator account, but am unable to log in using those credentials; I get the error: 'invalid email or password'.

I am able to use those credentials to log into the HAL Browser, however.

I'm using a VM on a remote server with the following URLs:


I have Nginx configured to proxy port 4000.

I checked the Network tab of Firefox's Dev Tools, and saw CORS Failed errors, and the DSpace installation documentation,
  • By default, the DSpace REST API / Backend will only trust the application at dspace.ui.url.  Therefore, you should first verify that your dspace.ui.url setting (in your local.cfg) exactly matches the primary URL of your User Interface (i.e. the URL you see in the browser).  This must be an exact match: mode (http vs https), domain, port, and subpath(s) all must match.
  • If you need to trust additional client applications / URLs, those MUST be added to the rest.cors.allowed-origins configuration. See REST API for details on this configuration.
So I added these to the foot of my local.cfg and restarted tomcat:

rest.cors.allow-origins = ${dspace.ui.url}
rest.cors.allow-origins = http://localhost
rest.cors.allow-origins = http://10.4.36.43:4000
rest.cors.allow-origins = http://10.4.36.43
rest.cors.allow-origins = http://localhost:8080
rest.cors.allow-origins = localhost:8080

But that doesn't seem to have helped:

Selection_021.png
These are my configurations:

src/environments/environment.prod.ts:
export const environment = {
  ui: {
      ssl: false,
      host: 'localhost',
      port: 4000,
      nameSpace: '/'
  },
  rest: {
      ssl: false,
      host: 'localhost',
      port: 8080,
      nameSpace: '/server'
  }
};

/dspace/config/local.cfg:
dspace.dir=/dspace
dspace.server.url = http://localhost:8080/server
dspace.ui.url = http://localhost:4000

/etc/nginx/sites-enabled/default:
        location / {
                proxy_pass      http://localhost:4000;
                proxy_http_version 1.1;
                proxy_set_header Upgrade $http_upgrade;
                proxy_set_header Connection ‘upgrade’;
                proxy_set_header Host $host;
                proxy_cache_bypass $http_upgrade;
                proxy_set_header X-Real-IP $remote_addr;
                proxy_set_header HOST $http_host;
                proxy_set_header X-NginX-Proxy true;
                proxy_set_header X-Forwarded-Proto $scheme;
        }

Any ideas where I've gone wrong?

Sean

Tim Donohue

unread,
Aug 18, 2021, 11:01:44 AM8/18/21
to Sean Carte, DSpace Technical Support
Hi Sean,

It looks like your environment.prod.ts is using a "localhost" based URL for the REST API.  This means it will attempt to access your REST API on the same machine where you are running your web browser.  

In other words, a localhost URL for the REST API is only valid if you are in a development environment...where both the UI and REST API are running on your local machine & you are only accessing both via localhost URLs from that same machine.

Since it sounds like you are accessing your REST API via a public IP address (10.4.36.43), you should be using that same public URL/IP address in your "rest" settings for environment.prod.ts.  Keep in mind, your REST API also MUST be running HTTPS if you plan to run it on a non-localhost URL.  



Good luck!
Tim



From: dspac...@googlegroups.com <dspac...@googlegroups.com> on behalf of Sean Carte <sean....@gmail.com>
Sent: Tuesday, August 17, 2021 8:21 AM
To: DSpace Technical Support <dspac...@googlegroups.com>
Subject: [dspace-tech] DSpace 7: 'Invalid email or password'
 
--
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/CA%2BxAuhP%3DypdwoXdD%3DVjxJT%3D%3DF3abRkDPMUdPkr2q9DSQ2hGX%3Dg%40mail.gmail.com.

Sean Carte

unread,
Aug 19, 2021, 3:57:39 AM8/19/21
to Tim Donohue, DSpace Technical Support
Thanks, Tim. I did try using the IP address everywhere, and that didn't work. But, as you point out, that would be because I wasn't using HTTPS.

As you also point out, it's right there in the instructions: 'Running the DSpace Backend on HTTP & port 8080 is only usable for local development environments (where you are running the UI and REST API from the same machine, and only accessing them via localhost URLs).'

I must have read that a hundred times without taking it in.

I'll try again with the IP addresses and HTTPS.

Sean
Reply all
Reply to author
Forward
0 new messages