Skip to content

http://localhost:8080/lsm-light.server/ not working #116

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Zoya2385 opened this issue Nov 17, 2015 · 6 comments
Open

http://localhost:8080/lsm-light.server/ not working #116

Zoya2385 opened this issue Nov 17, 2015 · 6 comments

Comments

@Zoya2385
Copy link

Hello,

I followed the tutorial to install openIOT. In the step 6, the deployment of the module "Lsm-light Server" is failed :

18:49:27.275 [MSC service thread 1-14] INFO o.o.lsm.pooling.ConnectionManager - Loading property file
18:49:27.291 [MSC service thread 1-14] INFO o.o.lsm.pooling.ConnectionManager - loading database server driver virtuoso.jdbc4.Driver
18:49:48.897 [MSC service thread 1-14] ERROR o.o.lsm.pooling.ConnectionManager - Error making pool:
java.sql.SQLException: Unable to open a test connection to the given database. JDBC url = jdbc:virtuoso://lsm.deri.ie:1111/log_enable=2, username = . Terminating connection pool. Original Exception: ------
virtuoso.jdbc4.VirtuosoException: Connection failed: Connection timed out: connect
at virtuoso.jdbc4.VirtuosoConnection.connect(Unknown Source)
at virtuoso.jdbc4.VirtuosoConnection.connect(Unknown Source)
at virtuoso.jdbc4.VirtuosoConnection.(Unknown Source)
at virtuoso.jdbc4.Driver.connect(Unknown Source)
at java.sql.DriverManager.getConnection(DriverManager.java:571)
at java.sql.DriverManager.getConnection(DriverManager.java:215)
at com.jolbox.bonecp.BoneCP.obtainRawInternalConnection(BoneCP.java:256)
at com.jolbox.bonecp.BoneCP.(BoneCP.java:305)
at org.openiot.lsm.pooling.ConnectionManager.init(ConnectionManager.java:75)
at org.openiot.lsm.http.ContextListener.contextInitialized(ContextListener.java:33)
at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3392)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:3850)
at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:90)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)

have you an idea of the problem ?

@Zoya2385
Copy link
Author

When modifying the openiot.properties files as follow, the deployement works :

#LSM-LIGHT Properties
lsm-light.server.connection.driver_class=virtuoso.jdbc4.Driver
lsm-light.server.connection.url=jdbc:virtuoso://localhost:1111/log_enable=2

lsm-light.server.connection.username=dba
lsm-light.server.connection.password=dba
lsm-light.server.minConnection=10
lsm-light.server.maxConnection=15
lsm-light.server.acquireRetryAttempts=5
#for local virtuoso instance
lsm-light.server.localMetaGraph = http://test/sensormeta#
lsm-light.server.localDataGraph = http://test/sensordta#
#lsm-light.client.connection.server = #http://localhost:8080/lsm-light.server/
#lsm-light.client.openiot.ontology.namespace = #http://openiot.eu/ontology/ns/
#lsm-light.client.openiot.resource.namespace = #http://localhost/resource/

then, the second step is the deplyement of the module "Security Management and Server". the deployment of the two war is failed (see the log file in attachement).

The openiot.properties file as follow :
###############################################################

Privacy and Security Module

###############################################################
security.lsm.sparql.endpoint=http://localhost:8890/sparql
security.lsm.graphURL=http://lsm.deri.ie/OpenIoT/OAuth#
security.signup.useCaptcha=true
security.automaticServiceSetup=true
security.initialize.admin.username=admin

md5 hashed of 'secret': 5ebe2294ecd0e0f08eab7690d2a6ee69

security.initialize.admin.password=secret
security.initialize.admin.email=[email protected]
security.initialize.lsmserver.username=lsmuser
security.initialize.lsmserver.password=lsmuserpass
security.initialize.scheduler.username=scheduleruser
security.initialize.scheduler.password=scheduleruserpass
security.initialize.sdum.username=sdumruser
security.initialize.sdum.password=sdumuserpass
security.initialize.xgsn.username=gsnuser
security.initialize.xgsn.password=gsnpass
security.initialize.cas.prefix=https://localhost:8443/openiot-cas
security.initialize.management.prefix=http://localhost:8080/security.management
security.initialize.management.secret=openiot-security-manager-app-secret
security.initialize.management.key=openiot-security-manager-app
security.initialize.reqDef.prefix=http://localhost:8080/ui.requestDefinition
security.initialize.reqDef.secret=requestDefinitionUI-secret
security.initialize.reqDef.key=requestDefinitionUI
security.initialize.reqPres.prefix=http://localhost:8080/ui.requestPresentation
security.initialize.reqPres.secret=requestPresentationUI-secret
security.initialize.reqPres.key=requestPresentationUI
security.initialize.schemaEditor.prefix=http://localhost:8080/ui.schemaeditor
security.initialize.schemaEditor.key=schemaEditor
security.initialize.schemaEditor.secret=schemaEditor-secret
security.initialize.scheduler.key=scheduler
security.initialize.scheduler.secret=scheduler.secret
security.initialize.sdum.key=sdum
security.initialize.sdum.secret=sdum.secret
security.initialize.xgsn.key=xgsn
security.initialize.xgsn.secret=xgsn.secret

is there a problem in the openiot.properties file ?

How can i modify it?

For the rest of war files, couls you please indicate me the modifications to do in the openiot.properties file to deploy all the war files ?

I'm working on localhost.

@nkef
Copy link
Member

nkef commented Nov 18, 2015

Dear Zoya,

Since you are working on localhost you should replace all the properties pointing to "lsm.deri.ie" with the "localhost" (as you corectly did for LSM-Light properties). For example i see that the "security.lsm.graphURL" points to "http://lsm.deri.ie/OpenIoT/OAuth#"

I hope this will help.
Nikos.

@Zoya2385
Copy link
Author

Thank you for your answer, i will replace all "lsm.deri.ie" by "localhost".
i comment the following lignes to deploy successfully "lsm-light.server.war" :

#lsm-light.client.connection.server = #http://localhost:8080/lsm-light.server/
#lsm-light.client.openiot.ontology.namespace = #http://openiot.eu/ontology/ns/
#lsm-light.client.openiot.resource.namespace = #http://localhost/resource/

is it correct ?

@Zoya2385
Copy link
Author

I replaced all "lsm.deri.ie" by "localhost" (see the openiot.properties in attachement)
I always have errors when deploying the two war : lsm-light.server.war and openiot-cas.war.
In C:\Program Files\jboss-as-7.1.1.Final\standalone\deployments, i have just the two war : lsm-light.server.war and openiot-cas.war.

Have you an idea of this problem ?

Thank you in advance
[log.txt](https://github.com/OpenIotOrg/openiot/files/37984/log.tx
[openiot_properties.txt]%28https://github.com/OpenIotOrg/openiot/files/37988/openiot_properties.txt%29
t)

@Zoya2385
Copy link
Author

openiot_properties.txt

@jefersonla
Copy link

I have faced this same error and found the solution here https://github.com/OpenIotOrg/openiot/wiki/OpenIoT-Virtual-Box-Image---Documentation , to make this easier, I've created the following snippet with sed that change change all lsm.deri.ie to localhost or OpenIoT.eu db.

sed --in-place \
        -e "s/scheduler\.core\.lsm\.openiotMetaGraph=.*$/scheduler\.core\.lsm\.openiotMetaGraph=http\:\/\/openiot\.eu\/OpenIoT\/sensormeta\#/g" \
        -e "s/scheduler\.core\.lsm\.openiotDataGraph=.*$/scheduler\.core\.lsm\.openiotDataGraph=http\:\/\/openiot\.eu\/OpenIoT\/sensordata#/g" \
        -e "s/scheduler\.core\.lsm\.openiotFunctionalGraph=.*$/scheduler\.core\.lsm\.openiotFunctionalGraph=http\:\/\/openiot.eu\/OpenIoT\/functionaldata#/g" \
        -e "s/scheduler\.core\.lsm\.sparql\.endpoint=.*/scheduler\.core\.lsm\.sparql\.endpoint=http\:\/\/localhost\:8890\/sparql/g" \
        -e "s/scheduler\.core\.lsm\.remote\.server=.*$/scheduler\.core\.lsm\.remote\.server=http\:\/\/localhost\:8080\/lsm-light\.server\//g" \
        -e "s/sdum\.core\.lsm\.openiotFunctionalGraph=.*$/sdum\.core\.lsm\.openiotFunctionalGraph=http\:\/\/openiot\.eu\/OpenIoT\/functionaldata#/g" \
        -e "s/sdum\.core\.lsm\.sparql\.endpoint=.*$/sdum\.core\.lsm\.sparql\.endpoint=http\:\/\/localhost\:8890\/sparql/g" \
        -e "s/sdum\.core\.lsm\.remote\.server=.*$/sdum\.core\.lsm\.remote\.server=http\:\/\/localhost\:8080\/lsm-light.server\//g" \
        -e "s/lsm-light\.server\.connection\.url=.*$/lsm-light\.server\.connection\.url=jdbc\:virtuoso\:\/\/localhost\:1111\/log_enable=2/g" \
        -e "s/lsm-light\.server\.connection\.username=.*$/lsm-light\.server\.connection\.username=dba/g" \
        -e "s/lsm-light\.server\.connection\.password=.*$/lsm-light\.server\.connection\.password=$VIRTUOSO_DBA_PASS/g" \
        -e "s/lsm-light\.server\.localMetaGraph.*$/lsm-light\.server\.localMetaGraph\ =\ http\:\/\/openiot.eu\/OpenIoT\/sensormeta#/g" \
        -e "s/lsm-light\.server\.localDataGraph.*$/lsm-light\.server\.localDataGraph\ =\ http\:\/\/openiot.eu\/OpenIoT\/sensordata#/g" \
        -e "s/lsm\.deri\.ie/localhost\:8080/g" \
        "$JBOSS_HOME/standalone/configuration/openiot.properties"

Despite of the fact that this is inted to be used on virtualbox image, these modifications are needed on the default deploy too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants
@nkef @jefersonla @Zoya2385 and others