javax.mail.AuthenticationFailedException: 535-5.7.8 Username and Password not accepted. Learn more at 535 5.7.8 https://support.google.com/mail/answer/14257 i5sm29574877wjx.15 - gsmtp I don't understand why there is possibility to config auth if I need to keep the default cassandra without authentication like that : # Authentication backend, implementing IAuthenticator; used to identify users # Out of the box, Cassandra provides org.apache.cassandra.auth.{AllowAllAuthenticator, # PasswordAuthenticator}. # # - AllowAllAuthenticator performs no checks - set it to disable authentication. # - PasswordAuthenticator relies on username/password pairs to authenticate # users. It keeps usernames and hashed passwords in system_auth.credentials table. # Please increase system_auth keyspace replication factor if you use this authenticator. # If using PasswordAuthenticator, CassandraRoleManager must also be used (see below) authenticator: AllowAllAuthenticator # Authorization backend, implementing IAuthorizer; used to limit access/provide permissions # Out of the box, Cassandra provides org.apache.cassandra.auth.{AllowAllAuthorizer, # CassandraAuthorizer}. # # - AllowAllAuthorizer allows any action to any user - set it to disable authorization. # - CassandraAuthorizer stores permissions in system_auth.permissions table. Please # increase system_auth keyspace replication factor if you use this authorizer. authorizer: AllowAllAuthorizer Regards, Guillaume 2016-04-04 15:47 GMT+01:00 John D. Ament <johndament@apache.org>: > When I was setting this up a while ago, I ran into similar problems like > yours. At one point, my ops team had configured cassandra so that only > authenticated users could create keyspaces, but turned off authentication. > I received the exact error you just had. > > If you created it manually via cqlsh, then the error shown in your log "InvalidRequestException(why:Keyspace > 'Usergrid_Applications' does not exist" should not exist any longer. > > John > > On Mon, Apr 4, 2016 at 10:34 AM Guillaume <guibdx@gmail.com> wrote: > >> I removed /var/lib/cassandra/* files and restarted the service. See my >> last email please, I think we cross our last exchange. I tried to create >> the keyspace with curl -v -u superuser:superpass -X PUT >> http://localhost:8080/system/database/setup command and also directly in >> cassandra with : tron@cqlsh> CREATe KEYSPACE IF NOT EXISTS >> Usergrid_Applications WITH REPLICATION = { 'class' : 'SimpleStrategy', >> 'replication_factor' : 1 }; >> >> both of them didn't work. I don't understand what you want to know about >> creating keyspaces and limitations in my env ? >> >> 2016-04-04 15:20 GMT+01:00 John D. Ament <johndament@apache.org>: >> >>> Did you create the keyspace already? Is creating keyspaces limited in >>> your env? >>> >>> John >>> >>> >>> On Mon, Apr 4, 2016 at 10:15 AM Guillaume <guibdx@gmail.com> wrote: >>> >>>> I also added this feature >>>> in /usr/share/tomcat7/lib/usergrid-deployment.properties >>>> >>>> usergrid.cluster_name=usergrid >>>> >>>> I get the following error : Caused by: >>>> InvalidRequestException(why:Keyspace 'Usergrid_Applications' does not exist) >>>> >>>> At this step I tried to generate the database with this command : >>>> >>>> # curl -v -u superuser:superpass -X PUT >>>> http://localhost:8080/system/database/setup >>>> * Hostname was NOT found in DNS cache >>>> * Trying 127.0.0.1... >>>> * Connected to localhost (127.0.0.1) port 8080 (#0) >>>> * Server auth using Basic with user 'superuser' >>>> > PUT /system/database/setup HTTP/1.1 >>>> > Authorization: Basic c3VwZXJ1c2VyOnN1cGVycGFzcw== >>>> > User-Agent: curl/7.38.0 >>>> > Host: localhost:8080 >>>> > Accept: */* >>>> > >>>> < HTTP/1.1 500 Internal Server Error >>>> * Server Apache-Coyote/1.1 is not blacklisted >>>> < Server: Apache-Coyote/1.1 >>>> < Access-Control-Allow-Origin: * >>>> < Content-Type: application/json >>>> < Content-Length: 154 >>>> < Date: Mon, 04 Apr 2016 13:01:12 GMT >>>> < Connection: close >>>> < >>>> * Closing connection 0 >>>> {"error":"runtime","timestamp":1459774872346,"duration":1,"error_description":"Error >>>> migrating Core Persistence","exception":"java.lang.RuntimeException"}# >>>> >>>> >>>> see the attached catalina.out file >>>> >>>> 2016-04-04 15:02 GMT+01:00 Guillaume <guibdx@gmail.com>: >>>> >>>>> Sorry I missed this parameter : >>>>> >>>>> # Whether to start the thrift rpc server. >>>>> start_rpc: true >>>>> >>>>> in /etc/cassandra/cassandra.yml because I changed again the version of >>>>> cassandra ... >>>>> >>>>> It still doesn't work and RPC is turned on now. I can see : >>>>> >>>>> # netstat -pltn|grep :9 >>>>> tcp 0 0 127.0.0.1:953 0.0.0.0:* >>>>> LISTEN 1340/named >>>>> tcp 0 0 0.0.0.0:993 0.0.0.0:* >>>>> LISTEN 1/init >>>>> tcp 0 0 127.0.0.1:9160 0.0.0.0:* >>>>> LISTEN 11381/java >>>>> tcp6 0 0 ::1:953 :::* >>>>> LISTEN 1340/named >>>>> tcp6 0 0 127.0.0.1:9200 :::* >>>>> LISTEN 2640/java >>>>> tcp6 0 0 127.0.0.1:9042 :::* >>>>> LISTEN 11381/java >>>>> tcp6 0 0 127.0.0.1:9300 :::* >>>>> LISTEN 2640/java >>>>> tcp6 0 0 :::9301 :::* >>>>> LISTEN 11672/java >>>>> >>>>> and here you will find attached the new /var/log/tomcat7/catalina.out >>>>> >>>>> 2016-04-04 14:36 GMT+01:00 John D. Ament <johndament@apache.org>: >>>>> >>>>>> Guillaume, >>>>>> >>>>>> Your emails a bit confusing, I'll assume that you mean it still >>>>>> didn't work. >>>>>> >>>>>> I see this error in your logs: 1) Error injecting constructor, >>>>>> com.netflix.astyanax.connectionpool.exceptions.PoolTimeoutException: >>>>>> PoolTimeoutException: [host=127.0.0.1(127.0.0.1):9160, latency=2007(2007), >>>>>> attempts=1]Timed out waiting for connection >>>>>> >>>>>> Are you sure that cassandra is up and running when you're trying >>>>>> this? is port 9160 open? >>>>>> >>>>>> John >>>>>> >>>>>> On Mon, Apr 4, 2016 at 8:54 AM Guillaume <guibdx@gmail.com> wrote: >>>>>> >>>>>>> Hi, >>>>>>> >>>>>>> I can change my arch in order to keep cassandra out of access for >>>>>>> security. I'll try to access without auth by keeping the followings >>>>>>> parameters by default in /etc/cassandra/cassandra.yml : >>>>>>> >>>>>>> >>>>>>> authenticator: AllowAllAuthenticator >>>>>>> authorizer: AllowAllAuthorizer >>>>>>> >>>>>>> instead of : >>>>>>> >>>>>>> authenticator: PasswordAuthenticator >>>>>>> authorizer: CassandraAuthorizer >>>>>>> >>>>>>> And I changed this keys to empty values >>>>>>> in /usr/share/tomcat7/lib/usergrid-deployment.properties : >>>>>>> >>>>>>> # Set the credentials used for Cassandra, if any. >>>>>>> # >>>>>>> cassandra.username= >>>>>>> cassandra.password= >>>>>>> >>>>>>> I also moved to cassandra 2.2.5 and changed the version in >>>>>>> the /usr/share/tomcat7/lib/usergrid-deployment.properties file. >>>>>>> >>>>>>> # Set a property to tell Usergrid which version of cassandra is >>>>>>> being used. >>>>>>> # >>>>>>> cassandra.version=2.2.5 >>>>>>> >>>>>>> LOGS : >>>>>>> #### >>>>>>> >>>>>>> # curl -v 127.0.0.1:9200 >>>>>>> * Rebuilt URL to: 127.0.0.1:9200/ >>>>>>> * Hostname was NOT found in DNS cache >>>>>>> * Trying 127.0.0.1... >>>>>>> * Connected to 127.0.0.1 (127.0.0.1) port 9200 (#0) >>>>>>> > GET / HTTP/1.1 >>>>>>> > User-Agent: curl/7.38.0 >>>>>>> > Host: 127.0.0.1:9200 >>>>>>> > Accept: */* >>>>>>> > >>>>>>> < HTTP/1.1 200 OK >>>>>>> < Content-Type: application/json; charset=UTF-8 >>>>>>> < Content-Length: 332 >>>>>>> < >>>>>>> { >>>>>>> "status" : 200, >>>>>>> "name" : "ES-1", >>>>>>> "cluster_name" : "elasticsearch", >>>>>>> "version" : { >>>>>>> "number" : "1.4.5", >>>>>>> "build_hash" : "2aaf797f2a571dcb779a3b61180afe8390ab61f9", >>>>>>> "build_timestamp" : "2015-04-27T08:06:06Z", >>>>>>> "build_snapshot" : false, >>>>>>> "lucene_version" : "4.10.4" >>>>>>> }, >>>>>>> "tagline" : "You Know, for Search" >>>>>>> } >>>>>>> * Connection #0 to host 127.0.0.1 left intact >>>>>>> >>>>>>> >>>>>>> # nodetool status >>>>>>> Datacenter: datacenter1 >>>>>>> ======================= >>>>>>> Status=Up/Down >>>>>>> |/ State=Normal/Leaving/Joining/Moving >>>>>>> -- Address Load Tokens Owns Host ID >>>>>>> Rack >>>>>>> UN 127.0.0.1 131.37 KB 256 ? >>>>>>> 273f3db2-822a-4ad8-bed7-2176a1fec1b4 rack1 >>>>>>> >>>>>>> Note: Non-system keyspaces don't have the same replication settings, >>>>>>> effective ownership information is meaningless >>>>>>> >>>>>>> >>>>>>> >>>>>>> See attached logs & configs to this email please, >>>>>>> >>>>>>> Regards, >>>>>>> Guillaume >>>>>>> >>>>>>> 2016-04-04 0:34 GMT+01:00 John D. Ament <johndament@apache.org>: >>>>>>> >>>>>>>> Hi Guillaume, >>>>>>>> >>>>>>>> Just wondering, do you require auth to access your cassandra >>>>>>>> instance? >>>>>>>> >>>>>>>> John >>>>>>>> >>>>>>>> >>>>>>>> On Sun, Apr 3, 2016 at 7:12 PM Guillaume <guibdx@gmail.com> wrote: >>>>>>>> hi, I tried to init the database with the command : # curl -v -u tron:g1psy -X PUT http://localhost:8080/system/database/setup * Hostname was NOT found in DNS cache * Trying 127.0.0.1... * Connected to localhost (127.0.0.1) port 8080 (#0) * Server auth using Basic with user 'tron' > PUT /system/database/setup HTTP/1.1 > Authorization: Basic dHJvbjpnMXBzeQ== > User-Agent: curl/7.38.0 > Host: localhost:8080 > Accept: */* > < HTTP/1.1 500 Internal Server Error * Server Apache-Coyote/1.1 is not blacklisted < Server: Apache-Coyote/1.1 < Access-Control-Allow-Origin: * < Content-Type: application/json < Content-Length: 218 < Date: Sun, 03 Apr 2016 22:02:13 GMT < Connection: close < * Closing connection 0 {"error":"h_invalid_request","timestamp":1459720933979,"duration":1,"error_description":"InvalidRequestException(why:You have not logged in)","exception":"me.prettyprint.hector.api.exceptions.HInvalidRequestException"}# and from catalina.out error log I get : 2016-04-04 00:02:13,895 INFO (http-bio-8080-exec-8) [org.apache.usergrid.rest.system.DatabaseResource] - DatabaseResource initialized 2016-04-04 00:02:13,897 INFO (http-bio-8080-exec-8) [org.apache.usergrid.rest.system.DatabaseResource] - Setting up Cassandra (runDatabaseSetup) 2016-04-04 00:02:13,977 INFO (http-bio-8080-exec-8) [org.apache.usergrid.corepersistence.CpSetup] - Creating static application keyspace Usergrid_Applications 2016-04-04 00:02:13,978 ERROR (http-bio-8080-exec-8) [org.apache.usergrid.rest.exceptions.ThrowableMapper] - An uncaught exception occurred during HTTP invocation me.prettyprint.hector.api.exceptions.HInvalidRequestException: InvalidRequestException(why:You have not logged in)

usergrid-user | Guillaume | 1 year ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Re: error when I initialize the database

    usergrid-user | 1 year ago | Guillaume
    javax.mail.AuthenticationFailedException: 535-5.7.8 Username and Password not accepted. Learn more at 535 5.7.8 https://support.google.com/mail/answer/14257 i5sm29574877wjx.15 - gsmtp I don't understand why there is possibility to config auth if I need to keep the default cassandra without authentication like that : # Authentication backend, implementing IAuthenticator; used to identify users # Out of the box, Cassandra provides org.apache.cassandra.auth.{AllowAllAuthenticator, # PasswordAuthenticator}. # # - AllowAllAuthenticator performs no checks - set it to disable authentication. # - PasswordAuthenticator relies on username/password pairs to authenticate # users. It keeps usernames and hashed passwords in system_auth.credentials table. # Please increase system_auth keyspace replication factor if you use this authenticator. # If using PasswordAuthenticator, CassandraRoleManager must also be used (see below) authenticator: AllowAllAuthenticator # Authorization backend, implementing IAuthorizer; used to limit access/provide permissions # Out of the box, Cassandra provides org.apache.cassandra.auth.{AllowAllAuthorizer, # CassandraAuthorizer}. # # - AllowAllAuthorizer allows any action to any user - set it to disable authorization. # - CassandraAuthorizer stores permissions in system_auth.permissions table. Please # increase system_auth keyspace replication factor if you use this authorizer. authorizer: AllowAllAuthorizer Regards, Guillaume 2016-04-04 15:47 GMT+01:00 John D. Ament <johndament@apache.org>: > When I was setting this up a while ago, I ran into similar problems like > yours. At one point, my ops team had configured cassandra so that only > authenticated users could create keyspaces, but turned off authentication. > I received the exact error you just had. > > If you created it manually via cqlsh, then the error shown in your log "InvalidRequestException(why:Keyspace > 'Usergrid_Applications' does not exist" should not exist any longer. > > John > > On Mon, Apr 4, 2016 at 10:34 AM Guillaume <guibdx@gmail.com> wrote: > >> I removed /var/lib/cassandra/* files and restarted the service. See my >> last email please, I think we cross our last exchange. I tried to create >> the keyspace with curl -v -u superuser:superpass -X PUT >> http://localhost:8080/system/database/setup command and also directly in >> cassandra with : tron@cqlsh> CREATe KEYSPACE IF NOT EXISTS >> Usergrid_Applications WITH REPLICATION = { 'class' : 'SimpleStrategy', >> 'replication_factor' : 1 }; >> >> both of them didn't work. I don't understand what you want to know about >> creating keyspaces and limitations in my env ? >> >> 2016-04-04 15:20 GMT+01:00 John D. Ament <johndament@apache.org>: >> >>> Did you create the keyspace already? Is creating keyspaces limited in >>> your env? >>> >>> John >>> >>> >>> On Mon, Apr 4, 2016 at 10:15 AM Guillaume <guibdx@gmail.com> wrote: >>> >>>> I also added this feature >>>> in /usr/share/tomcat7/lib/usergrid-deployment.properties >>>> >>>> usergrid.cluster_name=usergrid >>>> >>>> I get the following error : Caused by: >>>> InvalidRequestException(why:Keyspace 'Usergrid_Applications' does not exist) >>>> >>>> At this step I tried to generate the database with this command : >>>> >>>> # curl -v -u superuser:superpass -X PUT >>>> http://localhost:8080/system/database/setup >>>> * Hostname was NOT found in DNS cache >>>> * Trying 127.0.0.1... >>>> * Connected to localhost (127.0.0.1) port 8080 (#0) >>>> * Server auth using Basic with user 'superuser' >>>> > PUT /system/database/setup HTTP/1.1 >>>> > Authorization: Basic c3VwZXJ1c2VyOnN1cGVycGFzcw== >>>> > User-Agent: curl/7.38.0 >>>> > Host: localhost:8080 >>>> > Accept: */* >>>> > >>>> < HTTP/1.1 500 Internal Server Error >>>> * Server Apache-Coyote/1.1 is not blacklisted >>>> < Server: Apache-Coyote/1.1 >>>> < Access-Control-Allow-Origin: * >>>> < Content-Type: application/json >>>> < Content-Length: 154 >>>> < Date: Mon, 04 Apr 2016 13:01:12 GMT >>>> < Connection: close >>>> < >>>> * Closing connection 0 >>>> {"error":"runtime","timestamp":1459774872346,"duration":1,"error_description":"Error >>>> migrating Core Persistence","exception":"java.lang.RuntimeException"}# >>>> >>>> >>>> see the attached catalina.out file >>>> >>>> 2016-04-04 15:02 GMT+01:00 Guillaume <guibdx@gmail.com>: >>>> >>>>> Sorry I missed this parameter : >>>>> >>>>> # Whether to start the thrift rpc server. >>>>> start_rpc: true >>>>> >>>>> in /etc/cassandra/cassandra.yml because I changed again the version of >>>>> cassandra ... >>>>> >>>>> It still doesn't work and RPC is turned on now. I can see : >>>>> >>>>> # netstat -pltn|grep :9 >>>>> tcp 0 0 127.0.0.1:953 0.0.0.0:* >>>>> LISTEN 1340/named >>>>> tcp 0 0 0.0.0.0:993 0.0.0.0:* >>>>> LISTEN 1/init >>>>> tcp 0 0 127.0.0.1:9160 0.0.0.0:* >>>>> LISTEN 11381/java >>>>> tcp6 0 0 ::1:953 :::* >>>>> LISTEN 1340/named >>>>> tcp6 0 0 127.0.0.1:9200 :::* >>>>> LISTEN 2640/java >>>>> tcp6 0 0 127.0.0.1:9042 :::* >>>>> LISTEN 11381/java >>>>> tcp6 0 0 127.0.0.1:9300 :::* >>>>> LISTEN 2640/java >>>>> tcp6 0 0 :::9301 :::* >>>>> LISTEN 11672/java >>>>> >>>>> and here you will find attached the new /var/log/tomcat7/catalina.out >>>>> >>>>> 2016-04-04 14:36 GMT+01:00 John D. Ament <johndament@apache.org>: >>>>> >>>>>> Guillaume, >>>>>> >>>>>> Your emails a bit confusing, I'll assume that you mean it still >>>>>> didn't work. >>>>>> >>>>>> I see this error in your logs: 1) Error injecting constructor, >>>>>> com.netflix.astyanax.connectionpool.exceptions.PoolTimeoutException: >>>>>> PoolTimeoutException: [host=127.0.0.1(127.0.0.1):9160, latency=2007(2007), >>>>>> attempts=1]Timed out waiting for connection >>>>>> >>>>>> Are you sure that cassandra is up and running when you're trying >>>>>> this? is port 9160 open? >>>>>> >>>>>> John >>>>>> >>>>>> On Mon, Apr 4, 2016 at 8:54 AM Guillaume <guibdx@gmail.com> wrote: >>>>>> >>>>>>> Hi, >>>>>>> >>>>>>> I can change my arch in order to keep cassandra out of access for >>>>>>> security. I'll try to access without auth by keeping the followings >>>>>>> parameters by default in /etc/cassandra/cassandra.yml : >>>>>>> >>>>>>> >>>>>>> authenticator: AllowAllAuthenticator >>>>>>> authorizer: AllowAllAuthorizer >>>>>>> >>>>>>> instead of : >>>>>>> >>>>>>> authenticator: PasswordAuthenticator >>>>>>> authorizer: CassandraAuthorizer >>>>>>> >>>>>>> And I changed this keys to empty values >>>>>>> in /usr/share/tomcat7/lib/usergrid-deployment.properties : >>>>>>> >>>>>>> # Set the credentials used for Cassandra, if any. >>>>>>> # >>>>>>> cassandra.username= >>>>>>> cassandra.password= >>>>>>> >>>>>>> I also moved to cassandra 2.2.5 and changed the version in >>>>>>> the /usr/share/tomcat7/lib/usergrid-deployment.properties file. >>>>>>> >>>>>>> # Set a property to tell Usergrid which version of cassandra is >>>>>>> being used. >>>>>>> # >>>>>>> cassandra.version=2.2.5 >>>>>>> >>>>>>> LOGS : >>>>>>> #### >>>>>>> >>>>>>> # curl -v 127.0.0.1:9200 >>>>>>> * Rebuilt URL to: 127.0.0.1:9200/ >>>>>>> * Hostname was NOT found in DNS cache >>>>>>> * Trying 127.0.0.1... >>>>>>> * Connected to 127.0.0.1 (127.0.0.1) port 9200 (#0) >>>>>>> > GET / HTTP/1.1 >>>>>>> > User-Agent: curl/7.38.0 >>>>>>> > Host: 127.0.0.1:9200 >>>>>>> > Accept: */* >>>>>>> > >>>>>>> < HTTP/1.1 200 OK >>>>>>> < Content-Type: application/json; charset=UTF-8 >>>>>>> < Content-Length: 332 >>>>>>> < >>>>>>> { >>>>>>> "status" : 200, >>>>>>> "name" : "ES-1", >>>>>>> "cluster_name" : "elasticsearch", >>>>>>> "version" : { >>>>>>> "number" : "1.4.5", >>>>>>> "build_hash" : "2aaf797f2a571dcb779a3b61180afe8390ab61f9", >>>>>>> "build_timestamp" : "2015-04-27T08:06:06Z", >>>>>>> "build_snapshot" : false, >>>>>>> "lucene_version" : "4.10.4" >>>>>>> }, >>>>>>> "tagline" : "You Know, for Search" >>>>>>> } >>>>>>> * Connection #0 to host 127.0.0.1 left intact >>>>>>> >>>>>>> >>>>>>> # nodetool status >>>>>>> Datacenter: datacenter1 >>>>>>> ======================= >>>>>>> Status=Up/Down >>>>>>> |/ State=Normal/Leaving/Joining/Moving >>>>>>> -- Address Load Tokens Owns Host ID >>>>>>> Rack >>>>>>> UN 127.0.0.1 131.37 KB 256 ? >>>>>>> 273f3db2-822a-4ad8-bed7-2176a1fec1b4 rack1 >>>>>>> >>>>>>> Note: Non-system keyspaces don't have the same replication settings, >>>>>>> effective ownership information is meaningless >>>>>>> >>>>>>> >>>>>>> >>>>>>> See attached logs & configs to this email please, >>>>>>> >>>>>>> Regards, >>>>>>> Guillaume >>>>>>> >>>>>>> 2016-04-04 0:34 GMT+01:00 John D. Ament <johndament@apache.org>: >>>>>>> >>>>>>>> Hi Guillaume, >>>>>>>> >>>>>>>> Just wondering, do you require auth to access your cassandra >>>>>>>> instance? >>>>>>>> >>>>>>>> John >>>>>>>> >>>>>>>> >>>>>>>> On Sun, Apr 3, 2016 at 7:12 PM Guillaume <guibdx@gmail.com> wrote: >>>>>>>> hi, I tried to init the database with the command : # curl -v -u tron:g1psy -X PUT http://localhost:8080/system/database/setup * Hostname was NOT found in DNS cache * Trying 127.0.0.1... * Connected to localhost (127.0.0.1) port 8080 (#0) * Server auth using Basic with user 'tron' > PUT /system/database/setup HTTP/1.1 > Authorization: Basic dHJvbjpnMXBzeQ== > User-Agent: curl/7.38.0 > Host: localhost:8080 > Accept: */* > < HTTP/1.1 500 Internal Server Error * Server Apache-Coyote/1.1 is not blacklisted < Server: Apache-Coyote/1.1 < Access-Control-Allow-Origin: * < Content-Type: application/json < Content-Length: 218 < Date: Sun, 03 Apr 2016 22:02:13 GMT < Connection: close < * Closing connection 0 {"error":"h_invalid_request","timestamp":1459720933979,"duration":1,"error_description":"InvalidRequestException(why:You have not logged in)","exception":"me.prettyprint.hector.api.exceptions.HInvalidRequestException"}# and from catalina.out error log I get : 2016-04-04 00:02:13,895 INFO (http-bio-8080-exec-8) [org.apache.usergrid.rest.system.DatabaseResource] - DatabaseResource initialized 2016-04-04 00:02:13,897 INFO (http-bio-8080-exec-8) [org.apache.usergrid.rest.system.DatabaseResource] - Setting up Cassandra (runDatabaseSetup) 2016-04-04 00:02:13,977 INFO (http-bio-8080-exec-8) [org.apache.usergrid.corepersistence.CpSetup] - Creating static application keyspace Usergrid_Applications 2016-04-04 00:02:13,978 ERROR (http-bio-8080-exec-8) [org.apache.usergrid.rest.exceptions.ThrowableMapper] - An uncaught exception occurred during HTTP invocation me.prettyprint.hector.api.exceptions.HInvalidRequestException: InvalidRequestException(why:You have not logged in)
  2. 0

    Re: error when I initialize the database

    usergrid-user | 1 year ago | Guillaume
    javax.mail.AuthenticationFailedException: 535-5.7.8 Username and Password not accepted. Learn more at 535 5.7.8 https://support.google.com/mail/answer/14257 i5sm29574877wjx.15 - gsmtp I don't understand why there is possibility to config auth if I need to keep the default cassandra without authentication like that : # Authentication backend, implementing IAuthenticator; used to identify users # Out of the box, Cassandra provides org.apache.cassandra.auth.{AllowAllAuthenticator, # PasswordAuthenticator}. # # - AllowAllAuthenticator performs no checks - set it to disable authentication. # - PasswordAuthenticator relies on username/password pairs to authenticate # users. It keeps usernames and hashed passwords in system_auth.credentials table. # Please increase system_auth keyspace replication factor if you use this authenticator. # If using PasswordAuthenticator, CassandraRoleManager must also be used (see below) authenticator: AllowAllAuthenticator # Authorization backend, implementing IAuthorizer; used to limit access/provide permissions # Out of the box, Cassandra provides org.apache.cassandra.auth.{AllowAllAuthorizer, # CassandraAuthorizer}. # # - AllowAllAuthorizer allows any action to any user - set it to disable authorization. # - CassandraAuthorizer stores permissions in system_auth.permissions table. Please # increase system_auth keyspace replication factor if you use this authorizer. authorizer: AllowAllAuthorizer Regards, Guillaume 2016-04-04 15:47 GMT+01:00 John D. Ament <johndament@apache.org>: > When I was setting this up a while ago, I ran into similar problems like > yours. At one point, my ops team had configured cassandra so that only > authenticated users could create keyspaces, but turned off authentication. > I received the exact error you just had. > > If you created it manually via cqlsh, then the error shown in your log "InvalidRequestException(why:Keyspace > 'Usergrid_Applications' does not exist" should not exist any longer. > > John > > On Mon, Apr 4, 2016 at 10:34 AM Guillaume <guibdx@gmail.com> wrote: > >> I removed /var/lib/cassandra/* files and restarted the service. See my >> last email please, I think we cross our last exchange. I tried to create >> the keyspace with curl -v -u superuser:superpass -X PUT >> http://localhost:8080/system/database/setup command and also directly in >> cassandra with : tron@cqlsh> CREATe KEYSPACE IF NOT EXISTS >> Usergrid_Applications WITH REPLICATION = { 'class' : 'SimpleStrategy', >> 'replication_factor' : 1 }; >> >> both of them didn't work. I don't understand what you want to know about >> creating keyspaces and limitations in my env ? >> >> 2016-04-04 15:20 GMT+01:00 John D. Ament <johndament@apache.org>: >> >>> Did you create the keyspace already? Is creating keyspaces limited in >>> your env? >>> >>> John >>> >>> >>> On Mon, Apr 4, 2016 at 10:15 AM Guillaume <guibdx@gmail.com> wrote: >>> >>>> I also added this feature >>>> in /usr/share/tomcat7/lib/usergrid-deployment.properties >>>> >>>> usergrid.cluster_name=usergrid >>>> >>>> I get the following error : Caused by: >>>> InvalidRequestException(why:Keyspace 'Usergrid_Applications' does not exist) >>>> >>>> At this step I tried to generate the database with this command : >>>> >>>> # curl -v -u superuser:superpass -X PUT >>>> http://localhost:8080/system/database/setup >>>> * Hostname was NOT found in DNS cache >>>> * Trying 127.0.0.1... >>>> * Connected to localhost (127.0.0.1) port 8080 (#0) >>>> * Server auth using Basic with user 'superuser' >>>> > PUT /system/database/setup HTTP/1.1 >>>> > Authorization: Basic c3VwZXJ1c2VyOnN1cGVycGFzcw== >>>> > User-Agent: curl/7.38.0 >>>> > Host: localhost:8080 >>>> > Accept: */* >>>> > >>>> < HTTP/1.1 500 Internal Server Error >>>> * Server Apache-Coyote/1.1 is not blacklisted >>>> < Server: Apache-Coyote/1.1 >>>> < Access-Control-Allow-Origin: * >>>> < Content-Type: application/json >>>> < Content-Length: 154 >>>> < Date: Mon, 04 Apr 2016 13:01:12 GMT >>>> < Connection: close >>>> < >>>> * Closing connection 0 >>>> {"error":"runtime","timestamp":1459774872346,"duration":1,"error_description":"Error >>>> migrating Core Persistence","exception":"java.lang.RuntimeException"}# >>>> >>>> >>>> see the attached catalina.out file >>>> >>>> 2016-04-04 15:02 GMT+01:00 Guillaume <guibdx@gmail.com>: >>>> >>>>> Sorry I missed this parameter : >>>>> >>>>> # Whether to start the thrift rpc server. >>>>> start_rpc: true >>>>> >>>>> in /etc/cassandra/cassandra.yml because I changed again the version of >>>>> cassandra ... >>>>> >>>>> It still doesn't work and RPC is turned on now. I can see : >>>>> >>>>> # netstat -pltn|grep :9 >>>>> tcp 0 0 127.0.0.1:953 0.0.0.0:* >>>>> LISTEN 1340/named >>>>> tcp 0 0 0.0.0.0:993 0.0.0.0:* >>>>> LISTEN 1/init >>>>> tcp 0 0 127.0.0.1:9160 0.0.0.0:* >>>>> LISTEN 11381/java >>>>> tcp6 0 0 ::1:953 :::* >>>>> LISTEN 1340/named >>>>> tcp6 0 0 127.0.0.1:9200 :::* >>>>> LISTEN 2640/java >>>>> tcp6 0 0 127.0.0.1:9042 :::* >>>>> LISTEN 11381/java >>>>> tcp6 0 0 127.0.0.1:9300 :::* >>>>> LISTEN 2640/java >>>>> tcp6 0 0 :::9301 :::* >>>>> LISTEN 11672/java >>>>> >>>>> and here you will find attached the new /var/log/tomcat7/catalina.out >>>>> >>>>> 2016-04-04 14:36 GMT+01:00 John D. Ament <johndament@apache.org>: >>>>> >>>>>> Guillaume, >>>>>> >>>>>> Your emails a bit confusing, I'll assume that you mean it still >>>>>> didn't work. >>>>>> >>>>>> I see this error in your logs: 1) Error injecting constructor, >>>>>> com.netflix.astyanax.connectionpool.exceptions.PoolTimeoutException: >>>>>> PoolTimeoutException: [host=127.0.0.1(127.0.0.1):9160, latency=2007(2007), >>>>>> attempts=1]Timed out waiting for connection >>>>>> >>>>>> Are you sure that cassandra is up and running when you're trying >>>>>> this? is port 9160 open? >>>>>> >>>>>> John >>>>>> >>>>>> On Mon, Apr 4, 2016 at 8:54 AM Guillaume <guibdx@gmail.com> wrote: >>>>>> >>>>>>> Hi, >>>>>>> >>>>>>> I can change my arch in order to keep cassandra out of access for >>>>>>> security. I'll try to access without auth by keeping the followings >>>>>>> parameters by default in /etc/cassandra/cassandra.yml : >>>>>>> >>>>>>> >>>>>>> authenticator: AllowAllAuthenticator >>>>>>> authorizer: AllowAllAuthorizer >>>>>>> >>>>>>> instead of : >>>>>>> >>>>>>> authenticator: PasswordAuthenticator >>>>>>> authorizer: CassandraAuthorizer >>>>>>> >>>>>>> And I changed this keys to empty values >>>>>>> in /usr/share/tomcat7/lib/usergrid-deployment.properties : >>>>>>> >>>>>>> # Set the credentials used for Cassandra, if any. >>>>>>> # >>>>>>> cassandra.username= >>>>>>> cassandra.password= >>>>>>> >>>>>>> I also moved to cassandra 2.2.5 and changed the version in >>>>>>> the /usr/share/tomcat7/lib/usergrid-deployment.properties file. >>>>>>> >>>>>>> # Set a property to tell Usergrid which version of cassandra is >>>>>>> being used. >>>>>>> # >>>>>>> cassandra.version=2.2.5 >>>>>>> >>>>>>> LOGS : >>>>>>> #### >>>>>>> >>>>>>> # curl -v 127.0.0.1:9200 >>>>>>> * Rebuilt URL to: 127.0.0.1:9200/ >>>>>>> * Hostname was NOT found in DNS cache >>>>>>> * Trying 127.0.0.1... >>>>>>> * Connected to 127.0.0.1 (127.0.0.1) port 9200 (#0) >>>>>>> > GET / HTTP/1.1 >>>>>>> > User-Agent: curl/7.38.0 >>>>>>> > Host: 127.0.0.1:9200 >>>>>>> > Accept: */* >>>>>>> > >>>>>>> < HTTP/1.1 200 OK >>>>>>> < Content-Type: application/json; charset=UTF-8 >>>>>>> < Content-Length: 332 >>>>>>> < >>>>>>> { >>>>>>> "status" : 200, >>>>>>> "name" : "ES-1", >>>>>>> "cluster_name" : "elasticsearch", >>>>>>> "version" : { >>>>>>> "number" : "1.4.5", >>>>>>> "build_hash" : "2aaf797f2a571dcb779a3b61180afe8390ab61f9", >>>>>>> "build_timestamp" : "2015-04-27T08:06:06Z", >>>>>>> "build_snapshot" : false, >>>>>>> "lucene_version" : "4.10.4" >>>>>>> }, >>>>>>> "tagline" : "You Know, for Search" >>>>>>> } >>>>>>> * Connection #0 to host 127.0.0.1 left intact >>>>>>> >>>>>>> >>>>>>> # nodetool status >>>>>>> Datacenter: datacenter1 >>>>>>> ======================= >>>>>>> Status=Up/Down >>>>>>> |/ State=Normal/Leaving/Joining/Moving >>>>>>> -- Address Load Tokens Owns Host ID >>>>>>> Rack >>>>>>> UN 127.0.0.1 131.37 KB 256 ? >>>>>>> 273f3db2-822a-4ad8-bed7-2176a1fec1b4 rack1 >>>>>>> >>>>>>> Note: Non-system keyspaces don't have the same replication settings, >>>>>>> effective ownership information is meaningless >>>>>>> >>>>>>> >>>>>>> >>>>>>> See attached logs & configs to this email please, >>>>>>> >>>>>>> Regards, >>>>>>> Guillaume >>>>>>> >>>>>>> 2016-04-04 0:34 GMT+01:00 John D. Ament <johndament@apache.org>: >>>>>>> >>>>>>>> Hi Guillaume, >>>>>>>> >>>>>>>> Just wondering, do you require auth to access your cassandra >>>>>>>> instance? >>>>>>>> >>>>>>>> John >>>>>>>> >>>>>>>> >>>>>>>> On Sun, Apr 3, 2016 at 7:12 PM Guillaume <guibdx@gmail.com> wrote: >>>>>>>> hi, I tried to init the database with the command : # curl -v -u tron:g1psy -X PUT http://localhost:8080/system/database/setup * Hostname was NOT found in DNS cache * Trying 127.0.0.1... * Connected to localhost (127.0.0.1) port 8080 (#0) * Server auth using Basic with user 'tron' > PUT /system/database/setup HTTP/1.1 > Authorization: Basic dHJvbjpnMXBzeQ== > User-Agent: curl/7.38.0 > Host: localhost:8080 > Accept: */* > < HTTP/1.1 500 Internal Server Error * Server Apache-Coyote/1.1 is not blacklisted < Server: Apache-Coyote/1.1 < Access-Control-Allow-Origin: * < Content-Type: application/json < Content-Length: 218 < Date: Sun, 03 Apr 2016 22:02:13 GMT < Connection: close < * Closing connection 0 {"error":"h_invalid_request","timestamp":1459720933979,"duration":1,"error_description":"InvalidRequestException(why:You have not logged in)","exception":"me.prettyprint.hector.api.exceptions.HInvalidRequestException"}# and from catalina.out error log I get : 2016-04-04 00:02:13,895 INFO (http-bio-8080-exec-8) [org.apache.usergrid.rest.system.DatabaseResource] - DatabaseResource initialized 2016-04-04 00:02:13,897 INFO (http-bio-8080-exec-8) [org.apache.usergrid.rest.system.DatabaseResource] - Setting up Cassandra (runDatabaseSetup) 2016-04-04 00:02:13,977 INFO (http-bio-8080-exec-8) [org.apache.usergrid.corepersistence.CpSetup] - Creating static application keyspace Usergrid_Applications 2016-04-04 00:02:13,978 ERROR (http-bio-8080-exec-8) [org.apache.usergrid.rest.exceptions.ThrowableMapper] - An uncaught exception occurred during HTTP invocation me.prettyprint.hector.api.exceptions.HInvalidRequestException: InvalidRequestException(why:You have not logged in)
  3. 0

    Re: error when I initialize the database

    usergrid-user | 1 year ago | Guillaume
    javax.mail.AuthenticationFailedException: 535-5.7.8 Username and Password not accepted. Learn more at 535 5.7.8 https://support.google.com/mail/answer/14257 i5sm29574877wjx.15 - gsmtp I don't understand why there is possibility to config auth if I need to keep the default cassandra without authentication like that : # Authentication backend, implementing IAuthenticator; used to identify users # Out of the box, Cassandra provides org.apache.cassandra.auth.{AllowAllAuthenticator, # PasswordAuthenticator}. # # - AllowAllAuthenticator performs no checks - set it to disable authentication. # - PasswordAuthenticator relies on username/password pairs to authenticate # users. It keeps usernames and hashed passwords in system_auth.credentials table. # Please increase system_auth keyspace replication factor if you use this authenticator. # If using PasswordAuthenticator, CassandraRoleManager must also be used (see below) authenticator: AllowAllAuthenticator # Authorization backend, implementing IAuthorizer; used to limit access/provide permissions # Out of the box, Cassandra provides org.apache.cassandra.auth.{AllowAllAuthorizer, # CassandraAuthorizer}. # # - AllowAllAuthorizer allows any action to any user - set it to disable authorization. # - CassandraAuthorizer stores permissions in system_auth.permissions table. Please # increase system_auth keyspace replication factor if you use this authorizer. authorizer: AllowAllAuthorizer Regards, Guillaume 2016-04-04 15:47 GMT+01:00 John D. Ament <johndament@apache.org>: > When I was setting this up a while ago, I ran into similar problems like > yours. At one point, my ops team had configured cassandra so that only > authenticated users could create keyspaces, but turned off authentication. > I received the exact error you just had. > > If you created it manually via cqlsh, then the error shown in your log "InvalidRequestException(why:Keyspace > 'Usergrid_Applications' does not exist" should not exist any longer. > > John > > On Mon, Apr 4, 2016 at 10:34 AM Guillaume <guibdx@gmail.com> wrote: > >> I removed /var/lib/cassandra/* files and restarted the service. See my >> last email please, I think we cross our last exchange. I tried to create >> the keyspace with curl -v -u superuser:superpass -X PUT >> http://localhost:8080/system/database/setup command and also directly in >> cassandra with : tron@cqlsh> CREATe KEYSPACE IF NOT EXISTS >> Usergrid_Applications WITH REPLICATION = { 'class' : 'SimpleStrategy', >> 'replication_factor' : 1 }; >> >> both of them didn't work. I don't understand what you want to know about >> creating keyspaces and limitations in my env ? >> >> 2016-04-04 15:20 GMT+01:00 John D. Ament <johndament@apache.org>: >> >>> Did you create the keyspace already? Is creating keyspaces limited in >>> your env? >>> >>> John >>> >>> >>> On Mon, Apr 4, 2016 at 10:15 AM Guillaume <guibdx@gmail.com> wrote: >>> >>>> I also added this feature >>>> in /usr/share/tomcat7/lib/usergrid-deployment.properties >>>> >>>> usergrid.cluster_name=usergrid >>>> >>>> I get the following error : Caused by: >>>> InvalidRequestException(why:Keyspace 'Usergrid_Applications' does not exist) >>>> >>>> At this step I tried to generate the database with this command : >>>> >>>> # curl -v -u superuser:superpass -X PUT >>>> http://localhost:8080/system/database/setup >>>> * Hostname was NOT found in DNS cache >>>> * Trying 127.0.0.1... >>>> * Connected to localhost (127.0.0.1) port 8080 (#0) >>>> * Server auth using Basic with user 'superuser' >>>> > PUT /system/database/setup HTTP/1.1 >>>> > Authorization: Basic c3VwZXJ1c2VyOnN1cGVycGFzcw== >>>> > User-Agent: curl/7.38.0 >>>> > Host: localhost:8080 >>>> > Accept: */* >>>> > >>>> < HTTP/1.1 500 Internal Server Error >>>> * Server Apache-Coyote/1.1 is not blacklisted >>>> < Server: Apache-Coyote/1.1 >>>> < Access-Control-Allow-Origin: * >>>> < Content-Type: application/json >>>> < Content-Length: 154 >>>> < Date: Mon, 04 Apr 2016 13:01:12 GMT >>>> < Connection: close >>>> < >>>> * Closing connection 0 >>>> {"error":"runtime","timestamp":1459774872346,"duration":1,"error_description":"Error >>>> migrating Core Persistence","exception":"java.lang.RuntimeException"}# >>>> >>>> >>>> see the attached catalina.out file >>>> >>>> 2016-04-04 15:02 GMT+01:00 Guillaume <guibdx@gmail.com>: >>>> >>>>> Sorry I missed this parameter : >>>>> >>>>> # Whether to start the thrift rpc server. >>>>> start_rpc: true >>>>> >>>>> in /etc/cassandra/cassandra.yml because I changed again the version of >>>>> cassandra ... >>>>> >>>>> It still doesn't work and RPC is turned on now. I can see : >>>>> >>>>> # netstat -pltn|grep :9 >>>>> tcp 0 0 127.0.0.1:953 0.0.0.0:* >>>>> LISTEN 1340/named >>>>> tcp 0 0 0.0.0.0:993 0.0.0.0:* >>>>> LISTEN 1/init >>>>> tcp 0 0 127.0.0.1:9160 0.0.0.0:* >>>>> LISTEN 11381/java >>>>> tcp6 0 0 ::1:953 :::* >>>>> LISTEN 1340/named >>>>> tcp6 0 0 127.0.0.1:9200 :::* >>>>> LISTEN 2640/java >>>>> tcp6 0 0 127.0.0.1:9042 :::* >>>>> LISTEN 11381/java >>>>> tcp6 0 0 127.0.0.1:9300 :::* >>>>> LISTEN 2640/java >>>>> tcp6 0 0 :::9301 :::* >>>>> LISTEN 11672/java >>>>> >>>>> and here you will find attached the new /var/log/tomcat7/catalina.out >>>>> >>>>> 2016-04-04 14:36 GMT+01:00 John D. Ament <johndament@apache.org>: >>>>> >>>>>> Guillaume, >>>>>> >>>>>> Your emails a bit confusing, I'll assume that you mean it still >>>>>> didn't work. >>>>>> >>>>>> I see this error in your logs: 1) Error injecting constructor, >>>>>> com.netflix.astyanax.connectionpool.exceptions.PoolTimeoutException: >>>>>> PoolTimeoutException: [host=127.0.0.1(127.0.0.1):9160, latency=2007(2007), >>>>>> attempts=1]Timed out waiting for connection >>>>>> >>>>>> Are you sure that cassandra is up and running when you're trying >>>>>> this? is port 9160 open? >>>>>> >>>>>> John >>>>>> >>>>>> On Mon, Apr 4, 2016 at 8:54 AM Guillaume <guibdx@gmail.com> wrote: >>>>>> >>>>>>> Hi, >>>>>>> >>>>>>> I can change my arch in order to keep cassandra out of access for >>>>>>> security. I'll try to access without auth by keeping the followings >>>>>>> parameters by default in /etc/cassandra/cassandra.yml : >>>>>>> >>>>>>> >>>>>>> authenticator: AllowAllAuthenticator >>>>>>> authorizer: AllowAllAuthorizer >>>>>>> >>>>>>> instead of : >>>>>>> >>>>>>> authenticator: PasswordAuthenticator >>>>>>> authorizer: CassandraAuthorizer >>>>>>> >>>>>>> And I changed this keys to empty values >>>>>>> in /usr/share/tomcat7/lib/usergrid-deployment.properties : >>>>>>> >>>>>>> # Set the credentials used for Cassandra, if any. >>>>>>> # >>>>>>> cassandra.username= >>>>>>> cassandra.password= >>>>>>> >>>>>>> I also moved to cassandra 2.2.5 and changed the version in >>>>>>> the /usr/share/tomcat7/lib/usergrid-deployment.properties file. >>>>>>> >>>>>>> # Set a property to tell Usergrid which version of cassandra is >>>>>>> being used. >>>>>>> # >>>>>>> cassandra.version=2.2.5 >>>>>>> >>>>>>> LOGS : >>>>>>> #### >>>>>>> >>>>>>> # curl -v 127.0.0.1:9200 >>>>>>> * Rebuilt URL to: 127.0.0.1:9200/ >>>>>>> * Hostname was NOT found in DNS cache >>>>>>> * Trying 127.0.0.1... >>>>>>> * Connected to 127.0.0.1 (127.0.0.1) port 9200 (#0) >>>>>>> > GET / HTTP/1.1 >>>>>>> > User-Agent: curl/7.38.0 >>>>>>> > Host: 127.0.0.1:9200 >>>>>>> > Accept: */* >>>>>>> > >>>>>>> < HTTP/1.1 200 OK >>>>>>> < Content-Type: application/json; charset=UTF-8 >>>>>>> < Content-Length: 332 >>>>>>> < >>>>>>> { >>>>>>> "status" : 200, >>>>>>> "name" : "ES-1", >>>>>>> "cluster_name" : "elasticsearch", >>>>>>> "version" : { >>>>>>> "number" : "1.4.5", >>>>>>> "build_hash" : "2aaf797f2a571dcb779a3b61180afe8390ab61f9", >>>>>>> "build_timestamp" : "2015-04-27T08:06:06Z", >>>>>>> "build_snapshot" : false, >>>>>>> "lucene_version" : "4.10.4" >>>>>>> }, >>>>>>> "tagline" : "You Know, for Search" >>>>>>> } >>>>>>> * Connection #0 to host 127.0.0.1 left intact >>>>>>> >>>>>>> >>>>>>> # nodetool status >>>>>>> Datacenter: datacenter1 >>>>>>> ======================= >>>>>>> Status=Up/Down >>>>>>> |/ State=Normal/Leaving/Joining/Moving >>>>>>> -- Address Load Tokens Owns Host ID >>>>>>> Rack >>>>>>> UN 127.0.0.1 131.37 KB 256 ? >>>>>>> 273f3db2-822a-4ad8-bed7-2176a1fec1b4 rack1 >>>>>>> >>>>>>> Note: Non-system keyspaces don't have the same replication settings, >>>>>>> effective ownership information is meaningless >>>>>>> >>>>>>> >>>>>>> >>>>>>> See attached logs & configs to this email please, >>>>>>> >>>>>>> Regards, >>>>>>> Guillaume >>>>>>> >>>>>>> 2016-04-04 0:34 GMT+01:00 John D. Ament <johndament@apache.org>: >>>>>>> >>>>>>>> Hi Guillaume, >>>>>>>> >>>>>>>> Just wondering, do you require auth to access your cassandra >>>>>>>> instance? >>>>>>>> >>>>>>>> John >>>>>>>> >>>>>>>> >>>>>>>> On Sun, Apr 3, 2016 at 7:12 PM Guillaume <guibdx@gmail.com> wrote: >>>>>>>> hi, I tried to init the database with the command : # curl -v -u tron:g1psy -X PUT http://localhost:8080/system/database/setup * Hostname was NOT found in DNS cache * Trying 127.0.0.1... * Connected to localhost (127.0.0.1) port 8080 (#0) * Server auth using Basic with user 'tron' > PUT /system/database/setup HTTP/1.1 > Authorization: Basic dHJvbjpnMXBzeQ== > User-Agent: curl/7.38.0 > Host: localhost:8080 > Accept: */* > < HTTP/1.1 500 Internal Server Error * Server Apache-Coyote/1.1 is not blacklisted < Server: Apache-Coyote/1.1 < Access-Control-Allow-Origin: * < Content-Type: application/json < Content-Length: 218 < Date: Sun, 03 Apr 2016 22:02:13 GMT < Connection: close < * Closing connection 0 {"error":"h_invalid_request","timestamp":1459720933979,"duration":1,"error_description":"InvalidRequestException(why:You have not logged in)","exception":"me.prettyprint.hector.api.exceptions.HInvalidRequestException"}# and from catalina.out error log I get : 2016-04-04 00:02:13,895 INFO (http-bio-8080-exec-8) [org.apache.usergrid.rest.system.DatabaseResource] - DatabaseResource initialized 2016-04-04 00:02:13,897 INFO (http-bio-8080-exec-8) [org.apache.usergrid.rest.system.DatabaseResource] - Setting up Cassandra (runDatabaseSetup) 2016-04-04 00:02:13,977 INFO (http-bio-8080-exec-8) [org.apache.usergrid.corepersistence.CpSetup] - Creating static application keyspace Usergrid_Applications 2016-04-04 00:02:13,978 ERROR (http-bio-8080-exec-8) [org.apache.usergrid.rest.exceptions.ThrowableMapper] - An uncaught exception occurred during HTTP invocation me.prettyprint.hector.api.exceptions.HInvalidRequestException: InvalidRequestException(why:You have not logged in)
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. javax.mail.AuthenticationFailedException

      535-5.7.8 Username and Password not accepted. Learn more at 535 5.7.8 https://support.google.com/mail/answer/14257 i5sm29574877wjx.15 - gsmtp I don't understand why there is possibility to config auth if I need to keep the default cassandra without authentication like that : # Authentication backend, implementing IAuthenticator; used to identify users # Out of the box, Cassandra provides org.apache.cassandra.auth.{AllowAllAuthenticator, # PasswordAuthenticator}. # # - AllowAllAuthenticator performs no checks - set it to disable authentication. # - PasswordAuthenticator relies on username/password pairs to authenticate # users. It keeps usernames and hashed passwords in system_auth.credentials table. # Please increase system_auth keyspace replication factor if you use this authenticator. # If using PasswordAuthenticator, CassandraRoleManager must also be used (see below) authenticator: AllowAllAuthenticator # Authorization backend, implementing IAuthorizer; used to limit access/provide permissions # Out of the box, Cassandra provides org.apache.cassandra.auth.{AllowAllAuthorizer, # CassandraAuthorizer}. # # - AllowAllAuthorizer allows any action to any user - set it to disable authorization. # - CassandraAuthorizer stores permissions in system_auth.permissions table. Please # increase system_auth keyspace replication factor if you use this authorizer. authorizer: AllowAllAuthorizer Regards, Guillaume 2016-04-04 15:47 GMT+01:00 John D. Ament <johndament@apache.org>: > When I was setting this up a while ago, I ran into similar problems like > yours. At one point, my ops team had configured cassandra so that only > authenticated users could create keyspaces, but turned off authentication. > I received the exact error you just had. > > If you created it manually via cqlsh, then the error shown in your log "InvalidRequestException(why:Keyspace > 'Usergrid_Applications' does not exist" should not exist any longer. > > John > > On Mon, Apr 4, 2016 at 10:34 AM Guillaume <guibdx@gmail.com> wrote: > >> I removed /var/lib/cassandra/* files and restarted the service. See my >> last email please, I think we cross our last exchange. I tried to create >> the keyspace with curl -v -u superuser:superpass -X PUT >> http://localhost:8080/system/database/setup command and also directly in >> cassandra with : tron@cqlsh> CREATe KEYSPACE IF NOT EXISTS >> Usergrid_Applications WITH REPLICATION = { 'class' : 'SimpleStrategy', >> 'replication_factor' : 1 }; >> >> both of them didn't work. I don't understand what you want to know about >> creating keyspaces and limitations in my env ? >> >> 2016-04-04 15:20 GMT+01:00 John D. Ament <johndament@apache.org>: >> >>> Did you create the keyspace already? Is creating keyspaces limited in >>> your env? >>> >>> John >>> >>> >>> On Mon, Apr 4, 2016 at 10:15 AM Guillaume <guibdx@gmail.com> wrote: >>> >>>> I also added this feature >>>> in /usr/share/tomcat7/lib/usergrid-deployment.properties >>>> >>>> usergrid.cluster_name=usergrid >>>> >>>> I get the following error : Caused by: >>>> InvalidRequestException(why:Keyspace 'Usergrid_Applications' does not exist) >>>> >>>> At this step I tried to generate the database with this command : >>>> >>>> # curl -v -u superuser:superpass -X PUT >>>> http://localhost:8080/system/database/setup >>>> * Hostname was NOT found in DNS cache >>>> * Trying 127.0.0.1... >>>> * Connected to localhost (127.0.0.1) port 8080 (#0) >>>> * Server auth using Basic with user 'superuser' >>>> > PUT /system/database/setup HTTP/1.1 >>>> > Authorization: Basic c3VwZXJ1c2VyOnN1cGVycGFzcw== >>>> > User-Agent: curl/7.38.0 >>>> > Host: localhost:8080 >>>> > Accept: */* >>>> > >>>> < HTTP/1.1 500 Internal Server Error >>>> * Server Apache-Coyote/1.1 is not blacklisted >>>> < Server: Apache-Coyote/1.1 >>>> < Access-Control-Allow-Origin: * >>>> < Content-Type: application/json >>>> < Content-Length: 154 >>>> < Date: Mon, 04 Apr 2016 13:01:12 GMT >>>> < Connection: close >>>> < >>>> * Closing connection 0 >>>> {"error":"runtime","timestamp":1459774872346,"duration":1,"error_description":"Error >>>> migrating Core Persistence","exception":"java.lang.RuntimeException"}# >>>> >>>> >>>> see the attached catalina.out file >>>> >>>> 2016-04-04 15:02 GMT+01:00 Guillaume <guibdx@gmail.com>: >>>> >>>>> Sorry I missed this parameter : >>>>> >>>>> # Whether to start the thrift rpc server. >>>>> start_rpc: true >>>>> >>>>> in /etc/cassandra/cassandra.yml because I changed again the version of >>>>> cassandra ... >>>>> >>>>> It still doesn't work and RPC is turned on now. I can see : >>>>> >>>>> # netstat -pltn|grep :9 >>>>> tcp 0 0 127.0.0.1:953 0.0.0.0:* >>>>> LISTEN 1340/named >>>>> tcp 0 0 0.0.0.0:993 0.0.0.0:* >>>>> LISTEN 1/init >>>>> tcp 0 0 127.0.0.1:9160 0.0.0.0:* >>>>> LISTEN 11381/java >>>>> tcp6 0 0 ::1:953 :::* >>>>> LISTEN 1340/named >>>>> tcp6 0 0 127.0.0.1:9200 :::* >>>>> LISTEN 2640/java >>>>> tcp6 0 0 127.0.0.1:9042 :::* >>>>> LISTEN 11381/java >>>>> tcp6 0 0 127.0.0.1:9300 :::* >>>>> LISTEN 2640/java >>>>> tcp6 0 0 :::9301 :::* >>>>> LISTEN 11672/java >>>>> >>>>> and here you will find attached the new /var/log/tomcat7/catalina.out >>>>> >>>>> 2016-04-04 14:36 GMT+01:00 John D. Ament <johndament@apache.org>: >>>>> >>>>>> Guillaume, >>>>>> >>>>>> Your emails a bit confusing, I'll assume that you mean it still >>>>>> didn't work. >>>>>> >>>>>> I see this error in your logs: 1) Error injecting constructor, >>>>>> com.netflix.astyanax.connectionpool.exceptions.PoolTimeoutException: >>>>>> PoolTimeoutException: [host=127.0.0.1(127.0.0.1):9160, latency=2007(2007), >>>>>> attempts=1]Timed out waiting for connection >>>>>> >>>>>> Are you sure that cassandra is up and running when you're trying >>>>>> this? is port 9160 open? >>>>>> >>>>>> John >>>>>> >>>>>> On Mon, Apr 4, 2016 at 8:54 AM Guillaume <guibdx@gmail.com> wrote: >>>>>> >>>>>>> Hi, >>>>>>> >>>>>>> I can change my arch in order to keep cassandra out of access for >>>>>>> security. I'll try to access without auth by keeping the followings >>>>>>> parameters by default in /etc/cassandra/cassandra.yml : >>>>>>> >>>>>>> >>>>>>> authenticator: AllowAllAuthenticator >>>>>>> authorizer: AllowAllAuthorizer >>>>>>> >>>>>>> instead of : >>>>>>> >>>>>>> authenticator: PasswordAuthenticator >>>>>>> authorizer: CassandraAuthorizer >>>>>>> >>>>>>> And I changed this keys to empty values >>>>>>> in /usr/share/tomcat7/lib/usergrid-deployment.properties : >>>>>>> >>>>>>> # Set the credentials used for Cassandra, if any. >>>>>>> # >>>>>>> cassandra.username= >>>>>>> cassandra.password= >>>>>>> >>>>>>> I also moved to cassandra 2.2.5 and changed the version in >>>>>>> the /usr/share/tomcat7/lib/usergrid-deployment.properties file. >>>>>>> >>>>>>> # Set a property to tell Usergrid which version of cassandra is >>>>>>> being used. >>>>>>> # >>>>>>> cassandra.version=2.2.5 >>>>>>> >>>>>>> LOGS : >>>>>>> #### >>>>>>> >>>>>>> # curl -v 127.0.0.1:9200 >>>>>>> * Rebuilt URL to: 127.0.0.1:9200/ >>>>>>> * Hostname was NOT found in DNS cache >>>>>>> * Trying 127.0.0.1... >>>>>>> * Connected to 127.0.0.1 (127.0.0.1) port 9200 (#0) >>>>>>> > GET / HTTP/1.1 >>>>>>> > User-Agent: curl/7.38.0 >>>>>>> > Host: 127.0.0.1:9200 >>>>>>> > Accept: */* >>>>>>> > >>>>>>> < HTTP/1.1 200 OK >>>>>>> < Content-Type: application/json; charset=UTF-8 >>>>>>> < Content-Length: 332 >>>>>>> < >>>>>>> { >>>>>>> "status" : 200, >>>>>>> "name" : "ES-1", >>>>>>> "cluster_name" : "elasticsearch", >>>>>>> "version" : { >>>>>>> "number" : "1.4.5", >>>>>>> "build_hash" : "2aaf797f2a571dcb779a3b61180afe8390ab61f9", >>>>>>> "build_timestamp" : "2015-04-27T08:06:06Z", >>>>>>> "build_snapshot" : false, >>>>>>> "lucene_version" : "4.10.4" >>>>>>> }, >>>>>>> "tagline" : "You Know, for Search" >>>>>>> } >>>>>>> * Connection #0 to host 127.0.0.1 left intact >>>>>>> >>>>>>> >>>>>>> # nodetool status >>>>>>> Datacenter: datacenter1 >>>>>>> ======================= >>>>>>> Status=Up/Down >>>>>>> |/ State=Normal/Leaving/Joining/Moving >>>>>>> -- Address Load Tokens Owns Host ID >>>>>>> Rack >>>>>>> UN 127.0.0.1 131.37 KB 256 ? >>>>>>> 273f3db2-822a-4ad8-bed7-2176a1fec1b4 rack1 >>>>>>> >>>>>>> Note: Non-system keyspaces don't have the same replication settings, >>>>>>> effective ownership information is meaningless >>>>>>> >>>>>>> >>>>>>> >>>>>>> See attached logs & configs to this email please, >>>>>>> >>>>>>> Regards, >>>>>>> Guillaume >>>>>>> >>>>>>> 2016-04-04 0:34 GMT+01:00 John D. Ament <johndament@apache.org>: >>>>>>> >>>>>>>> Hi Guillaume, >>>>>>>> >>>>>>>> Just wondering, do you require auth to access your cassandra >>>>>>>> instance? >>>>>>>> >>>>>>>> John >>>>>>>> >>>>>>>> >>>>>>>> On Sun, Apr 3, 2016 at 7:12 PM Guillaume <guibdx@gmail.com> wrote: >>>>>>>> hi, I tried to init the database with the command : # curl -v -u tron:g1psy -X PUT http://localhost:8080/system/database/setup * Hostname was NOT found in DNS cache * Trying 127.0.0.1... * Connected to localhost (127.0.0.1) port 8080 (#0) * Server auth using Basic with user 'tron' > PUT /system/database/setup HTTP/1.1 > Authorization: Basic dHJvbjpnMXBzeQ== > User-Agent: curl/7.38.0 > Host: localhost:8080 > Accept: */* > < HTTP/1.1 500 Internal Server Error * Server Apache-Coyote/1.1 is not blacklisted < Server: Apache-Coyote/1.1 < Access-Control-Allow-Origin: * < Content-Type: application/json < Content-Length: 218 < Date: Sun, 03 Apr 2016 22:02:13 GMT < Connection: close < * Closing connection 0 {"error":"h_invalid_request","timestamp":1459720933979,"duration":1,"error_description":"InvalidRequestException(why:You have not logged in)","exception":"me.prettyprint.hector.api.exceptions.HInvalidRequestException"}# and from catalina.out error log I get : 2016-04-04 00:02:13,895 INFO (http-bio-8080-exec-8) [org.apache.usergrid.rest.system.DatabaseResource] - DatabaseResource initialized 2016-04-04 00:02:13,897 INFO (http-bio-8080-exec-8) [org.apache.usergrid.rest.system.DatabaseResource] - Setting up Cassandra (runDatabaseSetup) 2016-04-04 00:02:13,977 INFO (http-bio-8080-exec-8) [org.apache.usergrid.corepersistence.CpSetup] - Creating static application keyspace Usergrid_Applications 2016-04-04 00:02:13,978 ERROR (http-bio-8080-exec-8) [org.apache.usergrid.rest.exceptions.ThrowableMapper] - An uncaught exception occurred during HTTP invocation me.prettyprint.hector.api.exceptions.HInvalidRequestException: InvalidRequestException(why:You have not logged in)

      at me.prettyprint.cassandra.service.ExceptionsTranslatorImpl.translate()
    2. hector-core
      AbstractCluster.describeKeyspace
      1. me.prettyprint.cassandra.service.ExceptionsTranslatorImpl.translate(ExceptionsTranslatorImpl.java:52)
      2. me.prettyprint.cassandra.service.AbstractCluster$4.execute(AbstractCluster.java:195)
      3. me.prettyprint.cassandra.service.AbstractCluster$4.execute(AbstractCluster.java:185)
      4. me.prettyprint.cassandra.service.Operation.executeAndSetResult(Operation.java:104)
      5. me.prettyprint.cassandra.connection.HConnectionManager.operateWithFailover(HConnectionManager.java:253)
      6. me.prettyprint.cassandra.service.AbstractCluster.describeKeyspace(AbstractCluster.java:199)
      6 frames
    3. org.apache.usergrid
      DatabaseResource.runDatabaseSetup
      1. org.apache.usergrid.persistence.cassandra.CassandraService.keySpaceExists(CassandraService.java:299)
      2. org.apache.usergrid.persistence.cassandra.CassandraService.createColumnFamily(CassandraService.java:269)
      3. org.apache.usergrid.corepersistence.CpSetup.setupStaticKeyspace(CpSetup.java:176)
      4. org.apache.usergrid.corepersistence.CpSetup.initSubsystems(CpSetup.java:86)
      5. org.apache.usergrid.corepersistence.CpEntityManagerFactory.setup(CpEntityManagerFactory.java:520)
      6. org.apache.usergrid.rest.system.DatabaseResource.runDatabaseSetup(DatabaseResource.java:72)
      6 frames
    4. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      4. java.lang.reflect.Method.invoke(Method.java:498)
      4 frames
    5. jersey-core-server
      ServerRuntime$2.run
      1. org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81)
      2. org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144)
      3. org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161)
      4. org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$TypeOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:205)
      5. org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99)
      6. org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389)
      7. org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347)
      8. org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102)
      9. org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:309)
      9 frames
    6. Jersey Core
      RequestScope.runInScope
      1. org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)
      2. org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)
      3. org.glassfish.jersey.internal.Errors.process(Errors.java:315)
      4. org.glassfish.jersey.internal.Errors.process(Errors.java:297)
      5. org.glassfish.jersey.internal.Errors.process(Errors.java:267)
      6. org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317)
      6 frames
    7. jersey-core-server
      ApplicationHandler.handle
      1. org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:292)
      2. org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1139)
      2 frames
    8. jersey-container-servlet-core
      ServletContainer.doFilter
      1. org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:460)
      2. org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:386)
      3. org.glassfish.jersey.servlet.ServletContainer.doFilter(ServletContainer.java:548)
      4. org.glassfish.jersey.servlet.ServletContainer.doFilter(ServletContainer.java:489)
      5. org.glassfish.jersey.servlet.ServletContainer.doFilter(ServletContainer.java:426)
      5 frames
    9. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      2 frames
    10. Shiro
      OncePerRequestFilter.doFilter
      1. org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)
      2. org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)
      3. org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
      4. org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
      5. org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)
      6. org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)
      7. org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
      7 frames
    11. Spring
      DelegatingFilterProxy.doFilter
      1. org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:343)
      2. org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:260)
      2 frames
    12. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      2 frames
    13. org.apache.usergrid
      ContentTypeFilter.doFilter
      1. org.apache.usergrid.rest.filters.ContentTypeFilter.doFilter(ContentTypeFilter.java:94)
      1 frame
    14. Glassfish Core
      CoyoteAdapter.service
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      3. org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
      4. org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
      5. org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:503)
      6. org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
      7. org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
      8. org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
      9. org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
      10. org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421)
      10 frames
    15. Grizzly HTTP
      JIoEndpoint$SocketProcessor.run
      1. org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1070)
      2. org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
      3. org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:314)
      3 frames
    16. Java RT
      ThreadPoolExecutor$Worker.run
      1. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      2. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      2 frames
    17. Tomcat Util
      TaskThread$WrappingRunnable.run
      1. org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
      1 frame
    18. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:745)
      1 frame