Closed shawn-simon closed 9 years ago
My guess is that the window calculation is wrong. We will figure this out. Sorry..
Please try to do following
If issue still exists, please refer to https://github.com/ontometrics/slack-youtrack#troubleshooting and send detailed logs
@andrey-chorniy I updated the logging to requests, but not seeing where they're logged. Here's my logs. I updated some issues in YouTrack after starting the server.
~/yt2slack/logs$ ls
application.log localhost.2015-05-04.log
catalina.2015-05-04.log localhost_access_log.2015-05-04.txt
catalina.out
application.log
~/yt2slack/logs$ cat application.log
2015-05-04 20:27:20,361 - [INFO] - from com.ontometrics.integrations.jobs.WebContextJobStarter in localhost-startStop-1
Started up
2015-05-04 20:27:20,716 - [INFO] - from com.ontometrics.integrations.jobs.JobStarter in localhost-startStop-1
Scheduling EventListener task
2015-05-04 20:27:22,717 - [INFO] - from com.ontometrics.integrations.jobs.JobStarter in Timer-0
Event processing started
2015-05-04 20:27:22,719 - [INFO] - from com.ontometrics.integrations.configuration.EventProcessorConfiguration in Timer-0
Going to load properties from file /home/ubuntu/yt2slack/data/lastEvent.properties
2015-05-04 20:27:22,905 - [INFO] - from com.ontometrics.integrations.configuration.EventProcessorConfiguration in Timer-0
Last Event Change keyset:
2015-05-04 20:27:22,905 - [INFO] - from com.ontometrics.integrations.configuration.EventProcessorConfiguration in Timer-0
Initialized EventProcessorConfiguration
2015-05-04 20:27:22,906 - [DEBUG] - from com.ontometrics.integrations.sources.EditSessionsExtractor in Timer-0
edits since: Mon May 04 19:27:22 UTC 2015
2015-05-04 20:27:23,599 - [INFO] - from com.ontometrics.integrations.jobs.EventListenerImpl in Timer-0
Found 0 edit sessions to post.
2015-05-04 20:27:23,600 - [INFO] - from com.ontometrics.integrations.jobs.JobStarter in Timer-0
Event processing finished
2015-05-04 20:28:22,717 - [INFO] - from com.ontometrics.integrations.jobs.JobStarter in Timer-0
Event processing started
2015-05-04 20:28:22,717 - [DEBUG] - from com.ontometrics.integrations.sources.EditSessionsExtractor in Timer-0
edits since: Mon May 04 19:28:22 UTC 2015
2015-05-04 20:28:22,744 - [INFO] - from com.ontometrics.integrations.jobs.EventListenerImpl in Timer-0
Found 0 edit sessions to post.
2015-05-04 20:28:22,744 - [INFO] - from com.ontometrics.integrations.jobs.JobStarter in Timer-0
Event processing finished
catalina.out
~/yt2slack/logs$ cat catalina.out
May 04, 2015 8:27:15 PM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [/usr/share/tomcat7/common/classes], exists: [false], isDirectory: [false], canRead: [false]
May 04, 2015 8:27:15 PM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [/usr/share/tomcat7/common], exists: [false], isDirectory: [false], canRead: [false]
May 04, 2015 8:27:16 PM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [/usr/share/tomcat7/server/classes], exists: [false], isDirectory: [false], canRead: [false]
May 04, 2015 8:27:16 PM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [/usr/share/tomcat7/server], exists: [false], isDirectory: [false], canRead: [false]
May 04, 2015 8:27:16 PM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [/usr/share/tomcat7/shared/classes], exists: [false], isDirectory: [false], canRead: [false]
May 04, 2015 8:27:16 PM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [/usr/share/tomcat7/shared], exists: [false], isDirectory: [false], canRead: [false]
May 04, 2015 8:27:16 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
May 04, 2015 8:27:17 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 861 ms
May 04, 2015 8:27:17 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
May 04, 2015 8:27:17 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.52 (Ubuntu)
May 04, 2015 8:27:17 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive /home/ubuntu/yt2slack/webapps/slack.war
2015-05-04 20:27:20,361 - [INFO] - c.o.i.j.WebContextJobStarter - Started up
2015-05-04 20:27:20,716 - [INFO] - c.o.i.j.JobStarter - Scheduling EventListener task
2015-05-04 20:27:22,717 - [INFO] - c.o.i.j.JobStarter - Event processing started
2015-05-04 20:27:22,719 - [INFO] - c.o.i.c.EventProcessorConfiguration - Going to load properties from file /home/ubuntu/yt2slack/data/lastEvent.properties
2015-05-04 20:27:22,905 - [INFO] - c.o.i.c.EventProcessorConfiguration - Last Event Change keyset:
2015-05-04 20:27:22,905 - [INFO] - c.o.i.c.EventProcessorConfiguration - Initialized EventProcessorConfiguration
2015-05-04 20:27:22,906 - [DEBUG] - c.o.i.s.EditSessionsExtractor - edits since: Mon May 04 19:27:22 UTC 2015
2015-05-04 20:27:23,599 - [INFO] - c.o.i.j.EventListenerImpl - Found 0 edit sessions to post.
2015-05-04 20:27:23,600 - [INFO] - c.o.i.j.JobStarter - Event processing finished
May 04, 2015 8:28:19 PM org.apache.catalina.util.SessionIdGenerator createSecureRandom
INFO: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [58,579] milliseconds.
May 04, 2015 8:28:19 PM org.apache.jasper.EmbeddedServletOptions <init>
SEVERE: The scratchDir you specified: /home/ubuntu/yt2slack/work/Catalina/localhost/slack is unusable.
May 04, 2015 8:28:19 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
May 04, 2015 8:28:19 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 62348 ms
2015-05-04 20:28:22,717 - [INFO] - c.o.i.j.JobStarter - Event processing started
2015-05-04 20:28:22,717 - [DEBUG] - c.o.i.s.EditSessionsExtractor - edits since: Mon May 04 19:28:22 UTC 2015
2015-05-04 20:28:22,744 - [INFO] - c.o.i.j.EventListenerImpl - Found 0 edit sessions to post.
2015-05-04 20:28:22,744 - [INFO] - c.o.i.j.JobStarter - Event processing finished
2015-05-04 20:29:22,717 - [INFO] - c.o.i.j.JobStarter - Event processing started
2015-05-04 20:29:22,718 - [DEBUG] - c.o.i.s.EditSessionsExtractor - edits since: Mon May 04 19:29:22 UTC 2015
2015-05-04 20:29:22,746 - [INFO] - c.o.i.j.EventListenerImpl - Found 0 edit sessions to post.
2015-05-04 20:29:22,746 - [INFO] - c.o.i.j.JobStarter - Event processing finished
catalina.2015-05-04.txt
May 04, 2015 8:31:45 PM org.apache.coyote.AbstractProtocol pause
INFO: Pausing ProtocolHandler ["http-bio-8080"]
May 04, 2015 8:31:45 PM org.apache.catalina.core.StandardService stopInternal
INFO: Stopping service Catalina
May 04, 2015 8:31:45 PM org.apache.coyote.AbstractProtocol stop
INFO: Stopping ProtocolHandler ["http-bio-8080"]
May 04, 2015 8:31:45 PM org.apache.coyote.AbstractProtocol destroy
INFO: Destroying ProtocolHandler ["http-bio-8080"]
May 04, 2015 8:31:48 PM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [/usr/share/tomcat7/common/classes], exists: [false], isDirectory: [false], canRead: [false]
May 04, 2015 8:31:48 PM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [/usr/share/tomcat7/common], exists: [false], isDirectory: [false], canRead: [false]
May 04, 2015 8:31:48 PM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [/usr/share/tomcat7/server/classes], exists: [false], isDirectory: [false], canRead: [false]
May 04, 2015 8:31:48 PM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [/usr/share/tomcat7/server], exists: [false], isDirectory: [false], canRead: [false]
May 04, 2015 8:31:48 PM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [/usr/share/tomcat7/shared/classes], exists: [false], isDirectory: [false], canRead: [false]
May 04, 2015 8:31:48 PM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [/usr/share/tomcat7/shared], exists: [false], isDirectory: [false], canRead: [false]
May 04, 2015 8:31:49 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
May 04, 2015 8:31:49 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 865 ms
May 04, 2015 8:31:49 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
May 04, 2015 8:31:49 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.52 (Ubuntu)
May 04, 2015 8:31:49 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive /home/ubuntu/yt2slack/webapps/slack.war
May 04, 2015 8:31:52 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
May 04, 2015 8:31:52 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 3093 ms
nothing in the localhost logs
Thanks for your help btw!
Looks like it's looking for stuff that just happened today, per what we suspected.. ?
Looks like these are still just INFO logs, but clearly it's starting the server and looking backwards only a few minutes.
Right, but I'm making updates in YouTrack after the server is running, and it's not picking anything up
Uh, ok, then scratch that theory.
Are we sure the YouTrack URL is correct? Probably DEBUG logs are the next thing.
Yea, I'm pretty sure the YouTrack URL is correct because there are exceptions in the log if I change it. Where would I find the DEBUG logs? I already uncommented those lines and rebuilt the war file.
After uncommenting and rebuilding, if you redeploy DEBUG messages should appear in the same logs.
Yea, I did that, and I'm not seeing the request / response logging in any of the /logs/ files : (
wonder if this is the issue:
Failed tests: testThatMinimumAllowedDateCorrectlyResolved(com.ontometrics.integrations.configuration.EventProcessorConfigurationTest): Dates are not equals
Tests run: 53, Failures: 1, Errors: 0, Skipped: 3
@shawn-simon, we have made several changes to the logging. Now, after you update the source code in logback.xml, please uncomment these lines for HTTP request logging:
<logger name="org.apache.http" level="DEBUG" />
<logger name="com.ontometrics.integration.youtrack.response" level="DEBUG" />
Please attach logs after you redeploy application with the new logging settings.
Also, are the time zones on your Tomcat web app server and YouTrack server different? Are YT and slack-integration apps deployed on the same server?
@nchorniy I already have uncommented those lines, they did not change the logging... I noticed that in the code you pasted the logger name is org.apache.http, com.ontometrics.integration.youtrack.response, but in github its:
<!-- Uncomment line below to enable logging of sent and received data-$
<logger name="org.apache.http.wire" level="DEBUG" />
<!-- Uncomment line below to enable http requests headers logging-->
<logger name="org.apache.http.headers" level="DEBUG" />
Also, are the time zones on your Tomcat web app server and YouTrack server different? Are YT and slack-integration apps deployed on the same server?
I am using cloud hosted youtrack. I just threw up an ec2 instance and installed tomcat.
Oops! didnt see you just pushed. Trying again
Ok... figured it out... it's concatenating the url incorrectly. My installation is not at the web root... it's putting the port in anyway. GG
Got response from url https://mysubdomain.myjetbrains.com/youtrack:80/_rss/issues
:cry:
After reading the source, I set the PORT config to 0 which doesn't do the string concatenation. I would recommend expecting that the base url may have a sub path. Thanks so much for your help!
@shawn-simon we updated the way app is configured to address that issue, now you have to provide only one parameter YOUTRACK_URL=https://mysubdomain.myjetbrains.com/youtrack or with port YOUTRACK_URL=https://mysubdomain.myjetbrains.com:443/youtrack
This is my application log. it seems to be connecting to youtrack but not finding any thing to send to slack.
my config: