Unable install webconsole in ServiceMix 4.5.3 - apache-karaf

I deleted Cache and tmp directory of my serviceMix.
I'm trying to reinstall webconsole on using
features:install webconsole. I'm getting following error
Error executing command: Manifest not present in the first entry of the zip mvn:org.apache.felix/org.apache.felix.metatype/1.0.4
How can I solve this problem

There was a known problem with reorganization of maven repositories which caused some troubles. Please make sure that your local repository does not contain malformed JAR file (it happens sometimes with various gateways which redirects you to login page), then reconfigure repositories in etc/org.ops4j.pax.url.mvn.cfg and make entry
http://repo1.maven.org/maven2#id=central
First in list.

Related

Drupal site is broken due to badly installed module

I tried to install Simple OAuth (https://www.drupal.org/project/simple_oauth) module in my drupal site running in a shared Godaddy hosting. My first mistake was not to read the installation guide instructing to install the module by using composer. Instead, I installed the module using the Extend=>install a module link within Drupal. Installing the simple_oauth and enabling the module crashed my site and there is no output from the site.
Then I realised there is something wrong with the installation and checked the error log file. The error logged was:
PHP Fatal error: Interface 'League\OAuth2\Server\Repositories\AccessTokenRepositoryInterface' not found in /home/-----------/public_html/drupal/modules/simple_oauth/src/Repositories/AccessTokenRepository.php on line 10
At that point I realised there is something wrong with the installation and checked the module instructions which states I should use composer to install the module. I tried to solve this problem by redoing the installation from the ssh by using composer and this command:
composer config repositories.drupal composer https://packages.drupal.org/8 && composer require drupal/simple_oauth:^3
Which did not work because GoDaddy shared hosting plan has only 512mb of rams and composer kills the command because of lack of memory.
I tried reading through and understand how Composer works. There were recommendations saying you should never use composer in a production site and you should run it on your computer and copy the composer.lock file which needs much less rams. I created a PHP server using XAMMP on my computer and copied the composer.json file to my computer and run composer update command in my computer. It downloaded the dependencies and stuff on my computer. And feeling I get the hang of it, I copied the composer.lock file in my drupal server, run composer update command and saw composer delete many stuff which I could not undo.
So my questions are: 1- Is there a way of rescuing this drupal site at this point? I deleted many composer dependencies as far as I can understand.
The new error log says: PHP Fatal error: Interface 'Symfony\Component\HttpKernel\HttpKernelInterface' not found in /home/--------/public_html/drupal/core/lib/Drupal/Core/DrupalKernelInterface.php on line 15
2- If not, which is fine as I was just beginning to setup the site. Is it possible for someone to explain the best way of handling this scenario? I mean installing a module using composer in a memory critical place. Or explain how composer works for layman. I read about all the dependency stuff but could not figure out how to use it for this scenario.
Thanks.

OpenShift Custom Cartridge and NPM

I am working with a community-developed OpenShift cartridge for nginx. The cartridge's build script (without any modifications) works well; it starts the nginx server with the configuration file that I provide it. However, I am trying to modify the build script so that it first changes directory into my OpenShift repository, runs npm install and then grunt build to build an Angular application that I have created.
When I do this, I continuously get the error EACCES, mkdir '/var/lib/openshift/xxxxxxxxxx/.npm' when the script gets to npm install. Some OpenShift forum posts have attempted to solve the issue, but it appears as though a different solution is required (at least in my case).
Thus, I am interested in whether or not it is possible to use npm in this way, or if I need to create a cartridge that does all of this myself.
Since we do not typically have the access required to create ~/.npm, we have to find ways of moving the npm cache (normally ~/.npm) and the npm user configuration (normally ~/.npmrc) to accessible folders to get things going. The following information comes partially from a bug report that I submitted to Redhat on this matter.
We must begin by creating an environmental variable to control the location of .npmrc. I created a file (with shell access to my application) called .env in $OPENSHIFT_DATA_DIR. Within this file, I have placed:
export NPM_CONFIG_USERCONFIG=$OPENSHIFT_HOMEDIR/app-root/build-dependencies/.npmrc
This moves the .npmrc directory to a place where we have the privileges to read/write. Naturally, I have to also create the directory .npmrc in $OPENSHIFT_HOMEDIR/app-root/build-dependencies/. Then, in my pre-start webhook/early in my build script, I have placed:
touch $OPENSHIFT_DATA_DIR/.env
This ensures that the environmental variable that configures the location of .npmrc will be accessible each time we deploy/build. Now we can move the location of the npm cache. Start by running touch on the .env file manually, and create the .npm directory in $OPENSHIFT_HOMEDIR/app-root/build-dependencies/. Run the following to complete the reconfiguration:
npm config set cache $OPENSHIFT_HOMEDIR/app-root/build-dependencies/.npm
NPM should now be accessible each time we deploy, even if we are not using the NodeJS cartridge. The above directory choices may be changed as desired.
You do not have write access to the ~/.npm directory in your gear. You might try reviewing how the native node.js cartridge is setup (https://github.com/openshift/origin-server/tree/master/cartridges/openshift-origin-cartridge-nodejs) and see if you can apply it to your custom cartridge.

Symfony2 Composer Install

I am trying to install Symfony 2.1.3 (latest). I am running composer and installs everything okay. The only error that I get is:
Script Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache
handling the post-install-cmd event terminated with an exception
[RuntimeException]
An error occurred when executing the "'cache:clear --no-warmup'" command.
It's being installed under www folder. I am running nginx and followed the composer approach. I read on internet that apache should be run manually not as a service, however I am using nginx instead. Does apache still have any bearing on it? I'm using debian squeeze.
Edit: As per AdrienBrault's suggestion the error was because the timezone was not set in the php.ini. Only with --verbose I could see the warning. Thanks guys.
Apache is not related - PHP is called via command line.
Most likely is the permission in the cache folder: did you check if the user that runs the composer update can actually write the cache folder?
Try to manually run rm -Rf app/cache/dev (for production environment replace dev with prod) and see if you get any permission error.
Also you will get this error if the default.timezone setting is not configured in php when running in CLI. To verify just run
php --info | grep timezone
and check that the setting date.timezone is correctly configured.
On the security side, setting 777 to the folder is not the optimal solution - if you have ACL enabled you could use that to correctly set up the permission for the cache and logs folder. Read more at the Symfony2 official installation page
I had this same issue for a while and after hours of face to brick wall pounding I realized... I have a .gitmodule in my project, and on initial checkout these submodules are NOT initialized and as such are not there for your composer to update, which results in the above error.
Make sure you run the following
git submodule update --init src/Acme/Sadness/Bundle
of course replace src/Acme/Sadness/Bundle with YOUR project namespace.
Hope this helps someone not go through the same pain I just did.
If you have vendor folder already I would remove it and install symfony 2.1.3 again via "composer.phar install". Problem might be coming from outdated version of composer
I had the same problem and I resolve in this way.
execute this on the console
and you should see something like this
$ locate php.ini
/etc/php5/apache2/php.ini
/etc/php5/cli/php.ini
/etc/php5/fpm/php.ini
the first line is probably your php.ini that appear when you do a phpinfo();
the problem is that when you execute composer update this no check the same php.ini
in my case the second line
all my sites work fine but always I had problems not now
after edit the second file and put the same time zone that you set in the first one
run
$ sudo service apache2 reload
and now
$ composer update
I hope that this work for you like work for me
regards
Emiliano

Artifactory remote repos and Terracota

I want to setup my maven settings.xml file to download all the external dependencies from Artifactory cache instead of download them directly from any of the public repositories like repo1, repo2 or Jboss. I followed the instructions at http://wiki.jfrog.org/confluence/display/RTF/Configuring+Artifacts+Resolution at but I'm stuck with an error with the terracota library, the error is:
Could not find artifact net.sf.ehcache:ehcache-terracotta:jar:2.5.0 in remote-repos
I tried adding terracota repository at the remote repositories section but this didn't worked either.
Please advice.
I can think of a couple of possibilities:
Your remote-repos cache isn't configured to point to the remote repository that contains the Terracotta files
Your build isn't using the correct organization or module name when resolving the dependency on Terracotta.
Could you add some info to your question detailing where exactly you are seeing the error message, and whether you can browse to ehcache-terracotta version 2.5.0 in Artifactory ?
Please add the terracotta repository to your artifactory
This is the URL= http://www.terracotta.org/download/reflector/releases
Don't worry if the test of the repo doesn't work...
The last step is to go to Edit Virtual Repository and add the new terracotta repo to the virtual repository called "Remote Repo".

Symfony 2.0 bundle installation

So I am a new to doctrine, but I am not able to install a bundle at all. I am following the guide, but the "error" which I am getting is very unusual.
Anyhow, I add this lines into deps file:
[FOSRestBundle]
git=http://github.com/FriendsOfSymfony/FOSRestBundle.git
target=bundles/FOS/RestBundle
Then I do:
./bin/vendors install
And I get:
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20090626+lfs/sqlite.so' - /usr/lib/php5/20090626+lfs/sqlite.so: cannot open shared object file: No such file or directory in Unknown on line 0
Your project seems to be based on a Standard Edition that includes vendors.
Try to run ./bin/vendors install --reinstall
So on this standard way I am not able to install it at all. Can somebody explain me what is the problem, because to me it looks like, the symfony vendors script doesnt recognize changes in deps file at all.
This happens when you've downloaded the Symfony2 Standard Edition from the website. The vendor install script checks to see if the vendor directories are git repositories, and if not, will throw this error. You can fix the situation in one of two ways:
you can either run the command that it suggests: php bin/vendors install --reinstall
or, you can remove the vendors directory, then run php bin/vendors install, which amounts to about the same thing
No need to install that. Just follow the steps in the url : http://mmoreramerino.github.com/GearmanBundle/installation.html

Resources