Small error/warning on starting #61

Closed
opened 2019-04-09 00:18:25 -07:00 by sanitariu · 4 comments
sanitariu commented 2019-04-09 00:18:25 -07:00 (Migrated from github.com)

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)

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.<init>(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)
scionaltera commented 2019-04-09 11:33:33 -07:00 (Migrated from github.com)

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.

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.
sanitariu commented 2019-04-09 12:45:50 -07:00 (Migrated from github.com)

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.

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.
scionaltera commented 2019-04-09 12:59:28 -07:00 (Migrated from github.com)

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.

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.
scionaltera commented 2019-04-10 21:27:09 -07:00 (Migrated from github.com)

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 .arbitrader directory and move the state file in there so the bot will read it when it starts up.

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 `.arbitrader` directory and move the state file in there so the bot will read it when it starts up.
Commenting is not possible because the repository is archived.
No milestone
No project
No assignees
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
scion/arbitrader#61
No description provided.