Home » Support » Forum » The server cannot start in CentOS

The server cannot start in CentOS

#1

Hi, I try to run ObjectDB from Linux, but failed. My command is:

java -cp objectdb.jar com.objectdb.Server start

The result is attached.

After typing the command, the system seems halting.

Institute of Computer Technologies
image/gif iconObjectDB_server_cant_start.gif (12.1KB)
ObjectDB server cannot start in Linux CentOS
#2

Actually your attached screenshot shows that the server has been started successfully.

If you want to start it in the background, try:

java -cp objectdb.jar com.objectdb.Server start &

 

ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)
#3

Really? My client get no response from that server.

Maybe the firewall shunt all connections? I will try tomorrow.

Institute of Computer Technologies
#4

The server seems connected, but I set my pc ip to the objectdb.conf, and get the following:

Persist failed: Login Error (unauthorized IP address for user 'admin')

 

Institute of Computer Technologies
#5

again, the server refuse me.

com.objectdb.o.UserException: Failed to validate xml file /opt/objectdb-2.2.5/objectdb.conf line 41: cvc-datatype-valid.1.2.1: '10.63.0.0-10.63.0.255,127.0.0.1' is not a valid value for 'NMTOKEN'.
        at com.objectdb.o.MSG.d(MSG.java:74)
        at com.objectdb.o.XMD.n(XMD.java:229)
        at com.objectdb.o.XMD.j(XMD.java:144)
        at com.objectdb.o.CFG.r(CFG.java:223)
        at com.objectdb.o.CFG.<init>(CFG.java:206)
        at com.objectdb.o.CFG.q(CFG.java:189)
        at com.objectdb.o.CFG.p(CFG.java:122)
        at com.objectdb.Server.run(Server.java:96)
        at com.objectdb.Server.main(Server.java:66)
Caused by: org.xml.sax.SAXParseException: cvc-datatype-valid.1.2.1: '10.63.0.0-10.63.0.255,127.0.0.1' is not a valid value for 'NMTOKEN'.
        at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:198)
        at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:134)
        at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:387)
        at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:321)

 

Institute of Computer Technologies
#6

Try to remove the ip attribute in the configuration.

The exception that you got might indicate an internal ObjectDB schema validation problem.

ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)
#7

I'm running the JPAB bench. The objectdb.conf (<MyWindows>\<jpabpath>\jpa\ObjectDB\objectdb.conf) and the objectdb.conf (<MyServer>/$objectdb/objectdb.conf) are both working, aren't they?

When I modified the former, I get:

com.objectdb.o.UserException: Failed to validate xml file E:\projects\jpaBench\jpa\ObjectDB\objectdb.conf line 37: cvc-datatype-valid.1.2.1: '10.63.0.0-10.63.0.255,127.0.0.1' is not a valid value for 'NMTOKEN'.
 at com.objectdb.o.MSG.d(MSG.java:74)
 at com.objectdb.o.XMD.n(XMD.java:229)
 at com.objectdb.o.XMD.j(XMD.java:144)
 at com.objectdb.o.CFG.q(CFG.java:220)
 at com.objectdb.o.CFG.<init>(CFG.java:203)
 at com.objectdb.o.CFG.p(CFG.java:186)
 at com.objectdb.o.CFG.o(CFG.java:119)
 at com.objectdb.JEnhancerAgent.<clinit>(JEnhancerAgent.java:51)
 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 sun.instrument.InstrumentationImpl.loadClassAndStartAgent(Unknown Source)
 at sun.instrument.InstrumentationImpl.loadClassAndCallPremain(Unknown Source)
Caused by: org.xml.sax.SAXParseException: cvc-datatype-valid.1.2.1: '10.63.0.0-10.63.0.255,127.0.0.1' is not a valid value for 'NMTOKEN'.
 at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
 at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(Unknown Source)
 at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
 at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
 at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(Unknown Source)
 at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.reportSchemaError(Unknown Source)
 at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.processOneAttribute(Unknown Source)
 at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.processAttributes(Unknown Source)
 at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStartElement(Unknown Source)
 at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.startElement(Unknown Source)
 at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
 at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
 at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
 at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)
 at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
 at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
 at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
 at com.sun.org.apache.xerces.internal.jaxp.validation.StreamValidatorHelper.validate(Unknown Source)
 at com.sun.org.apache.xerces.internal.jaxp.validation.ValidatorImpl.validate(Unknown Source)
 at javax.xml.validation.Validator.validate(Unknown Source)
 at com.objectdb.o.XMD.n(XMD.java:204)
 ... 12 more

 

Institute of Computer Technologies
#8

Please read the previous reply (#6).

ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)
#9

I do remove the ip setting in server's objectdb.conf, but when I run the jpab.jar, it turns out use my client's objectdb.conf in jpab.

Institute of Computer Technologies
#10

Could you please give a runnable example setting for objectdb server?

TIA

Institute of Computer Technologies
#11

Hi, I have not connected a server yet.

Would you please give me a setting for client?

My server setting is:

 

<!-- ObjectDB Configuration -->

<objectdb>

<general>
  <temp path="$temp/ObjectDB" threshold="64mb" />
  <network inactivity-timeout="0" />
  <log path="$objectdb/log/" max="8mb" stdout="false" stderr="false" />
  <log-archive path="$objectdb/log/archive/" retain="90" />
  <logger name="*" level="info" />
</general>

<database>
  <size initial="256kb" resize="256kb" page="2kb" />
  <recovery enabled="true" sync="false" path="." max="128mb" />
  <recording enabled="false" sync="false" path="." mode="write" />
  <locking version-check="true" />
  <processing cache="64mb" max-threads="10" />
  <query-cache results="32mb" programs="500" />
</database>

<entities>
  <enhancement agent="true" reflection="warning" />
  <cache ref="weak" level2="0" />
  <cascade-persist always="auto" on-persist="true" on-commit="true" />
  <dirty-tracking arrays="false" />
</entities>

<schema>
</schema>

<server>
  <connection port="6136" max="100" />
  <data path="$objectdb/db-files" />
  <!--
  <replication url="objectdb://localhost/test.odb;user=admin;password=admin" />
  -->
</server>

<users>
  <user username="admin" password="admin" ip="10.63.0.1-10.63.0.254,127.0.0.1" admin="true">
   <dir path="/" permissions="access,modify,create,delete" />
  </user>
  <user username="$default" password="$$$###">
   <dir path="/$user/" permissions="access,modify,create,delete">
    <quota directories="5" files="20" disk-space="5mb" />
   </dir>
  </user>
  <user username="user1" password="user1" />
</users>

<ssl enabled="false">
  <server-keystore path="$objectdb/ssl/server-kstore" password="pwd" />
  <client-truststore path="$objectdb/ssl/client-tstore" password="pwd" />
</ssl>

</objectdb>

 

Institute of Computer Technologies
#12

No need to change the configuration.

See the manual for details on connecting to a server from the client.

ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)
#13

Hi, I believe the configuration has to been modified or it get this message:

Exception in thread "main" java.lang.ExceptionInInitializerError
at fpg.TrieTree.<clinit>(TrieTree.java:14)
at src.run.Exec.<init>(Exec.java:22)
at src.run.Exec.main(Exec.java:375)
Caused by: com.objectdb.o._PersistenceException: Login Error (unauthorized IP address for user 'admin')
at com.objectdb.o._PersistenceException.b(_PersistenceException.java:45)
at com.objectdb.o.JPE.g(JPE.java:140)
at com.objectdb.o.ERR.f(ERR.java:59)
at com.objectdb.o.OST.onObjectDBError(OST.java:589)
at com.objectdb.jpa.EMF.createEntityManager(EMF.java:163)
at src.run.SingleManager.<clinit>(SingleManager.java:21)
... 3 more
Caused by: com.objectdb.o.UserException: Login Error (unauthorized IP address for user 'admin')
at com.objectdb.o.MSG.d(MSG.java:61)
at com.objectdb.o.HND.J(HND.java:208)
at com.objectdb.o.SHN.J(SHN.java:198)
at com.objectdb.o.HND.run(HND.java:133)
at java.lang.Thread.run(Thread.java:636)

    It seems the hyphen does not work.

<users>
                <user username="admin" password="admin" ip="10.63.0.235-10.63.0.241,127.0.0.1" admin="true">
                        <dir path="/" permissions="access,modify,create,delete" />
                </user>
                <user username="$default" password="$$$###">
                        <dir path="/$user/" permissions="access,modify,create,delete">
                                <quota directories="5" files="20" disk-space="5mb" />
                        </dir>
                </user>
                <user username="user1" password="user1" />
        </users>

    I have to use identified ip as ip="10.63.0.235,127.0.0.1" or it will be failed.

Institute of Computer Technologies
#14

The ip attribute is optional so you can simply remove it.

This attribute is not included anymore in the default configuration (in version 2.2.8).

 

 

ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)

Post Reply

To post a reply and/or subscribe to update notifications - please login