cancel
Showing results for 
Search instead for 
Did you mean: 

Problems with SOLR and Login in share

plean
Confirmed Champ
Confirmed Champ

Using default username and password, as saved in mysql database, I try to login on to /share.

The only thing I get is a message telling me that my credentials are wrong or that alfresco is not running. I checked in /manager where I see that all webapps are running. On /alfresco I get a standard website with links but no login window.

The most confusing thing is that I see nothing in my logs during login. Neither in:

  •  /var/log/alfresco/catalina.out
  •  /usr/local/alfresco-5.0.d/alfresco.log
  •  /usr/local/alfresco-5.0.d/solr.log
  • /usr/local/alfresco-5.0.d/share.log

Share, Alfresco and Mysql all run on the same mache. In alfresco-global.properties I have:

alfresco.context=alfresco
alfresco.host=intranet-test.snct.lux
alfresco.port=8080
alfresco.protocol=http

share.context=share
share.host=intranet-test.snct.lux
share.port=8080
share.protocol=http

When I do a reload in /manager or /share of the /alfresco app, I get no errors in the logs either.

When I reload /solr4 I get

2017-07-24 10:02:14,871  ERROR [solr.core.CoreContainer] [coreLoadExecutor-5-thread-1] Unable to create core: collection1
 org.apache.solr.common.SolrException: Could not load core configuration for core collection1
        at org.apache.solr.core.ConfigSetService.getConfig(ConfigSetService.java:66)
        at org.apache.solr.core.CoreContainer.create(CoreContainer.java:554)
        at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:261)
        at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:253)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.solr.common.SolrException: Error loading solr config from solr/collection1/solrconfig.xml
        at org.apache.solr.core.SolrConfig.readFromResourceLoader(SolrConfig.java:148)
        at org.apache.solr.core.ConfigSetService.createSolrConfig(ConfigSetService.java:79)
        at org.apache.solr.core.ConfigSetService.getConfig(ConfigSetService.java:61)
        ... 9 more
Caused by: java.io.IOException: Can't find resource 'solrconfig.xml' in classpath or '/usr/local/alfresco-5.0.d/solr/collection1/conf'
        at org.apache.solr.core.SolrResourceLoader.openResource(SolrResourceLoader.java:362)
        at org.apache.solr.core.SolrResourceLoader.openConfig(SolrResourceLoader.java:308)
        at org.apache.solr.core.Config.<init>(Config.java:116)
        at org.apache.solr.core.Config.<init>(Config.java:86)
        at org.apache.solr.core.SolrConfig.<init>(SolrConfig.java:161)
        at org.apache.solr.core.SolrConfig.readFromResourceLoader(SolrConfig.java:144)
        ... 11 more
2017-07-24 10:02:14,874  ERROR [solr.core.CoreContainer] [coreLoadExecutor-5-thread-1] nullSmiley Surprisedrg.apache.solr.common.SolrException: Unable to create core: collection1
        at org.apache.solr.core.CoreContainer.recordAndThrow(CoreContainer.java:911)
        at org.apache.solr.core.CoreContainer.create(CoreContainer.java:568)
        at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:261)
        at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:253)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.solr.common.SolrException: Could not load core configuration for core collection1
        at org.apache.solr.core.ConfigSetService.getConfig(ConfigSetService.java:66)
        at org.apache.solr.core.CoreContainer.create(CoreContainer.java:554)
        ... 8 more
Caused by: org.apache.solr.common.SolrException: Error loading solr config from solr/collection1/solrconfig.xml
        at org.apache.solr.core.SolrConfig.readFromResourceLoader(SolrConfig.java:148)
        at org.apache.solr.core.ConfigSetService.createSolrConfig(ConfigSetService.java:79)
        at org.apache.solr.core.ConfigSetService.getConfig(ConfigSetService.java:61)
        ... 9 more
Caused by: java.io.IOException: Can't find resource 'solrconfig.xml' in classpath or '/usr/local/alfresco-5.0.d/solr/collection1/conf'
        at org.apache.solr.core.SolrResourceLoader.openResource(SolrResourceLoader.java:362)
        at org.apache.solr.core.SolrResourceLoader.openConfig(SolrResourceLoader.java:308)
        at org.apache.solr.core.Config.<init>(Config.java:116)
        at org.apache.solr.core.Config.<init>(Config.java:86)
        at org.apache.solr.core.SolrConfig.<init>(SolrConfig.java:161)
        at org.apache.solr.core.SolrConfig.readFromResourceLoader(SolrConfig.java:144)
        ... 11 more

I don't know if this has to do with my login problem, but I have no idea what he means with collection1? Solr4 is stated to be running after all. Neither I have no idea where the solrconfig.xml file should be located.

I did search for some days searching Alfresco discussions about similar problems, but nothing really helped on this issue. I would be very greatful for any help.

1 ACCEPTED ANSWER

afaust
Legendary Innovator
Legendary Innovator

That means SOLR indexing now works and you could search for content - if you were able to log in that is...

What did you set for the authentication chain in alfresco-global.properties? If you have not enabled alfrescoNtlm then you cannot login as admin because Alfresco will not use the internal user data and MD4 hash...

View answer in original post

16 REPLIES 16

plean
Confirmed Champ
Confirmed Champ

I got some progress I think ... Smiley Happy ... even so not yet working.

I did following 2 things:

(1) I did put absolute paths in solr4.xml

<Context crossContext="true">
  <Environment name="solr/home"  type="java.lang.String" value="/opt/alfresco-5.0.d/alf_data2/solr4" override="true"/>
  <Environment name="solr/model/dir" type="java.lang.String" value="/opt/alfresco-5.0.d/alf_data2/solr4/model" override="true"/>
  <Environment name="solr/content/dir" type="java.lang.String" value="/opt/alfresco-5.0.d/alf_data2/solr4/content" override="true"/>
</Context>

(2) Link solr4 and solr directories:

cd /usr/local/alfresco-5.0.d/

ln -s solr4 solr

Only the first did not change a lot, but after the second one, I now can start solr4 app without error.

Unfortuatley, login does not yet wortk, but I get much more messages in access_log:

192.168.211.1 - - [24/Jul/2017:13:54:12 +0200] "POST /share/page/dologin HTTP/1.1" 302 -
127.0.0.1 - - [24/Jul/2017:13:54:12 +0200] "POST /alfresco/s/api/login HTTP/1.1" 403 368
192.168.211.1 - - [24/Jul/2017:13:54:12 +0200] "GET /share/page/?error=true HTTP/1.1" 200 37889
127.0.0.1 - CN=Alfresco Repository Client, OU=Unknown, O=Alfresco Software Ltd., L=Maidenhead, ST=UK, C=GB [24/Jul/2017:13:54:15 +0200] "GET /alfresco/service/api/solr/aclchangesets?fromId=0&toId=2000&maxResults=1 HTTP/1.1" 200 235
127.0.0.1 - CN=Alfresco Repository Client, OU=Unknown, O=Alfresco Software Ltd., L=Maidenhead, ST=UK, C=GB [24/Jul/2017:13:54:15 +0200] "GET /alfresco/service/api/solr/aclchangesets?fromId=0&toId=2000&maxResults=1 HTTP/1.1" 200 235
127.0.0.1 - CN=Alfresco Repository Client, OU=Unknown, O=Alfresco Software Ltd., L=Maidenhead, ST=UK, C=GB [24/Jul/2017:13:54:15 +0200] "GET /alfresco/service/api/solr/transactions?minTxnId=0&maxTxnId=2000&maxResults=1 HTTP/1.1" 200 245
127.0.0.1 - CN=Alfresco Repository Client, OU=Unknown, O=Alfresco Software Ltd., L=Maidenhead, ST=UK, C=GB [24/Jul/2017:13:54:15 +0200] "GET /alfresco/service/api/solr/aclchangesets?fromTime=1500617624687&toTime=1500621224687&maxResults=2000 HTTP/1.1" 200 782
127.0.0.1 - CN=Alfresco Repository Client, OU=Unknown, O=Alfresco Software Ltd., L=Maidenhead, ST=UK, C=GB [24/Jul/2017:13:54:15 +0200] "GET /alfresco/service/api/solr/aclchangesets?fromTime=1500617624687&toTime=1500621224687&maxResults=2000 HTTP/1.1" 200 782
127.0.0.1 - CN=Alfresco Repository Client, OU=Unknown, O=Alfresco Software Ltd., L=Maidenhead, ST=UK, C=GB [24/Jul/2017:13:54:15 +0200] "GET /alfresco/service/api/solr/transactions?fromCommitTime=1500617631508&toCommitTime=1500621231508&maxResults=2000 HTTP/1.1" 200 2092
127.0.0.1 - CN=Alfresco Repository Client, OU=Unknown, O=Alfresco Software Ltd., L=Maidenhead, ST=UK, C=GB [24/Jul/2017:13:54:15 +0200] "GET /alfresco/service/api/solr/aclchangesets?fromTime=1500621224465&toTime=1500624824465&maxResults=2000 HTTP/1.1" 200 345
127.0.0.1 - CN=Alfresco Repository Client, OU=Unknown, O=Alfresco Software Ltd., L=Maidenhead, ST=UK, C=GB [24/Jul/2017:13:54:15 +0200] "GET /alfresco/service/api/solr/aclchangesets?fromTime=1500621224465&toTime=1500624824465&maxResults=2000 HTTP/1.1" 200 345
127.0.0.1 - CN=Alfresco Repository Client, OU=Unknown, O=Alfresco Software Ltd., L=Maidenhead, ST=UK, C=GB [24/Jul/2017:13:54:15 +0200] "GET /alfresco/service/api/solr/transactions?fromCommitTime=1500621231496&toCommitTime=1500624831496&maxResults=2000 HTTP/1.1" 200 379
127.0.0.1 - CN=Alfresco Repository Client, OU=Unknown, O=Alfresco Software Ltd., L=Maidenhead, ST=UK, C=GB [24/Jul/2017:13:54:15 +0200] "GET /alfresco/service/api/solr/aclchangesets?fromTime=1500621224687&toTime=1500624824687&maxResults=2000 HTTP/1.1" 200 235
127.0.0.1 - CN=Alfresco Repository Client, OU=Unknown, O=Alfresco Software Ltd., L=Maidenhead, ST=UK, C=GB [24/Jul/2017:13:54:15 +0200] "GET /alfresco/service/api/solr/aclchangesets?fromTime=1500621224687&toTime=1500624824687&maxResults=2000 HTTP/1.1" 200 235
127.0.0.1 - CN=Alfresco Repository Client, OU=Unknown, O=Alfresco Software Ltd., L=Maidenhead, ST=UK, C=GB [24/Jul/2017:13:54:15 +0200] "GET /alfresco/service/api/solr/transactions?fromCommitTime=1500621231508&toCommitTime=1500624831508&maxResults=2000 HTTP/1.1" 200 246
127.0.0.1 - CN=Alfresco Repository Client, OU=Unknown, O=Alfresco Software Ltd., L=Maidenhead, ST=UK, C=GB [24/Jul/2017:13:54:15 +0200] "GET /alfresco/service/api/solr/aclchangesets?fromTime=1500624824687&toTime=1500632024687&maxResults=2000 HTTP/1.1" 200 127
127.0.0.1 - CN=Alfresco Repository Client, OU=Unknown, O=Alfresco Software Ltd., L=Maidenhead, ST=UK, C=GB [24/Jul/2017:13:54:15 +0200] "GET /alfresco/service/api/solr/aclchangesets?fromTime=1500624824687&toTime=1500632024687&maxResults=2000 HTTP/1.1" 200 127
127.0.0.1 - CN=Alfresco Repository Client, OU=Unknown, O=Alfresco Software Ltd., L=Maidenhead, ST=UK, C=GB [24/Jul/2017:13:54:15 +0200] "GET /alfresco/service/api/solr/transactions?fromCommitTime=1500624831508&toCommitTime=1500632031508&maxResults=2000 HTTP/1.1" 200 115
127.0.0.1 - CN=Alfresco Repository Client, OU=Unknown, O=Alfresco Software Ltd., L=Maidenhead, ST=UK, C=GB [24/Jul/2017:13:54:15 +0200] "GET /alfresco/service/api/solr/aclchangesets?fromTime=1500632024687&toTime=1500646424687&maxResults=2000 HTTP/1.1" 200 127

afaust
Legendary Innovator
Legendary Innovator

That means SOLR indexing now works and you could search for content - if you were able to log in that is...

What did you set for the authentication chain in alfresco-global.properties? If you have not enabled alfrescoNtlm then you cannot login as admin because Alfresco will not use the internal user data and MD4 hash...

plean
Confirmed Champ
Confirmed Champ

I did have nothing with "authentication" in alfresco-global.properties, I did now add and reloaded the alfresco app:

authentication.chain=alfrescoNtlm1:alfrescoNtlm

I now get the following when trying to log in:

192.168.211.1 - - [24/Jul/2017:15:20:23 +0200] "POST /share/page/dologin HTTP/1.1" 302 -
127.0.0.1 - - [24/Jul/2017:15:20:23 +0200] "POST /alfresco/s/api/login HTTP/1.1" 403 368
192.168.211.1 - - [24/Jul/2017:15:20:23 +0200] "GET /share/page/?error=true HTTP/1.1" 200 37889

So the errors seem to be the same as above...

afaust
Legendary Innovator
Legendary Innovator

OK - if you did have nothing then the default was active, which actually is alfrescoNtlm.

Well, then the only remaining explanation is that the password hash simply does not match. You might want to try set the MD4 hash to a value that you explicitly calculated for a given password (do a SQL update on the alf_node_properties row) and then try to login with that password. If that then still does not work, you may have a weird issue somewhere in communication channel up to the comparison hash generation that results in a different hash value... Never encountered any of these so I don't know how / where that could happen...

plean
Confirmed Champ
Confirmed Champ

# echo admin | openssl md4
(stdin)= 23416c5cf7b6d5f466a7f10590a2b99c

which is not 209c6174da490caeb422f3fa5a7ae634 

weird ... I did now do:

UPDATE alf_node_properties
SET string_value='209c6174da490caeb422f3fa5a7ae634' where node_id=4 and qname_id=11;

I still get the following when loging in:

127.0.0.1 - - [24/Jul/2017:16:46:34 +0200] "POST /alfresco/s/api/login HTTP/1.1" 403 368
192.168.211.1 - - [24/Jul/2017:16:46:34 +0200] "POST /share/page/dologin HTTP/1.1" 302 -
192.168.211.1 - - [24/Jul/2017:16:46:34 +0200] "GET /share/page/?error=true HTTP/1.1" 200 37889

plean
Confirmed Champ
Confirmed Champ

When I try to open /alfresco/s/api/login?u=admin&pw=admin

I get following response:

<response>

<status>

<code>403</code>

<name>Forbidden</name>

<description>Server understood the request but refused to fulfill it.</description>

</status>

<message>06250013 Login failed</message>

<exception/>

<callstack></callstack>

<server>Community v5.0.0 (d r99759-b2) schema 8.022</server>

<time>25.07.2017 10:02:11</time>

</response>

plean
Confirmed Champ
Confirmed Champ

I will close this issue as most of the problems, except the login-issue are ok now. Thanks to Axel Faust‌!

I created a new and cleaner post for the login-issue: