Updating Drupal from 8.3.7 to 8.5.1 using composer - drupal-8

I am new to Drupal and am trying to understand the update process. I am running Drupal 8.3.7 on an Amazon server. I set my site into maintenance mode. Then I try to update like this:
composer update drupal/core --with-dependencies
However it has no effect. So I read the you can check for blocking dependencies with the following command:
composer prohibits drupal/core:8.5.1
Below are the results, but I don't know how to proceed from here. Do I need to add dependencies into the "require" section of my composer.json?
drupal/core 8.5.1 requires asm89/stack-cors (^1.1)
drupal/drupal 8.3.7 does not require asm89/stack-cors (but 1.0.0 is installed)
drupal/core 8.5.1 requires symfony/class-loader (~3.4.0)
drupal/drupal 8.3.7 requires symfony/class-loader (~2.8)
drupal/core 8.5.1 requires symfony/console (~3.4.0)
drupal/drupal 8.3.7 requires symfony/console (~2.8)
drupal/core 8.5.1 requires symfony/dependency-injection (~3.4.0)
drupal/drupal 8.3.7 requires symfony/dependency-injection (~2.8)
drupal/core 8.5.1 requires symfony/event-dispatcher (~3.4.0)
drupal/drupal 8.3.7 requires symfony/event-dispatcher (~2.8)
drupal/core 8.5.1 requires symfony/http-foundation (~3.4.0)
drupal/drupal 8.3.7 requires symfony/http-foundation (~2.8)
drupal/core 8.5.1 requires symfony/http-kernel (~3.4.0)
drupal/drupal 8.3.7 requires symfony/http-kernel (~2.8)
drupal/core 8.5.1 requires symfony/process (~3.4.0)
drupal/drupal 8.3.7 requires symfony/process (~2.8)
drupal/core 8.5.1 requires symfony/routing (~3.4.0)
drupal/drupal 8.3.7 requires symfony/routing (~2.8)
drupal/core 8.5.1 requires symfony/serializer (~3.4.0)
drupal/drupal 8.3.7 requires symfony/serializer (~2.8)
drupal/core 8.5.1 requires symfony/translation (~3.4.0)
drupal/drupal 8.3.7 requires symfony/translation (~2.8)
drupal/core 8.5.1 requires symfony/validator (~3.4.0)
drupal/drupal 8.3.7 requires symfony/validator (~2.8)
drupal/core 8.5.1 requires symfony/yaml (~3.4.5)
drupal/drupal 8.3.7 requires symfony/yaml (~2.8)
drupal/core 8.5.1 requires twig/twig (^1.35.0)
drupal/drupal 8.3.7 does not require twig/twig (but v1.25.0 is installed)
UPDATE:
I removed "drupal/core: ~8.3" from "replace" and added "drupal/core: ~8.5" to "require" (not sure if this is correct approach, but at this point I'm trying anything)
and then tried to run update again and get this error:
Package is not installed: drupal/drupal-8.3.7.0
UPDATE 2
Ok, I added "drupal/core: ~8.3" to require, and it updated to 8.3.9, then I changed it to "drupal/core: ~8.4" and it removed core, then I changed it to "drupal/core: ~8.5" and it seems to have updated, but I have a few errors on my site. For example, the "configuration" page returns "The website encountered an unexpected error. Please try again later." So obviously I am not doing this right. Any advice would be great. The dependencies don't seem straightforward and I hope this I don't have to go through this process every month. :(

Related

Twilio | Wso2 : ERROR {NativeWorkerPool} - Uncaught exception java.lang.NoSuchMethodError

I'm using Twilio connector for Wso2 and I'm facing an issue (as shown below) while deploying the .car file on micro Integrator runtime, however when I run the connector on embedded server that comes with integration studio things work pretty fine. Any solution to that?
[2022-10-07 15:31:24,320] ERROR {NativeWorkerPool} - Uncaught exception java.lang.NoSuchMethodError: org.apache.http.impl.client.DefaultRedirectStrategy.<init>([Ljava/lang/String;)V
at com.twilio.http.HttpClient.<init>(HttpClient.java:35)
at com.twilio.http.NetworkHttpClient.<init>(NetworkHttpClient.java:54)
at com.twilio.http.NetworkHttpClient.<init>(NetworkHttpClient.java:45)
at com.twilio.http.NetworkHttpClient.<init>(NetworkHttpClient.java:36)
at com.twilio.http.TwilioRestClient$Builder.build(TwilioRestClient.java:143)
at com.twilio.Twilio.buildRestClient(Twilio.java:202)
at com.twilio.Twilio.getRestClient(Twilio.java:174)
at com.twilio.base.Creator.create(Creator.java:40)
at org.wso2.carbon.connector.twilio.sms.SendSms.connect(SendSms.java:67)
at org.wso2.carbon.connector.core.AbstractConnector.mediate(AbstractConnector.java:32)
at org.apache.synapse.mediators.ext.ClassMediator.mediate(ClassMediator.java:94)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:109)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:71)
at org.apache.synapse.mediators.template.TemplateMediator.mediate(TemplateMediator.java:134)
at org.apache.synapse.mediators.template.InvokeMediator.mediate(InvokeMediator.java:169)
at org.apache.synapse.mediators.template.InvokeMediator.mediate(InvokeMediator.java:92)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:109)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:71)
at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:158)
at org.apache.synapse.rest.Resource.process(Resource.java:331)
at org.apache.synapse.rest.API.process(API.java:448)
at org.apache.synapse.rest.RESTRequestHandler.apiProcess(RESTRequestHandler.java:120)
at org.apache.synapse.rest.RESTRequestHandler.dispatchToAPI(RESTRequestHandler.java:98)
at org.apache.synapse.rest.RESTRequestHandler.process(RESTRequestHandler.java:71)
at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:331)
at org.apache.synapse.core.axis2.SynapseMessageReceiver.receive(SynapseMessageReceiver.java:99)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
at org.apache.synapse.transport.passthru.ServerWorker.processNonEntityEnclosingRESTHandler(ServerWorker.java:367)
at org.apache.synapse.transport.passthru.ServerWorker.processEntityEnclosingRequest(ServerWorker.java:426)
at org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:181)
at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
I have checked and it seems that the error is due to the incompatible org.apache.httpcomponents.httpclient runtime version.
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.12</version>
</dependency>
I'm not sure where to add this dependency in Wso2.
It's not recommended to add external Jars to the runtime, in this case, this could conflict with existing dependencies. Having said that, as per the Connector Store latest Twillio connector is not compatible with MI 1.2.0. Hence best option is to try upgrading to a newer version of MI(4.X). Should work in any 4.0+ versions.
Else you can try using the older version of the connector. (version 1.0.0)
Are you using the GA pack? Can you try updating the MI to the latest u2 level and check. We have done a Httpclient component upgrade in all the latest MI versions

Geoserver and moving to HTTPS

I've installed a Platform Indepednant Binary version Geoserver (http://geoserver.org/release/2.16.2/) successfully. It's been a while using it an no real problems. I now want to use this version of Geoserver for an OpenLayers website (that uses GeoLocation) but that requires all the component parts that use HTTP to use HTTPS...Geoserver is the last server I have that needs to be migrated.
I've looked online and there seems to be a lot of info on moving Geoserver to HTTPS but it doesn't all tie up with my installation. Some examples talk about server.xml files (which my installation doesn't have) and updating an apache conf file (/etc/apache2/sites-avaiable/smallmelo-le-ssl.conf) which I don't have either so I'm struggling to get instructions on my particular version of Geoserver. The docs state that it's running on a Jetty servlet. Does anyone have any documentation or links on how to configure https?
Progress!! So my installation is using Jetty. I've setup the keystore correctly with a valid certificate. I've updated the start.ini file to reflect the location of the keystore and password but...when I try to run geoserver I get:
ERROR : No module found to provide ssl for https{enabled}
I do not have an SSL.MOD module in the modules folder of my jetty installation. I did dig out a module (ssl) from https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-distribution/9.2.13.v20150730/ but I now get:
java.lang.IllegalStateException: No constructor class org.eclipse.jetty.server.ServerConnector([],{}) in file:/C:/Program%20Files/Geoserver/geoserver-2.16.2/etc/jetty-https.xml
I've struggled to find out how to update this file and add what is needed. Problem is I'm not a java expert so I don't want to just randomly copy someone elses config settings.
This is a simple case of finding a Jetty tutorial and following it, GeoServer doesn't care about https.
However, I should warn you that the reason you can't find much help in the GeoServer documentation is because you shouldn't run the platform independent binary in a production environment. This is the reason that the documentation expects a server.xml (part of tomcat) and assumes that you are behind an Apache2 or Nginx web server that is designed to handle ssl.
Both of the warning messages you mention come from bit rot in the Jetty configuration files on the GeoServer repository. You figured out that the ssl.mod file is missing, and adding it manually solves that issue.
The second error java.lang.IllegalStateException: No constructor class comes from a mix of Jetty version config files. The jetty-https.xml file that is in the GeoServer 2.16 repo is from Jetty 9.4, and the jetty-ssl.xml is from Jetty 9.2. At some point between those version, the location of the constructor <Configure id="Server" class="org.eclipse.jetty.server.Server"> was moved from jetty-https to jetty-ssl. It was not updated correctly in the GeoServer repo so there is a set of mismatched xml files.
I solved this by copying the jetty-https.xml file from 9.2 to match the 9.2 version of jetty-ssl.xml included with Geoserver. You could use the more current jetty files that match what Geoserver is running on, but make sure you copy all of them, ssl.mod, jetty-https.xml, jetty-ssl.xml, and jetty-ssl-context.xml.
Ok, just wanted to share this in case it was helpful. It is a bit brief but hopefully will be of use. Please note: My setup used a legitimate GoDaddy DNS/SSL Certificate so that may be a limiter for some and force you to use a self-signed certificate.
Thank you to Ian Turton who created the 'aha' moment :)
I used the following youtube video to get Tomcat and Geoserver installed: https://www.youtube.com/watch?v=RyCFKGm4NSw
Firstly, once I had Tomcat running (I used port 8081 as 8080 was already in use). Please be aware when I installed to port 8081 it didn't update the server.xml file, so I had to manually open it up and change
<Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
to
<Connector port="8081" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
and then restart Tomcat.
I used a legitimate PFX file I downloaded from GoDaddy. I already have an SSL certificate/DNS setup with them so it was just a question of requesting a PFX file.
Secondly, I imported my PFX using JAVA installed from AdoptOpenJDK. I went to the commandline, navigated to the AdoptOpenJDK bin folder (which has a keytool.exe application). I then ran this command:
keytool -importkeystore -srckeystore c:/temp/mygodaddycert.pfx -srcstoretype pkcs12 -destkeystore c:/temp/mycert.jks -deststoretype JKS
When prompted for the password for the enter source password I got that from GoDaddy and then I used my own, completely different, password for the JKS file. I then copied my JKS file to ./conf/certs folder (I created the certs folder)
Thirdly, I added this to my /conf/server.xml file:
<Connector port="8443" protocol="org.apache.coyote.http11.Http11NioProtocol" maxThreads="150"
SSLEnabled="true" scheme="https" secure="true" sslProtocol="TLS"
keystoreFile="conf/certs/mycert.jks"
keystorePass="<your_jks_password_when_registering_with_keytool>"
/>
I restart Tomcat...
Then I used my DNS from GoDaddy to connect to the instance: https://myXYZ.de:8443/ and voila Tomcat running on SSL with no certificate errors. Since Geoserver was installed. I can just add geoserver to the end: https://myXYZ.de:8443/geoserver and voila number 2.

Siddhi PMML Extension - Installation error

I'm trying to install Siddhi PMML Extension from WSO2 DAS as described [here][1].
I downloaded archive p2-repo.zip, added repository WSO2 GPL Feature Repository. I have an error when I try to install the extension:
Cannot complete the install because one or more required items could not be found. Software being installed: WSO2 Carbon GPL - Siddhi PMML Extension Feature 2.0.4 (org.wso2.siddhi.gpl.extension.pmml.feature.group 2.0.4) Missing requirement: pmml-evaluator 1.1.16.wso2v1 (pmml-evaluator 1.1.16.wso2v1) requires 'package com.google.common.base [15.0.0,18.0.0]' but it could not be found Cannot satisfy dependency: From: WSO2 Carbon GPL - Siddhi PMML Extension Feature 2.0.4 (org.wso2.siddhi.gpl.extension.pmml.feature.group 2.0.4) To: pmml-evaluator [1.1.16.wso2v1]
At the same time, I have no problem during installation other extentions (Siddhi NLP, R,...). How can I fix this issue?
I also experienced the same problem. Try build the p2-repo from building the P2 repositories. It worked for me.
Download the repositories and build them using mvn clean install command in the following order.
orbit
siddhi
carbon-event-processing
Copy the generated P2 repository in carbon-event-processing/repository/target/p2-repo into a local directory in your machine.
Then add this folder as a repository to DAS.

Resolving unstable/insecure versions with SwisscomDev/Cloudfoundry

Having buildpack: php_buildpack defined in our manifest.yml this should resolve to the latest CloudFoundry PHP Buildpack to my understanding.
But this resolves to Buildpack version 4.3.21 while Github mentions 4.3.22 as latest release. How does this happen? Do we need to trigger something/someone? Of course we don't want to specify a specific release tag in our manifest.
Additionally "PHP_VERSION": "{PHP_70_LATEST}" in options.json should resolve to the latest stable PHP 7 version but it resolves to 7.0.11 which is according to the PHP Release Announcements an insecure version which should not be used anymore.
Same applies to PHP_56_LATEST as it resolves to 5.6.7 which is a well outdated in favor of 5.6.28 (security release as well).
We didn't check for htttpd an others because we'd somehow rely on getting most recent, stable and secure versions.
php_buildpack refers to the latest version of the buildpack installed on the Cloud Foundry installation you are using (i.e. the Swisscom Application Cloud). It gets updated as soon as the version of Cloud Foundry gets updated because the buildpack is bundled with CF. If you really want to use the absolute latest buildpack, you'll have to pull it directly from GitHub. You can do so by specifying
buildpack: https://github.com/cloudfoundry/php-buildpack.git
The versions for PHP are also bundled with the buildpack. It will always install the latest version of the range you are specifying which is installed in the version of the buildpack you are using. You can find these versions here: https://github.com/cloudfoundry/php-buildpack/blob/master/manifest.yml (you can check out the file for different git tags of the buildpack to see which versions of PHP they come bundled with).
I believe the reason is that there are no standards on buildpacks names for operators.
E.g. platform operators can upload buildpacks with any name and use any version.
It is a best practice to keep them at default names/latest version, but not everyone follows that.
Just use custom buildpack with whatever version you need (if platform allows it)

Trouble installing WSO2 API Manager 1.7.1 features on ESB 4.8.1

I would like to install API Manager 1.7.1 feature on ESB 4.8.1 and receiving this as a message summary. Any help for steps to proceed from here.
Your original install request has been modified. org.wso2.carbon.security.mgt.feature.group-4.2.2 is already installed, so an update will be performed instead.
org.wso2.carbon.module.mgt.server.feature.group-4.2.0 is already present because other installed software requires it. It will be added to the installed software list.
org.wso2.carbon.rest.api.server.feature.group-4.2.1 is already present because other installed software requires it. It will be added to the installed software list.
org.wso2.carbon.stratos.common.feature.group-2.2.1 is already installed, so an update will be performed instead.
org.wso2.carbon.endpoint.server.feature.group-4.2.1 will be ignored because a newer version is already installed.
org.wso2.carbon.registry.community.features.server.feature.group-4.2.1 will be ignored because it is already installed.
org.wso2.carbon.event.server.feature.group-4.2.1 will be ignored because it is already installed.
org.wso2.carbon.application.mgt.server.feature.group-4.2.0 is already present because other installed software requires it. It will be added to the installed software list.
org.wso2.carbon.mediators.server.feature.group-4.2.1 will be ignored because a newer version is already installed.
org.wso2.carbon.sequences.server.feature.group-4.2.0 is already present because other installed software requires it. It will be added to the installed software list.
org.wso2.carbon.databridge.datapublisher.feature.group-4.2.1 is already installed, so an update will be performed instead.
org.wso2.carbon.datasource.server.feature.group-4.2.1 will be ignored because it is already installed.
org.wso2.carbon.mediation.templates.server.feature.group-4.2.0 is already present because other installed software requires it. It will be added to the installed software list.
org.wso2.carbon.application.mgt.synapse.server.feature.group-4.2.0 is already present because other installed software requires it. It will be added to the installed software list.
org.wso2.carbon.relay.server.feature.group-4.2.0 will be ignored because it is already installed.
org.apache.synapse.transport.nhttp.feature.group-2.1.2.wso2v4 is already installed, so an update will be performed instead.
org.wso2.carbon.localentry.server.feature.group-4.2.0 is already present because other installed software requires it. It will be added to the installed software list.
org.wso2.carbon.logging.mgt.feature.group-4.2.1 is already installed, so an update will be performed instead.
org.wso2.carbon.security.mgt.server.feature.group-4.2.2 is already installed, so an update will be performed instead.
org.apache.synapse.wso2.feature.group-2.1.2.wso2v4 is already installed, so an update will be performed instead.
org.wso2.carbon.registry.resource.properties.feature.group-4.2.0 is already installed, so an update will be performed instead.
org.wso2.carbon.registry.core.feature.group-4.2.1 is already installed, so an update will be performed instead.
org.wso2.carbon.service.mgt.server.feature.group-4.2.1 is already present because other installed software requires it. It will be added to the installed software list.
org.wso2.carbon.event.common.feature.group-4.2.0 will be ignored because it is already installed.
org.wso2.carbon.task.server.feature.group-4.2.0 is already present because other installed software requires it. It will be added to the installed software list.
org.wso2.carbon.throttle.feature.group-4.2.0 will be ignored because it is already installed.
org.wso2.carbon.proxyadmin.server.feature.group-4.2.1 is already present because other installed software requires it. It will be added to the installed software list.
org.wso2.carbon.rule.mediation.server.feature.group-4.2.0 is already installed, so an update will be performed instead.
org.wso2.carbon.mediation.security.server.feature.group-4.2.0 is already present because other installed software requires it. It will be added to the installed software list.
org.wso2.carbon.core.common.feature.group-4.2.0 is already present because other installed software requires it. It will be added to the installed software list.
org.wso2.carbon.user.mgt.feature.group-4.2.1 is already installed, so an update will be performed instead.
org.wso2.carbon.core.runtime.feature.group-4.2.0 is already present because other installed software requires it. It will be added to the installed software list.
org.wso2.carbon.identity.authenticator.saml2.sso.server.feature.group-4.2.0 is already installed, so an update will be performed instead.
org.wso2.carbon.identity.authenticator.saml2.sso.ui.feature.group-4.2.1 will be ignored because it is already installed.
org.wso2.carbon.core.server.feature.group-4.2.0 is already present because other installed software requires it. It will be added to the installed software list.
Cannot complete the install because of a conflicting dependency.
Software being installed: Key Store Management Feature 4.2.4 (org.wso2.carbon.security.mgt.feature.group 4.2.4)
Software currently installed: WSO2 Carbon - Service Management Feature 4.2.1 (org.wso2.carbon.service.mgt.feature.group 4.2.1)
Only one of the following can be installed at once: WSO2 Carbon - Security Management UI Feature 4.2.2 (org.wso2.carbon.security.mgt.ui.feature.jar 4.2.2) WSO2 Carbon - Security Management UI Feature 4.2.0 (org.wso2.carbon.security.mgt.ui.feature.jar 4.2.0)
Cannot satisfy dependency: From: Key Store Management Feature 4.2.4 (org.wso2.carbon.security.mgt.feature.group 4.2.4) To: org.wso2.carbon.security.mgt.ui.feature.group
[4.2.2]
Cannot satisfy dependency: From: WSO2 Carbon - Security Management UI Feature 4.2.0 (org.wso2.carbon.security.mgt.ui.feature.group 4.2.0) To: org.wso2.carbon.security.mgt.ui.feature.jar
[4.2.0]
Cannot satisfy dependency: From: WSO2 Carbon - Security Management UI Feature 4.2.2 (org.wso2.carbon.security.mgt.ui.feature.group 4.2.2) To: org.wso2.carbon.security.mgt.ui.feature.jar
[4.2.2]
Cannot satisfy dependency: From: WSO2 Carbon - Service Management Feature 4.2.1 (org.wso2.carbon.service.mgt.feature.group 4.2.1) To: org.wso2.carbon.service.mgt.ui.feature.group [4.2.0]
Cannot satisfy dependency: From: WSO2 Carbon - Service Management UI Feature 4.2.0 (org.wso2.carbon.service.mgt.ui.feature.group 4.2.0) To: org.wso2.carbon.security.mgt.ui.feature.group [4.2.0]
I am having similar issues when trying to install any of the features on top of any other wso2 product.
A work-around would be to uncheck the "bundles"(underneath the feauture - eg API Manager - uncheck Key Store bundle) that are causing the dependancy issues.
Hope this helps. I am having a lot of these conflicts when adding: AppServ to Carbon , MessageBroker to ApplicationServ.
We have decided to rather not try and bundle these whole products together , as there are too many issues and bugs etc etc, but rather to run them in standalone mode and utilize SSO.