java.lang.IllegalArgumentException: Mailbox ID should be valid RFC5322 email address

54 views
Skip to first unread message

John Wiesel

unread,
May 28, 2013, 10:57:48 AM5/28/13
to elasti...@googlegroups.com
Hi there,

I am currently running the elasticinbox-assembly-0.4.0-20130505.004416-7 snapshot on a test instance but seem to be doing s.th. fundamentally wrong even during the first steps.

After configuration and seemingly successful start-up, I am trying to use the v2 API as describe here, to create my very first test account:

2013-05-28 16:49:29,072 WARN  [qtp2030014547-23] o.e.j.u.l.Slf4jLog [warn:50] - /rest/v2/:mydomain.com/:testuser
java.lang.IllegalArgumentException: Mailbox ID should be valid RFC5322 email address

My curl command is

curl -XPOST "http://ipaddresshere:8181/rest/v2/:mydomain.com/:testuser

Btw.: If I try to run the old v1 syntax, I get a 404 error.

Thanks,

John

Rustam Aliyev

unread,
May 28, 2013, 11:08:18 AM5/28/13
to elasti...@googlegroups.com
You need to replace variables identified by semicolons (i.e. ":domain" is just a variable name). Try:
curl -XPOST "http://ipaddresshere:8181/rest/v2/elasticinbox.com/testuser"
v1 API is deprecated and removed in 0.4.

-
Rustam.



--
You received this message because you are subscribed to the Google Groups "ElasticInbox" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticinbox...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

John Wiesel

unread,
May 28, 2013, 11:29:09 AM5/28/13
to elasti...@googlegroups.com

You need to replace variables identified by semicolons (i.e. ":domain" is just a variable name). Try:

Thanks! I am geting an ok=true response now. But the account columnfamily in Cassandra still has 0 rows and follow up commands fail, though.
Hm. Any way to debug elasticinbox' connection to C*? (C* seems to be running fine, schema is deployed using https://github.com/elasticinbox/elasticinbox/blob/master/config/elasticinbox.cml )...

Log shows this:
2013-05-28 17:26:23,424 INFO  [Start Level Event Dispatcher] c.e.c.c.CassandraDAOFactory [<clinit>:96] - Connecting to cassandra hosts: **********:9160
2013-05-28 17:26:23,457 INFO  [Start Level Event Dispatcher] m.p.c.c.CassandraHostRetryService [<init>:48] - Downed Host Retry service started with queue size -1 and retry delay 10s

Rustam Aliyev

unread,
May 28, 2013, 12:10:11 PM5/28/13
to elasti...@googlegroups.com
From logs it looks like it couldn't connect to C*. Strange that you get OK response. Will try to reproduce.

In the mean time, to enable debugging just change INFO to DEBUG in logback.xml: https://github.com/elasticinbox/elasticinbox/blob/master/config/logback.xml#L43



John Wiesel

unread,
Jun 3, 2013, 11:39:48 AM6/3/13
to elasti...@googlegroups.com


On Tuesday, May 28, 2013 6:10:11 PM UTC+2, Rustam Aliyev wrote:
From logs it looks like it couldn't connect to C*. Strange that you get OK response. Will try to reproduce.

In the mean time, to enable debugging just change INFO to DEBUG in logback.xml: https://github.com/elasticinbox/elasticinbox/blob/master/config/logback.xml#L43

 

netstat shows that there is a connection between elastic and C*. So I was looking for a different problem.

Now this is getting really weird. When i run curl with -X DELETE .... elastic inserts the user. Any other API call on the account has no effect.

So:

john@johns-workstation:~$ curl -XPOST "http://******:8181/rest/v2/test/tester"
{"ok":true}

But no entries in "accounts" CF.

john@johns-workstation:~$ curl -XDELETE "http://******:8181/rest/v2/test/tester"
[default@ElasticInbox] list Accounts;
Using default limit of 100
Using default column limit of 100
-------------------
RowKey: tester@test

1 Row Returned.
Elapsed time: 3.78 msec(s).

It looks like it is deleting the messages as documented at the same time:

2013-06-03 17:27:09,620 DEBUG [Thread-24] c.e.c.c.CassandraMessageDAO [purge:415] - Purging all messages older than Mon Jun 03 17:27:09 CEST 2013 for Mailbox: {id:tester3@test}
...
2013-06-03 17:27:09,642 DEBUG [qtp1818470177-24 - /rest/v2/test/tester3] o.e.j.u.l.Slf4jLog [debug:70] - RESPONSE /rest/v2/test/tester3  204
 
Like I said, I am using the 0.4.0 snapshot version.
So, new user creation - for me - works only with the delete request. I will try to put some messages to that user now.

Best wishes,
John

John Wiesel

unread,
Jun 3, 2013, 12:18:57 PM6/3/13
to elasti...@googlegroups.com


On Monday, June 3, 2013 5:39:48 PM UTC+2, John Wiesel wrote:

So, new user creation - for me - works only with the delete request. I will try to put some messages to that user now.


Putting and getting messages works as expected. (Hooray! :) )

- John

Rustam Aliyev

unread,
Jul 2, 2013, 8:03:11 PM7/2/13
to elasti...@googlegroups.com
Hi John,

Glad to hear that it's working for you.

I've created followup github issue which explains a problem you were facing: https://github.com/elasticinbox/elasticinbox/issues/36

--
Rustam.


--
Reply all
Reply to author
Forward
0 new messages