ConnectException with couchdb-request

56 views
Skip to first unread message

DenisV

unread,
Jul 8, 2012, 10:17:28 PM7/8/12
to clojure...@googlegroups.com
Since moving a project from my old Windows XP machine to a new Windows 7 64-bit PC, I'm  getting the following error message in the Counterclockwise REPL when using couchdb-request :

ConnectException Connection refused: connect  java.net.PlainSocketImpl.socketConnect (:-2)

First I load into the REPL a file that starts with:

(use '[com.ashafa.clutch :as clutch])
(use '(com.ashafa.clutch [http-client :only (couchdb-request)]
                         [utils :only (url)]))

Then I get a ConnectException if I call any couchdb-request expression that used to work before, such as:

(couchdb-request :post (url (str "http://localhost/test-db/_compact")))

My project.clj file includes:
  :dependencies [[org.clojure/clojure "1.3.0"]
                 [com.ashafa/clutch "0.3.1"]]

Thanks for your help,
Denis

Chas Emerick

unread,
Jul 9, 2012, 8:51:40 AM7/9/12
to clojure...@googlegroups.com
Looks like you're not qualifying the port number; i.e. try:

(couchdb-request :post (url (str "http://localhost:5984/test-db/_compact")))

- Chas

--
http://cemerick.com
[Clojure Programming from O'Reilly](http://www.clojurebook.com)

DenisV

unread,
Jul 9, 2012, 1:30:49 PM7/9/12
to clojure...@googlegroups.com
Thanks, Chas, that fixed it. It's just weird that it used to work on my old PC.

Another thing that's different is that if I reload my file into the Counterclockwise REPL I get an error:

IllegalStateException assoc! already refers to: #'com.ashafa.clutch/assoc! in namespace: com.systematic.db-access  clojure.lang.Namespace.warnOrFailOnReplace (Namespace.java:88)

Thanks,
Denis
Reply all
Reply to author
Forward
0 new messages