2012-11-03 31 views
6

Tôi đã theo hướng dẫn để cài đặt ActiveMQ http://servicebus.blogspot.com/2011/02/installing-apache-active-mq-on-ubuntu.htmlThiết lập ActiveMQ

Tôi không hoàn toàn hiểu được phần này của hướng dẫn

Now, you must create the data/jmx.password and data/jmx.access files 

Làm thế nào tôi nên làm việc này ra?

Tôi cố gắng chạy dịch vụ bằng

sudo /etc/init.d/activemq start 

và tôi nhận được phản ứng này

INFO: Loading '/etc/default/activemq' 
INFO: Using java '/usr/bin/java' 
INFO: Starting - inspect logfiles specified in logging.properties and log4j.properties 
to get details 
INFO: changing to user 'activemq' to invoke java 
No directory, logging in with HOME=/ 
INFO: pidfile created : '/opt/activemq/data/activemq-iandjx-GA-MA785GMT-USB3.pid' (pid 
'6092') 

nhưng tôi vẫn không thể kết nối với

http://localhost:8161 

Cảm ơn trước.

Tôi cũng đã cố gắng sudo apt-get install activemq sau đó

activemq 

đó đã cho tôi

INFO: Loading '/usr/share/activemq/activemq-options' 
INFO: Using java '/usr/lib/jvm/java-6-openjdk//bin/java' 
mkdir: missing operand 
Try `mkdir --help' for more information. 
/usr/bin/activemq: 399: /usr/bin/activemq: /usr/lib/jvm/java-6-openjdk//bin/java -Xms512M -Xmx512M -Dorg.apache.activemq.UseDedicatedTaskRunner=true    -Dactivemq.classpath="/var/lib/activemq/conf;"    -Dactivemq.home="/usr/share/activemq"    -Dactivemq.base="/var/lib/activemq/"    -Dactivemq.conf="/var/lib/activemq/conf"    -Dactivemq.data="/var/lib/activemq/data"        -jar "/usr/share/activemq/bin/run.jar" : not found 
Tasks provided by the sysv init script: 
    restart   - stop running instance (if there is one), start new instance 
    console   - start broker in foreground, useful for debugging purposes 
    status   - check if activemq process is running 
    setup   - create the specified configuration file for this init script 
         (see next usage section) 

Configuration of this script: 
    The configuration of this script can be placed on /etc/default/activemq or /home/iandjx/.activemqrc. 
    To use additional configurations for running multiple instances on the same operating system 
    rename or symlink script to a name matching to activemq-instance-<INSTANCENAME>. 
    This changes the configuration location to /etc/default/activemq-instance-<INSTANCENAME> and 
    $HOME/.activemqrc-instance-<INSTANCENAME>. Configuration files in /etc have higher precedence. 
+0

có cùng sự cố – RollRoll

Trả lời

1

để bắt đầu máy chủ trong chế độ tương tác, đi đến/bin và chạy ./activemq console

1

ActiveMQ bắt đầu

nên hoạt động để bắt đầu.

tình trạng ActiveMQ

nên nói nếu dịch vụ đang chạy hay không.

Có thể là bạn phải chạy một lần để tạo ra các tập tin PID, và sau đó chạy lại để làm cho nó hoạt động, như describer trong câu trả lời này: Activemq will not start on my Ubuntu VM

Trong trường hợp nó đang chạy và bạn chỉ có thể 't kết nối với web console, kiểm tra này Q khác/A: ActiveMQ console not available

1

kiểm tra/etc/default/ActiveMQ cho dòng này và lưu ý tên người dùng và mật khẩu:

ACTIVEMQ_SUNJMX_CONTROL="--jmxurl service:jmx:rmi:///jndi/rmi://127.0.0.1:1099/j 
mxrmi --jmxuser USERNAME --jmxpassword PASSWORD" 

tập tin của bạn nên jmx.password chứa tên người dùng/mật khẩu cặp

USERNAME PASSWORD 

tập tin jmx.access của bạn nên chứa tên người dùng tiếp theo readwrite

USERNAME readwrite 
0

sudo là cần thiết.

bin$ sudo ./activemq start 
bin$ sudo ./activemq status 
INFO: Loading '/opt/runtime/apache-activemq-5.11.1/bin/env' 
INFO: Using java '/usr/bin/java' 
ActiveMQ is running (pid '29887') 
0

mở tập tin vim/etc/default/ActiveMQ và dòng chú thích # ACTIVEMQ_USER = "ActiveMQ"

bây giờ hãy vào thư mục bin trong apache-ActiveMQ và chạy nó bằng cách sử dụng lệnh ./activemq bắt đầu