On Thursday, February 7, 2013 3:12:22 PM UTC+8, Omer Iqbal wrote:
>
> Hey, I used a similar upstart script which works fine for ring.

[EDIT] ignore the above sentence. I was originally replying to a thread. 
#mybad 

> However, weirdly enough, my auth with a mysql database fails. I'm using 
> korma to interface with the db. The problem only occurs with upstart 
> script,, because it works fine when I run it myself.
> To be clearer. When I run: lein trampoline run/lein ring server, my db 
> connects fine.
> However, I use the following upstart script:
>
> start on startup
> start on runlevel [2345]
> stop on runlevel [!2345]
> chdir /home/ubuntu/www
> setuid ubuntu
> exec lein trampoline run > out.log 2>&1
>
> When I run the daemon, ring runs fine. However, when it communicates with 
> the mysql server, it throw the following exception (amongst a sea of stack 
> traces): "java.sql.SQLException: Access denied for user 'root'@'localhost' 
> (using password: NO)"
>
> This is weird because my korma config does supply a password, and it works 
> fine when I run lein run myself. However for reference sake, I check for an 
> environment variable(CLJ_ENV) to decide which config to use. SInce the only 
> differentiating factor is upstart, my assumption is that the problem is due 
> to setuid. But to be honest, I have no idea what's going wrong.
>
> Oh, and for clarification this is all on an aws machine running Ubuntu 
> Server 12.04 LTS.
> Any ideas on whats going on?
>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to