rlm_python , did not obey python_path in config - freeradius

I try to play with FreeRadius rlm_python
FreeRadius Version is : 3.0.15
first I put 'python_path=${modconfdir}/${.:name}'
in /etc/freeradius/mods-available/python
run in debug mode.
part of the debug msg shown :
Wed Sep 13 18:12:31 2017 : Debug: Loaded rlm_python, checking if it's valid
Wed Sep 13 18:12:31 2017 : Debug: # Loaded module rlm_python
Wed Sep 13 18:12:31 2017 : Debug: # Loading module "python" from file /etc/freeradius/mods-enabled/python
Wed Sep 13 18:12:31 2017 : Debug: python {
Wed Sep 13 18:12:31 2017 : Debug: mod_instantiate = "example"
Wed Sep 13 18:12:31 2017 : Debug: mod_authorize = "example"
Wed Sep 13 18:12:31 2017 : Debug: func_authorize = "authorize"
Wed Sep 13 18:12:31 2017 : Debug: mod_authenticate = "example"
Wed Sep 13 18:12:31 2017 : Debug: mod_preacct = "example"
Wed Sep 13 18:12:31 2017 : Debug: mod_accounting = "example"
Wed Sep 13 18:12:31 2017 : Debug: func_accounting = "accounting"
Wed Sep 13 18:12:31 2017 : Debug: mod_checksimul = "example"
Wed Sep 13 18:12:31 2017 : Debug: mod_pre_proxy = "example"
Wed Sep 13 18:12:31 2017 : Debug: mod_post_proxy = "example"
Wed Sep 13 18:12:31 2017 : Debug: mod_post_auth = "example"
Wed Sep 13 18:12:31 2017 : Debug: mod_recv_coa = "example"
Wed Sep 13 18:12:31 2017 : Debug: mod_send_coa = "example"
Wed Sep 13 18:12:31 2017 : Debug: mod_detach = "example"
Wed Sep 13 18:12:31 2017 : Debug: python_path = "/etc/freeradius/mods-config/python"
Wed Sep 13 18:12:31 2017 : Debug: cext_compat = yes
Wed Sep 13 18:12:31 2017 : Debug: }
...
Wed Sep 13 18:12:31 2017 : Debug: # Instantiating module "python" from file /etc/freeradius/mods-enabled/python
Wed Sep 13 18:12:31 2017 : Info: Python version: 2.7.9 (default, Jun 29 2016, 13:11:10) [GCC 4.9.2]
Segmentation fault
next I try to commented the python_path line,
and from shell i put :
export PYTHONPATH=/etc/freeradius/mods-config/python
re try in debug mode , looks like running well
part of debug msg :
Wed Sep 13 18:20:03 2017 : Debug: # Loading module "python" from file /etc/freeradius/mods-enabled/python
Wed Sep 13 18:20:03 2017 : Debug: python {
Wed Sep 13 18:20:03 2017 : Debug: mod_instantiate = "example"
Wed Sep 13 18:20:03 2017 : Debug: mod_authorize = "example"
Wed Sep 13 18:20:03 2017 : Debug: func_authorize = "authorize"
Wed Sep 13 18:20:03 2017 : Debug: mod_authenticate = "example"
Wed Sep 13 18:20:03 2017 : Debug: mod_preacct = "example"
Wed Sep 13 18:20:03 2017 : Debug: mod_accounting = "example"
Wed Sep 13 18:20:03 2017 : Debug: func_accounting = "accounting"
Wed Sep 13 18:20:03 2017 : Debug: mod_checksimul = "example"
Wed Sep 13 18:20:03 2017 : Debug: mod_pre_proxy = "example"
Wed Sep 13 18:20:03 2017 : Debug: mod_post_proxy = "example"
Wed Sep 13 18:20:03 2017 : Debug: mod_post_auth = "example"
Wed Sep 13 18:20:03 2017 : Debug: mod_recv_coa = "example"
Wed Sep 13 18:20:03 2017 : Debug: mod_send_coa = "example"
Wed Sep 13 18:20:03 2017 : Debug: mod_detach = "example"
Wed Sep 13 18:20:03 2017 : Debug: cext_compat = yes
Wed Sep 13 18:20:03 2017 : Debug: }
I try to add the same export line to freeradius init script, but it didn't take effect.
So how to properly set python_path ?
Sincerely
-bino-

Related

FreeRADIUS 4 : EAP-Request failure

I'm conducting an operation test of eap-aka certification with FreeRADIUS 4.
I want to set EAP-Request / AKA-Identity to return AT_PERMANENT_ID_REQ (the value set in FreeRadius is Permanent-Id-Req),
but in the case of Permanent-Id-Req, even if the specified value is set I get an error.
If I set Any-Id-Req and FullAuth-Id-Req, both values are returned successfully.
Set value
[OK] request_identity = Any-Id-Req
[OK] request_identity = FullAuth-Id-Req
[Failure] request_identity = Permanent-Id-Req
What settings should I make to ensure that the Permanent-Id-Req also returns the value correctly?
The failure log is below.
Tue Apr 26 22:21:48 2022: /usr/local/etc/raddb/sites-enabled/eap-aka-sim[137]: Pushed parse rule to eap-aka section: request_identity {}
Tue Apr 26 22:21:48 2022: /usr/local/etc/raddb/sites-enabled/eap-aka-sim[137]: Pushed parse rule to eap-aka section: strip_permanent_identity_hint {}
Tue Apr 26 22:21:48 2022: /usr/local/etc/raddb/sites-enabled/eap-aka-sim[137]: Pushed parse rule to eap-aka section: ephemeral_id_length
Tue Apr 26 22:21:48 2022: /usr/local/etc/raddb/sites-enabled/eap-aka-sim[137]: Pushed parse rule to eap-aka section: protected_success {}
Tue Apr 26 22:21:48 2022: /usr/local/etc/raddb/sites-enabled/eap-aka-sim[137]: eap-aka {
Tue Apr 26 22:21:48 2022: /usr/local/etc/raddb/sites-enabled/eap-aka-sim[137]: request_identity = Permanent-Id-Req
Tue Apr 26 22:21:48 2022: /usr/local/etc/raddb/sites-enabled/eap-aka-sim[159]: Invalid value "Permanent-Id-Req". Expected one of 'Any-Id-Req', 'FullAuth-Id-Req', 'Init', 'Permanent-Id-Req', 'no', 'none'
Tue Apr 26 22:21:48 2022: /usr/local/etc/raddb/sites-enabled/eap-aka-sim[137]: Failed evaluating configuration for module "process_eap_aka"
Thanks for your help!

Change timestamp on bitbucket

I have made a file and add it on 08 Jul 2019 14:00:00 +0000
but I wanted to show in Bitbucket repository this timestamp: Mon, 08 Jul 2019 11:42:00 +0000.
so I did:
$ git commit -m"try444" --date="Mon, 08 Jul 2019 11:42:00 +0000"
then after the push the Bitbucket still show:08 Jul 2019 14:00:00 +0000
How to change the hour in Bitbucket server??
I have made a file and add it on 08 Jul 2019 14:00:00 +0000
but I wanted to show in Bitbucket repository this timestamp: Mon, 08 Jul 2019 11:42:00 +0000.
so I did:
$ git commit -m"try444" --date="Mon, 08 Jul 2019 11:42:00 +0000"
$ git commit -m"try444" --date="Mon, 08 Jul 2019 11:42:00 +0000"
Bitbucket still show:08 Jul 2019 14:00:00 +0000

jenkins doesn't work with many cores and/or large memory

I have started Jenkins on an aws m5.24xlarge instance with 96 vCPU and 384 GiB memory). When starting it, I find myself unable to access it. curl localhost:8080 hangs forever and gets no response. Also, there is no log output.
However, stopping the same instance, changing the instance type to m5.12xlarge (48 vCPU and 192 GiB memory) and running the same configuration again, works.
This is the same for running it via java -jar jenkins.war, by installing it via the docker run jenkins/jenkins... command or by installing it from a ubuntu repo.
Can any of you reproduce that issue? Is there a known maximum number of cores Jenkins can handle or a maximum memory size?
Or is there a starting flag that I can set so it works?
Thanks in advance.
Edit: This is the log output
Running from: /home/ubuntu/jenkins.war
webroot: $user.home/.jenkins
Jul 06, 2018 1:55:38 PM org.eclipse.jetty.util.log.Log initialized
INFO: Logging initialized #236ms to org.eclipse.jetty.util.log.JavaUtilLog
Jul 06, 2018 1:55:38 PM winstone.Logger logInternal
INFO: Beginning extraction from war file
Jul 06, 2018 1:55:39 PM org.eclipse.jetty.server.handler.ContextHandler setContextPath
WARNING: Empty contextPath
Jul 06, 2018 1:55:39 PM org.eclipse.jetty.server.Server doStart
INFO: jetty-9.4.z-SNAPSHOT, build timestamp: 2017-11-21T21:27:37Z, git hash: 82b8fb23f757335bb3329d540ce37a2a2615f0a8
Jul 06, 2018 1:55:39 PM org.eclipse.jetty.webapp.StandardDescriptorProcessor visitServlet
INFO: NO JSP Support for /, did not find org.eclipse.jetty.jsp.JettyJspServlet
Jul 06, 2018 1:55:39 PM org.eclipse.jetty.server.session.DefaultSessionIdManager doStart
INFO: DefaultSessionIdManager workerName=node0
Jul 06, 2018 1:55:39 PM org.eclipse.jetty.server.session.DefaultSessionIdManager doStart
INFO: No SessionScavenger set, using defaults
Jul 06, 2018 1:55:39 PM org.eclipse.jetty.server.session.HouseKeeper startScavenging
INFO: Scavenging every 660000ms
Jenkins home directory: /home/ubuntu/.jenkins found at: $user.home/.jenkins
Jul 06, 2018 1:55:40 PM org.eclipse.jetty.server.handler.ContextHandler doStart
INFO: Started w.#644c78d4{/,file:///home/ubuntu/.jenkins/war/,AVAILABLE}{/home/ubuntu/.jenkins/war}
Jul 06, 2018 1:55:40 PM org.eclipse.jetty.server.AbstractConnector doStart
INFO: Started ServerConnector#355e34c7{HTTP/1.1,[http/1.1]}{0.0.0.0:8080}
Jul 06, 2018 1:55:40 PM org.eclipse.jetty.server.Server doStart
INFO: Started #1886ms
Jul 06, 2018 1:55:40 PM winstone.Logger logInternal
INFO: Winstone Servlet Engine v4.0 running: controlPort=disabled
Jul 06, 2018 1:55:41 PM jenkins.InitReactorRunner$1 onAttained
INFO: Started initialization
Jul 06, 2018 1:55:41 PM jenkins.InitReactorRunner$1 onAttained
INFO: Listed all plugins
Jul 06, 2018 1:55:42 PM jenkins.InitReactorRunner$1 onAttained
INFO: Prepared all plugins
Jul 06, 2018 1:55:42 PM jenkins.InitReactorRunner$1 onAttained
INFO: Started all plugins
Jul 06, 2018 1:55:42 PM jenkins.InitReactorRunner$1 onAttained
INFO: Augmented all extensions
Jul 06, 2018 1:55:42 PM jenkins.InitReactorRunner$1 onAttained
INFO: Loaded all jobs
Jul 06, 2018 1:55:42 PM hudson.model.AsyncPeriodicWork$1 run
INFO: Started Download metadata
Jul 06, 2018 1:55:43 PM org.springframework.context.support.AbstractApplicationContext prepareRefresh
INFO: Refreshing org.springframework.web.context.support.StaticWebApplicationContext#46ce48b7: display name [Root WebApplicationContext]; startup date [Fri Jul 06 13:55:43 UTC 2018]; root of context hierarchy
Jul 06, 2018 1:55:43 PM org.springframework.context.support.AbstractApplicationContext obtainFreshBeanFactory
INFO: Bean factory for application context [org.springframework.web.context.support.StaticWebApplicationContext#46ce48b7]: org.springframework.beans.factory.support.DefaultListableBeanFactory#454a5ad5
Jul 06, 2018 1:55:43 PM org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons
INFO: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory#454a5ad5: defining beans [authenticationManager]; root of factory hierarchy
Jul 06, 2018 1:55:43 PM org.springframework.context.support.AbstractApplicationContext prepareRefresh
INFO: Refreshing org.springframework.web.context.support.StaticWebApplicationContext#37a2b2a7: display name [Root WebApplicationContext]; startup date [Fri Jul 06 13:55:43 UTC 2018]; root of context hierarchy
Jul 06, 2018 1:55:43 PM org.springframework.context.support.AbstractApplicationContext obtainFreshBeanFactory
INFO: Bean factory for application context [org.springframework.web.context.support.StaticWebApplicationContext#37a2b2a7]: org.springframework.beans.factory.support.DefaultListableBeanFactory#74441a6d
Jul 06, 2018 1:55:43 PM org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons
INFO: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory#74441a6d: defining beans [filter,legacy]; root of factory hierarchy
Jul 06, 2018 1:55:43 PM jenkins.install.SetupWizard init
INFO:
*************************************************************
*************************************************************
*************************************************************
Jenkins initial setup is required. An admin user has been created and a password generated.
Please use the following password to proceed to installation:
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
This may also be found at: /home/ubuntu/.jenkins/secrets/initialAdminPassword
*************************************************************
*************************************************************
*************************************************************
Jul 06, 2018 1:55:46 PM hudson.model.UpdateSite updateData
INFO: Obtained the latest update center data file for UpdateSource default
Jul 06, 2018 1:55:46 PM hudson.model.UpdateSite updateData
INFO: Obtained the latest update center data file for UpdateSource default
Jul 06, 2018 1:55:46 PM jenkins.InitReactorRunner$1 onAttained
INFO: Completed initialization
Jul 06, 2018 1:55:46 PM hudson.WebAppMain$3 run
INFO: Jenkins is fully up and running
Jul 06, 2018 1:55:46 PM hudson.model.DownloadService$Downloadable load
INFO: Obtained the updated data file for hudson.tasks.Maven.MavenInstaller
Jul 06, 2018 1:55:46 PM hudson.model.AsyncPeriodicWork$1 run
INFO: Finished Download metadata. 3,968 ms

Removing lines from files having duplicate date time values.

I am working on parsing a file as follows. I see a duplicate line for "ver."=3 and 5 because there is only 1 second difference (Mon Jan 15 08:24:02 vs Mon Jan 15 08:24:03) software prints it twice.
Also, of you see line for "Ver."5 "Complete Time" has one second difference. I would like delete lines which has rest of the fields matching in the line except "Time" or "Complete Time" column has difference of 1 or 2 seconds.
Loc ID Img Name Ver. Time Complete Time
------------------------------------------------------------------------------------------
ssfad_fs TINT_PAP_1516048511 0 Mon Jan 15 20:35:13 2018 NA
ssfad_fs sfad_jpg 1 Mon Jan 15 18:24:02 2018 Wed Jan 17 18:24:02 2018
ssfad_fs sfad_jpg 1 Mon Jan 15 16:24:02 2018 Wed Jan 17 16:24:02 2018
ssfad_fs sfad_jpg 2 Mon Jan 15 12:24:03 2018 Wed Jan 17 12:24:02 2018
ssfad_fs sfad_jpg 3 Mon Jan 15 08:24:02 2018 Wed Jan 17 08:24:02 2018
ssfad_fs sfad_jpg 3 Mon Jan 15 08:24:03 2018 Wed Jan 17 08:24:02 2018
ssfad_fs sfad_jpg 4 Mon Jan 15 04:24:02 2018 Wed Jan 17 04:24:02 2018
ssfad_fs sfad_jpg 5 Mon Jan 15 00:24:03 2018 Wed Jan 17 00:24:59 2018
ssfad_fs sfad_jpg 5 Mon Jan 15 00:24:03 2018 Wed Jan 17 00:25:00 2018
ssfad_fs sfad_jpg 6 Sun Jan 14 20:24:03 2018 Tue Jan 16 20:24:02 2018
Expected O/P
Loc ID Img Name Ver. Time Complete Time
------------------------------------------------------------------------------------------
ssfad_fs TINT_PAP_1516048511 0 Mon Jan 15 20:35:13 2018 NA
ssfad_fs sfad_jpg 1 Mon Jan 15 18:24:02 2018 Wed Jan 17 18:24:02 2018
ssfad_fs sfad_jpg 1 Mon Jan 15 16:24:02 2018 Wed Jan 17 16:24:02 2018
ssfad_fs sfad_jpg 2 Mon Jan 15 12:24:03 2018 Wed Jan 17 12:24:02 2018
ssfad_fs sfad_jpg 3 Mon Jan 15 08:24:02 2018 Wed Jan 17 08:24:02 2018
ssfad_fs sfad_jpg 4 Mon Jan 15 04:24:02 2018 Wed Jan 17 04:24:02 2018
ssfad_fs sfad_jpg 5 Mon Jan 15 00:24:03 2018 Wed Jan 17 00:24:59 2018
ssfad_fs sfad_jpg 6 Sun Jan 14 20:24:03 2018 Tue Jan 16 20:24:02 2018
When I try #cat junk1.jnk |sort -uk 3,3 command it deletes third line as well which has same Ver.1 number but different times. I want to keep that line. Please help.

ActiveRecord does not respect daylight saving time (DST)?

We're in the timezone Bern, which is +0100. But since we're now in summertime (we have daylight saving time), the current offset is +0200. In my rails app, I set the timezone using a wrapper in the application controller since I need to have user-based timezones:
around_filter :user_timezone
def user_timezone(&block)
Time.use_zone(current_timezone, &block)
end
Now the strange part:
Time.zone.now # 2013-04-10 10:32:56 +0200
# (correct offset)
SomeArModel.first.created_at # 2013-03-28 17:49:59 +0100
# (incorrect offset, no DST)
Is there any explanation for this?
Thats normal behavior, the DST change happened on Sun Mar 31 01:00:00 UTC 2013.
t = Time.mktime(2013, 03, 31, 1, 15, 0)
6.times do
t += 900
u = Time.at(t.to_i).utc
puts t.to_s + " " + u.to_s
end
output:
Sun Mar 31 01:30:00 +0100 2013 Sun Mar 31 00:30:00 UTC 2013
Sun Mar 31 01:45:00 +0100 2013 Sun Mar 31 00:45:00 UTC 2013
Sun Mar 31 03:00:00 +0200 2013 Sun Mar 31 01:00:00 UTC 2013
Sun Mar 31 03:15:00 +0200 2013 Sun Mar 31 01:15:00 UTC 2013
Sun Mar 31 03:30:00 +0200 2013 Sun Mar 31 01:30:00 UTC 2013
Sun Mar 31 03:45:00 +0200 2013 Sun Mar 31 01:45:00 UTC 2013

Resources