Prestashop 1.7.8.8 Service Not Found Exception - Admin page blank (Error 500) after update to 1.7.8.8 - symfony

I have updated from Prestashop 1.7.8.6 to 1.7.8.8, admin worked, but after I updated a translation in the Backoffice, the Backoffice got a 500 error and I can't access it anymore. This is the Debug message:
ServiceNotFoundException
The service "prestashop.adapter.product.options.redirect_target_provider" has a dependency on a non-existent service "prestashop.adapter.product.repository.product_preview_repository".
in CheckExceptionOnInvalidReferenceBehaviorPass.php line 31
at CheckExceptionOnInvalidReferenceBehaviorPass->processValue(object(Reference), false)
in AbstractRecursivePass.php line 60
at AbstractRecursivePass->processValue(array(object(Reference), object(Reference), object(Reference)), false)
in CheckExceptionOnInvalidReferenceBehaviorPass.php line 28
at CheckExceptionOnInvalidReferenceBehaviorPass->processValue(array(object(Reference), object(Reference), object(Reference)))
in AbstractRecursivePass.php line 67
at AbstractRecursivePass->processValue(object(Definition), true)
in CheckExceptionOnInvalidReferenceBehaviorPass.php line 28
at CheckExceptionOnInvalidReferenceBehaviorPass->processValue(object(Definition), true)
in AbstractRecursivePass.php line 60
I don't know how to proceed :( - any tips?

Related

New eks node instance not able to join cluster, getting "cni plugin not initialized"

I am pretty new to terraform and trying to create a new eks cluster with node-group and launch template. The EKS cluster, node-group, launch template, nodes all created successfully. However, when I changed the desired size of the node group (using terraform or the AWS management console), it would fail. No error reported in the Nodg group Health issues tab. I digged further, and found that new instances were launched by the Autoscaling group, but new ones were not able to join the cluster.
Look into the troubled instances, I found the following log by running "sudo journalctl -f -u kubelet"
an 27 19:32:32 ip-10-102-21-129.us-east-2.compute.internal kubelet[3168]: E0127 19:32:32.612322 3168 eviction_manager.go:254] "Eviction manager: failed to get summary stats" err="failed to get node info: node "ip-10-102-21-129.us-east-2.compute.internal" not found"
Jan 27 19:32:32 ip-10-102-21-129.us-east-2.compute.internal kubelet[3168]: E0127 19:32:32.654501 3168 kubelet.go:2427] "Error getting node" err="node "ip-10-102-21-129.us-east-2.compute.internal" not found"
Jan 27 19:32:32 ip-10-102-21-129.us-east-2.compute.internal kubelet[3168]: E0127 19:32:32.755473 3168 kubelet.go:2427] "Error getting node" err="node "ip-10-102-21-129.us-east-2.compute.internal" not found"
Jan 27 19:32:32 ip-10-102-21-129.us-east-2.compute.internal kubelet[3168]: E0127 19:32:32.776238 3168 kubelet.go:2352] "Container runtime network not ready" networkReady="NetworkReady=false reason:NetworkPluginNotReady message:Network plugin returns error: cni plugin not initialized"
Jan 27 19:32:32 ip-10-102-21-129.us-east-2.compute.internal kubelet[3168]: E0127 19:32:32.856199 3168 kubelet.go:2427] "Error getting node" err="node "ip-10-102-21-129.us-east-2.compute.internal" not found"
Looked like the issue has something to do with the cni add-ons, googled it and others suggest to check for the log inside the /var/log/aws-routed-eni directory. I could find that directory and logs in the working nodes (the ones created initialy when the eks cluster was created), but the same directory and log files do not exist in the newly launch instances nodes (the one created after the cluster was created and by changing the desired node size)
The image I used for the node-group is ami-0af5eb518f7616978 (amazon/amazon-eks-node-1.24-v20230105)
Here is what my script looks like:
resource "aws_eks_cluster" "eks-cluster" {
name = var.mod_cluster_name
role_arn = var.mod_eks_nodes_role
version = "1.24"
vpc_config {
security_group_ids = [var.mod_cluster_security_group_id]
subnet_ids = var.mod_private_subnets
endpoint_private_access = "true"
endpoint_public_access = "true"
}
}
resource "aws_eks_node_group" "eks-cluster-ng" {
cluster_name = aws_eks_cluster.eks-cluster.name
node_group_name = "eks-cluster-ng"
node_role_arn = var.mod_eks_nodes_role
subnet_ids = var.mod_private_subnets
#instance_types = ["t3a.medium"]
scaling_config {
desired_size = var.mod_asg_desired_size
max_size = var.mod_asg_max_size
min_size = var.mod_asg_min_size
}
launch_template {
#name = aws_launch_template.eks_launch_template.name
id = aws_launch_template.eks_launch_template.id
version = aws_launch_template.eks_launch_template.latest_version
}
lifecycle {
create_before_destroy = true
}
}
resource "aws_launch_template" "eks_launch_template" {
name = join("", [aws_eks_cluster.eks-cluster.name, "-launch-template"])
vpc_security_group_ids = [var.mod_node_security_group_id]
block_device_mappings {
device_name = "/dev/xvda"
ebs {
volume_size = var.mod_ebs_volume_size
volume_type = "gp2"
#encrypted = false
}
}
lifecycle {
create_before_destroy = true
}
image_id = var.mod_ami_id
instance_type = var.mod_eks_node_instance_type
metadata_options {
http_endpoint = "enabled"
http_tokens = "required"
http_put_response_hop_limit = 2
}
user_data = base64encode(<<-EOF
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="==MYBOUNDARY=="
--==MYBOUNDARY==
Content-Type: text/x-shellscript; charset="us-ascii"
#!/bin/bash
set -ex
exec > >(tee /var/log/user-data.log|logger -t user-data -s 2>/dev/console) 2>&1
B64_CLUSTER_CA=${aws_eks_cluster.eks-cluster.certificate_authority[0].data}
API_SERVER_URL=${aws_eks_cluster.eks-cluster.endpoint}
K8S_CLUSTER_DNS_IP=172.20.0.10
/etc/eks/bootstrap.sh ${aws_eks_cluster.eks-cluster.name} --apiserver-endpoint $API_SERVER_URL --b64-cluster-ca $B64_CLUSTER_CA
--==MYBOUNDARY==--\
EOF
)
tag_specifications {
resource_type = "instance"
tags = {
Name = "EKS-MANAGED-NODE"
}
}
}
Another thing I notice is that I tagged the instance Name as "EKS-MANAGED-NODE". That tag showed up correctly in nodes created when the eks cluster was created. However, any new nodes created afterward, the Name changed to "EKS-MANAGED-NODEGROUP-NODE"
I wonder if that indicates there is issue?
I checked the log confirmed that the user-data got looked at and ran when instances started up.
sh-4.2$ more user-data.log
B64_CLUSTER_CA=LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUMvakNDQWVhZ0F3SUJBZ0lCQURBTkJna3Foa2lHOXcwQkFRc0ZBREFWTVJNd0VRWURWUVFERXdwcmRXSmwKY201bGRHVnpNQjRYRFRJek1ERXlOekU
0TlRrMU1Wb1hEVE16TURFeU5E (deleted the rest)
API_SERVER_URL=https://EC283069E9FF1B33CD6C59F3E3D0A1B9.gr7.us-east-2.eks.amazonaws.com
K8S_CLUSTER_DNS_IP=172.20.0.10
/etc/eks/bootstrap.sh dev-test-search-eks-oVpBNP0e --apiserver-endpoint https://EC283069E9FF1B33CD6C59F3E3D0A1B9.gr7.us-east-2.eks.amazonaws.com --b64-cluster-ca LS0tLS
1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUMvakND...(deleted the rest)
Using kubelet version 1.24.7
true
Using containerd as the container runtime
true
‘/etc/eks/containerd/containerd-config.toml’ -> ‘/etc/containerd/config.toml’
‘/etc/eks/containerd/sandbox-image.service’ -> ‘/etc/systemd/system/sandbox-image.service’
Created symlink from /etc/systemd/system/multi-user.target.wants/containerd.service to /usr/lib/systemd/system/containerd.service.
Created symlink from /etc/systemd/system/multi-user.target.wants/sandbox-image.service to /etc/systemd/system/sandbox-image.service.
‘/etc/eks/containerd/kubelet-containerd.service’ -> ‘/etc/systemd/system/kubelet.service’
Created symlink from /etc/sy
I confirmed that the role being specified has all the required permission, the role is being used in other eks cluster, I am trying to create a new one based on the existing one using terraform.
I tried removing the launch template and let aws using the default one. Then new nodes have no issue joining the cluster.
I looked at my launch template script and at the registry https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_template
nowhere mentioned that I need to manually add or run the cni plugin.
So I don't understand why the cni plugin was not installed automatically and why instances are not able to join the cluster.
Any help is appreciated.

PDFPageCountError: Unable to get page count

I am trying to use pdf2image, but I am getting this error:
PDFPageCountError: Unable to get page count.
I/O Error: Couldn't open file 'C:\Users\user_name\Desktop\folder_name\folder2_name\folder3_name\007-084841-1 to 31 Dec'22': No error.
It is confusing as it doesn't give any error, it just says 'No error'
My code is:
doc = convert_from_path("C:\\Users\\user_name\\Desktop\\folder_name\\folder2_name\\folder3_name\\007-084841-1 to 31 Dec'22")
path, fileName = os.path.split("C:\\Users\\user_name\\Desktop\\folder_name\\folder2_name\\folder3_name\\007-084841-1 to 31 Dec'22")
fileBaseName, fileExtension = os.path.splitext(fileName)
for page_number, page_data in enumerate(doc):
txt = pytesseract.image_to_string(Image.fromarray(page_data)).encode("utf-8")
print("Page # {} - {}".format(str(page_number),txt))
Can anyone help me please?
I don't know what to try as the error message just says Unable to open...: No error

file_get_html() not working for the only webpage

I want to call a simple DOM file
I tested with another links and it works, but with this url it's not working.
My code is:
$bnadatos = file_get_html("http://www.rofex.com.ar/cem/FyO.aspx");
foreach($bnadatos->find('[#id="ctl00_ContentPlaceHolder1_gvFyO"]') as $i){
echo "datos:";
echo $i->innertext;
}
Response is a blank page.
What's wrong?
i solved with
$arrContextOptions=array(
"ssl"=>array(
"verify_peer"=>false,
"verify_peer_name"=>false,
),
);
$response = file_get_html("https://www.rofex.com.ar/cem/FyO.aspx", false, stream_context_create($arrContextOptions));
foreach($response->find('[#id="ctl00_gvwDDF"]/tbody/tr[2]/td[2]') as $i){
echo $i->innertext;
}
thank you #maio290 for light my road
This is just a guess, but do you have your error reporting on?
Out of the box, this is not working with the simple-html-dom library:
Warning: file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed in /var/www/html/dom.php on line 83
Warning: file_get_contents(): Failed to enable crypto in /var/www/html/dom.php on line 83
Warning: file_get_contents(http://www.rofex.com.ar/cem/FyO.aspx): failed to open stream: operation failed in /var/www/html/dom.php on line 83
Fatal error: Call to a member function find() on boolean in /var/www/html/test.php on line 11
A fix for this can be found here - with that in place, I still get a blank page, which is due to a wrong answer (301 Moved Permanently) - for this to fix, you need to modify
'follow_location' => false
to
'follow_location' => true
so, now we get the proper site content - you can modify the selector to $html->find('#ctl00_ContentPlaceHolder1_gvFyO'); this will find all element which id=ctl00_ContentPlaceHolder1_gvFyO - see the documentation as reference.

Symfony2 :500 Internal error on assetic generated file in dev mode

I use assetic on my Symfony2 project and when i put my project on a new server environement i have the following 500 internal Server Error on the top of the CSS and JS generated files on dev environement. It seems that assetic can't access to the temp directory to generate the file.
[exception] 500 | Internal Server Error | ErrorException
[message] Warning: file_put_contents(): Filename cannot be empty in /Users/jo/Developpement/coV2/Symfony/vendor/kriswallsmith/assetic/src/Assetic/Filter/Yui/BaseCompressorFilter.php line 92
[1] ErrorException: Warning: file_put_contents(): Filename cannot be empty in /Users/jo/Developpement/coV2/Symfony/vendor/kriswallsmith/assetic/src/Assetic/Filter/Yui/BaseCompressorFilter.php line 92
at n/a
in /Users/jo/Developpement/coV2/Symfony/vendor/kriswallsmith/assetic/src/Assetic/Filter/Yui/BaseCompressorFilter.php line 92
at Symfony\Component\HttpKernel\Debug\ErrorHandler->handle('2', 'file_put_contents(): Filename cannot be empty', '/Users/jo/Developpement/coV2/Symfony/vendor/kriswallsmith/assetic/src/Assetic/Filter/Yui/BaseCompressorFilter.php', '92', array('content' => '/*!
The line 92 of the BaseCompressorFilter class is the last line of this code :
$tempDir = realpath(sys_get_temp_dir());
$input = tempnam($tempDir, 'YUI-IN-');
$output = tempnam($tempDir, 'YUI-OUT-');
file_put_contents($input, $content);
$tempDir is ok, but $input is empty.
Any idea ?

System.DirectoryServices produces .PageRequestManagerServerErrorException when deployed in production

I am getting this error
Message: Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was: 500
when I am running my application in the IIS.
I think it is with the System.Directory.Services which produces the eror. This does not produce one on my local machine.
Below is a snippet of my code.
string[] a = Request.RequestContext.HttpContext.User.Identity.Name.Split('\\');
System.DirectoryServices.DirectoryEntry ADEntry = new
System.DirectoryServices.DirectoryEntry("WinNT://" + a[0] + "/" + a[1]);
string Arranger = ADEntry.Properties["FullName"].Value.ToString();
Error produced:
Message: Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was: 500
Line: 940
Char: 13
Code: 0
URI: http://hrmd/ScriptResource.axd? d=qoTxFIEhQnPsyvjBHKKk60V8KyVGjuJO4u_QPoCxnkdWP8h53oPF6xWRYBSVhraJ1rWB7MwHQ0UUukOxxZP-__EfNy8U9HNSn9H4TG_rigG5a2MrWox2WPR4280GIrb57NZ6Ajhx2gKgc0sQKMnAVw2&t=48e38e19
Thanks in advance.

Resources