Closed lepokle closed 5 years ago
now has conflicts due to merge of https://github.com/sw360/sw360chores/pull/64
Also the travis ci needs to be adopted
Tested this PR and got same failure as @maxhbr. Building images with ./sw360chores.pl --build
seems to work, but after running ./sw360chores.pl -- up -d
, container sw360_lr7_sw360
crashes with error:
ksoranko_verifa_io@oss-server:~/sw360chores$ docker logs sw360_lr7_sw360
/usr/local/bin/entrypoint.sh: line 68: /opt/sw360/tomcat-*/conf/Catalina/localhost/logs.xml: No such file or directory
@maxhbr @kallesoranko
Might it be that you didn't use a clean checkout but used your existing directory and just switched the branch? If thats the case, please be sure to delete sw360-liferay.tar.gz
in the following directories first:
miscellaneous/prepare-liferay
docker-images/sw360empty
Note that you have to delete the existing containers, images and volumes associated to lr7 at least for sw360empty
.
I've done a clean run without any errors today.
then please rename your .tar.gz
to sw360-liferay7.tar.gz
, and remove the old file if existing. This would be the save way.
The commit before this merge should be tagged for latest LR6 support
Tested this again and yes the previous error was because of that old sw360-liferay.tar.gz
file. There is probably still something missing from configs, since UI looks like:
Not sure what is missing/misconfigured. Test server is in public cloud, with firewall disabled, so it is not about that. Any ideas?
Looks like SW360_HOST and similar are not correctly configured.
I think it is in configuration/sw360.env.
-----Original Message----- From: Kalle Soranko notifications@github.com To: sw360/sw360chores sw360chores@noreply.github.com Cc: lepokle github@leo.von-klenze.de, Author author@noreply.github.com Sent: Di., 20 Aug. 2019 15:19 Subject: Re: [sw360/sw360chores] chores(liferay): make compatible with Liferay 7.2 (#65)
Tested this again and yes the previous error was because of that old sw360-liferay.tar.gz
file. There is probably still something missing from configs, since UI looks like:
Not sure what is missing/misconfigured. Test server is in public cloud, with firewall disabled, so it is not about that. Any ideas?
-- You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/sw360/sw360chores/pull/65#issuecomment-523011054
$SW360_HOST was misconfigured. Thanks @lepokle
has someone with a working LR7 deployment tested, whether the authorization server which relies on the LR soap interface, still works? (ping @kallesoranko @lepokle )
@maxhbr not sure which part you mean with soap interface, but I do have a working instance with LR7. I haven't tested the rest yet, but will do that today.
One other point that I noticed was that sometimes webapps are not deployed from _deploy/tomcat
directory, but removing all war files and deploying/copying them again to that same directory solves the issue. Is this expected behavior or do you have any ideas why this is happening ? @lepokle ?
One more point: I guess --prod
argument cannot be used anymore since the changes in deployment mechanism
@maxhbr I tested rest and it seems that I cannot access https://sw360/authorization/client-management
because
2019-08-22 09:47:44 ERROR ErrorPageFilter:176 - Forwarding to error page from request [/client-management] due to exception [403 ]
sw360_1 | org.springframework.web.client.HttpClientErrorException: 403
sw360_1 | at org.springframework.web.client.DefaultResponseErrorHandler.handleError(DefaultResponseErrorHandler.java:78)
sw360_1 | at org.springframework.web.client.RestTemplate.handleResponse(RestTemplate.java:700)
sw360_1 | at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:653)
sw360_1 | at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:613)
sw360_1 | at org.springframework.web.client.RestTemplate.postForEntity(RestTemplate.java:407)
sw360_1 | at org.eclipse.sw360.rest.authserver.security.basicauth.Sw360LiferayAuthenticationProvider.liferayAuthCheckRequest(Sw360LiferayAuthenticationProvider.java:118)
sw360_1 | at org.eclipse.sw360.rest.authserver.security.basicauth.Sw360LiferayAuthenticationProvider.isAuthorized(Sw360LiferayAuthenticationProvider.java:102)
sw360_1 | at org.eclipse.sw360.rest.authserver.security.basicauth.Sw360LiferayAuthenticationProvider.authenticate(Sw360LiferayAuthenticationProvider.java:83)
sw360_1 | at org.springframework.security.authentication.ProviderManager.authenticate(ProviderManager.java:174)
and if I try to create new client in browser's console, I get undefined
in the console and same thing in log as above. On the other hand I haven't used new client management system, so I may be doing something wrong.
maybe it would help to use https://github.com/eclipse/sw360/wiki/Dev-REST-API#client-management-via-curl
I tried to add a client with curl with no success, in terminal I get no response and in log:
sw360_1 | 2019-08-22 10:09:30 ERROR ErrorPageFilter:176 - Forwarding to error page from request [/client-management] due to exception [404 ]
sw360_1 | org.springframework.web.client.HttpClientErrorException: 404
sw360_1 | at org.springframework.web.client.DefaultResponseErrorHandler.handleError(DefaultResponseErrorHandler.java:78)
sw360_1 | at org.springframework.web.client.RestTemplate.handleResponse(RestTemplate.java:700)
sw360_1 | at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:653)
sw360_1 | at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:613)
sw360_1 | at org.springframework.web.client.RestTemplate.postForEntity(RestTemplate.java:407)
sw360_1 | at org.eclipse.sw360.rest.authserver.security.basicauth.Sw360LiferayAuthenticationProvider.liferayAuthCheckRequest(Sw360LiferayAuthenticationProvider.java:118)
sw360_1 | at org.eclipse.sw360.rest.authserver.security.basicauth.Sw360LiferayAuthenticationProvider.isAuthorized(Sw360LiferayAuthenticationProvider.java:102)
sw360_1 | at org.eclipse.sw360.rest.authserver.security.basicauth.Sw360LiferayAuthenticationProvider.authenticate(Sw360LiferayAuthenticationProvider.java:83)
sw360_1 | at org.springframework.security.authentication.ProviderManager.authenticate(ProviderManager.java:174)
... can't say what this means...
shouldn't the request ask for /authorization/client-management
instead of /client-management
?
yes, probably. I used the curl-command directly from the wiki, so:
curl -s -S \
--user "${SW360_USER}:${SW360_PW}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
-X POST https://[hostname]:[port]/authorization/client-management \
-d @- <<EOF
{
"description" : "my first test client",
"authorities" : [ "BASIC" ],
"scope" : [ "READ" ],
"access_token_validity" : 3600,
"refresh_token_validity" : 3600
}
EOF
Maybe @imaykay can comment this, since he wrote client management thing?
It seems to be that the Liferay 7 REST API is not available. The important part is:
sw360_1 | org.springframework.web.client.HttpClientErrorException: 404
sw360_1 | at org.springframework.web.client.DefaultResponseErrorHandler.handleError(DefaultResponseErrorHandler.java:78)
sw360_1 | at org.springframework.web.client.RestTemplate.handleResponse(RestTemplate.java:700)
sw360_1 | at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:653)
sw360_1 | at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:613)
sw360_1 | at org.springframework.web.client.RestTemplate.postForEntity(RestTemplate.java:407)
sw360_1 | at org.eclipse.sw360.rest.authserver.security.basicauth.Sw360LiferayAuthenticationProvider.liferayAuthCheckRequest(Sw360LiferayAuthenticationProvider.java:118)
where the last line is the last one of our own code that is trying to query the L7 REST interface. But Spring's RestTemplate cannot make a successful call. What seems strange to me is that your first output got a 403, which means that the REST API has been somehow available. But your second call resultet in a 404.
I don't have a locally running L7 installation at hand. But maybe you could test if the API is available. On L6 the path to a GUI interface was https://[host]:[port]/api/jsonws
(which might not be the case for L7, Google might help).
In addition, @lepokle, did you read anything that said that the REST API has to be manually activated in L7 since they are now using their modularized system?
I think we use the liferay SOAP API instead of REST, but https://[host]:[port]/api/jsonws
is the correct URL to check
I think we use the liferay SOAP API instead of REST, but
https://[host]:[port]/api/jsonws
is the correct URL to check
I am really not so sure about it. Check the referenced lines of code (see stacktrace). It looks like REST to me.
then please rename your
.tar.gz
tosw360-liferay7.tar.gz
, and remove the old file if existing. This would be the save way.
This will only solve the problem once. We cannot rename the file on every change. There really should be another mechanism.
Nevertheless the file will be named after the project name after this PR has been updated.
This will only solve the problem once. We cannot rename the file on every change. There really should be another mechanism.
Isn't that similar to your sw360_lr7
prefix to the docker images? Shouldn't that actually be handled with tags?
update: The url https://[host]:[port]/api/jsonws
answers and looks good with LR7
currently rest-auth is broken due to the LR7 update, see: https://github.com/eclipse/sw360/pull/623
Side note: I've also fixed the docker swarm test by waiting for postgres in the sw360 startup script
@maxhbr Can we merge it then?
This commit is mainly to make it compatible with Liferay 7.2 and contains:
Signed-off-by: Leo von Klenze leo.vonklenze@scansation.de