Small error/warning on starting #61
Labels
No labels
blocked
breaking
bug
dependencies
duplicate
enhancement
good first issue
help wanted
question
tech debt
testing
wontfix
No milestone
No project
No assignees
1 participant
Due date
No due date set.
Dependencies
No dependencies set.
Reference
scion/arbitrader#61
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
There is a small error on starting complaining about missing state file.
arbitrader_1 | 2019-04-09 07:08:15.938 INFO 1 --- [ main] c.r.arbitrader.service.TradingService : Using fixed exposure of $16.00 as configured
arbitrader_1 | 2019-04-09 07:08:16.078 ERROR 1 --- [ main] c.r.arbitrader.service.TradingService : Unable to parse state file /arbitrader-state.json:
arbitrader_1 |
arbitrader_1 | java.io.FileNotFoundException: arbitrader-state.json (Is a directory)
arbitrader_1 | at java.io.FileInputStream.open0(Native Method)
arbitrader_1 | at java.io.FileInputStream.open(FileInputStream.java:195)
arbitrader_1 | at java.io.FileInputStream.(FileInputStream.java:138)
arbitrader_1 | at com.fasterxml.jackson.core.JsonFactory.createParser(JsonFactory.java:766)
arbitrader_1 | at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2902)
arbitrader_1 | at com.r307.arbitrader.service.TradingService.connectExchanges(TradingService.java:202)
arbitrader_1 | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
arbitrader_1 | at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
arbitrader_1 | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
arbitrader_1 | at java.lang.reflect.Method.invoke(Method.java:498)
arbitrader_1 | at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleElement.invoke(InitDestroyAnnotationBeanPostProcessor.java:363)
arbitrader_1 | at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleMetadata.invokeInitMethods(InitDestroyAnnotationBeanPostProcessor.java:307)
arbitrader_1 | at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:136)
arbitrader_1 | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:419)
arbitrader_1 | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1737)
arbitrader_1 | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:576)
arbitrader_1 | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:498)
arbitrader_1 | at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320)
arbitrader_1 | at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
arbitrader_1 | at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318)
arbitrader_1 | at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
arbitrader_1 | at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:846)
arbitrader_1 | at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:863)
arbitrader_1 | at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:546)
arbitrader_1 | at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:775)
arbitrader_1 | at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397)
arbitrader_1 | at org.springframework.boot.SpringApplication.run(SpringApplication.java:316)
arbitrader_1 | at org.springframework.boot.SpringApplication.run(SpringApplication.java:1260)
arbitrader_1 | at org.springframework.boot.SpringApplication.run(SpringApplication.java:1248)
arbitrader_1 | at com.r307.arbitrader.Arbitrader.main(Arbitrader.java:11)
arbitrader_1 | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
arbitrader_1 | at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
arbitrader_1 | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
arbitrader_1 | at java.lang.reflect.Method.invoke(Method.java:498)
arbitrader_1 | at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48)
arbitrader_1 | at org.springframework.boot.loader.Launcher.launch(Launcher.java:87)
arbitrader_1 | at org.springframework.boot.loader.Launcher.launch(Launcher.java:50)
arbitrader_1 | at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:51)
arbitrader_1 |
arbitrader_1 | 2019-04-09 07:08:16.549 INFO 1 --- [ main] com.r307.arbitrader.Arbitrader : Started Arbitrader in 18.151 seconds (JVM running for 19.312)
This shouldn’t prevent the bot from running but it might not be able to write the state file when it trades. Let me know if it also throws an exception when it opens a trade.
I merged a PR last night with a change to docker-compose.yaml and a small new section in the README for Windows users that might help you resolve this.
I am on gentoo linux. Actually after that error it continues to run. Maybe when you run for the first time it is unable to parse/find that state file.
Yes, on the first run the state file will not exist. I will make it so it doesn’t print the whole stack trace when it’s missing though. It should just be a brief warning.
I used to use Gentoo when I ran my own servers. Good stuff! Now I have it all in AWS.
When you update to the latest that includes #65, make sure you get the new
docker-compose.yaml. If you have trades open and there is a state file when you restart the bot, you can manually create the.arbitraderdirectory and move the state file in there so the bot will read it when it starts up.