I'm starting Solr with this command:

bin\solr.cmd start -cloud -p 8983 -s solr\node1\solr -m 8g -z
"localhost:9981,localhost:9982,localhost:9983"

bin\solr.cmd start -cloud -p 8984 -s solr\node2\solr -m 8g -z
"localhost:9981,localhost:9982,localhost:9983"

Regards,
Edwin

On 30 April 2017 at 13:52, Mike Drob <md...@apache.org> wrote:

> It might depend some on how you are starting Solr (I am less familiar with
> Windows) but you will need to give each instead a separate log4j.properties
> file and configure the log location in there.
>
> Also check out the Solr Ref Guide section on Configuring Logging,
> subsection Permanent Logging Settings.
>
> https://cwiki.apache.org/confluence/display/solr/Configuring+Logging
>
> Mike
>
> On Sat, Apr 29, 2017, 12:24 PM Zheng Lin Edwin Yeo <edwinye...@gmail.com>
> wrote:
>
> > Yes, both Solr instances are running in the same hardware.
> >
> > I believe they are pointing to the same log directories/config too.
> >
> > How do we point them to different log directories/config?
> >
> > Regards,
> > Edwin
> >
> >
> > On 30 April 2017 at 00:36, Mike Drob <md...@apache.org> wrote:
> >
> > > Are you running both Solr instances in the same hardware and pointing
> > them
> > > at the same log directories/config?
> > >
> > > On Sat, Apr 29, 2017, 2:56 AM Zheng Lin Edwin Yeo <
> edwinye...@gmail.com>
> > > wrote:
> > >
> > > > Hi,
> > > >
> > > > I'm using Solr 6.4.2 on SolrCloud, and I'm running 2 replica of Solr.
> > > >
> > > > When I start the replica, I will encounter this error message. It is
> > > > probably due to the Solr log, as both the main and the replica are
> > trying
> > > > to access the same solr_gc.log.0.current file.
> > > >
> > > > Is there anyway to prevent this?
> > > >
> > > > Besides this error message, the rest of the Solr for both main and
> > > replica
> > > > are running normally.
> > > >
> > > > Exception in thread "main" java.nio.file.FileSystemException:
> > > > C:\edwin\solr\server\logs\solr_gc.log.0.current ->
> > > > C:\edwin\solr\server\logs\archived\solr_gc.log.0.current: The
> process
> > > >  cannot access the file because it is being used by another process.
> > > >
> > > >         at
> > > > sun.nio.fs.WindowsException.translateToIOException(
> WindowsException.j
> > > > ava:86)
> > > >         at
> > > > sun.nio.fs.WindowsException.rethrowAsIOException(
> WindowsException.jav
> > > > a:97)
> > > >         at sun.nio.fs.WindowsFileCopy.move(WindowsFileCopy.java:387)
> > > >         at
> > > > sun.nio.fs.WindowsFileSystemProvider.move(
> WindowsFileSystemProvider.j
> > > > ava:287)
> > > >         at java.nio.file.Files.move(Files.java:1395)
> > > >         at
> > > > org.apache.solr.util.SolrCLI$UtilsTool.archiveGcLogs(
> SolrCLI.java:357
> > > > 9)
> > > >         at
> > > > org.apache.solr.util.SolrCLI$UtilsTool.runTool(SolrCLI.java:3548)
> > > >         at org.apache.solr.util.SolrCLI.main(SolrCLI.java:250)
> > > > "Failed archiving old GC logs"
> > > > Exception in thread "main" java.nio.file.FileSystemException:
> > > > C:\edwin\solr\server\logs\solr-8983-console.log ->
> > > > C:\edwin\solr\server\logs\archived\solr-8983-console.log: The
> process
> > > >  cannot access the file because it is being used by another process.
> > > >
> > > >         at
> > > > sun.nio.fs.WindowsException.translateToIOException(
> WindowsException.j
> > > > ava:86)
> > > >         at
> > > > sun.nio.fs.WindowsException.rethrowAsIOException(
> WindowsException.jav
> > > > a:97)
> > > >         at sun.nio.fs.WindowsFileCopy.move(WindowsFileCopy.java:387)
> > > >         at
> > > > sun.nio.fs.WindowsFileSystemProvider.move(
> WindowsFileSystemProvider.j
> > > > ava:287)
> > > >         at java.nio.file.Files.move(Files.java:1395)
> > > >         at
> > > > org.apache.solr.util.SolrCLI$UtilsTool.archiveConsoleLogs(
> SolrCLI.jav
> > > > a:3608)
> > > >         at
> > > > org.apache.solr.util.SolrCLI$UtilsTool.runTool(SolrCLI.java:3551)
> > > >         at org.apache.solr.util.SolrCLI.main(SolrCLI.java:250)
> > > > "Failed archiving old console logs"
> > > > Exception in thread "main" java.nio.file.FileSystemException:
> > > > C:\edwin\solr\server\logs\solr.log -> C:\edwin\solr\server\logs\
> > > solr.log.1:
> > > > The process cannot access the file because i
> > > > t is being used by another process.
> > > >
> > > >         at
> > > > sun.nio.fs.WindowsException.translateToIOException(
> WindowsException.j
> > > > ava:86)
> > > >         at
> > > > sun.nio.fs.WindowsException.rethrowAsIOException(
> WindowsException.jav
> > > > a:97)
> > > >         at sun.nio.fs.WindowsFileCopy.move(WindowsFileCopy.java:387)
> > > >         at
> > > > sun.nio.fs.WindowsFileSystemProvider.move(
> WindowsFileSystemProvider.j
> > > > ava:287)
> > > >         at java.nio.file.Files.move(Files.java:1395)
> > > >         at
> > > > org.apache.solr.util.SolrCLI$UtilsTool.rotateSolrLogs(
> SolrCLI.java:36
> > > > 51)
> > > >         at
> > > > org.apache.solr.util.SolrCLI$UtilsTool.runTool(SolrCLI.java:3545)
> > > >         at org.apache.solr.util.SolrCLI.main(SolrCLI.java:250)
> > > > "Failed rotating old Solr logs"
> > > > Waiting up to 30 to see Solr running on port 8984
> > > >
> > > >
> > > > Regards,
> > > > Edwin
> > > >
> > >
> >
>

Reply via email to