Error en la instalación de la interfaz de usuario (yarn start)

711 views
Skip to first unread message

Roy Antoni Ferro Afata

unread,
Mar 13, 2022, 1:40:17 PM3/13/22
to DSpace Technical Support
Instalación en servidor remoto:
1)
SO Debian 11.2
openjdk version "11.0.14" 2022-01-18
tomcat9, 
todos los requisitos necesarios para Backend.
Node. v16.14.0
yarn 1.22.17

2)
Al momento de hacer el yarn test:rest el resultado tiene éxito con la conexión a Backend
RESPONSE: 200

Checking JSON returned for validity...
        "dspaceVersion" = DSpace 7.2
        "dspaceUI" = http://midominio:4000
        "dspaceServer" = http://midominio:8080/server
        "dspaceServer" property matches UI's "rest" config? true
        Does "/api" endpoint have HAL links ("_links" section)? true
Done in 2.73s.
sin embargo el error surge al momento de lanzar el comando yarn start
teniendo como resultado lo siguiente:

3)
Error: listen EADDRNOTAVAIL: address not available midominio:4000
    at Server.setupListenHandle [as _listen2] (node:net:1313:21)
    at listenInCluster (node:net:1378:12)
    at doListen (node:net:1516:7)
    at ZoneDelegate.invokeTask (/home/repositorio/dspace-angular/dist/server/main.js:3:3858915)
    at Zone.runTask (/home/repositorio/dspace-angular/dist/server/main.js:3:3851480)
    at ZoneTask.invokeTask (/home/repositorio/dspace-angular/dist/server/main.js:3:3860500)
    at ZoneTask.options.useG.invoke (/home/repositorio/dspace-angular/dist/server/main.js:3:3860329)
    at data.args.<computed> (/home/repositorio/dspace-angular/dist/server/main.js:3:3881412)
    at processTicksAndRejections (node:internal/process/task_queues:84:21)
Emitted 'error' event on Server instance at:
    at emitErrorNT (node:net:1357:8)
    at ZoneDelegate.invokeTask (/home/repositorio/dspace-angular/dist/server/main.js:3:3858915)
    [... lines matching original stack trace ...]
    at data.args.<computed> (/home/repositorio/dspace-angular/dist/server/main.js:3:3881412)
    at processTicksAndRejections (node:internal/process/task_queues:83:21) {
  code: 'EADDRNOTAVAIL',
  errno: -99,
  syscall: 'listen',
  address: 'midominio',
  port: 4000
}
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.


Mohammad S. AlMutairi

unread,
Mar 13, 2022, 1:59:00 PM3/13/22
to DSpace Technical Support
I think you forgot to stop the frontend service before you start the compiling again. To resolve it do one of the commands you see below and then just the frontend with ( yarn serve:ssr ).
a) pm2 kill
b) kill -9 $(lsof -t -i :4000)

Roy Antoni Ferro Afata

unread,
Mar 13, 2022, 11:14:44 PM3/13/22
to DSpace Technical Support
Lamentablemente me apareció un error similar al ejecutar (yarn serve:ssr) después de haber ejecutado a) y b) en la ruta
/dspace-angular/config

aquí un pedazo de código que se mostró en el terminal como 30 segundos aproximadamente 
rRefCode=16*this.charRefCode+cp-55:isAsciiLowerHexDigit(cp)?this.charRefCode=16*this.charRefCode+cp-87:isAsciiDigit(cp)?this.charRefCode=16*this.charRefCode+cp-48:cp===$.SEMICOLON?this.state="NUMERIC_CHARACTER_REFERENCE_END_STATE":(this._err(ERR.missingSemicolonAfterCharacterReference),this._reconsumeInState("NUMERIC_CHARACTER_REFERENCE_END_STATE"))}DECIMAL_CHARACTER_REFERENCE_STATE(cp){isAsciiDigit(cp)?this.charRefCode=10*this.charRefCode+cp-48:cp===$.SEMICOLON?this.state="NUMERIC_CHARACTER_REFERENCE_END_STATE":(this._err(ERR.missingSemicolonAfterCharacterReference),this._reconsumeInState("NUMERIC_CHARACTER_REFERENCE_END_STATE"))}NUMERIC_CHARACTER_REFERENCE_END_STATE(){if(this.charRefCode===$.NULL)this._err(ERR.nullCharacterReference),this.charRefCode=$.REPLACEMENT_CHARACTER;else if(this.charRefCode>1114111)t......................................


Error: listen EADDRNOTAVAIL: address not available midominio:4000
    at Server.setupListenHandle [as _listen2] (node:net:1313:21)
    at listenInCluster (node:net:1378:12)
    at doListen (node:net:1516:7)
    at ZoneDelegate.invokeTask (/home/repositorio/dspace-angular/dist/server/main.js:3:3858915)
    at Zone.runTask (/home/repositorio/dspace-angular/dist/server/main.js:3:3851480)
    at ZoneTask.invokeTask (/home/repositorio/dspace-angular/dist/server/main.js:3:3860500)
    at ZoneTask.options.useG.invoke (/home/repositorio/dspace-angular/dist/server/main.js:3:3860329)
    at data.args.<computed> (/home/repositorio/dspace-angular/dist/server/main.js:3:3881412)
    at processTicksAndRejections (node:internal/process/task_queues:84:21)
Emitted 'error' event on Server instance at:
    at emitErrorNT (node:net:1357:8)
    at ZoneDelegate.invokeTask (/home/repositorio/dspace-angular/dist/server/main.js:3:3858915)
    [... lines matching original stack trace ...]
    at data.args.<computed> (/home/repositorio/dspace-angular/dist/server/main.js:3:3881412)
    at processTicksAndRejections (node:internal/process/task_queues:83:21) {
  code: 'EADDRNOTAVAIL',
  errno: -99,
  syscall: 'listen',
  address: 'midominio',
  port: 4000
}
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Mohammad S. AlMutairi

unread,
Mar 14, 2022, 8:00:09 AM3/14/22
to DSpace Technical Support
The issue you are facing is because port 4000 is already been used by another process. The process using port 4000 can be a previous frontend session ( which is what is expected ) or it can be any other service that is running on your server and configured to use port 4000. if it's the later then you must configure dspace frontend to use another unused port but if it was a previous node process you can just kill it using ( kill -9 PID-NUMBER ) after finding the process PID using  ( ss -nlp | grep :4000 ) and then just start the frontend service using  ( yarn serve:ssr  ).

You can use this method too if the previous node session was run using pm2:
1) pm2 kill
2) yarn serve:ssr

Or this method which should always work for you but you have to be root when you run it:
1) sudo passwd root
2) su - root
3) kill -9 $(lsof -t -i :4000)
4) cd [dspace-angular]
5) yarn serve:ssr


2022-03-14_12-24-49.png
Reply all
Reply to author
Forward
0 new messages