SERP Hacker support forum - serposcope

Support forum for open-source softwares built by serphacker.com : serposcope the rank checker.

You are not logged in.

#1 2016-01-18 06:17:51

negru rau
Member
Registered: 2016-01-18
Posts: 3

restart serposcope service in CentOS

Hi there,
First of all this a great app, thanks for making it open source!
I've installed serposcope-2.1.0 on CentOS and I would like to use MySQL instead of H2, I changed the config file, but I can't figure it out how to restart the service?

sudo service serposcope restart
Redirecting to /bin/systemctl restart  serposcope.service
Failed to restart serposcope.service: Unit serposcope.service failed to load: No such file or directory.

Thanks!
NR

Last edited by negru rau (2016-01-18 06:27:46)

Offline

#2 2016-01-18 06:41:23

negru rau
Member
Registered: 2016-01-18
Posts: 3

Re: restart serposcope service in CentOS

I tried this, but didn't create the tables in mysql sad

java -Dserposcope.conf=serposcope.conf -jar /home/www/seo/serposcope-2.1.0.jar
starting serposcope service
[2016-01-17 23:32:13,376] [NinjaJetty] INFO  c.SerposcopeConf - serposcope.version          : 2.1.0
...
Can't establish connection to database
org.h2.jdbc.JdbcSQLException: Database may be already in use: null. Possible solutions: close all other connection(s); use the server mode [90020-189]

Last edited by negru rau (2016-01-18 06:55:59)

Offline

#3 2016-01-18 11:59:00

serphacker
Administrator
Registered: 2014-06-13
Posts: 411

Re: restart serposcope service in CentOS

what is the content of serposcope.conf

Offline

#4 2016-01-20 04:45:16

negru rau
Member
Registered: 2016-01-18
Posts: 3

Re: restart serposcope service in CentOS

This is my config file:

# To use this file, you must launch serposcope with -Dserposcope.conf=/path/to/this/file parameters                                                     
# Do not forgot to restart serposcope service if you edit this file                                                                                     
#                                                                                                                                                       
# path where is stored embedded database and data files                                                                                                 
#serposcope.datadir=                                                                                                                     
                                                                                                                                                        
# log path                                                                                                                                              
#serposcope.logdir=                                                                                                                   
                                                                                                                                                        
# alternative database url, mysql example to use mysql :.                                                                                               
# serposcope.db.url=jdbc:mysql://localhost/DATABASE?user=USER&password=PASS&allowMultiQueries=true                                                      
serposcope.db.url=jdbc:mysql://localhost/serposcope?user=***&password=***&allowMultiQueries=true                                              
                                                                                                                                                        
# additional database options                                                                                                                           
#serposcope.db.options=                                                                                                                                 
#serposcope.db.debug=                                                                                                                                   
                                                                                                                                                        
# listen interface                                                                                                                                      
#serposcope.listenAddress=                                                                                                                              
                                                                                                                                                        
# listen port                                                                                                                                           
#serposcope.listenPort=     

Offline

#5 2016-01-26 14:32:03

NawtyBoy
Member
Registered: 2016-01-26
Posts: 2

Re: restart serposcope service in CentOS

I am getting same error on my mac, kindly suggest me a solution.

Thanks

Offline

#6 2016-01-26 14:33:46

serphacker
Administrator
Registered: 2014-06-13
Posts: 411

Re: restart serposcope service in CentOS

are you using mysql too or default database configuration ?

Offline

#7 2016-01-26 14:41:39

NawtyBoy
Member
Registered: 2016-01-26
Posts: 2

Re: restart serposcope service in CentOS

its default. i haven't changed anything yet

Mac:~ Awesomeness$ java -jar serposcope.jar
starting serposcope service
[2016-01-26 19:49:06,854] [NinjaJetty] INFO  c.SerposcopeConf - serposcope.version          : 2.1.0
[2016-01-26 19:49:06,856] [NinjaJetty] INFO  c.SerposcopeConf - serposcope.datadir          : /Users/Awesomeness/serposcope
[2016-01-26 19:49:06,856] [NinjaJetty] INFO  c.SerposcopeConf - serposcope.logdir           : /Users/Awesomeness/serposcope/logs
[2016-01-26 19:49:06,856] [NinjaJetty] INFO  c.SerposcopeConf - serposcope.db.url           : jdbc:h2:/Users/Awesomeness/serposcope/db;MODE=MySQL
[2016-01-26 19:49:06,856] [NinjaJetty] INFO  c.SerposcopeConf - serposcope.db.debug         : false
[2016-01-26 19:49:06,856] [NinjaJetty] INFO  c.SerposcopeConf - serposcope.listenAddress    : 0.0.0.0
[2016-01-26 19:49:06,856] [NinjaJetty] INFO  c.SerposcopeConf - serposcope.listenPort       : 7134
[2016-01-26 19:49:06,902] [NinjaJetty] WARN  o.e.j.s.h.ContextHandler - Empty contextPath
[2016-01-26 19:49:06,916] [NinjaJetty] INFO  s.l.MyNinjaJetty - Trying to start jetty vnull on 0.0.0.0:7134
[2016-01-26 19:49:07,150] [NinjaJetty] INFO  c.Module - now logging to /Users/Awesomeness/serposcope/logs/2016-01-26.log
Can't establish connection to database
org.h2.jdbc.JdbcSQLException: Database may be already in use: null. Possible solutions: close all other connection(s); use the server mode [90020-189]
    at org.h2.message.DbException.getJdbcSQLException(DbException.java:345)
    at org.h2.message.DbException.get(DbException.java:168)
    at org.h2.mvstore.db.MVTableEngine$Store.convertIllegalStateException(MVTableEngine.java:187)
    at org.h2.mvstore.db.MVTableEngine$Store.open(MVTableEngine.java:167)
    at org.h2.mvstore.db.MVTableEngine.init(MVTableEngine.java:99)
    at org.h2.engine.Database.getPageStore(Database.java:2450)
    at org.h2.engine.Database.open(Database.java:672)
    at org.h2.engine.Database.openDatabase(Database.java:269)
    at org.h2.engine.Database.<init>(Database.java:263)
    at org.h2.engine.Engine.openSession(Engine.java:65)
    at org.h2.engine.Engine.openSession(Engine.java:175)
    at org.h2.engine.Engine.createSessionAndValidate(Engine.java:153)
    at org.h2.engine.Engine.createSession(Engine.java:136)
    at org.h2.engine.Engine.createSession(Engine.java:28)
    at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:349)
    at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:107)
    at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:91)
    at org.h2.Driver.connect(Driver.java:72)
    at java.sql.DriverManager.getConnection(DriverManager.java:664)
    at java.sql.DriverManager.getConnection(DriverManager.java:270)
    at com.serphacker.serposcope.di.db.DataSourceProvider.get(DataSourceProvider.java:40)
    at com.serphacker.serposcope.di.db.DataSourceProvider.get(DataSourceProvider.java:21)
    at com.google.inject.internal.ProviderInternalFactory.provision(ProviderInternalFactory.java:81)
    at com.google.inject.internal.InternalFactoryToInitializableAdapter.provision(InternalFactoryToInitializableAdapter.java:53)
    at com.google.inject.internal.ProviderInternalFactory.circularGet(ProviderInternalFactory.java:61)
    at com.google.inject.internal.InternalFactoryToInitializableAdapter.get(InternalFactoryToInitializableAdapter.java:45)
    at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
    at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1103)
    at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
    at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:145)
    at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41)
    at com.google.inject.internal.InternalInjectorCreator$1.call(InternalInjectorCreator.java:205)
    at com.google.inject.internal.InternalInjectorCreator$1.call(InternalInjectorCreator.java:199)
    at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1092)
    at com.google.inject.internal.InternalInjectorCreator.loadEagerSingletons(InternalInjectorCreator.java:199)
    at com.google.inject.internal.InternalInjectorCreator.injectDynamically(InternalInjectorCreator.java:180)
    at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:110)
    at com.google.inject.Guice.createInjector(Guice.java:96)
    at ninja.Bootstrap.initInjector(Bootstrap.java:204)
    at ninja.Bootstrap.boot(Bootstrap.java:94)
    at ninja.servlet.NinjaServletListener.createNinjaBootstrap(NinjaServletListener.java:131)
    at ninja.servlet.NinjaServletListener.getInjector(NinjaServletListener.java:109)
    at com.google.inject.servlet.GuiceServletContextListener.contextInitialized(GuiceServletContextListener.java:47)
    at ninja.servlet.NinjaServletListener.contextInitialized(NinjaServletListener.java:61)
    at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:800)
    at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:444)
    at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:791)
    at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:294)
    at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:741)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
    at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132)
    at org.eclipse.jetty.server.Server.start(Server.java:387)
    at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114)
    at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61)
    at org.eclipse.jetty.server.Server.doStart(Server.java:354)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
    at ninja.standalone.NinjaJetty.doStart(NinjaJetty.java:107)
    at ninja.standalone.AbstractStandalone.start(AbstractStandalone.java:166)
    at ninja.standalone.AbstractStandalone.run(AbstractStandalone.java:87)
    at serposcope.lifecycle.Daemon.start(Daemon.java:19)
    at serposcope.lifecycle.Daemon.main(Daemon.java:15)
Caused by: java.lang.IllegalStateException: The file is locked: nio:/Users/Awesomeness/serposcope/db.mv.db [1.4.189/7]
    at org.h2.mvstore.DataUtils.newIllegalStateException(DataUtils.java:773)
    at org.h2.mvstore.FileStore.open(FileStore.java:172)
    at org.h2.mvstore.MVStore.<init>(MVStore.java:342)
    at org.h2.mvstore.MVStore$Builder.open(MVStore.java:2884)
    at org.h2.mvstore.db.MVTableEngine$Store.open(MVTableEngine.java:154)
    ... 57 more
Mac:~ Awesomeness$ java -Dserposcope.conf=/path/to/serposcope.conf -jar serposcope.jar
starting serposcope service
[2016-01-26 19:53:24,144] [NinjaJetty] INFO  c.SerposcopeConf - serposcope.version          : 2.1.0
[2016-01-26 19:53:24,146] [NinjaJetty] INFO  c.SerposcopeConf - serposcope.datadir          : /Users/Awesomeness/serposcope
[2016-01-26 19:53:24,146] [NinjaJetty] INFO  c.SerposcopeConf - serposcope.logdir           : /Users/Awesomeness/serposcope/logs
[2016-01-26 19:53:24,146] [NinjaJetty] INFO  c.SerposcopeConf - serposcope.db.url           : jdbc:h2:/Users/Awesomeness/serposcope/db;MODE=MySQL
[2016-01-26 19:53:24,146] [NinjaJetty] INFO  c.SerposcopeConf - serposcope.db.debug         : false
[2016-01-26 19:53:24,146] [NinjaJetty] INFO  c.SerposcopeConf - serposcope.listenAddress    : 0.0.0.0
[2016-01-26 19:53:24,146] [NinjaJetty] INFO  c.SerposcopeConf - serposcope.listenPort       : 7134
[2016-01-26 19:53:24,199] [NinjaJetty] WARN  o.e.j.s.h.ContextHandler - Empty contextPath
[2016-01-26 19:53:24,215] [NinjaJetty] INFO  s.l.MyNinjaJetty - Trying to start jetty vnull on 0.0.0.0:7134
[2016-01-26 19:53:24,456] [NinjaJetty] INFO  c.Module - now logging to /Users/Awesomeness/serposcope/logs/2016-01-26.log
Can't establish connection to database
org.h2.jdbc.JdbcSQLException: Database may be already in use: null. Possible solutions: close all other connection(s); use the server mode [90020-189]
    at org.h2.message.DbException.getJdbcSQLException(DbException.java:345)
    at org.h2.message.DbException.get(DbException.java:168)
    at org.h2.mvstore.db.MVTableEngine$Store.convertIllegalStateException(MVTableEngine.java:187)
    at org.h2.mvstore.db.MVTableEngine$Store.open(MVTableEngine.java:167)
    at org.h2.mvstore.db.MVTableEngine.init(MVTableEngine.java:99)
    at org.h2.engine.Database.getPageStore(Database.java:2450)
    at org.h2.engine.Database.open(Database.java:672)
    at org.h2.engine.Database.openDatabase(Database.java:269)
    at org.h2.engine.Database.<init>(Database.java:263)
    at org.h2.engine.Engine.openSession(Engine.java:65)
    at org.h2.engine.Engine.openSession(Engine.java:175)
    at org.h2.engine.Engine.createSessionAndValidate(Engine.java:153)
    at org.h2.engine.Engine.createSession(Engine.java:136)
    at org.h2.engine.Engine.createSession(Engine.java:28)
    at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:349)
    at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:107)
    at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:91)
    at org.h2.Driver.connect(Driver.java:72)
    at java.sql.DriverManager.getConnection(DriverManager.java:664)
    at java.sql.DriverManager.getConnection(DriverManager.java:270)
    at com.serphacker.serposcope.di.db.DataSourceProvider.get(DataSourceProvider.java:40)
    at com.serphacker.serposcope.di.db.DataSourceProvider.get(DataSourceProvider.java:21)
    at com.google.inject.internal.ProviderInternalFactory.provision(ProviderInternalFactory.java:81)
    at com.google.inject.internal.InternalFactoryToInitializableAdapter.provision(InternalFactoryToInitializableAdapter.java:53)
    at com.google.inject.internal.ProviderInternalFactory.circularGet(ProviderInternalFactory.java:61)
    at com.google.inject.internal.InternalFactoryToInitializableAdapter.get(InternalFactoryToInitializableAdapter.java:45)
    at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
    at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1103)
    at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
    at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:145)
    at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41)
    at com.google.inject.internal.InternalInjectorCreator$1.call(InternalInjectorCreator.java:205)
    at com.google.inject.internal.InternalInjectorCreator$1.call(InternalInjectorCreator.java:199)
    at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1092)
    at com.google.inject.internal.InternalInjectorCreator.loadEagerSingletons(InternalInjectorCreator.java:199)
    at com.google.inject.internal.InternalInjectorCreator.injectDynamically(InternalInjectorCreator.java:180)
    at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:110)
    at com.google.inject.Guice.createInjector(Guice.java:96)
    at ninja.Bootstrap.initInjector(Bootstrap.java:204)
    at ninja.Bootstrap.boot(Bootstrap.java:94)
    at ninja.servlet.NinjaServletListener.createNinjaBootstrap(NinjaServletListener.java:131)
    at ninja.servlet.NinjaServletListener.getInjector(NinjaServletListener.java:109)
    at com.google.inject.servlet.GuiceServletContextListener.contextInitialized(GuiceServletContextListener.java:47)
    at ninja.servlet.NinjaServletListener.contextInitialized(NinjaServletListener.java:61)
    at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:800)
    at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:444)
    at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:791)
    at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:294)
    at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:741)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
    at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132)
    at org.eclipse.jetty.server.Server.start(Server.java:387)
    at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114)
    at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61)
    at org.eclipse.jetty.server.Server.doStart(Server.java:354)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
    at ninja.standalone.NinjaJetty.doStart(NinjaJetty.java:107)
    at ninja.standalone.AbstractStandalone.start(AbstractStandalone.java:166)
    at ninja.standalone.AbstractStandalone.run(AbstractStandalone.java:87)
    at serposcope.lifecycle.Daemon.start(Daemon.java:19)
    at serposcope.lifecycle.Daemon.main(Daemon.java:15)
Caused by: java.lang.IllegalStateException: The file is locked: nio:/Users/Awesomeness/serposcope/db.mv.db [1.4.189/7]
    at org.h2.mvstore.DataUtils.newIllegalStateException(DataUtils.java:773)
    at org.h2.mvstore.FileStore.open(FileStore.java:172)
    at org.h2.mvstore.MVStore.<init>(MVStore.java:342)
    at org.h2.mvstore.MVStore$Builder.open(MVStore.java:2884)
    at org.h2.mvstore.db.MVTableEngine$Store.open(MVTableEngine.java:154)
    ... 57 more

Last edited by NawtyBoy (2016-01-26 14:42:20)

Offline

#8 2016-01-26 14:44:48

serphacker
Administrator
Registered: 2014-06-13
Posts: 411

Re: restart serposcope service in CentOS

Your database is locked, it happens if you launch serposcope multiple times simultaneously. It is very likely there is already another instance of serposcope running. Try to spot it and process list and kill it.

Offline

#9 2016-03-03 08:47:51

alexbertran
Member
Registered: 2016-03-03
Posts: 7

Re: restart serposcope service in CentOS

I have CPanel as well, and sometimes forget to place whole database name and user:

CPanel databases typically use db names such as "domainusername_database" and user such as "domainusername_user"

Offline

Board footer