I am getting below Error in Fuse log. In order to solve it I thought I will give permission to db-32.log file but it doesn't allow me to change permission of this file. Instead I get a warning
"cannot change properties of db-32.log"
Please find below the error log
07:17:20,163 | INFO | AMQ-1-thread-1 | ActiveMQServiceFactory | 197 -
io.fabric8.mq.mq-fabric - 1.2.0.redhat-621084 | Broker amq failed to start.
Will try again in 10 seconds
07:17:20,163 | ERROR | AMQ-1-thread-1 | ActiveMQServiceFactory | 197 -
io.fabric8.mq.mq-fabric - 1.2.0.redhat-621084 | Exception on start:
/opt/install/jboss/jboss-fuse-6.2.1.redhat-084/data/amq/kahadb/db-32.log
(Permission denied)
java.io.FileNotFoundException: /opt/install/jboss/jboss-fuse-6.2.1.redhat-
084/data/amq/kahadb/db-32.log (Permission denied)
at java.io.RandomAccessFile.open0(Native Method)[:1.8.0_91]
at java.io.RandomAccessFile.open(RandomAccessFile.java:316)[:1.8.0_91]
at java.io.RandomAccessFile.<init>(RandomAccessFile.java:243)[:1.8.0_91]
Do you restart the broker under a different user than was previously used to run the broker?
Make sure the OS level user that runs the broker has full access to the configured KahaDB folder on the file system.
Related
I want to run my web application with mssql db sample which has already existed on my localdb. I have made configurations. But I have an error like below altough My .mdf and .ldf files are in there.
My Files Directory
Docker-compose.yaml
version: '3.4'
services:
mssql:
image: "microsoft/mssql-server-windows-developer"
container_name: mssql
ports:
- 1433:1433
environment:
ACCEPT_EULA: "Y"
SA_PASSWORD: "Asdf1234"
attach_dbs: '[{"dbName":"BlogAppDB","dbFiles":["C:\\DBs\\BlogAppDB.mdf","C:\\DBs\\BlogAppDB_log.ldf"]}]'
# volumes:
# - BlogDB:/var/opt/mssql/data
client:
build:
dockerfile: Blog.Web/Dockerfile
context: .
depends_on:
- mssql
Bash prompt
Successfully built a873eeb86600
Successfully tagged blogwebapplication_client:latest
Recreating mssql ... done
Recreating blogwebapplication_client_1 ... done
Attaching to mssql, blogwebapplication_client_1
client_1 | Hosting environment: Production
client_1 | Content root path: C:\app
client_1 | Now listening on: http://[::]:80
client_1 | Application started. Press Ctrl+C to shut down.
mssql | VERBOSE: Starting SQL Server
mssql | VERBOSE: Changing SA login credentials
mssql | VERBOSE: Attaching 1 database(s)
mssql | VERBOSE: Invoke-Sqlcmd -Query IF EXISTS (SELECT 1 FROM SYS.DATABASES WHERE NAME
mssql | = 'BlogAppDB') BEGIN EXEC sp_detach_db [BlogAppDB] END;CREATE DATABASE
mssql | [BlogAppDB] ON (FILENAME = N'C:\DBs\BlogAppDB.mdf'),(FILENAME =
mssql | N'C:\DBs\BlogAppDB_log.ldf') FOR ATTACH;
mssql | Msg 5121, Level 16, State 2, Server E5F7E0B18B1B, Line 1
mssql | The path specified by "C:\DBs\BlogAppDB.mdf" is not in a valid directory.
mssql | VERBOSE: Started SQL Server.
mssql |
mssql | TimeGenerated EntryType Message
mssql | ------------- --------- -------
mssql | 12/19/2019 9:53:33 AM FailureAudit Login failed. The login is from an untrus...
mssql | 12/19/2019 9:53:33 AM Error SSPI handshake failed with error code 0x8...
mssql | 12/19/2019 9:55:11 AM FailureAudit Login failed. The login is from an untrus...
mssql | 12/19/2019 9:55:11 AM Error SSPI handshake failed with error code 0x8...
mssql | 12/19/2019 9:55:33 AM FailureAudit Login failed. The login is from an untrus...
mssql | 12/19/2019 9:55:33 AM Error SSPI handshake failed with error code 0x8...
mssql | 12/19/2019 9:56:46 AM Information None
mssql | 12/19/2019 9:57:03 AM FailureAudit Login failed. The login is from an untrus...
mssql | 12/19/2019 9:57:03 AM Error SSPI handshake failed with error code 0x8...
Your data is on your local machine (host machine). It is not available in Docker (the Docker machine). You can map local machine directories to Docker machine ones using volumes. For example:
volumes:
- C:\\DBs\\BlogAppDB.mdf","C:\\DBs\\BlogAppDB_log.ldf:/var/opt/mssql/data
In your question, you had commented out the volumes. But the volume was named BlogDB. If you want to persist data in the Docker machine, that's fine. But to map a directory from your local machine, you need to provide a path (e.g., ./my-directory/).
If the Windows-style path doesn't seem to be working out, check out this QA.
I have IIS FTPS Server setup and am trying to connect from a Camel route. But I'm getting the error:
22 Sep 2019 08:59:51,650 | WARN | Camel (Test) thread #202 -
ftps://test#test1834:21/BO/Salary | FtpConsumer | 248 -
org.apache.camel.camel-core - 2.17.0.redhat-630347 | Cannot
connect/login to: ftps://test#test1834:21. Will skip this poll.
I can connect via FileZilla client and perform any read/write operation.
Credentials have been verified.
Camel-Core version 2.17.0
Is anyone familiar with this issue?
this flag "isImplicit=true" is no longer valid for Camel version 3.7.0
The new flag is "implicit=true"
Take a look at the endpoint configuration, you probably should set the security mode isImplicit=true
It seems, that in case using an ActiveMQ-Consumer the depending components are not shut down is the correct order.
As far as I can see, the JMSSessionPool is shutdown before the depending routes were closed.
This causes JMSEsception and each client routes will run into timeouts, before they are forced to shutdown.
Also the amq-broker ist removed before its depending routes.
<?xml version="1.0" encoding="UTF-8"?>
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0"
xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
http://camel.apache.org/schema/blueprint http://camel.apache.org/schema/blueprint/camel-blueprint.xsd">
<camelContext id="ObjectServerConnection" xmlns="http://camel.apache.org/schema/blueprint" >
<route id="test-aqm-shutdown-route">
<from uri="activemq:buffered-route?concurrentConsumers=5&asyncConsumer=5" />
<!--transacted ref="required" /-->
<convertBodyTo type="java.lang.String" />
<to uri="file:/out.txt" />
</route>
</camelContext>
</blueprint>
As I can see in logfile:
...
2016-12-08 11:48:53,003 | INFO | FelixShutdown | DefaultShutdownStrategy | 151 - org.apache.camel.camel-core - 2.16.4 | Starting to graceful shutdown 1 routes (timeout 300 seconds)
2016-12-08 11:49:02,336 | ERROR | [buffered-route] | faultJmsMessageListenerContainer | 145 - org.apache.servicemix.bundles.spring-jms - 3.2.17.RELEASE_1 | Could not refresh JMS Connection for destination 'buffered-route' - retrying in 5000 ms. Cause: Error while attempting to add new Connection to the pool; nested exception is javax.jms.JMSException: Could not create Transport. Reason: java.io.IOException: Broker named 'amq-broker' does not exist.
2016-12-08 11:49:07,339 | INFO | 5 - ShutdownTask | DefaultShutdownStrategy | 151 - org.apache.camel.camel-core - 2.16.4 | Route: test-aqm-shutdown-route shutdown complete, was consuming from: Endpoint[activemq://buffered-route?asyncConsumer=5&concurrentConsumers=5]
2016-12-08 11:49:07,340 | INFO | FelixShutdown | DefaultShutdownStrategy | 151 - org.apache.camel.camel-core - 2.16.4 | Graceful shutdown of 1 routes completed in 14 seconds
...
2016-12-08 11:47:09,064 | DEBUG | m://amq-broker#0 | AdvisoryConsumer | 122 - org.apache.activemq.activemq-osgi - 5.12.3 | Failed to send remove command: javax.jms.JMSException: Peer (vm://amq-broker#1) disposed.
javax.jms.JMSException: Peer (vm://amq-broker#1) disposed.
at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:72)[122:org.apache.activemq.activemq-osgi:5.12.3]
at org.apache.activemq.ActiveMQConnection.doAsyncSendPacket(ActiveMQConnection.java:1314)[122:org.apache.activemq.activemq-osgi:5.12.3]
at org.apache.activemq.ActiveMQConnection.asyncSendPacket(ActiveMQConnection.java:1306)[122:org.apache.activemq.activemq-osgi:5.12.3]
at org.apache.activemq.AdvisoryConsumer.dispose(AdvisoryConsumer.java:57)[122:org.apache.activemq.activemq-osgi:5.12.3]
at org.apache.activemq.ActiveMQConnection.close(ActiveMQConnection.java:655)[122:org.apache.activemq.activemq-osgi:5.12.3]
at org.apache.activemq.jms.pool.ConnectionPool.close(ConnectionPool.java:168)[122:org.apache.activemq.activemq-osgi:5.12.3]
at org.apache.activemq.jms.pool.ConnectionPool.onException(ConnectionPool.java:379)[122:org.apache.activemq.activemq-osgi:5.12.3]
at org.apache.activemq.ActiveMQConnection$5.run(ActiveMQConnection.java:1982)[122:org.apache.activemq.activemq-osgi:5.12.3]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_102]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_102]
at java.lang.Thread.run(Thread.java:745)[:1.8.0_102]
Caused by: org.apache.activemq.transport.TransportDisposedIOException: Peer (vm://amq-broker#1) disposed.
at org.apache.activemq.transport.vm.VMTransport.oneway(VMTransport.java:91)[122:org.apache.activemq.activemq-osgi:5.12.3]
at org.apache.activemq.transport.MutexTransport.oneway(MutexTransport.java:68)[122:org.apache.activemq.activemq-osgi:5.12.3]
at org.apache.activemq.transport.ResponseCorrelator.oneway(ResponseCorrelator.java:60)[122:org.apache.activemq.activemq-osgi:5.12.3]
at org.apache.activemq.ActiveMQConnection.doAsyncSendPacket(ActiveMQConnection.java:1312)[122:org.apache.activemq.activemq-osgi:5.12.3]
... 9 more
Does anyone have an idea how to solve this?
Update the start-level of the bundle for your route. The container will shutdown bundles in reverse order. It appears your bundle is at the same level (or lower) as the broker bundle.
Also.. if you are using the deploy/ directory, you can update the setting:
etc/org.apache.felix.fileinstall-deploy.cfg:
felix.fileinstall.start.level=XX
ref: http://felix.apache.org/documentation/subprojects/apache-felix-file-install.html
For those that might be encountering this in Karaf/Felix, we got round the issue by writing a Karaf console script which stops our Camel contexts first before issuing the 'shutdown' command.
The context stop command(s) will gracefully stop all routes in that context before it returns.
The context stops take about 15 seconds (about 300 routes), and then the shutdown completes in about 5 seconds (we have over 350 bundles).
So the script looks something like this:
camel:context-stop context1
camel:context-stop context2
camel:context-stop context3
camel:context-stop context4
shutdown -f
(Context names have been changed to protect the innocent)
I have encountered an issue with ActiveMQ where the entire cluster will fail when the master Zookeeper node goes offline.
We have a 3-node ActiveMQ cluster setup in our development environment. Each node has ActiveMQ 5.12.0 and Zookeeper 3.4.6 (*note, we have done some testing with Zookeeper 3.4.7, but this has failed to resolve the issue. Time constraints have so far prevented us from testing ActiveMQ 5.13).
What we have found is that when we stop the master ZooKeeper process (via the "end process tree" command in Task Manager), the remaining two ZooKeeper nodes continue to function as normal. Sometimes the ActiveMQ cluster is able to handle this, but sometimes it does not.
When the cluster fails, we typically see this in the ActiveMQ log:
2015-12-18 09:08:45,157 | WARN | Too many cluster members are connected. Expected at most 3 members but there are 4 connected. | org.apache.activemq.leveldb.replicated.MasterElector | WrapperSimpleAppMain-EventThread
...
...
2015-12-18 09:27:09,722 | WARN | Session 0x351b43b4a560016 for server null, unexpected error, closing socket connection and attempting reconnect | org.apache.zookeeper.ClientCnxn | WrapperSimpleAppMain-SendThread(192.168.0.10:2181)
java.net.ConnectException: Connection refused: no further information
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)[:1.7.0_79]
at sun.nio.ch.SocketChannelImpl.finishConnect(Unknown Source)[:1.7.0_79]
at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:361)[zookeeper-3.4.6.jar:3.4.6-1569965]
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1081)[zookeeper-3.4.6.jar:3.4.6-1569965]
We were immediately concerned by the fact that (A)ActiveMQ seems to think there are four members in the cluster when it is only configured with 3 and (B) when the exception is raised, the server appears to be null. We then increased ActiveMQ's logging level to DEBUG in order to display the list of members:
2015-12-18 09:33:04,236 | DEBUG | ZooKeeper group changed: Map(localhost -> ListBuffer((0000000156,{"id":"localhost","container":null,"address":null,"position":-1,"weight":5,"elected":null}), (0000000157,{"id":"localhost","container":null,"address":null,"position":-1,"weight":1,"elected":null}), (0000000158,{"id":"localhost","container":null,"address":"tcp://192.168.0.11:61619","position":-1,"weight":10,"elected":null}), (0000000159,{"id":"localhost","container":null,"address":null,"position":-1,"weight":10,"elected":null}))) | org.apache.activemq.leveldb.replicated.MasterElector | ActiveMQ BrokerService[localhost] Task-14
Can anyone suggest why this may be happening and/or suggest a way to resolve this? Our configurations are shown below:
ZooKeeper:
tickTime=2000
dataDir=C:\\zookeeper-3.4.7\\data
clientPort=2181
initLimit=5
syncLimit=2
server.1=192.168.0.10:2888:3888
server.2=192.168.0.11:2888:3888
server.3=192.168.0.12:2888:3888
ActiveMQ (server.1):
<persistenceAdapter>
<replicatedLevelDB
directory="activemq-data"
replicas="3"
bind="tcp://0.0.0.0:61619"
zkAddress="192.168.0.11:2181,192.168.0.10:2181,192.168.0.12:2181"
zkPath="/activemq/leveldb-stores"
hostname="192.168.0.10"
weight="5"/>
//server.2 has a weight of 10, server.3 has a weight of 1
</persistenceAdapter>
I downloaded Activemq_5.10 and configured using the command "activemq start" from the bin folder.
It is not moving after the last line and is not properly started, because of which the console is not up.
Extract of the log is:
| INFO | For help or more information please see: http://activemq.apache.org | org.apache.activemq.broker.BrokerService | main
| INFO | ActiveMQ WebConsole available at http://0.0.0.0:8161/ | org.apache.activemq.web.WebConsoleStarter | main
| INFO | Initializing Spring FrameworkServlet 'dispatcher' | /admin | main
| INFO | jolokia-agent: No access restrictor found at classpath:/jolokia-access.xml, access to all MBeans is allowed | /api | main
That is the last line logged, ActiveMQ should be started, eg when I do on ActiveMQ 5.10.0
bin/activemq console
I see
INFO | Apache ActiveMQ 5.10.0 (localhost, ID:davsclaus.air-62275-1403850867605-0:1) started
INFO | For help or more information please see: http://activemq.apache.org
WARN | Store limit is 102400 mb (current store usage is 0 mb). The data directory: /opt/apache-activemq-5.10.0/data/kahadb only has 74949 mb of usable space - resetting to maximum available disk space: 74949 mb
INFO | ActiveMQ WebConsole available at http://0.0.0.0:8161/
INFO | Initializing Spring FrameworkServlet 'dispatcher'
INFO | jolokia-agent: No access restrictor found at classpath:/jolokia-access.xml, access to all MBeans is allowed
And I can see the old web console at
http://localhost:8161/
And I can connect to the broker remotely using hawtio as documented here:
http://sensatic.net/activemq/activemq-and-hawtio.html
So I think your ActiveMQ is running as expected.