An upddate:
I have chnaged the way I start the UI server and instead of pm2 I use node like this:
node ./dist/server/main.js
And by starting I get the following messages:
Unable to find default config file at /var/www/tatoireposfe-deploy/config/config.yaml
Unable to find env config file at /var/www/tatoireposfe-deploy/config/config.production.yaml
Angular config.json file generated correctly at /var/www/tatoireposfe-deploy/dist/browser/assets/config.json
I have copied from the source directory config.yml in both
/var/www/tatoireposfe-deploy/config/config.yaml
and
/var/www/tatoireposfe-deploy/config/config.yml
The contents of this two file is:
rest:
ssl: false
host: localhost
port: 4000
nameSpace: /server
Nevertheless when node application start does not recognize them.
I see by the end of start up this outpout:
I don;t know exactly what this means but when I try to access the ui
I see the following output from the node:
Error: HttpErrorResponse {
headers: HttpHeaders {
normalizedNames: Map(0) {},
lazyUpdate: null,
headers: Map(0) {}
},
status: 0,
statusText: 'Unknown Error',
url: 'http://localhost:8080/api', ok: false,
name: 'HttpErrorResponse',
message: 'Http failure response for
http://localhost:8080/api: 0 Unknown Error',
error: ProgressEvent {
type: 'error',
target: XMLHttpRequest {
onloadstart: null,
onprogress: null,
onabort: null,
onerror: null,
onload: null,
ontimeout: null,
onloadend: null,
_listeners: [Object],
onreadystatechange: null,
_anonymous: undefined,
readyState: 4,
response: null,
responseText: '',
responseType: 'text',
responseURL: '',
status: 0,
statusText: '',
timeout: 0,
upload: [XMLHttpRequestUpload],
_method: 'GET',
_url: [Url],
_sync: false,
_headers: [Object],
_loweredHeaders: [Object],
_mimeOverride: null,
_request: null,
_response: null,
_responseParts: null,
_responseHeaders: null,
_aborting: null,
_error: null,
_loadedBytes: 0,
_totalBytes: 0,
_lengthComputable: false,
nodejsHttpAgent: [Agent],
nodejsHttpsAgent: [Agent],
withCredentials: true
},
currentTarget: XMLHttpRequest {
onloadstart: null,
onprogress: null,
onabort: null,
onerror: null,
onload: null,
ontimeout: null,
onloadend: null,
_listeners: [Object],
onreadystatechange: null,
_anonymous: undefined,
readyState: 4,
response: null,
responseText: '',
responseType: 'text',
responseURL: '',
status: 0,
statusText: '',
timeout: 0,
upload: [XMLHttpRequestUpload],
_method: 'GET',
_url: [Url],
_sync: false,
_headers: [Object],
_loweredHeaders: [Object],
_mimeOverride: null,
_request: null,
_response: null,
_responseParts: null,
_responseHeaders: null,
_aborting: null,
_error: null,
_loadedBytes: 0,
_totalBytes: 0,
_lengthComputable: false,
nodejsHttpAgent: [Agent],
nodejsHttpsAgent: [Agent],
withCredentials: true
},
lengthComputable: false,
loaded: 0,
total: 0
}
}
{
statusCode: 0,
statusText: 'Unknown Error',
message: 'Http failure response for
http://localhost:8080/api: 0 Unknown Error'
}
If I understand correct it tries to access dspace backend thorugh the url (higligted with yellow) on the above output:
and it is defined in dist/config/config.prod.yml.
Content of config.prog.yml is:
ui:
ssl: false
host: 127.0.0.1
port: 4000
nameSpace: /
rest:
ssl: false
host:
dspace.tatoi.mnss.eu port: 80
nameSpace: /server
I don't know why UI is not reading the correct setup from cofnig.prod.yml and I think this is the main problem.
any help is appreciated.