netrunner icon indicating copy to clipboard operation
netrunner copied to clipboard

`lein fetch` failed with `java.lang.Exception`

Open darmac opened this issue 5 years ago • 5 comments

I tried to make a local server by using the latest source code.

commit ac5451818a18bbd72955a841c73500ac877038c4 (HEAD -> master, origin/master, origin/HEAD)
Merge: d4019576c 1dc1597ff
Author: Noah <[email protected]>
Date:   Fri Jan 8 16:45:51 2021 -0500

    Merge pull request #5477 from jwarwick/deck_modal
    
    Only make one modal window for the app

But there is an exception here:

Exception in thread "main" java.lang.Exception: Failed to download file java.net.ConnectException: Connection refused, compiling:(/tmp/form-init6739805473055085091.clj:1:73)
	at clojure.lang.Compiler.load(Compiler.java:7526)
	at clojure.lang.Compiler.loadFile(Compiler.java:7452)
	at clojure.main$load_script.invokeStatic(main.clj:278)
	at clojure.main$init_opt.invokeStatic(main.clj:280)
	at clojure.main$init_opt.invoke(main.clj:280)
	at clojure.main$initialize.invokeStatic(main.clj:311)
	at clojure.main$null_opt.invokeStatic(main.clj:345)
	at clojure.main$null_opt.invoke(main.clj:342)
	at clojure.main$main.invokeStatic(main.clj:424)
	at clojure.main$main.doInvoke(main.clj:387)
	at clojure.lang.RestFn.applyTo(RestFn.java:137)
	at clojure.lang.Var.applyTo(Var.java:702)
	at clojure.main.main(main.java:37)
Caused by: java.lang.Exception: Failed to download file java.net.ConnectException: Connection refused
	at tasks.nrdb$download_edn_data.invokeStatic(nrdb.clj:21)
	at tasks.nrdb$download_edn_data.invoke(nrdb.clj:15)
	at tasks.nrdb$fetch_data.invokeStatic(nrdb.clj:98)
	at tasks.nrdb$fetch_data.invoke(nrdb.clj:96)
	at tasks.fetch$command.invokeStatic(fetch.clj:48)
	at tasks.fetch$command.doInvoke(fetch.clj:42)
	at clojure.lang.RestFn.invoke(RestFn.java:397)
	at clojure.lang.Var.invoke(Var.java:377)
	at user$eval149.invokeStatic(form-init6739805473055085091.clj:1)
	at user$eval149.invoke(form-init6739805473055085091.clj:1)
	at clojure.lang.Compiler.eval(Compiler.java:7062)
	at clojure.lang.Compiler.eval(Compiler.java:7052)
	at clojure.lang.Compiler.load(Compiler.java:7514)
	... 12 more

My server info:

root:netrunner_latest# uname -a
Linux darmac-VirtualBox 4.15.0-54-generic #58-Ubuntu SMP Mon Jun 24 10:55:24 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
root:netrunner_latest# cat /etc/os-release 
NAME="Ubuntu"
VERSION="18.04 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic

Java info

root:netrunner_latest# java -version; javac -version
openjdk version "1.8.0_275"
OpenJDK Runtime Environment (build 1.8.0_275-8u275-b01-0ubuntu1~18.04-b01)
OpenJDK 64-Bit Server VM (build 25.275-b01, mixed mode)
javac 1.8.0_275

Is that any problem with my environment? How to fix that exception?

darmac avatar Jan 20 '21 23:01 darmac

Is mongo running? If it isn't running that's typically the cause of connection errors.

jwarwick avatar Jan 21 '21 01:01 jwarwick

Hmm, actually looking closer at the stacktrace, it might not be able to download the card information (edn file)? Actually, pretty certain that's it. Can you curl or wget this file: "https://raw.githubusercontent.com/NoahTheDuke/netrunner-data/master/edn/raw_data.edn"

jwarwick avatar Jan 21 '21 01:01 jwarwick

yes,I cannot access the file. But I can access GitHub webpage. Any workaround method for this?

darmac avatar Jan 21 '21 05:01 darmac

You can download the data file here: https://github.com/NoahTheDuke/netrunner-data/blob/master/edn/raw_data.edn Then run using the --local flag: % lein fetch --local path_to_file/raw_data.edn

jwarwick avatar Jan 21 '21 13:01 jwarwick

Yes, thanks for your guiding, I just found that by myself. I haven't used clj language yet, but I found it's much easy to understand~

darmac avatar Jan 21 '21 14:01 darmac