ShowVoc and VocBench Instance

119 views
Skip to first unread message

JessK

unread,
Dec 10, 2021, 9:15:58 AM12/10/21
to vocbench-user
Hi everyone,

I am having a little bit of trouble with ShowVoc.

I run a local instance of VocBench using the normal http://localhost:1979/vocbench3. If I attempt to build ShowVoc, it is unable to work because 1979 is already assigned to VocBench. And, of course, if I exit out of VocBench and build ShowVoc, I can't access VocBench.

When I don't have an instance of VocBench up, the build of ShowVoc is fine and I am able to access the site, but to be able to use it with VocBench has me perplexed. 

Is there a step in the process to deploy ShowVoc that I am missing?

Any help would be much appreciated!

Thanks,
Jess

Armando Stellato

unread,
Dec 10, 2021, 9:21:37 AM12/10/21
to JessK, vocbench-user

Hi Jess!

 

Well, let’s say that the manual helps :P

 

http://vocbench.uniroma2.it/doc/sys/#further_configuration_for_reaching_semantic_turkey_on_a_different_host_port

 

Kind Regards,

 

Armando

--
You received this message because you are subscribed to the Google Groups "vocbench-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vocbench-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vocbench-user/00294ae1-3504-4072-9a28-d759cb16591fn%40googlegroups.com.

Armando Stellato

unread,
Dec 10, 2021, 9:33:19 AM12/10/21
to JessK, vocbench-user

…manuals help but rushing does not :D

 

My bad I gave you the wrong link (thanks Tiziano for spotting this). The one in the previous email is about client configuration for connecting to a server on a different port.

 

This is the right one:

 

http://semanticturkey.uniroma2.it/doc/sys/#running_karaf_on_a_different_port

 

Pls notice that, being a server configuration, it can be done both for VB and SV (in case you want to change the port on ShowVoc)

 

One more thing: as explained in the previous link, if you run VB or SV client and server both hosted on the same Karaf container, then you don’t need to make any configuration for the client.

 

Cheers,

 

Armando

JessK

unread,
Dec 10, 2021, 9:36:28 AM12/10/21
to vocbench-user
Thank you!

Roland Wingerter

unread,
Feb 8, 2022, 11:37:46 AM2/8/22
to vocbench-user
Dear all,

I am struggling with the same problem, and reading the manual did not help ;-)

I have installed VocBench 3 (v. 10.2.1)  and ShowVoc (v. 1.2.1) and on my local machine (Windows 10), each in its own directory:
C:\ShowVoc\semanticturkey-10.2.1\
C:\VocBench3\semanticturkey-10.2.1\

When run separately, both applications work as expected. My problem is how to run them simultaneously.

My question: What is the recommended configuration for running ShowVoc and VocBench simultaneously on a local machine?

This is what I did:

1. Use a different port for ShowVoc
Set "org.osgi.service.http.port=1980"  (in file C:\ShowVoc\semanticturkey-10.2.1\etc\ org.ops4j.pax.web.cfg)
VocBench uses port 1979. (I have also tried other ports for ShowVoc.)

2. Start both karaf.bat files
This leads to an error  when the second karaf instance starts.

>>
Exception in thread "JMX Connector Thread [service:jmx:rmi://127.0.0.1:44444/jndi/rmi://127.0.0.1:1099/karaf-root]" java.lang.RuntimeException:
Port already in use: 44444;
You may have started two containers.  If you need to start a second container or the default ports are already in use update the config file etc/org.apache.karaf.management.cfg and change the Registry Port and Server Port to unused ports
        at org.apache.karaf.management.ConnectorServerFactory.lambda$init$0(ConnectorServerFactory.java:434)
        at java.lang.Thread.run(Unknown Source)
Exception in thread "JMX Connector Thread [service:jmx:rmi://127.0.0.1:44444/jndi/rmi://127.0.0.1:1099/karaf-root]" java.lang.RuntimeException:
Port already in use: 44444;
You may have started two containers.  If you need to start a second container or the default ports are already in use update the config file etc/org.apache.karaf.management.cfg and change the Registry Port and Server Port to unused ports
        at org.apache.karaf.management.ConnectorServerFactory.lambda$init$0(ConnectorServerFactory.java:434)
        at java.lang.Thread.run(Unknown Source)
    ____                    __  _       ______         __
   / __/__ __ _  ___ ____  / /_(_)___  /_  __/_ ______/ /_____ __ __
  _\ \/ -_)  ' \/ _ `/ _ \/ __/ / __/   / / / // / __/  '_/ -_) // /
 /___/\__/_/_/_/\_,_/_//_/\__/_/\__/   /_/  \_,_/_/ /_/\_\\__/\_, /
                                                             /___/

  developed by ART (Artificial Intelligence Research at Tor Vergata).
  Running on Apache Karaf (4.2.15)

Hit '<tab>' for a list of available commands
and '[cmd] --help' for help on a specific command.
Hit '<ctrl-d>' or 'osgi:shutdown' to shutdown Karaf.

17:27:24.461 ERROR [activator-1-thread-1] bind(/0.0.0.0:8101) - failed (BindException) to bind: Address already in use: bind
karaf@root()> ST Home Directory: file:/C:/VocBench3/vocbench3-10.2.1-full/semanticturkey-10.2.1/
Remote SPARQL Endpoints: []
Data dumps: []
Adding data located at: bundle://107.0:0/META-INF/it.uniroma2.art.maple/access_implementations.ttl
ST Started

<<

After this, both applications run. It sort of works, except that I need to login again each time I switch from one app to the other. What am I missing?

Kind regards
Roland

Tiziano Lorenzetti

unread,
Feb 8, 2022, 12:27:14 PM2/8/22
to Roland Wingerter, vocbench-user
Dear Roland,
for what concern the error message about the port already used, as far as I can see, Karaf uses the port 44444 for RMI connector server connection. As stated also in the error message it can be changed in etc/org.apache.karaf.management.cfg.
Honestly, when dealing with multiple Karaf instances running on my machine (just for development purposes) I never worried about this error since, as you already noticed, it doesn't affect the normal usage of VocBench and ShowVoc. 
Anyway I tried now to change it to a different number and it solves only in part, in fact the error


ERROR [activator-1-thread-1] bind(/0.0.0.0:8101) - failed (BindException) to bind: Address already in use: bind

is still there, but also in this case VB and SV seems to work flawlessly.

These errors anyway have nothing to do with the need to login each time you switch application. This issue depends to the fact that, if you're running the applications locally, both SV and VB are on the same domain (http://localhost), so they share the same cookies in the browser. 
When you login into VB, your browser recieves and stores the JSESSIONID cookie for identifying the VB session, but when you switch to SV and login there, the browser recieves a new JSESSIONID cookie (this time for the SV session) which overrides the one of VB, so VB user will not be recognized anymore by the backing SemanticTurkey (viceversa, the same will happen when you login again in VB, SV user will not be recognized anymore).
In order to overcome this limitation you just need to use two different browsers.

Best regards,
Tiziano

Roland Wingerter

unread,
Feb 8, 2022, 1:01:30 PM2/8/22
to vocbench-user
Dear Tiziano,

running in two different browsers (like Chrome and Firefox) solved the problem!

Thank you for the quick reply.

Kind regards
Roland

Roland Wingerter

unread,
Feb 14, 2022, 4:14:22 PM2/14/22
to vocbench-user
Dear all,

this is not a question, but a tip.

In Windows, you can change the appearance of the Windows CMD line Window. This can be quite useful, since when VB3 and SV are both running, it can be impossible to know which of the two Karaf instances is which.

Today I had both apps running, but when I wanted to stop ShowVoc, I could not tell which Karaf instance it was. To avoid that sort of situation happening, it is useful to choose a different color scheme for one of the apps.

Kind regards
Roland
Reply all
Reply to author
Forward
0 new messages