I started Apache Karaf 3.0.0 in server mode using $KARAF_HOME/bin/start in CentOS 6.5. Then I wanted to run several commands using $KARAF_HOME/bin/client and also capture the output of these commands, so as to make sure the commands ran successfully. The output did get spit out on my console but I was never able to redirect it into a file. Seems like Karaf doesn't write anything to the output stream or error stream. I tried the following:
[apache-karaf-3.0.0]$ ./bin/start clean
[apache-karaf-3.0.0]$ ./bin/client "bundle:list"
Logging in as karaf
282 [pool-2-thread-3] WARN org.apache.sshd.client.keyverifier.AcceptAllServerKeyVerifier - Server at /0.0.0.0:8101 presented unverified key:
START LEVEL 100 , List Threshold: 50
ID | State | Lvl | Version | Name
------------------------------------------------------------------------------------
91 | Active | 80 | 1.8.0 | Commons Codec
92 | Active | 80 | 2.6 | Commons Lang
93 | Active | 80 | 15.0.0 | Guava: Google Core Libraries for Java
[apache-karaf-3.0.0]$ ./bin/client "bundle:list" >& bundleList
[apache-karaf-3.0.0]$ cat bundleList
null
Nothing got written to the file bundleList. Piping the output doesn't seem to help either.
To make Aviv's solution work, simply use a pipe, e.g. "bundle:list | tac -f /tmp/yourfile"
I'm able to capture client output in Karaf version 3.0.2 .
user#hostname:~$ client bundle:list > bundleinfo.txt
This results in following debug info on the console:
2053 [sshd-SshClient[36c8e545]-nio2-thread-2] WARN org.apache.sshd.client.keyverifier.AcceptAllServerKeyVerifier - Server at [/0.0.0.0:8101, DSA, xx:xx:xx:xx:xx:xx:xx:c
2:3a:5a:9b:87:ed:e0:b2:6a] presented unverified {} key: {}
..and of course the bundleinfo.txt file with content as expected:
user#hostname:~$ head -5 bundleinfo.txt
START LEVEL 100 , List Threshold: 50
ID | State | Lvl | Version | Name
---------------------------------------------------------------------------------------------
38 | Active | 80 | 3.2.5.RELEASE | Spring Security Core
39 | Active | 80 | 1.0.0.1 | Apache ServiceMix :: Bundles :: javax.inject
For command line, I use "tac" and redirect to a file with -f , in Karaf 3.0.3, try it or learn what it does with --help
Related
i have installed cinder in controller node and block node.
i test the status of openstack-cinder-scheduler and openstack-cinder-api(on controller node) ,openstack-cinder-volume and target.service(on block node),that they are running.
but when i use the "cinder list,cinder create,openstack volume service list"only can get one kind of output:
[root#controller //]# openstack volume service list
The server is currently unavailable. Please try again at a later time.
The Keystone service is temporarily unavailable.
(HTTP 503)
[root#controller //]# cinder list
ERROR: The server is currently unavailable. Please try again at a later time.
The Keystone service is temporarily unavailable.
i have check the configure in cinder.conf,nova.conf serveral times.i have no idea with them.can u give a suggestion? thank you.
I found that I can create volume by dashboard, while by command line I can't. It may be something wrong between admin and cinder user. Try it again.
[root#controller //]# openstack volume list
+--------------------------------------+----------+-----------+------+-------------+
| ID | Name | Status | Size | Attached to |
+--------------------------------------+----------+-----------+------+-------------+
| 435acaae-44d8-4793-9a0c-61a4436b6b37 | volumev4 | available | 1 | |
+--------------------------------------+----------+-----------+------+-------------+
[root#controller //]# openstack role add --project service --user cinder admin
[root#controller //]# openstack volume service list
+------------------+--------------+------+---------+-------+----------------------------+
| Binary | Host | Zone | Status | State | Updated At |
+------------------+--------------+------+---------+-------+----------------------------+
| cinder-scheduler | controller | nova | enabled | up | 2021-12-28T07:40:01.000000 |
| cinder-volume | compute2#lvm | nova | enabled | up | 2021-12-28T07:40:07.000000 |
+------------------+--------------+------+---------+-------+----------------------------+
it has the output.
I am getting the following error while I am trying to edit default lxc profile:
The "default" storage pool doesn't exist
/snap/bin/lxd init
or
lxd init
solved the issue, but select yes for following:
Do you want to configure a new storage pool? (yes/no) [default=yes]:
Then you can confirm with the following command and the output:
/snap/bin/lxc storage list
+---------+-------------+--------+--------------------------------------------+---------+
| NAME | DESCRIPTION | DRIVER | SOURCE | USED BY |
+---------+-------------+--------+--------------------------------------------+---------+
| default | | zfs | /var/snap/lxd/common/lxd/disks/default.img | 1 |
+---------+-------------+--------+--------------------------------------------+---------+
Following this document will help.
I have a problem with file storage organization.
There is a network of Windows 7 and Windows XP computers. One of them is a file storage server.
Software packs are located on the storage server. Each software pack includes
1. active folder;
1. some folders for each program.
(see the structure example below)
Active folder is a structure of the actual program's versions, must allow to copy all the software in their actual versions avoiding file's duplicating via direct copying. Also fast switching of actual version is needed.
Program folders contain folders for each program's version.
I tried to solve the task via windows directory junction. I created the links via Far Manager 3, command Alt+F6, type directory junction.
Desired structure example
+---active % 389 MB, desired package of actual software
| +---notepad++ % directory junction
| | \---7.3.1
| | npp.7.3.1.Installer.exe
| | npp.7.3.1.Installer.x64.exe
| |
| +---octave % directory junction
| | \---4.2.1
| | octave-4.2.1-w32-installer.exe
| | octave-4.2.1-w64-installer.exe
| |
| \---texstudio % directory junction
| \---2.12.4
| texstudio-2.12.4-win-qt5.6.2.exe
|
+---notepad++
| +---6.8.8
| | npp.6.8.8.Installer.exe
| |
| \---7.3.1 % actual version
| npp.7.3.1.Installer.exe
| npp.7.3.1.Installer.x64.exe
|
+---octave
| +---4.2.0
| | octave-4.2.0-w32-installer.exe
| | octave-4.2.0-w64-installer.exe
| | octave-4.2.0-w64.zip
| |
| \---4.2.1 % actual version
| octave-4.2.1-w32-installer.exe
| octave-4.2.1-w64-installer.exe
|
\---texstudio
+---2.11.0
| texstudio-2.11.0-win-qt5.5.1.exe
|
+---2.12.0
| texstudio-2.12.0-win-qt5.6.2.exe
|
+---2.12.2
| texstudio-2.12.2-win-qt5.6.2.exe
|
\---2.12.4 % actual version
texstudio-2.12.4-win-qt5.6.2.exe
Local usage
Local means I operate on the storage server's Windows GUI.
If to copy active folder to another server's folder observed result is the same as desired:
TEST_COPY
\---active % 389 MB, all the files are copied
+---notepad++
| \---7.3.1
| npp.7.3.1.Installer.exe
| npp.7.3.1.Installer.x64.exe
|
+---octave
| \---4.2.1
| octave-4.2.1-w32-installer.exe
| octave-4.2.1-w64-installer.exe
|
\---texstudio
\---2.12.4
texstudio-2.12.4-win-qt5.6.2.exe
Network file access
If to access to the storage server's active folder via network sharing and copy it the desired result does not happen.
Of course, tree /A /F command shows the same structure of the copied tree, but active is 0 MB size and child folders notepad++, octave, texstudio are also zero-sized and empty.
TEST_COPY
\---active % 0 MB, no any files, only subfolders
+---notepad++
| \---7.3.1
|
+---octave
| \---4.2.1
|
\---texstudio
\---2.12.4
Only if try to copy directly directory junctions subfolders inside active folder (7.3.1, 4.2.1, 2.12.4) the content will be copied as desired. But every user wants to copy active folder, not its second level childs.
BTW. Sometimes when trying to copy an error occurred: file/folder already exists, and copy process was broken unexpectedly.
May be links are set up wrong or there are other methods to reach the desired result.
I've got a simple Laravel app that I've just been told that the public DIR has to be in quite a different place to the core code.
I need to have s'thing like this:
folder-root
| - site
| - | - someFolder
| - | - | - codeFolder
| - | - | - | - app
| - | - | - | - bootstrap
| - | - | - | - config (etc etc etc)
| - newPublicFolder
| - | - index.php
I've copied all my files to this structure locally and altered my public index.php file to point to the bootstrap/autoload.php file and can echo out test variables from that file, so I know it is pointing it to it correctly.
Is there a guide anywhere to do this, or is there a config file I'm missing?
UPDATE: This is from my apache error log:
PHP Fatal error: Call to a member function make() on a non-object in /var/www/test/site/public/index.php on line 49
UPDATE 2:
I've ONLY copied the files over. The DB remains the same and I've not run any compser updates or anything.. if that makes a differnce?
Cheers!
To all in the same boat and here because of a Google search..
I'd copied line 22 and pasted into line 36.
I'd missed that the first was to 'autoload.php' and the second was to 'app,php'
Rookie mistake, but if it helps you.. all good..
What are the valid instanceState's for the Amazon EC2 API? It doesn't seem to be defined in the current API doc. Google doesn't turn up much. So far I know about:
0: pending
16: running
32: shutting-down
48: terminated
but I'm pretty sure I've seen an error state before.
Thanks!
As of posting, the current states are:
+--------+---------------+
| Code | State |
+--------+---------------+
| 0 | pending |
| 16 | running |
| 32 | shutting-down |
| 48 | terminated |
| 64 | stopping |
| 80 | stopped |
+--------+---------------+
And the documentation can be found within the Amazon Elastic Compute Cloud API reference under InstanceStateType
The docs also mention a state code 272 which "typically indicates a problem with the host running the instance". They suggest trying a reboot in the first instance, and posting on the EC2 forums if that doesn't solve the issue.
The docs seem to have been moved, and I still can't find them. Here are two more state codes
64: stopping
80: stopped