Cannot create directory: /comments

Helma Maassen March 13, 2017

In our JIRA DC installation we get the following errors:

"Error activating indexing with path 'null'" ... Cannot create directory: /comments, but I also saw errors about the /issues directory.
"Indexing is turned on, but index path [null] invalid - disabling indexing"
"File path not set - not indexing"

It seems that the index path is not set correctly, although the JIRA HOME IS set correctly:
"The jira.home directory '....../home_jira' is validated and locked for exclusive use by this instance"

Because of the lucene indexes that will be stored in the "caches" directory, we decided to create a local filesystem and link that into the home directory of the JIRA user. 

like this:
...../home_jira/caches --> /local-jira/caches

Can somebody shed some light on how to fix this?

 

Best Regards,

Helma.

 

1 answer

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 13, 2017

It suggests that your indexing directory is not fully read/write enabled for the user running JIRA.  Check the ownership and permissions of both the content of /local-jira and the contents of the home directory, including the symbolic link.

Helma Maassen March 13, 2017

Hi Nic,

Thanks for thinking along!

I also thought so at first glance.
But the directory it needs to create is ..../home_jira/caches/indexes/issues, and not (root)/issues.
The user is indeed not allowed to write in / wink

The problem seems to be in setting/keeping the base directory.

Best Regards,

Helma.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 14, 2017

If you've relocated the directory to /local/caches, then the process needs full read/write access in there.  I don't know what you mean by "setting/keeping the base directory"

Helma Maassen March 14, 2017

hi Nic,

I do not want the indexes to be relocated in an other path, the caches/indexes directory is residing in the JIRA home directory.

When JIRA gets to create the issues, comments and other subdirectories in the normal "standard" directory (home_jira/caches/indexes), it is not able to determine the base directory anymore. The base directory will become <null>, so the subdirectories it is trying to create are:

<null>/issues
<null>/comments
<null>/changes
<null/... 

all resulting in trying to create
/issues so in the root directory (where my user rightfully doesn't have write permissions)

Thanks for thinking along, this problem is bugging me for some days now ;-(

Best Regards,
Helma. 

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 14, 2017

I really don't understand what you've done then.  For the home directory to become empty, you would have to botch JIRA_HOME, but this is being reported correctly, so it's not that.  I don't know how you'd manage to clear it out like that. 

Could you go back and explain exactly what you have set up?

Helma Maassen March 15, 2017

Ok,

Back to the basics, first of all, I'm using JIRA 7.1.1 (atlassian-jira-software-7.1.1-jira-7.1.1.tar.gz)

I did some extra testing (and planning to perform extra scenarios wink)

Scenario 1:

  • Untarred the tar.gz file
  • Added jira.home to the jira-application.properties
  • Changed ojdbc driver
  • Started jira
  • Setup with internal database
  • Works fine, although I see "Indexing is turned on, but index path [null] invalid - disabling indexing" in catalina.out

Scenario 2:

  • Untarred the tar.gz file
  • Added jira.home to the jira-application.properties
  • Changed ojdbc driver
  • Added cluster.properties
    • jira.node.id = nlseir131

    • jira.shared.home = /opt/atlassian/home_sajira/shared

  • Created the /opt/atlassian/home_sajira/shared directory
  • Started jira
  • Setup with internal database
  • Fails at the SetupApplicationProperties!default.jspa page after entering the Application Title and stuff, and pressing Next. The following error shows up in catalina.out

    Error activating indexing with path 'null':
    com.atlassian.jira.util.RuntimeIOException: java.io.IOException: Cannot create directory: /comments

 

Any ideas?

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 15, 2017

Right.  Could you tell us what jira.home is set to exactly in scenario 1?  (I think there's something very broken in 1 which you're then copying over to 2)

 

Helma Maassen March 15, 2017

hi Nic,

For both scenarios I changed jira-application.properties to:

jira.home = /opt/atlassian/home_sajira/

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 16, 2017

RIght, so a different place to where you first said.  That's ok, but you need to be consistent about it.  could you now list out all the config files you have customised away from a standard installation?

 

Helma Maassen March 16, 2017

hi Nic,

So my enviroment is setup like this:

For both scenarios:

/opt/atlassian/jira/atlassian-jira-software-7.1.1-standalone/ for the JIRA software
/opt/atlassian/jira/atlassian-jira-software-7.1.1-standalone/atlassian-jira/WEB-INF/classes/jira-application.properties :

  • jira.home = /opt/atlassian/home_sajira

/opt/atlassian/home_sajira/ user home for sajira
The full tree of /opt/atlassian is owned by user sajira
The database is empty 

And only for scenario 2:
It's all the same as scenario 1, and started with a clean slate all over again (incl empty database)
/opt/atlassian/home_sajira/shared created an empty directory for that
/opt/atlassian/home_sajira/cluster.properties:

  • jira.node.id = nlseir131
  • jira.shared.home = /opt/atlassian/home_sajira/shared

 

Suggest an answer

Log in or Sign up to answer