前面介绍了对于confluence和jira的破解版安装记录,下面简单记录下confluence和jira结合配置:
安装顺序:先安装Jira,然后安装Confluence,在Confluence安装过程中去连接jira,既Confluence用户目录回去主动同步jira的用户目录。这样,在jira里创建用户就会自动同步到Confluence里,双方登陆的用户是一样的(最好是先在jira里创建用户,然后同步到Confluence里)。在同一个session环境下,可以使用同样的账号登陆jira和Confluence。(但是在切换登陆时仍然需要输入密码,要想切换登陆时不需要登陆密码,即实现单点登录,则需要基于Crowd实现,这样就不做介绍了)。
下面粘贴下Confluence安装中连接jira的截图:
1)在jira里创建的用户,会主动给用户发送一封邮件,点击邮件可以重置密码。使用该用户登录后,点击左上角图标,切换到confluence后进行该用户的界面
设置,这样该用户才能载入到confluence用户目录下。
2)在jira里创建和删除用户,默认confluence同步是需要一段时间的。如果用户同步不及时,可以手动同步,即点击"用户目录"->"同步",即手动同步用户目录即可!(删除用户最后先在jira里删除,然后Confluence同步用户)
一般来说,用户创建(建议使用"邀请用户"的方式创建用户)的规则:
1)如果jira和Confluence都需要创建用户,就先在jira上创建用户,然后Confluence同步。
2)如果只需要Confluence账号,不需要jira账号。那么就在Confluence上"邀请用户"注册账号,然后同步到jira上的账号默认不能登录,需要将用户添加到jira的相关用户组内才能够登录。
=================================================
如何查看破解后的的jira和Confluence到期时间
1)查看jira的到期时间。如下可知,jira到期时间是2033年2月8号
2)查看Confluence的到期时间。如下可知,Confluence离到期时间还有957个月零7天20小时
========================================Confluence问题================================================
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
|
1)问题一:
JVM 堆内存溢出,导致confluence访问慢或程序直接跑死问题
查看
/opt/atlassian/confluence/logs/catalina
.out日志,报错信息为:
java.lang.OutOfMemoryError: Direct buffer memory
解决办法:增大JVM内存,做法如下:
在bin
/catalina
.sh脚本文件里添加下面一行内容,具体内存增加到多少,要根据自己服务器的实际内存来考虑(比如我的机器是128G,这里我调整到24G)
[root@
file
-server ~]
# vim /opt/atlassian/confluence/bin/catalina.sh
......
JAVA_OPTS=
'-Xms20480m -Xmx20480m -XX:PermSize=10240M -XX:MaxNewSize=10240m -XX:MaxPermSize=5120m'
[root@
file
-server ~]
# /etc/init.d/confluence restart
--------------------------------------------------------------------------------------------------------------
2)问题二:
confluence正常启动,8090端口也顺利起来了,但是confluence访问报错404!
[root@
file
-server ~]
# tail -f [root@file-server ~]# tail -f /opt/atlassian/confluence/logs/catalina.out
........
11-Jan-2018 09:10:46.527 SEVERE [http-nio-8090-
exec
-6] org.springframework.web.socket.sockjs.client.SockJsClient.doHandshake Initial SockJS
"Info"
request to server failed,
url=ws:
//127
.0.0.1:8091
/synchrony/sockjs/v1org
.springframework.web.client.ResourceAccessException: I
/O
error on GET request
for
"http://127.0.0.1:8091/synchrony/sockjs/v1/info"
:
Connection refused (Connection refused); nested exception is java.net.ConnectException: Connection refused (Connection refused)
at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:607)
at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:572)
at org.springframework.web.socket.sockjs.client.RestTemplateXhrTransport.executeInfoRequestInternal(RestTemplateXhrTransport.java:138)
at org.springframework.web.socket.sockjs.client.AbstractXhrTransport.executeInfoRequest(AbstractXhrTransport.java:153)
at org.springframework.web.socket.sockjs.client.SockJsClient.getServerInfo(SockJsClient.java:286)
at org.springframework.web.socket.sockjs.client.SockJsClient.doHandshake(SockJsClient.java:254)
at org.springframework.web.socket.sockjs.client.SockJsClient.doHandshake(SockJsClient.java:236)
at com.atlassian.synchrony.proxy.websocket.WebSocketProxy.afterConnectionEstablished(WebSocketProxy.java:49)
at org.springframework.web.socket.handler.PerConnectionWebSocketHandler.afterConnectionEstablished(PerConnectionWebSocketHandler.java:81)
特别注意:
confluence和jira的日志不只是只在
/opt/atlassian/confluence/logs
和
/opt/atlassian/jira/logs
下面,有时只根据这里面的日志是看不到具体报错的!
还需要去confluence和jira的数据目录
/var/atlassian/application-data
下面查看日志,可以通过这里面的日志信息进行排错。
日志分别为
/var/atlassian/application-data/jira/log/atlassian-jira
.log和
/var/atlassian/application-data/confluence/logs/atlassian-confluence
.log
以上报错查看confluence日志如下
[root@
file
-server ~]
# tail -f /var/atlassian/application-data/confluence/logs/atlassian-confluence.log
......
org.springframework.beans.factory.BeanCreationException: Error creating bean with name
'hostComponentProvider'
: Injection of autowired dependencies failed; nested exception is
org.springframework.beans.factory.BeanCreationException: Could not autowire method: public void com.atlassian.plugin.spring.SpringHostComponentProviderFactoryBean.setSpringHos
tComponentProviderConfig(com.atlassian.plugin.spring.SpringHostComponentProviderConfig); nested exception is org.springframework.beans.factory.BeanCreationException: Error cre
ating bean with name
'bundledPluginLoader'
defined
in
class path resource [services
/pluginServiceContext
.xml]: Cannot resolve reference to bean
'osgiPluginFactory'
while
setting
constructor argument with key [1]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name
'osgiPluginFactory'
defined
in
class
path resource [services
/pluginServiceContext
.xml]: Cannot resolve reference to bean
'osgiPersistentCache'
while
setting constructor argument; nested exception is org.springframework.
beans.factory.BeanCreationException: Error creating bean with name
'osgiPersistentCache'
: FactoryBean threw exception on object creation; nested exception is com.atlassian.plugin.osgi.
container.OsgiContainerException: Unable to clean the cache directory:
/var/atlassian/application-data/confluence/plugins-osgi-cache/felix
通过上面的日志错误信息可知,是由于cache缓存目录的权限不对造成的:
[root@
file
-server ~]
# ll -d /var/atlassian/application-data/confluence/plugins-osgi-cache
drwxr-xr-x 5 root root 4096 Nov 9 10:54
/var/atlassian/application-data/confluence/plugins-osgi-cache
plugins-osgi-cache目前权限是root,confluence程序权限是confluence,所以不能创建缓存数据。将其权限修改为confluence即可!
建议可以将
/var/atlassian/application-data/confluence
下的目录权限全部修改为confluence.confluence。
[root@
file
-server ~]
# chown -R confluence.confluence /var/atlassian/application-data/confluence/plugins-osgi-cache
[root@
file
-server ~]
# ll -d /var/atlassian/application-data/confluence/plugins-osgi-cache
drwxr-xr-x 5 confluence confluence 4096 Nov 9 10:54
/var/atlassian/application-data/confluence/plugins-osgi-cache
如上修改后,访问confluence就正常了(可以不用重启confluence)
--------------------------------------------------------------------------------------------------------------
问题三:
confluence登陆后,上传附件报错:Could not upload the
file
to Confluence. The server may be unavailable
查看日志:
[root@
file
-server ~]
# tail -f /var/atlassian/application-data/confluence/logs/atlassian-confluence.log
......
javax.servlet.jsp.jspException: java.lang.RuntimeException: Error creating temp
file
in
folder:
/var/atlassian/application-data/confluence/attachments/ver003/21/87/4587521/92/247/3997842/5144597
javax.servlet.error.exception: java.lang.RuntimeException: Error creating temp
file
in
folder:
/var/atlassian/application-data/confluence/attachments/ver003/21/87/4587521/92/247/3997842/5144597
由此可以看出,附件不能上传的原因是由于权限问题导致的,解决如下:
[root@
file
-server ~]
# ll -d /var/atlassian/application-data/confluence/attachments/ver003/
drwxr-xr-x 11 root root 4096 Jan 9 09:14
/var/atlassian/application-data/confluence/attachments/ver003/
[root@
file
-server ~]
# chown -R confluence.confluence /var/atlassian/application-data/confluence/attachments
[root@
file
-server ~]
# ll -d /var/atlassian/application-data/confluence/attachments/ver003/
drwxr-xr-x 11 confluence confluence 4096 Jan 9 09:14
/var/atlassian/application-data/confluence/attachments/ver003/
|