OneSwarm Forum » Community servers

Community Server on Windows

(7 posts)
  1. JamesDean
    Member
    Login to Send PM

    Hey all,

    I have been having some trouble getting a community server running on a Windows machine.

    I got the 6.x server running no problem, but the 7.x has some features that I would like to use. I believe that I am just improperly setting up the configuration (community.conf) file. Usually I get errors during startup about not being able to find the properties file but the server does start successfully (or at least the command line output says so).

    Can someone provide details about exactly how entries should be formatted in the .conf file on a Windows machine.

    Posted 1 month ago #
  2. piatek
    Administrator
    Login to Send PM

    The most common problem is paths not being properly escaped. For instance, C:\Temp\jdbc.properties would be C\:\\Temp\\jdbc.properties

    This applies to all paths, \ -> \\, : -> \:, etc. What sort of errors are you observing?

    Posted 1 month ago #
  3. JamesDean
    Member
    Login to Send PM

    Errors are something along the line of unable to locate file (in dos when starting the server). The sever still starts, but behaves oddly.

    I will post a the output next time I try. Should the path also be escaped in the jetty file that I will need to edit?

    Posted 1 month ago #
  4. JamesDean
    Member
    Login to Send PM

    Ok, here is a dump of my command line:

    C:\OSCSv7>set LIBS=war\WEB-INF\lib

    C:\OSCSv7>set JAVA_HOME=C:\Program Files\Java\jdk1.6.0_18

    C:\OSCSv7>echo C:\Program Files\Java\jdk1.6.0_18
    C:\Program Files\Java\jdk1.6.0_18

    C:\OSCSv7>set CLASSPATH=war\WEB-INF\classes;C:\Program Files\Java\jdk1.6.0_18\lib\tools.jar;war\WEB-
    INF\lib\commons-fileupload-1.2.1.jar;war\WEB-INF\lib\SimpleCaptcha-1.1.1.jar;war\WEB-INF\lib\gwt-use
    r.jar;war\WEB-INF\lib\jetty-util-6.1.21.jar;war\WEB-INF\lib\mysql-connector-java-5.1.10-bin.jar;war\
    WEB-INF\lib\standard.jar;war\WEB-INF\lib\gwt-dev-mac.jar;war\WEB-INF\lib\jdom.jar;war\WEB-INF\lib\ro
    me-1.0.jar;war\WEB-INF\lib\commons-io-1.3.2.jar;war\WEB-INF\lib\gwt-servlet.jar;war\WEB-INF\lib\jett
    y-6.1.21.jar;war\WEB-INF\lib\jstl.jar;war\WEB-INF\lib\servlet-api-2.5-20081211.jar;war\WEB-INF\lib\j
    asper.jar;war\WEB-INF\lib\tomcat-juli.jar;war\WEB-INF\lib\jsp-api.jar;war\WEB-INF\lib\el-api.jar;war
    \WEB-INF\lib\jasper-el.jar;war\WEB-INF\lib\jasper-jdt.jar;war\WEB-INF\lib\bonecp-0.5.3.1-rc1.jar;war
    \WEB-INF\lib\google-collect-1.0-rc4.jar;war\WEB-INF\lib\log4j-1.2.15.jar
    java.io.FileNotFoundException: \tmp\jdbc.properties (The system cannot find the path specified)
    at java.io.FileOutputStream.open(Native Method)
    at java.io.FileOutputStream.<init>(Unknown Source)
    at java.io.FileOutputStream.<init>(Unknown Source)
    at edu.washington.cs.oneswarm.community2.server.EmbeddedServer.load_config(EmbeddedServer.ja
    va:450)
    at edu.washington.cs.oneswarm.community2.server.EmbeddedServer.main(EmbeddedServer.java:467)

    read log configuration
    log4j:WARN No appenders could be found for logger (com.jolbox.bonecp.BoneCPConfig).
    log4j:WARN Please initialize the log4j system properly.
    [INFO] 1/30/10 1:17 PM CommunityDAO: Starting reload of soft state...
    [INFO] 1/30/10 1:17 PM CommunityDAO: db sync took: 94 for 0
    [INFO] 1/30/10 1:17 PM CommunityDAO: Registered: 0 infrastructure keys
    [INFO] 1/30/10 1:17 PM EmbeddedServer: max_threads: 30
    2010-01-30 13:17:20.762::INFO: Logging to STDERR via org.mortbay.log.StdErrLog
    [INFO] 1/30/10 1:17 PM KeyRegistrationServlet: Key registration servlet created.
    [INFO] 1/30/10 1:17 PM SwarmPublishServlet: Swarm publishing servlet created.
    [INFO] 1/30/10 1:17 PM EmbeddedServer: Authentication required for swarm publishing
    [INFO] 1/30/10 1:17 PM EmbeddedServer: host: ohioos.dyndns.org
    [INFO] 1/30/10 1:17 PM EmbeddedServer: port: 8081
    2010-01-30 13:17:21.512::INFO: jetty-6.1.x
    [INFO] 1/30/10 1:17 PM CommunityDAO: Using user timeout: 86400000 seconds
    [INFO] 1/30/10 1:17 PM CommunityDAO: Pruned 0 old peers
    [INFO] 1/30/10 1:17 PM CommunityDAO: Starting reload of soft state...
    [INFO] 1/30/10 1:17 PM CommunityDAO: db sync took: 63 for 0
    2010-01-30 13:17:22.293::WARN: Unknown realm: JDBCRealm
    2010-01-30 13:17:22.434::WARN: Config error at <Set name="config">TEMP\\jdbc.properties</Set>
    2010-01-30 13:17:22.543::WARN: Config error at <Set name="userRealm">
    <New class="org.mortbay.jetty.security.JDBCUserRealm"><Set name="name">JDBCRealm</Set><Set nam
    e="config">TEMP\\jdbc.properties</Set></New>
    </Set>
    2010-01-30 13:17:22.809::WARN: Config error at <Get name="securityHandler"><Set name="userRealm">
    <New class="org.mortbay.jetty.security.JDBCUserRealm"><Set name="name">JDBCRealm</Set><Set nam
    e="config">TEMP\\jdbc.properties</Set></New>
    </Set></Get>
    2010-01-30 13:17:23.074::WARN: Failed startup of context org.mortbay.jetty.webapp.WebAppContext@148
    bd3{/,./war}
    java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.mortbay.xml.XmlConfiguration.set(XmlConfiguration.java:297)
    at org.mortbay.xml.XmlConfiguration.configure(XmlConfiguration.java:240)
    at org.mortbay.xml.XmlConfiguration.newObj(XmlConfiguration.java:618)
    at org.mortbay.xml.XmlConfiguration.itemValue(XmlConfiguration.java:907)
    at org.mortbay.xml.XmlConfiguration.value(XmlConfiguration.java:829)
    at org.mortbay.xml.XmlConfiguration.set(XmlConfiguration.java:278)
    at org.mortbay.xml.XmlConfiguration.configure(XmlConfiguration.java:240)
    at org.mortbay.xml.XmlConfiguration.get(XmlConfiguration.java:460)
    at org.mortbay.xml.XmlConfiguration.configure(XmlConfiguration.java:246)
    at org.mortbay.xml.XmlConfiguration.configure(XmlConfiguration.java:182)
    at org.mortbay.jetty.webapp.JettyWebXmlConfiguration.configureWebApp(JettyWebXmlConfiguratio
    n.java:109)
    at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1217)
    at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:513)
    at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448)
    at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
    at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
    at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
    at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
    at org.mortbay.jetty.Server.doStart(Server.java:222)
    at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
    at edu.washington.cs.oneswarm.community2.server.EmbeddedServer.start(EmbeddedServer.java:373
    )
    at edu.washington.cs.oneswarm.community2.server.EmbeddedServer.main(EmbeddedServer.java:558)

    Caused by: java.io.FileNotFoundException: C:\OSCSv7\TEMP\jdbc.properties (The system cannot find the
    file specified)
    at java.io.FileInputStream.open(Native Method)
    at java.io.FileInputStream.<init>(Unknown Source)
    at org.mortbay.resource.FileResource.getInputStream(FileResource.java:273)
    at org.mortbay.jetty.security.HashUserRealm.loadConfig(HashUserRealm.java:152)
    at org.mortbay.jetty.security.HashUserRealm.setConfig(HashUserRealm.java:127)
    at org.mortbay.jetty.security.JDBCUserRealm.setConfig(JDBCUserRealm.java:138)
    ... 26 more
    2010-01-30 13:17:25.934::WARN: Nested in java.lang.reflect.InvocationTargetException:
    java.io.FileNotFoundException: C:\OSCSv7\TEMP\jdbc.properties (The system cannot find the file speci
    fied)
    at java.io.FileInputStream.open(Native Method)
    at java.io.FileInputStream.<init>(Unknown Source)
    at org.mortbay.resource.FileResource.getInputStream(FileResource.java:273)
    at org.mortbay.jetty.security.HashUserRealm.loadConfig(HashUserRealm.java:152)
    at org.mortbay.jetty.security.HashUserRealm.setConfig(HashUserRealm.java:127)
    at org.mortbay.jetty.security.JDBCUserRealm.setConfig(JDBCUserRealm.java:138)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.mortbay.xml.XmlConfiguration.set(XmlConfiguration.java:297)
    at org.mortbay.xml.XmlConfiguration.configure(XmlConfiguration.java:240)
    at org.mortbay.xml.XmlConfiguration.newObj(XmlConfiguration.java:618)
    at org.mortbay.xml.XmlConfiguration.itemValue(XmlConfiguration.java:907)
    at org.mortbay.xml.XmlConfiguration.value(XmlConfiguration.java:829)
    at org.mortbay.xml.XmlConfiguration.set(XmlConfiguration.java:278)
    at org.mortbay.xml.XmlConfiguration.configure(XmlConfiguration.java:240)
    at org.mortbay.xml.XmlConfiguration.get(XmlConfiguration.java:460)
    at org.mortbay.xml.XmlConfiguration.configure(XmlConfiguration.java:246)
    at org.mortbay.xml.XmlConfiguration.configure(XmlConfiguration.java:182)
    at org.mortbay.jetty.webapp.JettyWebXmlConfiguration.configureWebApp(JettyWebXmlConfiguratio
    n.java:109)
    at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1217)
    at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:513)
    at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448)
    at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
    at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
    at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
    at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
    at org.mortbay.jetty.Server.doStart(Server.java:222)
    at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
    at edu.washington.cs.oneswarm.community2.server.EmbeddedServer.start(EmbeddedServer.java:373
    )
    at edu.washington.cs.oneswarm.community2.server.EmbeddedServer.main(EmbeddedServer.java:558)

    2010-01-30 13:17:28.887::INFO: Started SelectChannelConnector@ohioos.dyndns.org:8081
    [INFO] 1/30/10 1:17 PM EmbeddedServer: started embedded server

    It doesn't seem to be creating the properties file.

    Posted 1 month ago #
  5. piatek
    Administrator
    Login to Send PM

    Right, the problem seems to be related to this path: TEMP\\jdbc.properties
    What does your community.conf have set for the jdbc.properties setting?

    And yes, you also need to update the path in war/WEB-INF/jetty-web.xml
    A sample jetty-web.xml that we use on our windows test machine (where the escaping is different, sigh):

    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd">
    <Configure class="org.mortbay.jetty.webapp.WebAppContext">
    <Get name="securityHandler">
    <Set name="userRealm">
    <New class="org.mortbay.jetty.security.JDBCUserRealm">
    <Set name="name">JDBCRealm</Set>
    <Set name="config">C:\Temp\jdbc.properties</Set>
    </New>
    </Set>
    </Get>
    </Configure>

    Posted 1 month ago #
  6. JamesDean
    Member
    Login to Send PM

    I made my jetty-web.inf look like yours (and made the community.conf file agree), but still get the same error.

    Posted 1 month ago #
  7. piatek
    Administrator
    Login to Send PM

    it's jetty-web.xml, not jetty-web.inf. Also, what is your jdbc.properties setting in community.conf? (That needs to match the JDBCUserRealm in the jetty-web.xml)

    Posted 1 month ago #

RSS feed for this topic

Reply

You must log in to post.