Has anyone gotten the jenkins-docs / simple-python-pyinstaller-app to work?

2021-05-07 Thread Ray Tayek
The best i can do so far is:

[Pipeline] sh + docker inspect -f . python:2-alpine unable to resolve 
docker endpoint: open C:/Program Files/Git/certs/client/ca.pem: no such 
file or directory 

I had lot's of problems so I made this SSCCE 
. Also posted this 
so question 

.

Any pointers will be appreciated.

Thank you

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/6f2e9513-b60a-4911-87c3-64a05cb5b114n%40googlegroups.com.


Disabling sameorigin checks for a LAN IP

2021-05-07 Thread Jesse Kaukonen
I'm trying to set up a screen in our office to display the Jenkins 
dashboard and the state of all our pipelines. This is an HTML page with an 
iframe for Jenkins, as the same page displays status for other tools as 
well. For the Jenkins view, I'm getting:

```
The loading of “http://foobar.local/view/main_dashboard/” in a frame is 
denied by “X-Frame-Options“ directive set to “sameorigin“.
```

due to `X-Frame-Options sameorigin` being set by the server.

I want to disable sameorigin checks for a specific IP address in our LAN, 
as our internal Jenkins instance is not accessible over the internet.

Things I've tried include:

* Adding `jenkins.security.FrameOptionsPageDecorator.enabled=false` into 
Jenkins cmd params, as documented in the [system properties 
manual](https://www.jenkins.io/doc/book/managing/system-properties/). This 
didn't do anything.
* Installing [cors-filter](https://plugins.jenkins.io/cors-filter/) and 
tweaking with its settings. No changes to the headers. I tried configuring 
the allowed origins with `http://x.x.x.x` (the IP) and `*` (allow all) for 
GET requests.
* Installing 
[xframe-filter](https://plugins.jenkins.io/xframe-filter-plugin/) and 
disabling sameorigin checks. Still a no go.
* I also tried rebooting Jenkins between the CMD argument changes and the 
plugin configurations.

I'm running Jenkins 2.277.4 with nginx proxy passing data into it without 
TLS, as this is an internal network. Here's the relevant part of my nginx 
config:

```
location ~ "^/static/[0-9a-fA-F]{8}\/(.*)$" {
# rewrite all static files into requests to the root
# E.g /static/12345678/css/something.css will become 
/css/something.css
rewrite "^/static/[0-9a-fA-F]{8}\/(.*)" /$1 last;
}

location /userContent {
# have nginx handle all the static requests to userContent folder
# note : This is the $JENKINS_HOME dir
root /var/lib/jenkins/;
if (!-f $request_filename){
# this file does not exist, might be a directory or a /**view** 
url
rewrite (.*) /$1 last;
break;
}
sendfile on;
}

location / {
sendfile off;
proxy_pass   http://jenkins;
proxy_redirect   default;
proxy_http_version 1.1;

# Required for Jenkins websocket agents
proxy_set_header   Connection $connection_upgrade;
proxy_set_header   Upgrade $http_upgrade;

proxy_set_header   Host $host;
proxy_set_header   X-Real-IP $remote_addr;
proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header   X-Forwarded-Proto $scheme;
proxy_max_temp_file_size 0;

#this is the maximum upload size
client_max_body_size   10m;
client_body_buffer_size   128k;

proxy_connect_timeout   90;
proxy_send_timeout   90;
proxy_read_timeout   90;
proxy_buffering   off;
proxy_request_buffering   off; # Required for HTTP CLI commands
proxy_set_header Connection ""; # Clear for keepalive
}

```

Any ideas where else I could investigate this?

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/cb304365-3621-4449-ba83-2310ff98d195n%40googlegroups.com.


Re: Provision EC2 node: gets destroyed as soon as it is ready

2021-05-07 Thread Amedee Van Gasse
This is when I manually provision:

May 07, 2021 6:18:25 PM INFO hudson.plugins.ec2.SlaveTemplate getImage
Getting image for request {ExecutableUsers: [],Filters: [],ImageIds: 
[ami-0d8ed2b0df1b1c6ef],Owners: []}
May 07, 2021 6:18:25 PM INFO hudson.plugins.ec2.SlaveTemplate 
logProvisionInfo
SlaveTemplate{description='Windows', labels='aws windows'}. Considering 
launching
May 07, 2021 6:18:25 PM INFO hudson.plugins.ec2.SlaveTemplate 
setupRootDevice
AMI had /dev/sda1
May 07, 2021 6:18:25 PM INFO hudson.plugins.ec2.SlaveTemplate 
setupRootDevice
{DeleteOnTermination: true,SnapshotId: snap-0ab3c9f92925a0abf,VolumeSize: 
200,VolumeType: gp2,Encrypted: false}
May 07, 2021 6:18:25 PM INFO hudson.plugins.ec2.SlaveTemplate 
logProvisionInfo
SlaveTemplate{description='Windows', labels='aws windows'}. EBS default 
encryption value set to: Based on AMI (null)
May 07, 2021 6:18:25 PM INFO hudson.plugins.ec2.SlaveTemplate 
logProvisionInfo
SlaveTemplate{description='Windows', labels='aws windows'}. Setting 
Instance Initiated Shutdown Behavior : ShutdownBehavior.Terminate
May 07, 2021 6:18:25 PM INFO hudson.plugins.ec2.SlaveTemplate 
logProvisionInfo
SlaveTemplate{description='Windows', labels='aws windows'}. Looking for 
existing instances with describe-instance: {Filters: [{Name: 
image-id,Values: [ami-0d8ed2b0df1b1c6ef]}, {Name: instance-type,Values: 
[t3a.medium]}, {Name: key-name,Values: [rsa-8192-aws-jenkins]}, {Name: 
tenancy,Values: [default]}, {Name: subnet-id,Values: [subnet-d426f499]}, 
{Name: instance.group-id,Values: [sg-0c2d470529c492f13]}, {Name: 
tag:jenkins_server_url,Values: [https://jenkins.itextsupport.com/]}, {Name: 
tag:jenkins_slave_type,Values: [demand_Windows]}, {Name: tag:Name,Values: 
[Jenkins/Windows]}],InstanceIds: [],}
May 07, 2021 6:18:26 PM INFO hudson.plugins.ec2.SlaveTemplate 
logProvisionInfo
SlaveTemplate{description='Windows', labels='aws windows'}. Return 
instance: {AmiLaunchIndex: 0,ImageId: ami-0d8ed2b0df1b1c6ef,InstanceId: 
i-0078ac5df5320de3d,InstanceType: t3a.medium,KeyName: 
rsa-8192-aws-jenkins,LaunchTime: Fri May 07 18:18:26 CEST 2021,Monitoring: 
{State: pending},Placement: {AvailabilityZone: eu-central-1c,GroupName: 
,Tenancy: default,},Platform: windows,PrivateDnsName: 
ip-172-31-12-78.eu-central-1.compute.internal,PrivateIpAddress: 
172.31.12.78,ProductCodes: [],PublicDnsName: ,State: {Code: 0,Name: 
pending},StateTransitionReason: ,SubnetId: subnet-d426f499,VpcId: 
vpc-ddb7aab5,Architecture: x86_64,BlockDeviceMappings: [],ClientToken: 
e9f54d34-c9a4-47db-a472-a1204e9b5784,EbsOptimized: true,EnaSupport: 
true,Hypervisor: xen,ElasticGpuAssociations: 
[],ElasticInferenceAcceleratorAssociations: [],NetworkInterfaces: 
[{Attachment: {AttachTime: Fri May 07 18:18:26 CEST 2021,AttachmentId: 
eni-attach-0789ae7127addb88f,DeleteOnTermination: true,DeviceIndex: 
0,Status: attaching,NetworkCardIndex: 0},Description: ,Groups: [{GroupName: 
ssh,GroupId: sg-0c2d470529c492f13}],Ipv6Addresses: [],MacAddress: 
0a:1a:df:ec:e0:26,NetworkInterfaceId: eni-034d777e34991680a,OwnerId: 
050520292612,PrivateDnsName: 
ip-172-31-12-78.eu-central-1.compute.internal,PrivateIpAddress: 
172.31.12.78,PrivateIpAddresses: [{Primary: true,PrivateDnsName: 
ip-172-31-12-78.eu-central-1.compute.internal,PrivateIpAddress: 
172.31.12.78}],SourceDestCheck: true,Status: in-use,SubnetId: 
subnet-d426f499,VpcId: vpc-ddb7aab5,InterfaceType: 
interface}],RootDeviceName: /dev/sda1,RootDeviceType: ebs,SecurityGroups: 
[{GroupName: ssh,GroupId: sg-0c2d470529c492f13}],SourceDestCheck: 
true,StateReason: {Code: pending,Message: pending},Tags: [{Key: Name,Value: 
Jenkins/Windows}, {Key: jenkins_slave_type,Value: demand_Windows}, {Key: 
jenkins_server_url,Value: 
https://jenkins.itextsupport.com/}],VirtualizationType: hvm,CpuOptions: 
{CoreCount: 1,ThreadsPerCore: 2},CapacityReservationSpecification: 
{CapacityReservationPreference: open,},Licenses: [],MetadataOptions: 
{State: pending,HttpTokens: optional,HttpPutResponseHopLimit: 
1,HttpEndpoint: enabled},EnclaveOptions: {Enabled: false},}
May 07, 2021 6:18:26 PM INFO hudson.plugins.ec2.EC2RetentionStrategy start
Start requested for EC2 (eu-central-1 Windows) - Windows 
(i-0078ac5df5320de3d)
May 07, 2021 6:18:26 PM INFO hudson.plugins.ec2.EC2Cloud log
Launching instance: i-0078ac5df5320de3d
May 07, 2021 6:18:26 PM INFO hudson.plugins.ec2.EC2Cloud log
bootstrap()
May 07, 2021 6:18:26 PM INFO hudson.plugins.ec2.EC2Cloud log
Getting keypair...
May 07, 2021 6:18:26 PM INFO hudson.plugins.ec2.EC2Cloud log
Using private key rsa-8192-aws-jenkins (SHA-1 fingerprint 
87:87:34:8e:a4:d5:7f:17:bb:08:9d:f8:68:c9:33:f1)
May 07, 2021 6:18:26 PM INFO hudson.plugins.ec2.EC2Cloud log
Authenticating as jenkins
May 07, 2021 6:18:27 PM INFO hudson.plugins.ec2.EC2Cloud log
Connecting to null on port 22, with timeout 1.
May 07, 2021 6:18:27 PM INFO hudson.plugins.ec2.EC2Cloud log
No SSH key verification (ssh-ed25519 
57:02:49:51:15:8a:41:70:67:ca:7a:e5:48:5f:32:b6) for connections to 

Provision EC2 node: gets destroyed as soon as it is ready

2021-05-07 Thread Amedee Van Gasse
I have added an EC2 cloud with the intention of using Windows instances.
The Windows AMI is configured to use SSH connection, not WinRM.
When I provision a Windows instance, I see it starting in the AWS console, 
and I see this in the Jenkins console:

May 07, 2021 5:45:42 PM INFO hudson.plugins.ec2.EC2Cloud log
Connecting to ec2-18-197-156-192.eu-central-1.compute.amazonaws.com on port 
22, with timeout 1.
May 07, 2021 5:45:52 PM INFO hudson.plugins.ec2.EC2Cloud log
Failed to connect via ssh: The kexTimeout (1 ms) expired.
May 07, 2021 5:45:52 PM INFO hudson.plugins.ec2.EC2Cloud log
Waiting for SSH to come up. Sleeping 5.
May 07, 2021 5:45:57 PM INFO hudson.plugins.ec2.EC2Cloud log
Connecting to ec2-18-197-156-192.eu-central-1.compute.amazonaws.com on port 
22, with timeout 1.
May 07, 2021 5:45:57 PM INFO hudson.plugins.ec2.EC2Cloud log
Failed to connect via ssh: There was a problem while connecting to 
ec2-18-197-156-192.eu-central-1.compute.amazonaws.com:22
May 07, 2021 5:45:57 PM INFO hudson.plugins.ec2.EC2Cloud log
Waiting for SSH to come up. Sleeping 5.

(repeat many times)
This is normal of course, as long as the instance is still starting.

After a while, I see in the AWS console that the instance is Running.
And immediately, it gets terminated.

I also see this in the Jenkins log, which may or may not be relevant:

May 07, 2021 5:50:52 PM INFO hudson.plugins.ec2.EC2OndemandSlave 
lambda$terminate$0
Terminated EC2 instance (terminated): i-0c82439628de13743
May 07, 2021 5:50:52 PM INFO hudson.plugins.ec2.EC2OndemandSlave 
lambda$terminate$0
Removed EC2 instance from jenkins master: i-0c82439628de13743

I may add more log snippets as I try to figure this out.

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/7a223f14-cd33-4722-9424-997158bb4fb8n%40googlegroups.com.