Install KIE-WB without Network Access

705 views
Skip to first unread message

Dominik Sandjaja

unread,
Sep 23, 2014, 12:02:21 PM9/23/14
to drools...@googlegroups.com
Hi,

I just installed KIE-WB on a system which does not have access to other servers. Only some other servers and networks have access to the GUI and the Maven repository. For simplicity, I call that setup "offline" setup.

I use a separate settings.xml which I provide at Tomcat startup with -Dkie.maven.settings.custom="/Users/myuser/somepath/settings.xml". The content of that file is (header and other stuff omitted):

<localRepository>/Users/myuser/someotherpath/repository</localRepository>

<interactiveMode>false</interactiveMode>#

The internal maven within KIE-WB seems to be trying to access repo1.maven.org a lot. Since the system has no network connection to the outside world, this results in waiting times, slowing down the user interface and annoying the users. I tried to circumvent the problem by setting

127.0.0.1  localhost repo1.maven.org

in the hosts file, but I don't like the solution ...

My question is mainly: Why can I not just put

<offline>true</offline>

in the settings.xml? If I try that, KIE-WB gives me the error

org.sonatype.aether.deployment.DeploymentException: The repository system is in offline mode, deployment impossible

when trying to build and deploy. But since I do not want to deploy my artifact to anywhere else except the local repository (defined in the <localRepository> tag), why would it need online access? Is this a bug (feature?) in the Aether package? If not, how can I prevent any connection tries to any outside server?

Thanks for any help!

Dominik

Guido Campopiano

unread,
Jan 23, 2015, 5:56:59 PM1/23/15
to drools...@googlegroups.com
Hi,

I've the same identical problem with the same setup. Which is the correct settings.xml's config to get rid of it?

Thanks
Guido

Mark Proctor

unread,
Jan 23, 2015, 5:58:52 PM1/23/15
to drools...@googlegroups.com
--
You received this message because you are subscribed to the Google Groups "Drools Setup" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drools-setup...@googlegroups.com.
To post to this group, send email to drools...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/drools-setup/d6167fe0-0b47-41d4-8a77-086a1287a505%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Mark Proctor

unread,
Jan 23, 2015, 6:00:45 PM1/23/15
to drools...@googlegroups.com

Guido Campopiano

unread,
Jan 24, 2015, 5:31:37 AM1/24/15
to drools...@googlegroups.com
Thanks Mark, I'll try setup suggested in your links sa soon as possible: in order to do this could you confirm that I have to set the url of the central repo to the same Url of the guvnor-m2-repo provided by kie-wb in settings.xml, since I don't have any Nexus in my company? Do I have also to set the tag "localRepo" to the "repositories/kie" in settings.xml?

Thanks in advance.
Guido

Guido Campopiano

unread,
Feb 3, 2015, 4:22:14 AM2/3/15
to drools...@googlegroups.com
I tried overriding central definition ( both repository and pluginRepository ) with the URL of the maven repo provided by kie but I didn't succeed: when I trigger "Build & Deploy" of the project on workbench following exception occurs:

Caused by: org.sonatype.aether.transfer.ArtifactTransferException: Could not transfer artifact <myGroupId>:<myArtifactId>:pom:2.0.2 from/to central (http://repo1.maven.org/maven2/): Connection to http://repo1.maven.org refused
    at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:951) [aether-connector-wagon-1.13.1.jar:]
    at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:941) [aether-connector-wagon-1.13.1.jar:]
    at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$GetTask.run(WagonRepositoryConnector.java:669) [aether-connector-wagon-1.13.1.jar:]
    at org.sonatype.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:60) [aether-util-1.13.1.jar:]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_51]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_51]
    ... 1 more
Caused by: org.apache.maven.wagon.TransferFailedException: Connection to http://repo1.maven.org refused
    at org.apache.maven.wagon.shared.http.AbstractHttpClientWagon.fillInputData(AbstractHttpClientWagon.java:795) [wagon-http-shared4-2.0.jar:2.0]
    at org.apache.maven.wagon.StreamWagon.getInputStream(StreamWagon.java:116) [wagon-provider-api-1.0.jar:1.0]
    at org.apache.maven.wagon.StreamWagon.getIfNewer(StreamWagon.java:88) [wagon-provider-api-1.0.jar:1.0]
    at org.apache.maven.wagon.StreamWagon.get(StreamWagon.java:61) [wagon-provider-api-1.0.jar:1.0]
    at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$GetTask.run(WagonRepositoryConnector.java:601) [aether-connector-wagon-1.13.1.jar:]
    ... 4 more
Caused by: org.apache.http.conn.HttpHostConnectException: Connection to http://repo1.maven.org refused
    at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:190) [httpclient-4.2.1-redhat-1.jar:4.2.1-redhat-1]
    at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:151) [httpclient-4.2.1-redhat-1.jar:4.2.1-redhat-1]
    at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:125) [httpclient-4.2.1-redhat-1.jar:4.2.1-redhat-1]
    at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:640) [httpclient-4.2.1-redhat-1.jar:4.2.1-redhat-1]
    at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:479) [httpclient-4.2.1-redhat-1.jar:4.2.1-redhat-1]
    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:906) [httpclient-4.2.1-redhat-1.jar:4.2.1-redhat-1]
    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:805) [httpclient-4.2.1-redhat-1.jar:4.2.1-redhat-1]
    at org.apache.maven.wagon.shared.http.AbstractHttpClientWagon.execute(AbstractHttpClientWagon.java:671) [wagon-http-shared4-2.0.jar:2.0]
    at org.apache.maven.wagon.shared.http.AbstractHttpClientWagon.fillInputData(AbstractHttpClientWagon.java:789) [wagon-http-shared4-2.0.jar:2.0]
    ... 8 more
Caused by: java.net.ConnectException: Connection timed out
    at java.net.PlainSocketImpl.socketConnect(Native Method) [rt.jar:1.7.0_51]
    at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339) [rt.jar:1.7.0_51]
    at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200) [rt.jar:1.7.0_51]
    at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182) [rt.jar:1.7.0_51]
    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) [rt.jar:1.7.0_51]
    at java.net.Socket.connect(Socket.java:579) [rt.jar:1.7.0_51]
    at org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:127) [httpclient-4.2.1-redhat-1.jar:4.2.1-redhat-1]
    at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:180) [httpclient-4.2.1-redhat-1.jar:4.2.1-redhat-1]
    ... 16 more

It simply seems to ignore my custom settings provided through property "kie.maven.settings.custom" at startup.
Must say that even if this exception occurs, kie GUI slows down but at the end the project is built and deployed.

Any other suggestion? I could provide my setup stuff if needed.
Thanks in advance.

Guido

Rahul Singh

unread,
May 6, 2017, 4:44:26 AM5/6/17
to Drools Setup
Hi Mark,

I have weblogic server with two nodes, suddenly one node is taking more time to create the KieContainer from KieServices
KieServices kServices = KieServices.Factory.get();
logger.info(" Got the KieServices ......");
cachedContainer = kServices.newKieContainer(this.releaseId);
And It hangs after printing log
wagon http use multi threaded http connection manager maxPerRoute 20, max total 40
for 6-7 min. 
whereas other node is taking 1 min to create the same.
Pleas help me out to understand this issue. Why wagon is called everytime when i restrat the server and my artifact is present in local me directory.

Antispam Antispam

unread,
Jan 28, 2019, 7:48:02 AM1/28/19
to Drools Setup
Sorry, i have the same issue - need to use drools (business-central) offline. But maven want to connect to repo (why? for what?) - and breacks down.

So, i need to use local repo, but:
1. I don't know where settings.xml and pom.xml places. (So, can't edit it)
2. don't know what stores in local repo (so, can't fill it)

вторник, 23 сентября 2014 г., 19:02:21 UTC+3 пользователь Dominik Sandjaja написал:

Abhijit Humbe

unread,
Jan 28, 2019, 8:06:33 AM1/28/19
to drools...@googlegroups.com
In jBPM 7.12 'kie.maven.offline.force' introduced to make kie-workbench work in offline mode. Try passing option -Dkie.maven.offline.force=true while starting server instance if you are using jBPM 7.12 or higher.
Abhijit Humbe


--
You received this message because you are subscribed to the Google Groups "Drools Setup" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drools-setup...@googlegroups.com.
To post to this group, send email to drools...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages