youngmon/atlassian-qna huggingface dataset:
service confluence stop needs to be killed after installation
Asked by Schups:

Yesterday I installed Confluence clean on a cleanly installed CentOS. No data imported yet, no users accessing it yet.

The problem is this: when I stop confluence server via the usual "service confluence stop" it always get "Tomcat did not stop in time" "The Tomcat process has been killed" together with lots of exceptions in the log file.

I do not think it is normal after a clean installation. I do not feel confident about putting this in production for my users.

Via Browser to the users Confluence seems to be working all right despite this situation.

Any thoughts / suggestions on how to proceed?

Version: 6.12.2

Last message log before the forced process kill:

"30-Nov-2018 06:44:22.364 INFO \[localhost-startStop-4\] org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler.shutdown Shutting down ExecutorService 'defaultSockJsTaskScheduler'"


Answers:
author: Schups
body: Thank you, will try that.

Is it dangerous to have it killed? E.g. if not all is written to the DB at the kill time...

comments: author: roman
body: I don't think there is much risk in killing the process if it hasn't stopped in time.

If you would like to feel safe in this regard, set the wait time to 60 seconds. If the process won't stop within this time frame, you can kill it without any risk.

Roman.


author: roman
body: Hi [@Schups](/t5/user/viewprofilepage/user-id/1795812),

By default a Tomcat server gives an application 5 seconds to terminate before the "Tomcat did not stop in time. PID file was not removed." messages is logged.

I have just checked my local Confluence 6.12.1 installation, and in the stop-confluence.sh file I have the parameter set to 20 seconds.

5 or even 20 seconds might not be a lot of time for Confluence to stop (even without any data), especially when the application needs to close a connection pool or perform some cleanup tasks.

The fix is documented in the catalina command:

```
Usage: catalina.sh ( commands ... )
stop Stop Catalina, waiting up to 5 seconds for the process to end
 stop n Stop Catalina, waiting up to n seconds for the process to end
 stop -force Stop Catalina, wait up to 5 seconds and then use kill -KILL if still running
 stop n -force Stop Catalina, wait up to n seconds and then use kill -KILL if
```

Changing a timeout parameter to the shutdown command will give Confluence the time it needs to perform a clean shutdown. You can change the timeout value (the number after "shutdown.sh" in stop-confluence.sh:

```
exec $PRGDIR/shutdown.sh 20 -force $@
```

Hope this helps.

Roman.


Tags: confluence-server

server
attachments are not deleted
Asked by Daniil Krol:

Good day. Attachments are not deleted. Here is a link to the video how it looks. I rummaged everything, I am the administrator of the portal.

<https://yadi.sk/i/At8Li5gSUpBWVw>

How to solve a problem?


Answers:
author: Daniil Krol
body: Thanks - [https://jira.atlassian.com/browse/CONFSERVER-37862?utm_source=STP\&utm_medium=logScan](https://jira.atlassian.com/browse/CONFSERVER-37862?utm_source=STP&utm_medium=logScan)


author: Nic Brough -Adaptavist-
body: Ok, that suggests a failure on the back-end.

Could you read the application log for errors occuring at the time you try a delete? There should be something in \<confluence home\>/log/atlassian-confluence.log (but check other logs in that directory for errors too)


author: Daniil Krol
body: I click delete, the confirmation dialog appears - OK. I press the OK button, it appears, and nothing happens. And so with all the files.


author: Nic Brough -Adaptavist-
body: Could you tell us what exactly is wrong? (The video doesn't work)
Confluence doesn't caching extra javascript resources
Asked by V?ctor Ayll?n:

Hi, I'm trying to include an extra javascript resource using the "Insert Custom HTML" field in the confluence configuration.

I've included this line in the field:

\<script type="text/javascript" src="/includes/js/jquery.sticky.js"\>\</script\>

![Captura de pantalla 2018-11-30 a las 1.20.48.png](https://community.atlassian.com/t5/image/serverpage/image-id/39001i8C5FCE7A7C9D385C/image-size/large?v=v2&px=999 "Captura de pantalla 2018-11-30 a las 1.20.48.png")

It works well in Chrome / Safari / IExplorer browsers, but when I try to access to Confluence with Firefox I'm getting a very slow response loading the pages.

Looking the Network load when loading the pages I can see that the included resource is loading very slow. Confluence is not caching the .js file and every load takes more than 20 seconds !

![Captura de pantalla 2018-11-30 a las 1.22.15.png](https://community.atlassian.com/t5/image/serverpage/image-id/39002i9F775773F753774C/image-size/large?v=v2&px=999 "Captura de pantalla 2018-11-30 a las 1.22.15.png")

Is there any other way to include this resource?


Answers:
author: Tobias Anstett _K15t_
body: Hi [@V?ctor Ayll?n](/t5/user/viewprofilepage/user-id/2091424),

If you know how to develop a simple confluence app the web resource plugin module could help you \>\> <https://developer.atlassian.com/server/framework/atlassian-sdk/web-resource-plugin-module/>

If you define a web resource with context alt.general (loaded everywhere except administration screen) and define a resource of type download for your js file there it will be merged in Confluence' batch js/css files.

Best, Tobias


author: Maksym Fedoryshyh
body: Can you please click on the request and inspect http response headers? I suspect that this resource comes with headers, which disable caching, that's why firefox tries to download it on every page load.

Confluence provides appropriate http caching headers for all resources it is aware about (f.e. registered plugin resources). The problem with custom resources is that Confluence doesn't know if it is appropriate to cache them (f.e. for security or legal reasons).

If *jquery.sticky.js* resource is served by Confluence (with "Insert Custom HTML" you can add any resources, f.e. hosted somewhere on cdn and not controlled by Confluence), you can add proper http caching rule by overriding [urlrevrite.xml](http://www.tuckey.org/urlrewrite/) in [your Confluence](https://community.atlassian.com/t5/Answers-Developer-Questions/How-to-use-Confluence-for-hostname-redirects/qaq-p/495650#M33307) (here you can find an [example for caching rule](https://stackoverflow.com/questions/18452125/caching-with-tuckey-urlrewrite))


Tags: confluence-server

server
Has anyone used Microsoft Flow HTTP connector to call Confluence REST APIs?
Asked by Byron Stoker:

I have a MS Flow setup to detect changes in Azure Dev Ops. When triggered I want to copy the content from the description of the work item and create a new page in Confluence containing the same content.

I am using the HTTP connector and passing the most simple JSON to demonstrate the idea.

Headers

{ "Content-Type": "application/json", "Accept": "application/json"}

Body

{ "type": "page", "title": "New Page Test6", "space": { "key": "TS" }, "body": { "storage": { "value": "\<p\>This is \<br/\> a new page\</p\>", "representation": "storage" } }}

When the flow is triggered I get a success code (i.e. Status = 200) even though Confluence did not actually create the page.

When I run the exact same JSON structure as CURL or through our Confluence API plug (../restbrowser#/resource/api-content/POST) it works just fine.

Looking for some guidance on what could possibly be the difference between the two approaches.

Thanks


Answers:
author: Chii
body: Can you find and put here the full request being sent by the Microsoft Flow Http Connector (e.g., include all the headers, and the method and body etc)? There must be something different between what is being sent by CURL and the Flow Http Connector.

Also, how is the authentication done? The REST api browser in the administration uses the cookies in the current user's browser. I expect you will need to use BASIC auth instead when making the REST api call from Microsoft Flow Http Connector.


Tags: confluence-server

server

status
Create Space Button missing
Asked by Gene Kilene:

What permissions are needed to have the Create Space button visible?


Answers:
author: Don Willis
body: You just need the Global "can use" and "Create Space(s)" global permissions:![View Global Permissions.png](https://community.atlassian.com/t5/image/serverpage/image-id/39011i0BC952B7DCD404F9/image-size/large?v=v2&px=999 "View Global Permissions.png")


author: Carol Jones
body: I believe you'll need System Administrator permissions to update this, but below is where it would be:

Navigate to your Confluence ***Global Permissions*** within the ***Confluence administration*** area. There, you'll find permissions broken out into four categories where you can associate individuals or groups: Personal Space, Create Space(s), Confluence Administrator, ***System Administrator***

I would add, be cautious opening Create Space(s) to everyone as folks can go space happy without any type of naming convention or reasoning, making it hard to navigate through and organize later. Also keep in mind that Confluence KEYS can not be updated once created, while the NAME can, so just ensure folks know to think about the creation process as they're getting started. ?
Is there a way to edit the favorite macro to add spaces between page links?
Asked by Jennifer Greiner:

Some users find it difficult to click the correct link when accessing confluence via mobile. Is there a way (maybe using a text editor) to manually set the Favorite Pages macro to include spaces between each link?


Answers:
author: Davin Studer
body: You could do this with some CSS. You could either put it in the space stylesheet or the global stylsheet depending upon how you want it deployed. Also, of note if yo use the content by label macro you can get more inks than just 5. Below is how you can do it either way you choose.

**Favorite Pages Macro:**

CSS Style:

```
.favpages-container td {padding-bottom: 15px;}
```

**Content By Label Macro:**

These screenshots show you how to set it up with the content by label macro.

![Capture1.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/38990i07C80F8DA2D83055/image-size/large?v=v2&px=999 "Capture1.PNG")![Capture2.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/38991i15F9A5106BE2F8D7/image-size/large?v=v2&px=999 "Capture2.PNG")

CSS Style:

```
.content-by-label li {margin-bottom: 15px;}
```

In this case you might want to make the CSS only on the page that the macro is on as opposed to the space or global stylesheet because it could affect lots of pages. You could do that with the html macro, or you could create your own stylesheet user macro. Code below.

**Macro Name:**   
style

**Macro Title:**   
CSS Stylesheet

**Macro Body Processing:**   
Unrendered

**Template:**

```
## Developed by: Davin Studer## Date created: 08/10/2018## @param media:title=Media|type=string|required=false|default=All|desc=Optionally specify which media types the style applies to, eg: print,aural,embossed## @param import:title=Import|type=string|required=false|desc=Optional URL for an external style sheet to import<style type="text/css">########################################################################################## Below CDATA fixes issue with greather than and less than symbols being escaped out ##########################################################################################/*<![CDATA[*/#if($parammedia && $parammedia != "" && $parammedia != "All")@media $parammedia {#end#if($paramimport && $paramimport != "")@import url($paramimport);#end$!body#if($parammedia && $parammedia != "" && $parammedia != "All")}#end/*]]>*/</style>
```


Tags: confluence-server

macro

server
unable to use the Confluence macro which embeds a JIRA issue on a page and unable to see calendar ev
Asked by Blacksky IT:

I have a user who is having an issue getting Confluence to talk to Jira. She made a test page and Jira does not reflect changes to the page. Plus, her calendar is not syncing. Any idea why this would happen and how I can fix it for her?


Answers:
author: Shannon S
body: Richard,

What sort of changes are you making to the Confluence page that isn't reflecting in Jira?

As for the Calendar syncing, can you let me know what you mean by that? Is it connected to an external calendar?

Does this only occur for the one user, but not anyone else on the instance?

Please also let me know what version Jira and Confluence are.

Thank you!

Shannon

comments: author: Blacksky IT
body: Hi Shannon,

We are trying to use the Confluence macro to embed a Jira ticket into a Confluence page. When Confluence asks the user to "Login and Approve," the Jira page is loaded in the background, but nothing happens.

The problem with the Calendars is that the team calendars are not syncing for users.

So far, I know the issue is affecting a handful of users and possibly more.

Jira version 7.7.0 and Confluence version 6.4.1 with Team Calendars version 6.0.25.

Thank you for your help!!


author: Shannon S
body: Hi Richard,

So from my understanding, you're having two separate issues.

1. You are using the Jira issues macro in a Confluence page to display a Jira ticket. It asks the user to login, they do, but the macro doesn't update in Confluence to display the issue.
2. There is an issue with getting your calendars to sync.

With the 2nd issue, I'm still not clear on what problem you're having. The Team Calendars app hosts the calendar itself so there's no syncing required. If you embed the calendar in a page using the macro, it will display the calendar as it is, again, no syncing is required.

Syncing is required when you subscribe to a Team Calendar via Google Calendar or Outlook, for example.

Could you describe the exact behavior you're experiencing with your Calendar?

As for your Application Link itself, I would recommend that you try to remove the application link and recreate it, and see if that helps.

Regards,

Shannon


Tags: confluence-server

jira-software

server
Is it possible to include a category or parent/ancestor to blogpost in confluence via API ?
Asked by Shaurya Chawla:

Currently POSTing the stuff to confluence blog using REST API(type:blogpost); creates new page and posts it by default under 2018. How can I have API json body include an ancestor or parent category instead of 2018 or under 2018 itself for categorizing the pages that will be posted?


Answers:
author: Diego
body: Hello there Shaurya!   

Currently, Confluence **does not have** a feature that allows blogposts to be categorized in such fashion, **with or without** REST.   
We can, however, **use labels** in blogposts to categorize them right after creation, with another call to REST. An example of such call is this:

```
curl -u username:password -X POST -H "Content-Type: application/json" -d '{"prefix": "global", "name": "abc"}' "https://myconfluence/rest/api/content/9999999999/label"
```

In this thread here, we have a customer who was able to implement the label via REST. The thread get to this at February 19:  
**[Add Lavel With REST API](https://community.atlassian.com/t5/Answers-Developer-Questions/Add-Label-with-REST-API/qaq-p/533938)**   

<br />

Also, you can take a look into our REST documentation for more insights on this:  
**[Confluence Server REST API examples](https://developer.atlassian.com/server/confluence/confluence-rest-api-examples/?_ga=2.211494421.160352870.1543847553-1770418407.1541684782)**   

While there is **no native method** to create categories for blogposts, a third-party add-on may be able to help you out. Just keep in mind that this plugin **may not work with** REST:  
**[Lively Blogs for Confluence](https://marketplace.atlassian.com/apps/1213057/lively-blogs-for-confluence?hosting=server&tab=overview)**   

Let the community know your thoughts!


Tags: atl-adm

developer
Confluence
Asked by Gina_Kollars:

I added Confluence to my free trial period (I have already setup and used JIRA Software). Where do I see/find Confluence? What I am reading seems to imply that it will just appear on my dashboard, under JIRA Software - or I should be able to click "SWITCH TO" and get to Confluence. However Confluence is not offered there.

Help!


Answers:
author: Alex Fox
body: Confluence is an entirely separate product and must be installed and configured as such: <https://confluence.atlassian.com/conf64/installing-confluence-on-windows-936511771.html>

Once installed and configured you can set up application links which will make Confluence appear in the "switch to" menu.
Relative Anchor Link on a Confluence Page
Asked by Changcheng Li:

I created a confluence page and added a anchor in the middle of the page. On the top of the page, I inserted a link to this anchor so user can quickly navigate to the anchor position as designed. Everything works great.   

Now my question is, when I make a copy of this page. The link (on the top of the page) on the 2nd copy of the page points to the anchor of the original page. We want the anchor to be relative when we copy the page. That means, the link on the new copy of this page should points to the anchor on the same copy of the page. Is there anyway we can do this?

Thanks.


Answers:
author: Davin Studer
body: Hmm. They are relative when I create an anchor, link to it, and then copy the page. Here is how I do it. Is this how you are doing it?

![Capture2.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/38994i8AAC759EB4D3AA9C/image-size/large?v=v2&px=999 "Capture2.PNG")![Capture1.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/38995i86A38982BE361AE2/image-size/large?v=v2&px=999 "Capture1.PNG")![Capture3.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/38996i41AE8B46D9A94390/image-size/large?v=v2&px=999 "Capture3.PNG")

comments: author: Tobias Anstett _K15t_
body: Same for me.
Atlassian Confluence REST API: Is it possible to suppress automatic alphabetical page ordering?
Asked by Tim Harms:

I am using the confluence REST API to create Pages in Confluence via python script. The Problem i?ve come across is, that after i created some pages they are in alphabetical order, and not the chronological order that i created them in.

Is it possible to suppress the automatic alphabetical ordering, or replace it with another ordering?

I know it is possible to reorder pages by hand, but that is not the solution i?m trying to find.


Answers:
author: Stephen Sifers
body: Hello Tim and welcome to the Community!

Using the Confluence REST API is a great time save for automation. The ability to change the sort order within Confluence from the REST API is not currently a feature. However, there is a feature request already placed to add this functionality as a feature. You can find more about the feature request for Server [CONFSERVER-40101](https://jira.atlassian.com/browse/CONFSERVER-40101) and for Cloud [CONFCLOUD-40101](https://jira.atlassian.com/browse/CONFCLOUD-40101). We would suggest you vote and watch these features to get future updates as they progress.

I hope this clarifies the sorting capabilities within the REST API for Confluence.

Regards,  
Stephen Sifers


Tags: atl-adm

confluence-server

server
How to make the export to word from confluence to respect the noprint macro?
Asked by Joao Flavio Mendonca:

Hello all,

I am trying to customize the export to word feature from confluence, however, I would like to remove the noprint content and the attachment plugin when exporting the file.

Someone has an idea how to do it?

I already used the same code for the export pdf but it is still not working....

Thanks in advance

Joao Flavio


Answers:
author: Joao Flavio Mendonca
body: Hello again Alex,

I add the !important in the code, but I still have the same issue, all the content is gone but the table is still appearing ... as you said it is very odd.

Thanks again

Best Regards

Joao Flavio


author: Alex Fox
body: You need to make sure the relevant .css file has a class to hide the noprint content:

```
div.noprint {

display:none

}
```

comments: author: Joao Flavio Mendonca
body: Hello Alex,

Thanks a lot for your answer, it is partially working...

All the content which is inside the no print "area" were not exported to the word document, however, in one of my no print "areas" I have a table which is still being exported to word.

By the way, is not a problem of my no print macro since when I export the same page in PDF the table doesn't appear in the document.

Thanks again

Best Regards

Joao Flavio


author: Alex Fox
body: Hi Joao,

It is very odd that you have some elements still showing. You could try making the class !important:   

```
div.noprint?{

display:none !important

}
```

I'm not sure this will work but it's worth a try


Tags: confluence-server

server
confluence backup
Asked by Padmasree P:

we have setup automatic xml back up in confluence with attachments. when the scheduled job is completed when the backup file will be placed in backup directory. is it immediate or at any specified time.


Answers:
author: Nic Brough -Adaptavist-
body: The scheduler runs the export using memory and temporary files, when the export is complete, the finished file is copied to the backup directory and the temporary files discarded.

comments: author: Padmasree P
body: hi Nic,

I see the schedule status as complete. but still the file is in temp directory and not moved to backup directory.

is there any issue on this. please help


author: Nic Brough -Adaptavist-
body: You'll need to read the log file to find out where the problem is.


Tags: confluence-server

server
Create a new macro
Asked by Beatriz Orfao E Vale Tabernero:

Hello!

I need to create a group mentions macro. I' ve been searching at the administrator's guide, and I've found that I have to go to User macros in the Confluence Administration Console, but i don't have that option, why?

Thank you

Beatriz


Answers:
author: Nic Brough -Adaptavist-
body: User macros are only available to Server users, I'd guess you are on Cloud?

comments: author: Beatriz Orfao E Vale Tabernero
body: Yes I am on Cloud, so is there any way to migrate from Cloud to Server user?


author: Nic Brough -Adaptavist-
body: Yes - see <https://confluence.atlassian.com/confcloud/migrate-from-confluence-cloud-to-server-724765578.html>


author: David at David Simpson Apps
body: That sounds dangerous. Just think how many emails would get sent if you [@Confluence](/t5/user/viewprofilepage/user-id/338789)-users   
?


author: Nic Brough -Adaptavist-
body: There is an App that can do it for server, and it has the rather useful default of "don't allow people to mention the login groups"


author: Davin Studer
body: What is the app if don't mind my asking. I'm not seeing it. I do see an app that does enable group mentioning, but it doesn't look to me like the one I'm seeing allows you to blacklist certain groups.