Installing jobsworth on an Ubuntu server

조회수 115회
읽지 않은 첫 메시지로 건너뛰기

Penteract

읽지 않음,
2016. 6. 13. 오전 10:55:5516. 6. 13.
받는사람 jobsworth
Hello

I'm trying to get jobsworth(5.0) running in a local ubuntu(16.04) server and I'm stuck in an error that I've seen a couple of times but I haven't seen a specific solution in the error threads.

When I try to access the jobsworth site I get the folowing error:
jdbc adapter requires :driver and :url (got :driver = mysql) from /usr/share/tomcat7-root/jobsworth/WEB-INF/gems/gems/activerecord-jdbc-adapter-1.3.20/lib/arjdbc/jdbc/connection.rb:89:in [...]

As far as I'm aware, the mysql package has been installed and I have  a link to that jar in my tomcat7 folder:

usr@admin-ubuntu-server:/usr/share/tomcat7/lib$ ls -l
total
248
lrwxrwxrwx
1 root root     44 Feb 27 08:04 annotations-api.jar -> ../../java/tomcat-annotations-api-7.0.68.jar
lrwxrwxrwx
1 root root     34 Feb 27 08:04 catalina-ant.jar -> ../../java/catalina-ant-7.0.68.jar
lrwxrwxrwx
1 root root     40 Feb 27 08:04 catalina-ha.jar -> ../../java/tomcat-catalina-ha-7.0.68.jar
lrwxrwxrwx
1 root root     37 Feb 27 08:04 catalina.jar -> ../../java/tomcat-catalina-7.0.68.jar
lrwxrwxrwx
1 root root     48 Feb 27 08:04 catalina-jmx-remote.jar -> ../../java/tomcat-catalina-jmx-remote-7.0.68.jar
lrwxrwxrwx
1 root root     37 Feb 27 08:04 catalina-tribes.jar -> ../../java/catalina-tribes-7.0.68.jar
lrwxrwxrwx
1 root root     27 Feb 27 08:04 commons-dbcp.jar -> ../../java/commons-dbcp.jar
lrwxrwxrwx
1 root root     27 Feb 27 08:04 commons-pool.jar -> ../../java/commons-pool.jar
lrwxrwxrwx
1 root root     32 Feb 27 08:04 el-api.jar -> ../../java/tomcat-el-api-2.2.jar
lrwxrwxrwx
1 root root     38 Feb 27 08:04 jasper-el.jar -> ../../java/tomcat-jasper-el-7.0.68.jar
lrwxrwxrwx
1 root root     35 Feb 27 08:04 jasper.jar -> ../../java/tomcat-jasper-7.0.68.jar
lrwxrwxrwx
1 root root     33 Feb 27 08:04 jsp-api.jar -> ../../java/tomcat-jsp-api-2.2.jar
lrwxrwxrwx
1 root root     25 Jun 13 10:27 mysql.jar -> /usr/share/java/mysql.jar
lrwxrwxrwx
1 root root     37 Feb 27 08:04 servlet-api.jar -> ../../java/tomcat-servlet-api-3.0.jar
-rw-r--r-- 1 root root 216639 Feb 27 08:04 tomcat7-websocket.jar
lrwxrwxrwx
1 root root     32 Feb 27 08:04 tomcat-api.jar -> ../../java/tomcat-api-7.0.68.jar
lrwxrwxrwx
1 root root     35 Feb 27 08:04 tomcat-coyote.jar -> ../../java/tomcat-coyote-7.0.68.jar
lrwxrwxrwx
1 root root     36 Feb 27 08:04 tomcat-i18n-es.jar -> ../../java/tomcat-i18n-es-7.0.68.jar
lrwxrwxrwx
1 root root     36 Feb 27 08:04 tomcat-i18n-fr.jar -> ../../java/tomcat-i18n-fr-7.0.68.jar
lrwxrwxrwx
1 root root     36 Feb 27 08:04 tomcat-i18n-ja.jar -> ../../java/tomcat-i18n-ja-7.0.68.jar
lrwxrwxrwx
1 root root     33 Feb 27 08:04 tomcat-jdbc.jar -> ../../java/tomcat-jdbc-7.0.68.jar
lrwxrwxrwx
1 root root     33 Feb 27 08:04 tomcat-util.jar -> ../../java/tomcat-util-7.0.68.jar
-rw-r--r-- 1 root root  36202 Feb 27 08:04 websocket-api.jar

I've also made sure to create and modify my context.xml file in /usr/share/tomcat7-root/jobsworth/WEB-INF/config:

<Context swallowOutput="true">
 
<Resource name="jdbc/jobsworth"
           
removeAbandoned="true"
           
auth="Container" type="javax.sql.DataSource"
           
maxActive="100" maxIdle="30" maxWait="10000"
           
username="root" password="root"
           
driverClassName="com.mysql.jdbc.Driver" batchSize="-1"
           
url="jdbc:mysql://127.0.0.1:3306/jobsworth?autoReconnect=true&amp;zeroDateTimeBehavior=convertToNull&amp;useUnicode=true&amp;characterEncoding=utf8"
           
validationQuery="select 1"/>

[...]

Altough I dont think jobsworth gets to the part where it tries to connect to the database. Is there any debian/ubuntu-specific config that I'm missing? I feel like the jdbc driver should be visible for jobsworth, should I make  a link elsewere?

Thank you in advance.


Aristedes Maniatis

읽지 않음,
2016. 6. 13. 오전 11:05:3116. 6. 13.
받는사람 jobs...@googlegroups.com
On 14/06/2016 12:55am, Penteract wrote:
> Altough I dont think jobsworth gets to the part where it tries to connect to the database. Is there any debian/ubuntu-specific config that I'm missing? I feel like the jdbc driver should be visible for jobsworth, should I make a link elsewere?

Can you confirm the username and password are both "root"?

Ari


--
-------------------------->
Aristedes Maniatis
CEO, ish
https://www.ish.com.au
GPG fingerprint CBFB 84B4 738D 4E87 5E5C 5EFA EF6A 7D2E 3E49 102A

signature.asc

Penteract

읽지 않음,
2016. 6. 13. 오전 11:11:3516. 6. 13.
받는사람 jobsworth
Yes

usr@admin-ubuntu-server:/etc/tomcat7$ mysql -u root -proot
mysql
: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 25
Server version: 5.7.12-0ubuntu1 (Ubuntu)

Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates
. Other names may be trademarks of their respective
owners
.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql
>

Aristedes Maniatis

읽지 않음,
2016. 6. 13. 오전 11:20:3116. 6. 13.
받는사람 jobs...@googlegroups.com
Also be careful that that user is for 127.0.0.1 and not localhost or the unix sockets. mysql is very picky.

Ari


On 14/06/2016 1:11am, Penteract wrote:
> Yes
>
> |
> usr@admin-ubuntu-server:/etc/tomcat7$ mysql -u root -proot
> mysql:[Warning]Usinga password on the command line interfacecan be insecure.
> Welcometo the MySQLmonitor. Commandsendwith;or\g.
> YourMySQLconnection id is25
> Serverversion:5.7.12-0ubuntu1(Ubuntu)
>
> Copyright(c)2000,2016,Oracleand/orits affiliates.Allrights reserved.
>
> Oracleisa registered trademark of OracleCorporationand/orits
> affiliates.Othernames may be trademarks of their respective
> owners.
>
> Type'help;'or'\h'forhelp.Type'\c'to clear the current input statement.
>
> mysql>
> |
>
>
>
> On Monday, June 13, 2016 at 11:05:31 AM UTC-4, Ari Maniatis wrote:
>
> On 14/06/2016 12:55am, Penteract wrote:
> > Altough I dont think jobsworth gets to the part where it tries to connect to the database. Is there any debian/ubuntu-specific config that I'm missing? I feel like the jdbc driver should be visible for jobsworth, should I make a link elsewere?
>
> Can you confirm the username and password are both "root"?
>
> Ari
>
>
> --
> -------------------------->
> Aristedes Maniatis
> CEO, ish
> https://www.ish.com.au
> GPG fingerprint CBFB 84B4 738D 4E87 5E5C 5EFA EF6A 7D2E 3E49 102A
>
> --
>
> ---
> You received this message because you are subscribed to the Google Groups "jobsworth" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to jobsworth+...@googlegroups.com <mailto:jobsworth+...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout.
signature.asc

Penteract

읽지 않음,
2016. 6. 13. 오전 11:21:0716. 6. 13.
받는사람 jobsworth
I finally found something that alters the problem. If I copy my context.xml file to /etc/tomcat7. However I dont think that the jobsworth-specific context file should be placed in /etc/tomcat7.

That being said, the change is not enough to get jobsworth up and running:

org.jruby.rack.RackInitializationException: undefined method `projects' for nil:NilClass from /usr/share/tomcat7-root/jobsworth/WEB-INF/app/models/property.rb:141:in `update_project_counts' from /usr/share/tomcat7-root/jobsworth/WEB-INF/gems/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:432:in `block in make_lambda' from /usr/share/tomcat7-root/jobsworth/WEB-INF/gems/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:228:in `block in halting_and_conditional' from /usr/share/tomcat7-root/jobsworth/WEB-INF/gems/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:506:in `block in call' from org/jruby/RubyArray.java:1593:in `each' from /usr/share/tomcat7-root/jobsworth/WEB-INF/gems/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:506:in `call' from /usr/share/tomcat7-root/jobsworth/WEB-INF/gems/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:92:in `__run_callbacks__' from /usr/share/tomcat7-root/jobsworth/WEB-INF/gems/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:778:in `_run_save_callbacks' from /usr/share/tomcat7-root/jobsworth/WEB-INF/gems/gems/activerecord-4.2.6/lib/active_record/callbacks.rb:302:in `create_or_update' from /usr/share/tomcat7-root/jobsworth/WEB-INF/gems/gems/activerecord-4.2.6/lib/active_record/persistence.rb:142:in `save!' from /usr/share/tomcat7-root/jobsworth/WEB-INF/gems/gems/activerecord-4.2.6/lib/active_record/validations.rb:43:in `save!' from /usr/share/tomcat7-root/jobsworth/WEB-INF/gems/gems/activerecord-4.2.6/lib/active_record/attribute_methods/dirty.rb:29:in `save!' from /usr/share/tomcat7-root/jobsworth/WEB-INF/gems/gems/activerecord-4.2.6/lib/active_record/transactions.rb:291:in `block in save!' from /usr/share/tomcat7-root/jobsworth/WEB-INF/gems/gems/activerecord-4.2.6/lib/active_record/transactions.rb:351:in `block in with_transaction_returning_status' from /usr/share/tomcat7-root/jobsworth/WEB-INF/gems/gems/activerecord-4.2.6/lib/active_record/connection_adapters/abstract/database_statements.rb:211:in `transaction' from /usr/share/tomcat7-root/jobsworth/WEB-INF/gems/gems/activerecord-4.2.6/lib/active_record/transactions.rb:220:in `transaction' from /usr/share/tomcat7-root/jobsworth/WEB-INF/gems/gems/activerecord-4.2.6/lib/active_record/transactions.rb:348:in `with_transaction_returning_status' from /usr/share/tomcat7-root/jobsworth/WEB-INF/gems/gems/activerecord-4.2.6/lib/active_record/transactions.rb:291:in `save!' from /usr/share/tomcat7-root/jobsworth/WEB-INF/app/models/company.rb:80:in `block in create_default_properties' from org/jruby/RubyArray.java:1593:in `each'
[...]

at org
.jruby.rack.RackInitializationException.wrap(RackInitializationException.java:29) at org.jruby.rack.RackApplicationFactoryDecorator.init(RackApplicationFactoryDecorator.java:104) at org.jruby.rack.RackServletContextListener.contextInitialized(RackServletContextListener.java:50) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5068) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5584) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:899) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:875) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652) at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:677) at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1962)

I believe you've already answered to a post with a similar issue: https://groups.google.com/forum/#!topic/jobsworth/YxkAdvZ0bVI

However the solution is not clearly specified

Penteract

읽지 않음,
2016. 6. 13. 오전 11:52:1116. 6. 13.
받는사람 jobsworth
Just found out something that might be usefull in my tomcat logs:

SEVERE: Parse Fatal Error at line 1 column 1: Content is not allowed in prolog.
org
.xml.sax.SAXParseException; systemId: file:///var/lib/tomcat7/webapps/ROOT/META-INF/context.xml; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.
        at com
.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:203)
        at com
.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:177)
        at com
.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:400)
        at com
.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:327)
        at com
.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1438)
        at com
.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:999)
        at com
.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:606)
        at com
.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
        at com
.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:848)
        at com
.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:777)
        at com
.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
        at com
.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
        at com
.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:643)
        at org
.apache.tomcat.util.digester.Digester.parse(Digester.java:1539)
        at org
.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1197)
        at org
.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1998)
        at java
.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java
.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java
.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java
.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java
.lang.Thread.run(Thread.java:745)
Jun 13, 2016 11:45:51 AM org.apache.catalina.startup.HostConfig deployDirectory
SEVERE
: Error deploying configuration descriptor /var/lib/tomcat7/webapps/ROOT/META-INF/context.xml
org
.xml.sax.SAXParseException; systemId: file:///var/lib/tomcat7/webapps/ROOT/META-INF/context.xml; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.
        at com
.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1239)
        at com
.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:643)
        at org
.apache.tomcat.util.digester.Digester.parse(Digester.java:1539)
        at org
.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1197)
        at org
.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1998)
        at java
.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java
.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java
.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java
.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java
.lang.Thread.run(Thread.java:745)
[...]

Aristedes Maniatis

읽지 않음,
2016. 6. 14. 오전 3:09:1916. 6. 14.
받는사람 jobs...@googlegroups.com
On 14/06/2016 1:52am, Penteract wrote:
> |SEVERE:ParseFatalErrorat line 1column 1:Contentisnotallowed inprolog.

Your XML is not valid XML.
signature.asc

Penteract

읽지 않음,
2016. 6. 14. 오전 7:56:3716. 6. 14.
받는사람 jobsworth
In which way? I went to look inside my mySQL DB and there are tables in the jobsworth DB (access_levels companies custom_attribute_choices custom_attribute_values, ...) so certanly jobsworth does manage to reach the database. Is there a specific value outside Context tag that I need to revise?

<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is an example. You will need to customise it for your own needs, and rename it
to context.xml. In Apache Tomcat is belongs inside a folder called "config".

You can change the mysql driver to postgresql and you will need to replace all the variables
which look like this ${VARIABLE} either at runtime using a script, or by editing this file
directly.
-->

<Context swallowOutput="true">
 
<Resource name="jdbc/jobsworth"
           
removeAbandoned="true"
           
auth="Container" type="javax.sql.DataSource"
           
maxActive="100" maxIdle="30" maxWait="10000"
           
username="root" password="root"
           
driverClassName="com.mysql.jdbc.Driver" batchSize="-1"

           
url="jdbc:mysql://localhost:3306/jobsworth?autoReconnect=true&amp;zeroDateTimeBehavior=convertToNull&amp;useUnicode=true&amp;characterEncoding=utf8"
           
validationQuery="select 1"/>

 
<!-- The base domain of the running application. The actual URL you use to access the system is the name of the tenant followed by this. So you might have 'company1.acme.com' and 'company2.acme.com' -->
 
<Parameter name="config.domain" value="acme.com" override="false"/>

 
<!-- Jobsworth can be branded as something else -->
 
<Parameter name="config.productName" value="jobsworth" override="false"/>

 
<!-- SSL is good. But you may want to turn it off while you are first setting this up -->
 
<Parameter name="config.ssl" value="true" override="false"/>

   
<!-- A path to a folder on disk where jobsworth will store task attachments -->
 
<Parameter name="config.storeroot" value="/var/jobsworth/assets" override="false"/>

 
<!-- What domain will mail from jobsworth come from? -->
 
<Parameter name="config.email_domain" value="acme.com" override="false"/>

 
<!-- Some emails like password resets will come from this user name. So in this example, it will be jobs...@acme.com -->
 
<Parameter name="config.email_replyto" value="jobsworth" override="false"/>

 
<!-- The from user name. This is usually the same as the reply-to username -->
 
<Parameter name="config.email_from" value="jobsworth" override="false"/>

 
<!-- Something to put at the start of every subject on emails from jobsworth -->
 
<Parameter name="config.email_prefix" value="'[jobsworth]'" override="false"/>

 
<!-- SMTP settings -->
 
<Parameter name="config.smtp_host" value="mail.acme.com" override="false"/>
 
<Parameter name="config.smtp_port" value="25" override="false"/>

 
<!-- This value is used for integration with your incoming mail server. Change it! -->
 
<Parameter name="config.secret" value="changeThisValueToSomethingRandom" override="false"/>


 
<!-- Used by devise to generate tokens for email confirmations, Recover password etc... -->
 
<Parameter name="config.secret_key" value="f8892f2aebc7b250a31b9678eee0c3a784bbb9f5d5384884d0d2204dde2d446823e15fcbeeb3ce526a407956ca8ff6543367e67386b075571a7277f54a73a5f9" override="false"/>

 
<!-- Email notification of errors -->
 
<Parameter name="config.error_email_prefix" value="'[jobsworth error]'" override="false"/>
 
<Parameter name="config.error_sender_address" value="jobs...@acme.com" override="false"/>
 
<Parameter name="config.error_exception_recipients" value="['sup...@example.com','sysa...@example.com']" override="false"/>

 
<!-- logstash settings
    If you use the following, add an input to logstash like this:

    input {
      udp {
        host => "10.0.1.50"
        port => 5001
        codec => json_lines
      }
    }
-->

 
<Parameter name="config.logstash_port" value="5000" override="false"/>
 
<Parameter name="config.logstash_host" value="10.0.1.50" override="false"/>

 
<!-- Jobsworth cache store settings -->
 
<Parameter name="config.cache_path" value="/var/jobsworth/cache" override="false"/>


</Context>

I have not changed values such as the "config.secret" as I do not need any mail-related functionallity at the moment so I figure w/e random value the parameters had would be fine. Should I go value by value and change them? Is there any specific value that HAS to be server-specific?

Aristedes Maniatis

읽지 않음,
2016. 6. 14. 오후 11:03:4716. 6. 14.
받는사람 jobs...@googlegroups.com
On 14/06/2016 9:56pm, Penteract wrote:
> In which way? I went to look inside my mySQL DB and there are tables in the jobsworth DB (access_levels companies custom_attribute_choices custom_attribute_values, ...) so certanly jobsworth does manage to reach the database. Is there a specific value outside Context tag that I need to revise?
>
> <?xml version="1.0" encoding="UTF-8"?>
> <!--

I'm not sure what your error is, however "Content is not allowed in prolog" is a common error seen when parsing invalid XML. Perhaps a bad character in there somewhere?
signature.asc

Penteract

읽지 않음,
2016. 6. 15. 오전 9:20:2616. 6. 15.
받는사람 jobsworth
The only thing I finally found that adresses issue with:
undefined method `+' for nil:NilClass

Is to copy the context.xml file from the WEB-INF/config folder in the webapps folder to the /etc/tomcat folder. When I do that the errors change to something like 
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown database 'jobsworth_production'


But if I do create a database 'jobsworth_production' (and the test and staging DBs) after restarting tomcat the site tries to load for a long time and when it doesnt, var/log says this:

[...]
-- create_table("work_plans", {:force=>true})
-> 0.1858s
-> 0 rows
-- add_index("work_plans", ["user_id"], {:name=>"index_work_plans_on_user_id"})
-> 0.1506s
-> 0 rows
-- initialize_schema_migrations_table()
-> 0.4888s
-> 0 rows
LogStashLogger::Device::UDP - SystemCallError - Unknown error - No message available
LogStashLogger::Device::UDP - SystemCallError - Unknown error - No message available
LogStashLogger::Device::UDP - SystemCallError - Unknown error - No message available
LogStashLogger::Device::UDP - SystemCallError - Unknown error - No message available
LogStashLogger::Device::UDP - SystemCallError - Unknown error - No message available
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOf(Arrays.java:3332)
at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:137)
at java.lang.AbstractStringBuilder.ensureCapacityInternal(AbstractStringBuilder.java:121)
at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:421)
at java.lang.StringBuilder.append(StringBuilder.java:136)
at org.apache.juli.OneLineFormatter.format(OneLineFormatter.java:138)
at org.apache.juli.FileHandler.publish(FileHandler.java:196)
at java.util.logging.Logger.log(Logger.java:738)
at java.util.logging.Logger.doLog(Logger.java:765)
at java.util.logging.Logger.logp(Logger.java:1041)
at org.apache.juli.logging.DirectJDKLog.log(DirectJDKLog.java:182)
at org.apache.juli.logging.DirectJDKLog.error(DirectJDKLog.java:148)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:918)
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
at org.apache.catalina.core.StandardService.startInternal(StandardService.java:441)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:769)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
at org.apache.catalina.startup.Catalina.start(Catalina.java:629)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

Penteract

읽지 않음,
2016. 6. 15. 오전 9:25:3416. 6. 15.
받는사람 jobsworth
Btw, I can see that jobsworth is actually doing stuff before crashing. In the newly created jobsworth_productoin table I have tables that I never added:

| Tables_in_jobsworth_production |
+--------------------------------+
| access_levels                  |
| companies                      |
| custom_attribute_choices       |
| custom_attribute_values        |
| custom_attributes              |
| customers                      |
| default_project_users          |
| delayed_jobs                   |
| dependencies                   |
| email_address_tasks            |
| email_addresses                |
| email_deliveries               |
| event_logs                     |
| generated_reports              |
| ical_entries                   |
| keywords                       |
| locales                        |
| milestones                     |
| news_items                     |
| organizational_units           |
| preferences                    |
| project_files                  |
| project_permissions            |
[...]

And I before the tomcat memory heap I mentioned earlier I have the db operations in the tomcat log:
[...]
-- add_index("users", ["company_id"], {:name=>"users_company_id_index"})
   
-> 0.1444s
   
-> 0 rows
-- add_index("users", ["customer_id"], {:name=>"index_users_on_customer_id"})
   
-> 0.1979s
   
-> 0 rows
-- add_index("users", ["last_seen_at"], {:name=>"index_users_on_last_seen_at"})
   
-> 0.1266s
   
-> 0 rows
-- add_index("users", ["reset_password_token"], {:name=>"index_users_on_reset_password_token", :unique=>true})
   
-> 0.1805s
   
-> 0 rows
-- add_index("users", ["username", "company_id"], {:name=>"index_users_on_username_and_company_id", :unique=>true})
   
-> 0.1626s
   
-> 0 rows
-- add_index("users", ["uuid"], {:name=>"users_uuid_index"})
   
-> 0.1512s
   
-> 0 rows
-- create_table("widgets", {:force=>true})
   
-> 0.2203s
   
-> 0 rows
-- add_index("widgets", ["company_id"], {:name=>"fk_widgets_company_id"})
   
-> 0.3498s
   
-> 0 rows
-- add_index("widgets", ["user_id"], {:name=>"index_widgets_on_user_id"})
   
-> 0.2763s
   
-> 0 rows
-- create_table("wiki_pages", {:force=>true})
   
-> 0.2442s
   
-> 0 rows
-- add_index("wiki_pages", ["company_id"], {:name=>"wiki_pages_company_id_index"})
   
-> 0.1586s
   
-> 0 rows
-- create_table("wiki_references", {:force=>true})
   
-> 0.1964s
   
-> 0 rows

[...]




On Tuesday, June 14, 2016 at 11:03:47 PM UTC-4, Ari Maniatis wrote:

Aristedes Maniatis

읽지 않음,
2016. 6. 15. 오전 9:25:4416. 6. 15.
받는사람 jobs...@googlegroups.com
On 15/06/2016 11:20pm, Penteract wrote:
> LogStashLogger::Device::UDP - SystemCallError - Unknown error - No message available

Remove the logstash config from context.xml. It doesn't work well if configured and not pointing at a real logstash server. In fact it was too fragile so we ripped it out for the next milestone.
signature.asc

Aristedes Maniatis

읽지 않음,
2016. 6. 15. 오전 9:35:1616. 6. 15.
받는사람 jobs...@googlegroups.com
On 15/06/2016 11:25pm, Penteract wrote:
> Btw, I can see that jobsworth is actually doing stuff before crashing. In the newly created jobsworth_productoin table I have tables that I never added:

How much memory are you giving it? Java is fast, but is likely memory so you'll probably want to run this with at least 700Mb but I'd give it more if you can.
signature.asc

Penteract

읽지 않음,
2016. 6. 15. 오전 9:45:3816. 6. 15.
받는사람 jobsworth
It has 2GB of ram

I removed the following lines from context.xml:


<Parameter name="config.logstash_port" value="5000" override="false"/>
<Parameter name="config.logstash_host" value="10.0.1.50" override="false"/>


However the application still crashes. Here's the tomcat log:

/var/lib/tomcat8/webapps/jobsworth/WEB-INF/app/controllers/feeds_controller.rb:154: warning: key (SymbolNode:task 153) is duplicated and overwritten on line 154
Exception in thread "Ruby-0-Thread-1: /var/lib/tomcat8/webapps/jobsworth/WEB-INF/gems/gems/rufus-scheduler-3.2.0/lib/rufus/scheduler.rb:556" java.lang.OutOfMemoryError: Java heap space
    at java
.nio.HeapCharBuffer.<init>(HeapCharBuffer.java:57)
    at java
.nio.CharBuffer.allocate(CharBuffer.java:335)
    at org
.jruby.RubyEncoding$UTF8Coder.<init>(RubyEncoding.java:304)
    at org
.jruby.RubyEncoding.getUTF8Coder(RubyEncoding.java:365)
    at org
.jruby.RubyEncoding.decodeUTF8(RubyEncoding.java:280)
    at org
.jruby.runtime.Helpers.decodeByteList(Helpers.java:2640)
    at org
.jruby.RubyString.decodeString(RubyString.java:763)
    at org
.jruby.RubyString.toString(RubyString.java:754)
    at org
.jruby.RubyString.asJavaString(RubyString.java:1304)
    at org
.jruby.RubyThread.getSymbolKey(RubyThread.java:878)
    at org
.jruby.RubyThread.op_aref(RubyThread.java:914)
    at org
.jruby.RubyThread$INVOKER$i$1$0$op_aref.call(RubyThread$INVOKER$i$1$0$op_aref.gen)
    at org
.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:161)
    at
var.lib.tomcat8.webapps.jobsworth.WEB_minus_INF.gems.gems.rufus_minus_scheduler_minus_3_dot_2_dot_0.lib.rufus.scheduler.invokeOther6:\=\{\}(/var/lib/tomcat8/webapps/jobsworth/WEB-INF/gems/gems/rufus-scheduler-3.2.0/lib/rufus/scheduler.rb)
Exception in thread "main"     at var.lib.tomcat8.webapps.jobsworth.WEB_minus_INF.gems.gems.rufus_minus_scheduler_minus_3_dot_2_dot_0.lib.rufus.scheduler.RUBY$block$threads$2(/var/lib/tomcat8/webapps/jobsworth/WEB-INF/gems/gems/rufus-scheduler-3.2.0/lib/rufus/scheduler.rb:397)
    at java
.lang.invoke.LambdaForm$DMH/15758469.invokeStatic_L8_L(LambdaForm$DMH)
    at java
.lang.invoke.LambdaForm$MH/29768127.invokeExact_MT(LambdaForm$MH)
    at org
.jruby.runtime.CompiledIRBlockBody.yieldDirect(CompiledIRBlockBody.java:156)
    at org
.jruby.runtime.BlockBody.yield(BlockBody.java:110)
    at org
.jruby.runtime.Block.yield(Block.java:167)
    at org
.jruby.RubyArray.selectCommon(RubyArray.java:2402)
    at org
.jruby.RubyArray.select(RubyArray.java:2411)
    at org
.jruby.RubyArray$INVOKER$i$0$0$select.call(RubyArray$INVOKER$i$0$0$select.gen)
    at org
.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:139)
    at org
.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:145)
    at
var.lib.tomcat8.webapps.jobsworth.WEB_minus_INF.gems.gems.rufus_minus_scheduler_minus_3_dot_2_dot_0.lib.rufus.scheduler.invokeOther9:select(/var/lib/tomcat8/webapps/jobsworth/WEB-INF/gems/gems/rufus-scheduler-3.2.0/lib/rufus/scheduler.rb)
    at
var.lib.tomcat8.webapps.jobsworth.WEB_minus_INF.gems.gems.rufus_minus_scheduler_minus_3_dot_2_dot_0.lib.rufus.scheduler.RUBY$method$threads$0(/var/lib/tomcat8/webapps/jobsworth/WEB-INF/gems/gems/rufus-scheduler-3.2.0/lib/rufus/scheduler.rb:397)
    at java
.lang.invoke.LambdaForm$DMH/10967573.invokeStatic_L6_L(LambdaForm$DMH)
    at java
.lang.invoke.LambdaForm$MH/24317179.invokeExact_MT(LambdaForm$MH)
    at org
.jruby.internal.runtime.methods.CompiledIRMethod.invokeExact(CompiledIRMethod.java:232)
    at org
.jruby.internal.runtime.methods.CompiledIRMethod.call(CompiledIRMethod.java:101)
    at org
.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:128)
java
.lang.OutOfMemoryError: Java heap space

di...@orlet.eu

읽지 않음,
2016. 12. 9. 오전 9:50:3416. 12. 9.
받는사람 jobsworth
Got the same problem, fixed by changing to
JAVA_OPTS="-Djava.awt.headless=true -Xmx512m -XX:+UseConcMarkSweepGC"
in /etc/default/tomcat8
전체답장
작성자에게 답글
전달
새 메시지 0개