These are chat archives for nemesis-software/gitter

29th
Feb 2016
UryDanko
@UryDanko
Feb 29 2016 09:44
and good morning again
it is Monday and it is good time to ask new questions :)
Windows:
[ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:1.3.2.RELEASE:run (default-cli) on project nemesis-demo-storefront: Could not exec java: Cannot run program "C:\jdk1.8.0_65\jre\bin\java.exe": CreateProcess error=206, The filename or extension is too long -> [Help 1]
I can't do path to java shorter (by using just jre for example).. so it there a way to reduce classpath lenght?
Nayden Gochev
@gochev
Feb 29 2016 10:12
good morning
the problem is you are using windows :) and windows do have an issue with "long filename or execution path" :) you basically cannot start an java application with LONG classpath in Windows :) please read the gist I shared on Friday https://gist.github.com/gochev/6d1db7e4f3804279b9e2 there I stated if you are using Windos to use java -jar filetoWar.war
Vladimir Tsanev
@tsachev
Feb 29 2016 10:35
I believe you should also be able to run/debug the app from eclipse (did not tried it on windows though).
Nayden Gochev
@gochev
Feb 29 2016 12:44
just use java -jar samplestore.war :) tested and working ;) tell us if you have other problems, but I tested everything in the gist 10 steps :)
UryDanko
@UryDanko
Feb 29 2016 14:21
and again :)
today's build, exportshema, initdb - no errors
trying to run java -jar -Dfile.encoding="UTF-8" storefront.war and get an error
2016-02-29 15:20:08,033 org.springframework.boot.SpringApplication [main] ERROR: Application startup failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redisServer' defined in class path resource [com/nemesis/platform/config/PlatformCoreSessionConfig.class]: Invocation of init method failed; nested exception is java.lang.RuntimeException: Can't start redis server. Check logs for details.
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1578)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:545)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:120)
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:678)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:520)
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:118)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:766)
at org.springframework.boot.SpringApplication.createAndRefreshContext(SpringApplication.java:361)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:307)
at nl.oramon.nemesis.OramonApplication.main(OramonApplication.java:41)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:54)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.RuntimeException: Can't start redis server. Check logs for details.
at redis.embedded.AbstractRedisInstance.awaitRedisServerReady(AbstractRedisInstance.java:61)
at redis.embedded.AbstractRedisInstance.start(AbstractRedisInstance.java:39)
at redis.embedded.RedisServer.start(RedisServer.java:9)
at com.nemesis.platform.config.PlatformCoreSessionConfig$RedisServerBean.afterPropertiesSet(PlatformCoreSessionConfig.java:155)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1637)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1574)
... 20 more
Petar Tahchiev
@ptahchiev
Feb 29 2016 14:58
maybe you have a firewall running?
there should be logs in the target/ folder - something about redis
Nayden Gochev
@gochev
Feb 29 2016 15:13
we do start embedded redis server that should be started and I tested it was started properly on my WIndows 10 machine.
Petar Tahchiev
@ptahchiev
Feb 29 2016 15:16
Ury can you paste your stacktrace in a gist?
the gitter cuts out most of it
UryDanko
@UryDanko
Feb 29 2016 15:40
firewall - I was first idea. I switched it off.
https://gist.github.com/UryDanko/b5710a6209aaf86d70dc
Petar Tahchiev
@ptahchiev
Feb 29 2016 15:47
again we need to check the logs.. but I've seen this happen if you somehow kill the platform, but it doesn't kill the redis server
then what I usually do on linux is ps aux | grep redis
to find the PID of the redis process
and then I kill -9 PID_REDIS
to kill the redis.. otherwise it runs in the background and blocks the port
i'm not sure how to find it on windows - i think it is Ctrl + Alt + Del
and then find if there's any redis processes running
or perhaps java processes
Here's what it looks like on linux:
petar     26804  0.1  0.1  38044  7032 ?        Sl   Feb25  10:31 /tmp/1456386899877-0/redis-server-2.8.19 *:6379
Nayden Gochev
@gochev
Feb 29 2016 15:55
kill all "java' and "redis" processes you have :) not sure how to use "taskkill" which is the alternative of kill in Windows
we definitely need a windows user
taskkill /IM redis maybe ?
UryDanko
@UryDanko
Feb 29 2016 16:02
I have neither java nor redis before start :(
Petar Tahchiev
@ptahchiev
Feb 29 2016 16:06
Hi Ury
we had the same problem before
kstyrc/embedded-redis#51
this is the issue we opened
and seems like a lot of people are experiencing it
UryDanko
@UryDanko
Feb 29 2016 16:07
yes, you can add +1 to this issue
Petar Tahchiev
@ptahchiev
Feb 29 2016 16:07
I opened it :D
people say port is in use
is mostly the case
or check the logs
UryDanko
@UryDanko
Feb 29 2016 16:50
good news. It has been started. Seems it was windows magic. I've restarted laptop and everything works fine.
to be serious - perhaps some other application was on this port but resourceMonitor didn't show anything. At least this is only explanation I have. And yes - it was my environment for sure
so you can add into your windows instruction "don't forget to reboot" :)
Petar Tahchiev
@ptahchiev
Feb 29 2016 17:04
:+1:
i was going to tell you to try change the port by changing the spring.redis.port property