Stardog connection reset

16 views
Skip to first unread message

oklma...@gmail.com

unread,
Aug 18, 2015, 6:20:38 AM8/18/15
to Stardog
Hi,

I testing Stardog-3.0.1 with the community license. I keep encountering the below exception on the Stardog client side at some point.

Caused by: com.complexible.stardog.security.StardogSecurityException: Connection reset
        at com.complexible.stardog.protocols.client.SPECClientUtil.toStardogSecurityException(SPECClientUtil.java:93)
        at com.complexible.stardog.protocols.client.admin.StatefulAdminClient.addUserPerm(StatefulAdminClient.java:533)
        at co.wds.xi.km2.sail.impl.StardogSailFactoryImpl.createDB(StardogSailFactoryImpl.java:57)
        ... 98 more
Caused by: com.complexible.common.protocols.client.ClientException: Connection reset
        at com.complexible.stardog.protocols.http.client.BaseHttpClient.execute(BaseHttpClient.java:245)
        at com.complexible.stardog.protocols.http.client.HttpAdminClientImpl.executeHttpPut(HttpAdminClientImpl.java:159)
        at com.complexible.stardog.protocols.http.client.HttpAdminClientImpl.addUserPerm(HttpAdminClientImpl.java:345)
        at com.complexible.stardog.protocols.http.client.HttpAdminClientImpl.addUserPerm(HttpAdminClientImpl.java:86)
        at com.complexible.stardog.protocols.client.admin.StatefulAdminClient.addUserPerm(StatefulAdminClient.java:530)
        ... 99 more

What are some of the reasons that the above exception would happen ?

Thanks.

Michael Grove

unread,
Aug 18, 2015, 10:07:31 AM8/18/15
to stardog
That is difficult to say with only the connection closed message.  Are there any stacktraces in the logs?

Cheers,

Mike
 

Thanks.

--
-- --
You received this message because you are subscribed to the C&P "Stardog" group.
To post to this group, send email to sta...@clarkparsia.com
To unsubscribe from this group, send email to
stardog+u...@clarkparsia.com
For more options, visit this group at
http://groups.google.com/a/clarkparsia.com/group/stardog?hl=en

oklma...@gmail.com

unread,
Aug 18, 2015, 9:03:22 PM8/18/15
to Stardog
No, there are nothing in stardog logs. This is what makes it difficult to figure out what went wrong.

Michael Grove

unread,
Aug 20, 2015, 8:27:06 AM8/20/15
to stardog
On Tue, Aug 18, 2015 at 9:03 PM, <oklma...@gmail.com> wrote:
No, there are nothing in stardog logs. This is what makes it difficult to figure out what went wrong.

Is there a sequence of commands you can invoke to trigger the exception?

Also, the current version is 3.1.4, you may consider upgrading.

Cheers,

Mike

oklma...@gmail.com

unread,
Aug 20, 2015, 10:33:58 PM8/20/15
to Stardog
The section of the code is this :

public void createDB(String dbname) {

AdminConnection aAdminConnection = null;

try {
aAdminConnection = AdminConnectionConfiguration.toServer(dbLocation).credentials(username, password).connect();
Metadata meta = Metadata.create();
meta.set(DatabaseOptions.NAME, dbname);
meta.set(DatabaseOptions.QUERY_ALL_GRAPHS, true);
aAdminConnection.builder(meta).set(SearchOptions.SEARCHABLE, true).set(SearchOptions.SEARCH_REINDEX_MODE, "sync").create();

                  // This line below does not get a  Connection reset error 
aAdminConnection.getPermissionManager().addUserPerm(username, ActionType.ALL, new SecurityResourceType() {
@Override
public String id() {
return "db";
}
}, dbname);
     
 
       // This line below when executed hits the Connection reset error
aAdminConnection.getPermissionManager().addUserPerm(username, ActionType.ALL, new SecurityResourceType() {
@Override
public String id() {
return "metadata";
}
}, dbname);

} catch (Exception e) {
}

}


Calling the method createDB("SomeDB")  the first time always results in "Connection reset" at the line aAdminConnection.getPermissionManager().addUserPerm(username, ActionType.ALL, new SecurityResourceType() , but on the second call it is fine.  

This is really strange, because I would think the line prior to that would hit a connection problem first.

Michael Grove

unread,
Aug 21, 2015, 5:15:24 PM8/21/15
to stardog
The first thing is that creating an anonymous SecurityResourceType like that is going to cause problems; it's not Serializable, nor is it registered w/ a codec that would know how to serialize it over the wire.  Though, I'd expect it to fail the first time in that case.

Is there any difference when you use `CoreResourceType.DATABASE`, which is the correct type for the permission you're creating.

You may also consider upgrading Stardog to a more recent version.

Cheers,

Mike
 

oklma...@gmail.com

unread,
Aug 24, 2015, 4:20:10 AM8/24/15
to Stardog
Thanks. I have noted that there is a new version of Stardog, just that at this point it is difficult to update my client dependencies since we do not have access to Stardog's maven repository.

Apparently in Stardog 3.0.1 , CoreResourceType does not have DATABASE nor METADATA enumeration type.

Kendall Clark

unread,
Aug 24, 2015, 10:22:04 AM8/24/15
to stardog
On Mon, Aug 24, 2015 at 4:20 AM, <oklma...@gmail.com> wrote:
have noted that there is a new version of Stardog, just that at this point it is difficult to update my client dependencies since we do not have access to Stardog's maven repository.

​Why is that?

Cheers,
Kendall​

Michael Grove

unread,
Aug 24, 2015, 10:43:31 AM8/24/15
to stardog
On Mon, Aug 24, 2015 at 4:20 AM, <oklma...@gmail.com> wrote:
Thanks. I have noted that there is a new version of Stardog, just that at this point it is difficult to update my client dependencies since we do not have access to Stardog's maven repository.

Have you tried maven.stardog.com?
 

Apparently in Stardog 3.0.1 , CoreResourceType does not have DATABASE nor METADATA enumeration type.

Correct.  The API around security was updated in 3.1 with the introduction of named graph security.

Cheers,

Mike

oklma...@gmail.com

unread,
Aug 25, 2015, 3:52:27 AM8/25/15
to Stardog
For some reason, my experience with maven.stardog.com seems to have missing jar dependencies. For example, my Maven have problem finding the below JAR dependencies :

<dependency>
  <groupId>com.complexible.stardog</groupId>
  <artifactId>stardog-search-api</artifactId>
  <version>3.1.4</version>
</dependency>
<dependency>
  <groupId>com.complexible.stardog</groupId>
  <artifactId>stardog-search-shared</artifactId>
  <version>3.1.4</version>
</dependency>
<dependency>
  <groupId>com.complexible.stardog</groupId>
  <artifactId>stardog-core-shared</artifactId>
  <version>3.1.4</version>
</dependency>
<dependency>
  <groupId>com.complexible.stardog</groupId>
  <artifactId>stardog-reasoning-api</artifactId>
  <version>3.1.4</version>
</dependency>

Are those only first available in the private repository and eventually make their way to the public repository ?

Michael Grove

unread,
Aug 25, 2015, 7:47:36 AM8/25/15
to stardog
On Tue, Aug 25, 2015 at 3:52 AM, <oklma...@gmail.com> wrote:
For some reason, my experience with maven.stardog.com seems to have missing jar dependencies. For example, my Maven have problem finding the below JAR dependencies :

<dependency>
  <groupId>com.complexible.stardog</groupId>
  <artifactId>stardog-search-api</artifactId>
  <version>3.1.4</version>
</dependency>
<dependency>
  <groupId>com.complexible.stardog</groupId>
  <artifactId>stardog-search-shared</artifactId>
  <version>3.1.4</version>
</dependency>
<dependency>
  <groupId>com.complexible.stardog</groupId>
  <artifactId>stardog-core-shared</artifactId>
  <version>3.1.4</version>
</dependency>
<dependency>
  <groupId>com.complexible.stardog</groupId>
  <artifactId>stardog-reasoning-api</artifactId>
  <version>3.1.4</version>
</dependency>

Are those only first available in the private repository and eventually make their way to the public repository ?

No, those are available in the public repository.  They seem to work ok for me when compiling stardog-examples.

Do you think you could send us the pom that is failing to resolve these artifacts?

Thanks.

Mike

Julie Schott

unread,
Aug 25, 2015, 1:55:51 PM8/25/15
to sta...@clarkparsia.com
I believe I'm having the same problem.  I get the following error:

The following artifacts could not be resolved: com.complexible.stardog:client-snarl:jar:3.1, com.complexible.stardog:client-http:jar:3.1: Failure to find com.complexible.stardog:client-snarl:jar:3.1 in http://maven.stardog.com was cached in the local repository, resolution will not be reattempted until the update interval of stardog-public has elapsed or updates are forced -> [Help 1]

Attached is my pom file


Julie


To unsubscribe from this group and stop receiving emails from it, send an email to stardog+u...@clarkparsia.com.

pom.xml

oklma...@gmail.com

unread,
Aug 25, 2015, 11:20:52 PM8/25/15
to Stardog
Hi Mike,

The POM looks like below :


<?xml version="1.0"?>
<project
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>co.test</groupId>
<artifactId>km</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>

<artifactId>km-web</artifactId>
<packaging>war</packaging>
<name>km-web Maven Webapp</name>

<properties>
<catalina.home>${basedir}/server</catalina.home>
<stardog.home>${basedir}/db/stardog-3.0</stardog.home>
</properties>

<profiles>
<profile>
<id>Windows</id>
<activation>
<os>
<family>Windows</family>
</os>
</activation>
<properties>
<PATHDELIM>;</PATHDELIM>
<script.extension>.bat</script.extension>
</properties>
</profile>
<profile>
<id>unix</id>
<activation>
<os>
<family>unix</family>
</os>
</activation>
<properties>
<PATHDELIM>:</PATHDELIM>
<script.extension>.sh</script.extension>
</properties>
</profile>
</profiles>

<dependencies>
<!-- Modules -->
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>km-model</artifactId>
<version>${project.version}</version>
</dependency>
<!-- API -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
<scope>provided</scope>
</dependency>

<!-- Mysql -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.34</version>
</dependency>

<!-- Spring -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>${org.springframework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>${org.springframework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context-support</artifactId>
<version>${org.springframework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>${org.springframework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>${org.springframework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jdbc</artifactId>
<version>${org.springframework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId>
<version>${org.springframework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-orm</artifactId>
<version>${org.springframework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-aspects</artifactId>
<version>${org.springframework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-aop</artifactId>
<version>${org.springframework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-web</artifactId>
<version>${spring.security.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-config</artifactId>
<version>${spring.security.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>${org.springframework.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>cglib</groupId>
<artifactId>cglib</artifactId>
<version>2.2.2</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>${jackson.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>${jackson.version}</version>
</dependency>
<!-- End of Spring -->

<!-- GSon -->
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.1</version>
</dependency>

<!-- JPA -->
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-jpa</artifactId>
<version>1.7.1.RELEASE</version>
</dependency>


<!-- Sail -->
<dependency>
<groupId>org.openrdf.sesame</groupId>
<artifactId>sesame-runtime-osgi</artifactId>
<version>2.7.14</version>
<exclusions>
<exclusion>
<artifactId>logback-core</artifactId>
<groupId>ch.qos.logback</groupId>
</exclusion>
<exclusion>
<artifactId>logback-classic</artifactId>
<groupId>ch.qos.logback</groupId>
</exclusion>
</exclusions>
</dependency>

<!-- mustache -->
<dependency>
<groupId>com.github.spullara.mustache.java</groupId>
<artifactId>compiler</artifactId>
<version>0.8.17</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>18.0</version>
</dependency>

<!-- XML Data -->
<dependency>
<groupId>org.apache.xmlbeans</groupId>
<artifactId>xmlbeans</artifactId>
<version>2.6.0</version>
</dependency>

<!-- Stardog -->
<dependency>
<groupId>com.complexible.stardog.sesame</groupId>
<artifactId>stardog-sesame-core</artifactId>
<version>3.1.4</version>
</dependency>

<dependency>
<groupId>com.complexible.stardog</groupId>
<artifactId>stardog-api</artifactId>
<version>3.1.4</version>
</dependency>
<dependency>
<groupId>com.complexible.stardog</groupId>
<artifactId>stardog-search-api</artifactId>
<version>3.1.4</version>
</dependency>
<dependency>
<groupId>com.complexible.stardog</groupId>
<artifactId>stardog-search-shared</artifactId>
<version>3.1.4</version>
</dependency>
<dependency>
<groupId>com.complexible.stardog</groupId>
<artifactId>stardog-core-shared</artifactId>
<version>3.1.4</version>
</dependency>
<dependency>
<groupId>com.complexible.stardog</groupId>
<artifactId>stardog-reasoning-api</artifactId>
<version>3.1.4</version>
</dependency>
<dependency>
<groupId>org.mindrot</groupId>
<artifactId>jbcrypt</artifactId>
<version>0.3m</version>
</dependency>

<!-- HTTP Client -->
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.4</version>
</dependency>

<!-- Apache Ant -->
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant</artifactId>
<version>1.9.4</version>
</dependency>

<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.4</version>
</dependency>

<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>4.3.8.Final</version>
</dependency>

<!-- Lucene -->
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-analyzers-common</artifactId>
<version>4.7.2</version>
</dependency>
        <dependency>
<groupId>net.spy</groupId>
<artifactId>spymemcached</artifactId>
<version>2.12.0</version>
</dependency>

<dependency>
<groupId>com.jcraft</groupId>
<artifactId>jsch</artifactId>
<version>0.1.53</version>
<scope>test</scope>
</dependency>
<!-- Xi Test data -->
<dependency>
<groupId>co.test</groupId>
<artifactId>test-data</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
</dependencies>
<build>
<finalName>km-web</finalName>
<plugins>

<!-- Read properties files in order to run sql scripts -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>properties-maven-plugin</artifactId>
<version>1.0-alpha-2</version>
<executions>
<execution>
<phase>initialize</phase>
<goals>
<goal>read-project-properties</goal>
</goals>
<configuration>
<files>
<file>build.properties</file>
</files>
</configuration>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>sql-maven-plugin</artifactId>
<version>1.5</version>
<dependencies>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.34</version>
</dependency>
</dependencies>
<configuration>
<username>${db.username}</username>
<password>${db.password}</password>
<driver>com.mysql.jdbc.Driver</driver>
<url>${db.url}</url>
<delimiter>GO</delimiter>
<delimiterType>row</delimiterType>
</configuration>
<executions>
<execution>
<id>populate-test-data</id>
<phase>process-test-resources</phase>
<goals>
<goal>execute</goal>
</goals>
<configuration>
<autocommit>true</autocommit>
<srcFiles>
<srcFile>db/scripts/test/km_data.sql</srcFile>
</srcFiles>
</configuration>
</execution>
</executions>
</plugin>

<!-- Start and Stop Stardog -->
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.6</version>
<executions>
<execution>
<id>start stardog</id>
<phase>process-resources</phase>
<configuration>
<target if="${internalstore.stardog}">
<exec executable="${basedir}/db/run_stardog${script.extension}" spawn="true"></exec>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
<execution>
<id>stop stardog</id>
<phase>post-integration-test</phase>
<configuration>
<target>
<exec executable="${basedir}/db/stop_stardog${script.extension}"
spawn="true"></exec>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>

<!-- Clean existing webapps and logs folder inside Tomcat -->
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<!-- Delete old war and log files before integration test -->
<execution>
<id>auto-clean-war-and-log</id>
<phase>package</phase>
<configuration>
<tasks>
<delete quiet="true" includeemptydirs="true">
<fileset dir="${catalina.home}/webapps" includes="**/*" />
<fileset dir="${catalina.home}/logs">
<include name="*" />
</fileset>
</delete>
<mkdir dir="${catalina.home}/webapps" />
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>

<!-- Start/Stop server -->
<plugin>
<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-maven2-plugin</artifactId>
<version>1.4.13</version>
<executions>
<execution>
<id>start-container</id>
<phase>pre-integration-test</phase>
<goals>
<goal>start</goal>
</goals>
</execution>
<execution>
<id>stop-container</id>
<phase>post-integration-test</phase>
<goals>
<goal>stop</goal>
</goals>
</execution>
</executions>
<configuration>
<wait>false</wait>
<container>
<containerId>tomcat8x</containerId>
<type>installed</type>
<home>${catalina.home}</home>
<timeout>120000</timeout>
<output>${basedir}/target/container.log</output>
<append>false</append>
<log>${basedir}/target/cargo.log</log>
</container>
<configuration>
<type>existing</type>
<home>${catalina.home}</home>
<properties>
<cargo.servlet.port>8080</cargo.servlet.port>
<preferIPv4Stack>true</preferIPv4Stack>
</properties>
</configuration>
</configuration>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<!--This plugin's configuration is used to store Eclipse m2e settings 
only. It has no influence on the Maven build itself. -->
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>
org.codehaus.mojo
</groupId>
<artifactId>
properties-maven-plugin
</artifactId>
<versionRange>
[1.0-alpha-2,)
</versionRange>
<goals>
<goal>
read-project-properties
</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore></ignore>
</action>
</pluginExecution>
<pluginExecution>
<pluginExecutionFilter>
<groupId>
org.codehaus.mojo
</groupId>
<artifactId>
sql-maven-plugin
</artifactId>
<versionRange>
[1.5,)
</versionRange>
<goals>
<goal>execute</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore></ignore>
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>

<repositories>
<repository>
<id>ext-release-local</id>
<name>KM internal repository</name>
<url>
</url>
</repository>
<repository>
<id>stardog-maven</id>
<name>Stardog Maven Repository</name>
<url>
</url>
</repository>
</repositories>
</project>

Michael Grove

unread,
Aug 26, 2015, 7:59:35 AM8/26/15
to stardog
Ah, it's kind of suble, but I think the groupId's are slightly off.

The search artifacts are in `com.compexible.stardog.search`, reasoning is in `com.complexible.stardog.reasoning` and the core-shared is in `com.complexible.stardog.core`

I think that will resolve your issue.

Cheers,

Mike

oklma...@gmail.com

unread,
Aug 27, 2015, 5:34:03 AM8/27/15
to Stardog
With the groupId changes, I am now able to download the binaries. Going forward, how can we find out what are the groupId's ? Are they published somewhere ?

I have still been unable to establish that the latest version fixes the connection reset issue, but will update again when I get to try that out.
...

Michael Grove

unread,
Aug 27, 2015, 7:54:59 AM8/27/15
to stardog
On Thu, Aug 27, 2015 at 5:34 AM, <oklma...@gmail.com> wrote:
With the groupId changes, I am now able to download the binaries. Going forward, how can we find out what are the groupId's ? Are they published somewhere ?

We published the groups/artifacts for the top-level elements in the docs.  We didn't really expect people to pull a subset of the client, which is why we did not list those.

Was there a particular reason the client-snarl (or client-http) module was insufficient for your use case?

Cheers,

Mike
 

--
Reply all
Reply to author
Forward
0 new messages