question_id
int64
82.3k
79.7M
title_clean
stringlengths
15
158
body_clean
stringlengths
62
28.5k
full_text
stringlengths
95
28.5k
tags
stringlengths
4
80
score
int64
0
1.15k
view_count
int64
22
1.62M
answer_count
int64
0
30
link
stringlengths
58
125
43,720,118
JAVA how to find the target file path that a symbolic link points to?
I'm trying to find a way in Java to figure out the file path that a symbolic link is pointing to. We have a system that monitors a symbolic link folder, does some stuff based on the file name, deletes that symbolic link file. What I need to do is figure out where each symbolic link file is pointing to so I can delete that file as well when the symbolic link. This is using Java on a RHEL system. Any guidance to API topics would be greatly appreciated. I'm hitting a wall on my searches.
JAVA how to find the target file path that a symbolic link points to? I'm trying to find a way in Java to figure out the file path that a symbolic link is pointing to. We have a system that monitors a symbolic link folder, does some stuff based on the file name, deletes that symbolic link file. What I need to do is figure out where each symbolic link file is pointing to so I can delete that file as well when the symbolic link. This is using Java on a RHEL system. Any guidance to API topics would be greatly appreciated. I'm hitting a wall on my searches.
java, symlink, rhel
8
17,768
2
https://stackoverflow.com/questions/43720118/java-how-to-find-the-target-file-path-that-a-symbolic-link-points-to
11,526,036
Returning application/json content-type for .json files on RHEL/Apache
OS is specifically RHEL6 running Apache2. So in my Apache configuration, I have: LoadModule mime_module modules/mod_mime.so And in /etc/mime.types , I have the following: application/json json Yet when requesting a file with the .json extension (and containing valid JSON), the content-type is set to text/html . Any idea how I can force the correct header for this file type?
Returning application/json content-type for .json files on RHEL/Apache OS is specifically RHEL6 running Apache2. So in my Apache configuration, I have: LoadModule mime_module modules/mod_mime.so And in /etc/mime.types , I have the following: application/json json Yet when requesting a file with the .json extension (and containing valid JSON), the content-type is set to text/html . Any idea how I can force the correct header for this file type?
json, apache, mime, rhel
8
22,017
1
https://stackoverflow.com/questions/11526036/returning-application-json-content-type-for-json-files-on-rhel-apache
60,768,524
How to list and edit GRUB2's "menuentry" in command-line under Centos-8?
How to list GRUB2's “menuentries” in command-line under Centos-8? The used workable method "fgrep menuentry /etc/grub2.conf" failed. Because at Centos-8/RHEL-8, they DO NOT store menuentry in /etc/grub2.conf. Instead, they search and build entries at booting runtime. And how to add a custom cmdline parameter to special menuentry? There is no menuentry in /etc/grub2.conf, I can not edit any menuentry.
How to list and edit GRUB2's "menuentry" in command-line under Centos-8? How to list GRUB2's “menuentries” in command-line under Centos-8? The used workable method "fgrep menuentry /etc/grub2.conf" failed. Because at Centos-8/RHEL-8, they DO NOT store menuentry in /etc/grub2.conf. Instead, they search and build entries at booting runtime. And how to add a custom cmdline parameter to special menuentry? There is no menuentry in /etc/grub2.conf, I can not edit any menuentry.
rhel, boot, centos8, grub2
8
17,510
2
https://stackoverflow.com/questions/60768524/how-to-list-and-edit-grub2s-menuentry-in-command-line-under-centos-8
18,704,247
Configure Jenkins for different user.home
I am running Jenkins version 1.527 (I know there is a newer version but it is broken, I can't use the user interface in 1.528 and haven't gotten a chance to upgrade to 1.529) I am trying to change the user.home system property in Jenkins by doing this in my startup script: export HOME=/new-home-dir However, the environment variable shows correctly in jenkins and user.dir shows as the exported variable, but user.home does not change. The reason I can't use the default functionality is because I am in an enterprise that locks down the user's home directory and my user can add or modify files there. Any help on changing user.home would be greatly appreciated. FYI - I am running Jenkins on RHEL v6.2 Attempted Solutions add -Duser.home=/newDir to JAVA_OPTS or JAVA_ARGS, neither worked add -Duser.home=/newDir to the MAVEN_OPTS in the build job.
Configure Jenkins for different user.home I am running Jenkins version 1.527 (I know there is a newer version but it is broken, I can't use the user interface in 1.528 and haven't gotten a chance to upgrade to 1.529) I am trying to change the user.home system property in Jenkins by doing this in my startup script: export HOME=/new-home-dir However, the environment variable shows correctly in jenkins and user.dir shows as the exported variable, but user.home does not change. The reason I can't use the default functionality is because I am in an enterprise that locks down the user's home directory and my user can add or modify files there. Any help on changing user.home would be greatly appreciated. FYI - I am running Jenkins on RHEL v6.2 Attempted Solutions add -Duser.home=/newDir to JAVA_OPTS or JAVA_ARGS, neither worked add -Duser.home=/newDir to the MAVEN_OPTS in the build job.
java, linux, jenkins, maven-3, rhel
8
16,622
5
https://stackoverflow.com/questions/18704247/configure-jenkins-for-different-user-home
25,166,085
how can a systemd controlled service distinguish between shutdown and reboot?
I have a Linux process that runs on RHEL7 and is started by systemd. When the process is stopped, I need to know if it is being stopped because of a system shutdown or reboot, and I need to be able to distinguish between the two. Previously, under init on RHEL6, I was able to do this by looking at the pathname used to invoke my init script, and sent the process a different signal accordingly, i.e.: case "$0" in *rc0\.d*|*rc1\.d*) #shutdown sig=USR1 ;; *rc6\.d*) #reboot sig=USR2 ;; *) sig=TERM ;; esac This doesnt work with systemd...although my init script gets called at the right time, $0 is always the same (/etc/init.d/scriptname). Is there some way under systemd to know if you are being called because of a system shutdown or reboot? I'm happy to get rid of the init script and configure it as a systemd target instead, but from the documentation I can't see a way to do what I want.
how can a systemd controlled service distinguish between shutdown and reboot? I have a Linux process that runs on RHEL7 and is started by systemd. When the process is stopped, I need to know if it is being stopped because of a system shutdown or reboot, and I need to be able to distinguish between the two. Previously, under init on RHEL6, I was able to do this by looking at the pathname used to invoke my init script, and sent the process a different signal accordingly, i.e.: case "$0" in *rc0\.d*|*rc1\.d*) #shutdown sig=USR1 ;; *rc6\.d*) #reboot sig=USR2 ;; *) sig=TERM ;; esac This doesnt work with systemd...although my init script gets called at the right time, $0 is always the same (/etc/init.d/scriptname). Is there some way under systemd to know if you are being called because of a system shutdown or reboot? I'm happy to get rid of the init script and configure it as a systemd target instead, but from the documentation I can't see a way to do what I want.
linux, rhel, systemd
8
7,316
2
https://stackoverflow.com/questions/25166085/how-can-a-systemd-controlled-service-distinguish-between-shutdown-and-reboot
21,433,864
Using strace fixes hung memory issue
I have a multithreaded process running on RHEL6.x (64bit). I find that the process hangs and some threads (of the same process) crash most of the time when I try to bring up the process. Some threads wait for shared memory between the threads to get created (I can see that all of it does not get created). But when I use strace , the process does not hang and it works just fine (all of the memory that is supposed to be created, gets created). Even interrupting strace after the memory gets created, keeps the process running fine for good. I have read this: strace fixes hung process which did give me an idea. But I am still unclear on this as the version of RHEL that they have used is not mentioned. Also, another point is that, changing the kernel to a fedora (compatible) kernel did not produce the issue. So, I would just like to know how exactly does strace affect a process ? (or is it just the stack that moves back to the kernel as pointed out in the link) ?
Using strace fixes hung memory issue I have a multithreaded process running on RHEL6.x (64bit). I find that the process hangs and some threads (of the same process) crash most of the time when I try to bring up the process. Some threads wait for shared memory between the threads to get created (I can see that all of it does not get created). But when I use strace , the process does not hang and it works just fine (all of the memory that is supposed to be created, gets created). Even interrupting strace after the memory gets created, keeps the process running fine for good. I have read this: strace fixes hung process which did give me an idea. But I am still unclear on this as the version of RHEL that they have used is not mentioned. Also, another point is that, changing the kernel to a fedora (compatible) kernel did not produce the issue. So, I would just like to know how exactly does strace affect a process ? (or is it just the stack that moves back to the kernel as pointed out in the link) ?
unix, process, kernel, rhel, strace
8
733
1
https://stackoverflow.com/questions/21433864/using-strace-fixes-hung-memory-issue
12,710,544
Python multiprocessing doesn't use all cores on RHEL6
I have been trying to use the python multiprocessing package to speed up some physics simulations I'm doing by taking advantage of the multiple cores of my computer. I noticed that when I run my simulation at most 3 of the 12 cores are used. In fact, when I start the simulation it initially uses 3 of the cores, and then after a while it goes to 1 core. Sometimes only one or two cores are used from the start. I have not been able to figure out why (I basically change nothing, except closing a few terminal windows (without any active processes)). (The OS is Red Hat Enterprise Linux 6.0, Python version is 2.6.5.) I experimented by varying the number of chunks (between 2 and 120) into which the work is split (i.e. the number of processes that are created), but this seems to have no effect. I looked for info about this problem online and read through most of the related questions on this site (e.g. one , two ) but could not find a solution. (Edit: I just tried running the code under Windows 7 and it's using all available cores alright. I still want to fix this for the RHEL, though.) Here's my code (with the physics left out): from multiprocessing import Queue, Process, current_process def f(q,start,end): #a dummy function to be passed as target to Process q.put(mc_sim(start,end)) def mc_sim(start,end): #this is where the 'physics' is p=current_process() print "starting", p.name, p.pid sum_=0 for i in xrange(start,end): sum_+=i print "exiting", p.name, p.pid return sum_ def main(): NP=0 #number of processes total_steps=10**8 chunk=total_steps/10 start=0 queue=Queue() subprocesses=[] while start<total_steps: p=Process(target=f,args=(queue,start,start+chunk)) NP+=1 print 'delegated %s:%s to subprocess %s' % (start, start+chunk, NP) p.start() start+=chunk subprocesses.append(p) total=0 for i in xrange(NP): total+=queue.get() print "total is", total #two lines for consistency check: # alt_total=mc_sim(0,total_steps) # print "alternative total is", alt_total while subprocesses: subprocesses.pop().join() if __name__=='__main__': main() (In fact the code is based on Alex Martelli's answer here .) Edit 2: eventually the problem resolved itself without me understanding how. I did not change the code nor am I aware of having changed anything related to the OS. In spite of that, now all cores are used when I run the code. Perhaps the problem will reappear later on, but for now I choose to not investigate further, as it works. Thanks to everyone for the help.
Python multiprocessing doesn&#39;t use all cores on RHEL6 I have been trying to use the python multiprocessing package to speed up some physics simulations I'm doing by taking advantage of the multiple cores of my computer. I noticed that when I run my simulation at most 3 of the 12 cores are used. In fact, when I start the simulation it initially uses 3 of the cores, and then after a while it goes to 1 core. Sometimes only one or two cores are used from the start. I have not been able to figure out why (I basically change nothing, except closing a few terminal windows (without any active processes)). (The OS is Red Hat Enterprise Linux 6.0, Python version is 2.6.5.) I experimented by varying the number of chunks (between 2 and 120) into which the work is split (i.e. the number of processes that are created), but this seems to have no effect. I looked for info about this problem online and read through most of the related questions on this site (e.g. one , two ) but could not find a solution. (Edit: I just tried running the code under Windows 7 and it's using all available cores alright. I still want to fix this for the RHEL, though.) Here's my code (with the physics left out): from multiprocessing import Queue, Process, current_process def f(q,start,end): #a dummy function to be passed as target to Process q.put(mc_sim(start,end)) def mc_sim(start,end): #this is where the 'physics' is p=current_process() print "starting", p.name, p.pid sum_=0 for i in xrange(start,end): sum_+=i print "exiting", p.name, p.pid return sum_ def main(): NP=0 #number of processes total_steps=10**8 chunk=total_steps/10 start=0 queue=Queue() subprocesses=[] while start<total_steps: p=Process(target=f,args=(queue,start,start+chunk)) NP+=1 print 'delegated %s:%s to subprocess %s' % (start, start+chunk, NP) p.start() start+=chunk subprocesses.append(p) total=0 for i in xrange(NP): total+=queue.get() print "total is", total #two lines for consistency check: # alt_total=mc_sim(0,total_steps) # print "alternative total is", alt_total while subprocesses: subprocesses.pop().join() if __name__=='__main__': main() (In fact the code is based on Alex Martelli's answer here .) Edit 2: eventually the problem resolved itself without me understanding how. I did not change the code nor am I aware of having changed anything related to the OS. In spite of that, now all cores are used when I run the code. Perhaps the problem will reappear later on, but for now I choose to not investigate further, as it works. Thanks to everyone for the help.
python, multiprocessing, multicore, python-2.6, rhel
8
1,103
1
https://stackoverflow.com/questions/12710544/python-multiprocessing-doesnt-use-all-cores-on-rhel6
60,589,523
Unable to register with subscription-manager - &#39;NoneType&#39; object has no attribute &#39;__getitem__&#39;
In rhel 7 server I am trying to install packages with yum. After getting error that I need to register my rhel7 with subscription-manager I got this error: command: subscription-manager register output: 'NoneType' object has no attribute '__getitem__' after some checks I saw that I need to unregister (the register command dident work but still) and clean the data, but still same error. The user and password are correct in the red hat website
Unable to register with subscription-manager - &#39;NoneType&#39; object has no attribute &#39;__getitem__&#39; In rhel 7 server I am trying to install packages with yum. After getting error that I need to register my rhel7 with subscription-manager I got this error: command: subscription-manager register output: 'NoneType' object has no attribute '__getitem__' after some checks I saw that I need to unregister (the register command dident work but still) and clean the data, but still same error. The user and password are correct in the red hat website
rhel, rhel7
8
3,458
2
https://stackoverflow.com/questions/60589523/unable-to-register-with-subscription-manager-nonetype-object-has-no-attribut
53,545,436
No package certbot available
I'm trying to install certbot on RHEL server. Instructions to enable epel-release # yum install [URL] then # subscription-manager repos --enable "rhel-*-optional-rpms" --enable "rhel-*-extras-rpms " epel-release-7-11 was installed. # yum install certbot Loaded plugins: product-id, search-disabled-repos, subscription-manager No package certbot available. Error: Nothing to do I even downloaded rpm manually from fedora project epel removed and cleared all cache. But install package is not available.
No package certbot available I'm trying to install certbot on RHEL server. Instructions to enable epel-release # yum install [URL] then # subscription-manager repos --enable "rhel-*-optional-rpms" --enable "rhel-*-extras-rpms " epel-release-7-11 was installed. # yum install certbot Loaded plugins: product-id, search-disabled-repos, subscription-manager No package certbot available. Error: Nothing to do I even downloaded rpm manually from fedora project epel removed and cleared all cache. But install package is not available.
rhel, lets-encrypt, certbot, epel
7
17,679
5
https://stackoverflow.com/questions/53545436/no-package-certbot-available
15,741,796
Linux how to start &quot;sftp-server&quot;?
I'm not very familiar with it but there is installed openssh/sftp-server (by a vendor before) on RHEL and it was well running before i reboot the server. Then when i check after rebooted: # ps aux | grep ftp No sftp is running but sshd is. So how do i do to have this sftp running please?
Linux how to start &quot;sftp-server&quot;? I'm not very familiar with it but there is installed openssh/sftp-server (by a vendor before) on RHEL and it was well running before i reboot the server. Then when i check after rebooted: # ps aux | grep ftp No sftp is running but sshd is. So how do i do to have this sftp running please?
linux, sftp, openssh, rhel, sshd
7
92,802
2
https://stackoverflow.com/questions/15741796/linux-how-to-start-sftp-server
10,396,601
Finding installed apache module versions in CentOS/RHEL
I found a similar question about this but aimed at Debian here . However since I don't have apt-cache it doesn't help me. Running: httpd -M Gives me a list of all the installed modules but not their versions. My colleague has just pointed out that you can use: yum info mod_dav_svn.x86_64 This returns the installed version and the one available via Yum, however, if I use httpd -M it lists the names like: mod_proxy_http.so Is there any easy way to match up the installed modules file name (i.e. x86_64 i386) so I can check each module, or even better does anyone know of a way to output this info for all modules at once?
Finding installed apache module versions in CentOS/RHEL I found a similar question about this but aimed at Debian here . However since I don't have apt-cache it doesn't help me. Running: httpd -M Gives me a list of all the installed modules but not their versions. My colleague has just pointed out that you can use: yum info mod_dav_svn.x86_64 This returns the installed version and the one available via Yum, however, if I use httpd -M it lists the names like: mod_proxy_http.so Is there any easy way to match up the installed modules file name (i.e. x86_64 i386) so I can check each module, or even better does anyone know of a way to output this info for all modules at once?
apache, apache2, centos, rhel
7
24,380
3
https://stackoverflow.com/questions/10396601/finding-installed-apache-module-versions-in-centos-rhel
43,674,331
Kerberos aes-256 encryption not working
Server is a RHEL7, Kerberos is AD (Windows). I'm only client of KDC. Arcfour-hmac works fine but when I change encryption type to aes-256 and set up a new keytab, kinit still works, but not kvno. And even if the user seems to have a valid ticket (in klist) he is not able to start services anymore. I don't have access to the Kerberos AD, but it seems properly configured to use aes-256, because end users (on Windows computers) already request tickets in this encryption type. My krb5.conf : [libdefaults] default_realm = TOTO.NET dns_lookup_realm = false dns_lookup_kdc = false ticket_lifetime = 24h renew_lifetime = 7d forwardable = true default_tkt_enctypes = aes256-cts aes128-cts des-cbc-md5 des-cbc-crc default_tgs_enctypes = aes256-cts aes128-cts des-cbc-md5 des-cbc-crc permitted_enctypes = aes256-cts aes128-cts des-cbc-md5 des-cbc-crc [realms] TOTO.NET = { kdc = kdc1.toto.net kdc = kdc2.toto.net admin_server = kdc1.toto.net } [domain_realm] .toto.net = TOTO.NET toto.net = TOTO.NET And here the errors I got when I try to acquire a ticket with kvno : [2477332] 1493147723.961912: Getting credentials myuser@TOTO.NET -> nn/myserver@TOTO.NET using ccache FILE:/tmp/krb5cc_0 [2477332] 1493147723.962055: Retrieving myuser@TOTO.NET -> nn/myserver@TOTO.NET from FILE:/tmp/krb5cc_0 with result: -1765328243/Matching credential not found (filename: /tmp/krb5cc_0) [2477332] 1493147723.962257: Retrieving myuser@TOTO.NET -> krbtgt/TOTO.NET@TOTO.NET from FILE:/tmp/krb5cc_0 with result: 0/Success [2477332] 1493147723.962267: Starting with TGT for client realm: myuser@TOTO.NET -> krbtgt/TOTO.NET@TOTO.NET [2477332] 1493147723.962274: Requesting tickets for nn/myserver@TOTO.NET, referrals on [2477332] 1493147723.962309: Generated subkey for TGS request: aes256-cts/17DF [2477332] 1493147723.962363: etypes requested in TGS request: aes256-cts, aes128-cts [2477332] 1493147723.962504: Encoding request body and padata into FAST request [2477332] 1493147723.962575: Sending request (1716 bytes) to TOTO.NET [2477332] 1493147723.962725: Resolving hostname kdc1.TOTO.NET [2477332] 1493147723.963054: Initiating TCP connection to stream ip_of_kdc1:88 [2477332] 1493147723.964205: Sending TCP request to stream ip_of_kdc1:88 [2477332] 1493147724.3751: Received answer (329 bytes) from stream ip_of_kdc1:88 [2477332] 1493147724.3765: Terminating TCP connection to stream ip_of_kdc1:88 [2477332] 1493147724.3846: Response was not from master KDC [2477332] 1493147724.3879: Decoding FAST response [2477332] 1493147724.3965: TGS request result: -1765328370/KDC has no support for encryption type klist -ket mykeytab Keytab name: FILE:nn.service.keytab KVNO Timestamp Principal ---- ------------------- ------------------------------------------------------ 1 01/01/1970 01:00:00 nn/myserver01@TOTO.NET (aes256-cts-hmac-sha1-96) 1 03/22/2017 16:34:55 nn/myserver02@TOTO.NET (aes256-cts-hmac-sha1-96) Thanks for your help
Kerberos aes-256 encryption not working Server is a RHEL7, Kerberos is AD (Windows). I'm only client of KDC. Arcfour-hmac works fine but when I change encryption type to aes-256 and set up a new keytab, kinit still works, but not kvno. And even if the user seems to have a valid ticket (in klist) he is not able to start services anymore. I don't have access to the Kerberos AD, but it seems properly configured to use aes-256, because end users (on Windows computers) already request tickets in this encryption type. My krb5.conf : [libdefaults] default_realm = TOTO.NET dns_lookup_realm = false dns_lookup_kdc = false ticket_lifetime = 24h renew_lifetime = 7d forwardable = true default_tkt_enctypes = aes256-cts aes128-cts des-cbc-md5 des-cbc-crc default_tgs_enctypes = aes256-cts aes128-cts des-cbc-md5 des-cbc-crc permitted_enctypes = aes256-cts aes128-cts des-cbc-md5 des-cbc-crc [realms] TOTO.NET = { kdc = kdc1.toto.net kdc = kdc2.toto.net admin_server = kdc1.toto.net } [domain_realm] .toto.net = TOTO.NET toto.net = TOTO.NET And here the errors I got when I try to acquire a ticket with kvno : [2477332] 1493147723.961912: Getting credentials myuser@TOTO.NET -> nn/myserver@TOTO.NET using ccache FILE:/tmp/krb5cc_0 [2477332] 1493147723.962055: Retrieving myuser@TOTO.NET -> nn/myserver@TOTO.NET from FILE:/tmp/krb5cc_0 with result: -1765328243/Matching credential not found (filename: /tmp/krb5cc_0) [2477332] 1493147723.962257: Retrieving myuser@TOTO.NET -> krbtgt/TOTO.NET@TOTO.NET from FILE:/tmp/krb5cc_0 with result: 0/Success [2477332] 1493147723.962267: Starting with TGT for client realm: myuser@TOTO.NET -> krbtgt/TOTO.NET@TOTO.NET [2477332] 1493147723.962274: Requesting tickets for nn/myserver@TOTO.NET, referrals on [2477332] 1493147723.962309: Generated subkey for TGS request: aes256-cts/17DF [2477332] 1493147723.962363: etypes requested in TGS request: aes256-cts, aes128-cts [2477332] 1493147723.962504: Encoding request body and padata into FAST request [2477332] 1493147723.962575: Sending request (1716 bytes) to TOTO.NET [2477332] 1493147723.962725: Resolving hostname kdc1.TOTO.NET [2477332] 1493147723.963054: Initiating TCP connection to stream ip_of_kdc1:88 [2477332] 1493147723.964205: Sending TCP request to stream ip_of_kdc1:88 [2477332] 1493147724.3751: Received answer (329 bytes) from stream ip_of_kdc1:88 [2477332] 1493147724.3765: Terminating TCP connection to stream ip_of_kdc1:88 [2477332] 1493147724.3846: Response was not from master KDC [2477332] 1493147724.3879: Decoding FAST response [2477332] 1493147724.3965: TGS request result: -1765328370/KDC has no support for encryption type klist -ket mykeytab Keytab name: FILE:nn.service.keytab KVNO Timestamp Principal ---- ------------------- ------------------------------------------------------ 1 01/01/1970 01:00:00 nn/myserver01@TOTO.NET (aes256-cts-hmac-sha1-96) 1 03/22/2017 16:34:55 nn/myserver02@TOTO.NET (aes256-cts-hmac-sha1-96) Thanks for your help
authentication, encryption, aes, kerberos, rhel
7
9,509
2
https://stackoverflow.com/questions/43674331/kerberos-aes-256-encryption-not-working
46,172,600
RHEL7 - /usr/lib64/libstdc++.so.6: version `CXXABI_1.3.8&#39; not found
I know this question has been asked for many times while I still get stuck with it. I have reviewed all answers previously asked like version `CXXABI_1.3.8' not found (required by ...) How to fix: [program name] /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version CXXABI_1.3.8' not found (required by [program name]) and I've read [URL] My system is RHEL7, I had a gcc 4.8 installed before, and I install gcc 4.9 with yum -y install devtoolset-3-gcc devtoolset-3-gcc-c++ Then gcc 4.9 is successfully installed. With gcc -v , I get Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/opt/rh/devtoolset-3/root/usr/libexec/gcc/x86_64-redhat-linux/4.9.2/lto-wrapper Target: x86_64-redhat-linux Configured with: ../configure --prefix=/opt/rh/devtoolset-3/root/usr --mandir=/opt/rh/devtoolset-3/root/usr/share/man --infodir=/opt/rh/devtoolset-3/root/usr/share/info --with-bugurl=[URL] --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --enable-languages=c,c++,fortran,lto --enable-plugin --with-linker-hash-style=gnu --enable-initfini-array --disable-libgcj --with-isl=/builddir/build/BUILD/gcc-4.9.2-20150212/obj-x86_64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.9.2-20150212/obj-x86_64-redhat-linux/cloog-install --enable-gnu-indirect-function --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux Thread model: posix gcc version 4.9.2 20150212 (Red Hat 4.9.2-6) (GCC) Then I set my LD_LIBRARY_PATH following the others' suggestions like: export LD_LIBRARY_PATH=/opt/rh/devtoolset-3/root/usr/lib/gcc/x86_64-redhat-linux/4.9.2:${LD_LIBRARY_PATH} However, the error still exits and it seems my newer version gcc4.9 doesn't work. Any help would be appreciated!
RHEL7 - /usr/lib64/libstdc++.so.6: version `CXXABI_1.3.8&#39; not found I know this question has been asked for many times while I still get stuck with it. I have reviewed all answers previously asked like version `CXXABI_1.3.8' not found (required by ...) How to fix: [program name] /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version CXXABI_1.3.8' not found (required by [program name]) and I've read [URL] My system is RHEL7, I had a gcc 4.8 installed before, and I install gcc 4.9 with yum -y install devtoolset-3-gcc devtoolset-3-gcc-c++ Then gcc 4.9 is successfully installed. With gcc -v , I get Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/opt/rh/devtoolset-3/root/usr/libexec/gcc/x86_64-redhat-linux/4.9.2/lto-wrapper Target: x86_64-redhat-linux Configured with: ../configure --prefix=/opt/rh/devtoolset-3/root/usr --mandir=/opt/rh/devtoolset-3/root/usr/share/man --infodir=/opt/rh/devtoolset-3/root/usr/share/info --with-bugurl=[URL] --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --enable-languages=c,c++,fortran,lto --enable-plugin --with-linker-hash-style=gnu --enable-initfini-array --disable-libgcj --with-isl=/builddir/build/BUILD/gcc-4.9.2-20150212/obj-x86_64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.9.2-20150212/obj-x86_64-redhat-linux/cloog-install --enable-gnu-indirect-function --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux Thread model: posix gcc version 4.9.2 20150212 (Red Hat 4.9.2-6) (GCC) Then I set my LD_LIBRARY_PATH following the others' suggestions like: export LD_LIBRARY_PATH=/opt/rh/devtoolset-3/root/usr/lib/gcc/x86_64-redhat-linux/4.9.2:${LD_LIBRARY_PATH} However, the error still exits and it seems my newer version gcc4.9 doesn't work. Any help would be appreciated!
linux, gcc, rhel
7
24,201
1
https://stackoverflow.com/questions/46172600/rhel7-usr-lib64-libstdc-so-6-version-cxxabi-1-3-8-not-found
49,696,709
gcc assembler messages can&#39;t open /tmp/ccqjY5HV.s for reading no such file or directory
I have a nightly build that builds a source tree with several compilers/options. I'm using buildbot on centos 6, though I doubt that buildbot has any relation to the problem. Sometimes the build fails with a bunch of messages like: Assembler messages: Error: can't open /tmp/ccqjY5HV.s for reading: No such file or directory My first guess is that something is deleting these files behind the compiler's back. I've looked at the tmpwatch cron job but the setup doesn't seem like a culprit. The failures seem to happen around 10pm when several builds launch. The actual compiles are locked so that only one compile happens at a time. Any thoughts welcome.
gcc assembler messages can&#39;t open /tmp/ccqjY5HV.s for reading no such file or directory I have a nightly build that builds a source tree with several compilers/options. I'm using buildbot on centos 6, though I doubt that buildbot has any relation to the problem. Sometimes the build fails with a bunch of messages like: Assembler messages: Error: can't open /tmp/ccqjY5HV.s for reading: No such file or directory My first guess is that something is deleting these files behind the compiler's back. I've looked at the tmpwatch cron job but the setup doesn't seem like a culprit. The failures seem to happen around 10pm when several builds launch. The actual compiles are locked so that only one compile happens at a time. Any thoughts welcome.
compiler-errors, centos, centos6, rhel, rhel6
7
3,077
1
https://stackoverflow.com/questions/49696709/gcc-assembler-messages-cant-open-tmp-ccqjy5hv-s-for-reading-no-such-file-or-di
42,845,853
Why bash4 expands curly braces differently?
One of legacy system got upgraded to bash4 and most of its scripts stopped working. I've narrowed it down to how a curly brackets are expanded within a <(cmdA ...|cmdB ... file{1,2}|cmdZ ...) . To illustrate the difference better: BEFORE (bash 3.2.25): [root@host1:~]$ bash -version|head -1 GNU bash, version 3.2.25(1)-release (x86_64-redhat-linux-gnu) [root@host1:~]$ cat <(echo sort file{1,2}) sort file1 sort file2 [root@host1:~]$ join <(sed 's/\r//g;s/^[^:]*://' file{1,2}|LANG=C sort) [root@host1:~]$ AFTER (bash 4.1.2): [root@host2:~]$ bash --version|head -1 GNU bash, version 4.1.2(1)-release (x86_64-redhat-linux-gnu) [root@host2:~]$ cat <(echo sort file{1,2}) sort file1 file2 [root@host2:~]$ join <(sed 's/\r//g;s/^[^:]*://' file{1,2}|LANG=C sort) join: missing operand after /dev/fd/63' Try join --help' for more information. [root@host2:~]$ Is it a "hard-coded" (and expected?) change made for bash4? Or is the behavior of this expansion controlled by some bash-level settings (like set -B / set +B ) and can be switched back to old/legacy/bash3 mode? I'd rather change some shell-wide switch (instead of having to rewrite a pile of scripts). If this (bash3) "feature" was cut off during a bugfix or improvement - I'm surprised, because old (bash3) syntax allowed to save a ton on typing...
Why bash4 expands curly braces differently? One of legacy system got upgraded to bash4 and most of its scripts stopped working. I've narrowed it down to how a curly brackets are expanded within a <(cmdA ...|cmdB ... file{1,2}|cmdZ ...) . To illustrate the difference better: BEFORE (bash 3.2.25): [root@host1:~]$ bash -version|head -1 GNU bash, version 3.2.25(1)-release (x86_64-redhat-linux-gnu) [root@host1:~]$ cat <(echo sort file{1,2}) sort file1 sort file2 [root@host1:~]$ join <(sed 's/\r//g;s/^[^:]*://' file{1,2}|LANG=C sort) [root@host1:~]$ AFTER (bash 4.1.2): [root@host2:~]$ bash --version|head -1 GNU bash, version 4.1.2(1)-release (x86_64-redhat-linux-gnu) [root@host2:~]$ cat <(echo sort file{1,2}) sort file1 file2 [root@host2:~]$ join <(sed 's/\r//g;s/^[^:]*://' file{1,2}|LANG=C sort) join: missing operand after /dev/fd/63' Try join --help' for more information. [root@host2:~]$ Is it a "hard-coded" (and expected?) change made for bash4? Or is the behavior of this expansion controlled by some bash-level settings (like set -B / set +B ) and can be switched back to old/legacy/bash3 mode? I'd rather change some shell-wide switch (instead of having to rewrite a pile of scripts). If this (bash3) "feature" was cut off during a bugfix or improvement - I'm surprised, because old (bash3) syntax allowed to save a ton on typing...
bash, shell, rhel, curly-braces, expansion
7
253
1
https://stackoverflow.com/questions/42845853/why-bash4-expands-curly-braces-differently
40,924,529
Remeasuring files with Linux IMA
I am trying to set up Linux IMA in RHEL with the help of this guide [URL] . I would like to set up the system such that sensitive files of my choosing are remeasured if the file has changed (I'm stuck in the section relating to re-measuring files). My /etc/fstab looks like this: UUID=c8dbe0a9-8c0c-4aba-adff-bcf2dd4640da / ext4,iversion defaults 1 1 UUID=b1762b74-d517-4293-8b49-cdc06b94d78c /boot ext3 defaults 1 2 UUID=8c6b8003-7176-4cf4-ae23-a124f8768c36 swap swap defaults 0 0 When I check the measurement list, in /sys/kernel/security/ima/ascii_runtime_measurements I only see one entry as below: 10 3f0d6c1e772444096d975aba704a10e4820eabab ima 7b739f0b35c61d68bd664d352b6631c366aee34f boot_aggregate I do not observe any other measurements showing up, even if I change some files in /etc/ or do other actions. Any thoughts on what could be going wrong?
Remeasuring files with Linux IMA I am trying to set up Linux IMA in RHEL with the help of this guide [URL] . I would like to set up the system such that sensitive files of my choosing are remeasured if the file has changed (I'm stuck in the section relating to re-measuring files). My /etc/fstab looks like this: UUID=c8dbe0a9-8c0c-4aba-adff-bcf2dd4640da / ext4,iversion defaults 1 1 UUID=b1762b74-d517-4293-8b49-cdc06b94d78c /boot ext3 defaults 1 2 UUID=8c6b8003-7176-4cf4-ae23-a124f8768c36 swap swap defaults 0 0 When I check the measurement list, in /sys/kernel/security/ima/ascii_runtime_measurements I only see one entry as below: 10 3f0d6c1e772444096d975aba704a10e4820eabab ima 7b739f0b35c61d68bd664d352b6631c366aee34f boot_aggregate I do not observe any other measurements showing up, even if I change some files in /etc/ or do other actions. Any thoughts on what could be going wrong?
linux, rhel, integrity, rhel7
7
1,133
1
https://stackoverflow.com/questions/40924529/remeasuring-files-with-linux-ima
22,939,521
how to promote ldap replica to master
I have a master LDAP server (openldap) running on a node that needs to be decomissioned. I have several consumer nodes doing a syncrepl to it. I have designated another node (one of the consumers) to become the new master so I can decomission the old master. I have updated all of the other consumers to syncrepl from this second master. heuristically, what is the process to 'promote' this new server from consumer (slave) to a master? The config line looks like this in the consumers. olcSyncrepl: {0}rid=312 provider="ldaps://<new master>/" type=refreshAndPersist interval="00:00:01:00" retry="60 30 300 +" searchbase="<base of tree>" bindmethod=sasl saslmech=gssapi keepalive=3540:10:3 in the new master it is the same line, except the value of the provider is the old master. Is it simply a case of removing this line? And if so, can I do it by just stopping slapd and removing this line from the hdb.ldif file and restarting. or do I need to do ldapmodify on the RDN?
how to promote ldap replica to master I have a master LDAP server (openldap) running on a node that needs to be decomissioned. I have several consumer nodes doing a syncrepl to it. I have designated another node (one of the consumers) to become the new master so I can decomission the old master. I have updated all of the other consumers to syncrepl from this second master. heuristically, what is the process to 'promote' this new server from consumer (slave) to a master? The config line looks like this in the consumers. olcSyncrepl: {0}rid=312 provider="ldaps://<new master>/" type=refreshAndPersist interval="00:00:01:00" retry="60 30 300 +" searchbase="<base of tree>" bindmethod=sasl saslmech=gssapi keepalive=3540:10:3 in the new master it is the same line, except the value of the provider is the old master. Is it simply a case of removing this line? And if so, can I do it by just stopping slapd and removing this line from the hdb.ldif file and restarting. or do I need to do ldapmodify on the RDN?
ldap, openldap, rhel
7
2,912
2
https://stackoverflow.com/questions/22939521/how-to-promote-ldap-replica-to-master
49,677,522
RHEL/Pyenv: No module named &#39;_tkinter&#39;
I'm trying to use Matplotlib on RHEL using a pyenv installed version of python 3.6.5. (installed using the following command) → pyenv install 3.6.5 Installing Python-3.6.5... python-build: use readline from homebrew Installed Python-3.6.5 to /home/swp1g17/.pyenv/versions/3.6.5 → pyenv global 3.6.5 I'm presented with the following error, and have found many questions that have a similar issue: Python 3.6.5 (default, Apr 5 2018, 17:22:36) [GCC 5.5.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import tkinter Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/swp1g17/.pyenv/versions/3.6.5/lib/python3.6/tkinter/__init__.py", line 36, in <module> import _tkinter # If this fails your Python may not be configured for Tk ModuleNotFoundError: No module named '_tkinter' However the suggested solution is usually to install tkinter using a package manager. However I've tried installing: 2872 sudo yum install rh-python36-python-tkinter 2873 sudo yum install rh-python35-python-tkinter 2874 sudo yum install rh-python34-python-tkinter 2891 sudo yum install tkinter 2893 sudo yum install python36-tkinter 2902 sudo yum install gcc zlib-devel bzip2 bzip2-devel readline-devel sqlite sqlite-devel openssl-devel tk-devel gdbm-devel ncurses-devel gl.. 2916 sudo yum install tkinter.x86_64 rh-python36-python-tkinter.x86_64 rh-python35-python-tkinter.x86_64 rh-python34-python-tkinter.x86_64 p.. 2921 sudo yum install tcl 2933 sudo yum install tk-devel 2934 sudo yum install tk 3000 sudo yum install tkinter 3026 sudo yum install tix 3031 sudo yum install tk 3032 sudo yum install tk-devel > 3033 sudo yum install tcl-devel with each already having been installed or making no difference (having rebuilt python each time a new package was installed. The system python is able to locate tkinter: → /usr/bin/python3.6 Python 3.6.3 (default, Jan 4 2018, 16:40:53) [GCC 4.8.5 20150623 (Red Hat 4.8.5-16)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import tkinter >>> so I'm unsure how to install python using pyenv and have it use the same version of tkinter? UPDATE: Having found that build configuration options can be set using $PYTHON_CONFIGURE_OPTS I've tried specifying the library locations using (for linuxbrew downloaded tcl/tk): export PYTHON_CONFIGURE_OPTS="--with-tcltk-includes=-I/home/linuxbrew/.linuxbrew/opt/tcl-tk/include --with-tcltk-libs=-L/home/linuxbrew/.linuxbrew/opt/tcl-tk/lib" pyenv install 3.6.5 and (using system tcl/tk): export PYTHON_CONFIGURE_OPTS="--with-tcltk-includes=-I/usr/include --with-tcltk-libs=-L/usr/lib64" pyenv install 3.6.5 each with no luck. System tcl/tk was found using: → whereis tcl tcl: /usr/lib64/tcl8.5 /usr/include/tcl.h /usr/share/tcl8.5 → whereis tcl tcl: /usr/lib64/tcl8.5 /usr/include/tcl.h /usr/share/tcl8.5
RHEL/Pyenv: No module named &#39;_tkinter&#39; I'm trying to use Matplotlib on RHEL using a pyenv installed version of python 3.6.5. (installed using the following command) → pyenv install 3.6.5 Installing Python-3.6.5... python-build: use readline from homebrew Installed Python-3.6.5 to /home/swp1g17/.pyenv/versions/3.6.5 → pyenv global 3.6.5 I'm presented with the following error, and have found many questions that have a similar issue: Python 3.6.5 (default, Apr 5 2018, 17:22:36) [GCC 5.5.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import tkinter Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/swp1g17/.pyenv/versions/3.6.5/lib/python3.6/tkinter/__init__.py", line 36, in <module> import _tkinter # If this fails your Python may not be configured for Tk ModuleNotFoundError: No module named '_tkinter' However the suggested solution is usually to install tkinter using a package manager. However I've tried installing: 2872 sudo yum install rh-python36-python-tkinter 2873 sudo yum install rh-python35-python-tkinter 2874 sudo yum install rh-python34-python-tkinter 2891 sudo yum install tkinter 2893 sudo yum install python36-tkinter 2902 sudo yum install gcc zlib-devel bzip2 bzip2-devel readline-devel sqlite sqlite-devel openssl-devel tk-devel gdbm-devel ncurses-devel gl.. 2916 sudo yum install tkinter.x86_64 rh-python36-python-tkinter.x86_64 rh-python35-python-tkinter.x86_64 rh-python34-python-tkinter.x86_64 p.. 2921 sudo yum install tcl 2933 sudo yum install tk-devel 2934 sudo yum install tk 3000 sudo yum install tkinter 3026 sudo yum install tix 3031 sudo yum install tk 3032 sudo yum install tk-devel > 3033 sudo yum install tcl-devel with each already having been installed or making no difference (having rebuilt python each time a new package was installed. The system python is able to locate tkinter: → /usr/bin/python3.6 Python 3.6.3 (default, Jan 4 2018, 16:40:53) [GCC 4.8.5 20150623 (Red Hat 4.8.5-16)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import tkinter >>> so I'm unsure how to install python using pyenv and have it use the same version of tkinter? UPDATE: Having found that build configuration options can be set using $PYTHON_CONFIGURE_OPTS I've tried specifying the library locations using (for linuxbrew downloaded tcl/tk): export PYTHON_CONFIGURE_OPTS="--with-tcltk-includes=-I/home/linuxbrew/.linuxbrew/opt/tcl-tk/include --with-tcltk-libs=-L/home/linuxbrew/.linuxbrew/opt/tcl-tk/lib" pyenv install 3.6.5 and (using system tcl/tk): export PYTHON_CONFIGURE_OPTS="--with-tcltk-includes=-I/usr/include --with-tcltk-libs=-L/usr/lib64" pyenv install 3.6.5 each with no luck. System tcl/tk was found using: → whereis tcl tcl: /usr/lib64/tcl8.5 /usr/include/tcl.h /usr/share/tcl8.5 → whereis tcl tcl: /usr/lib64/tcl8.5 /usr/include/tcl.h /usr/share/tcl8.5
python, tkinter, rhel
7
4,110
2
https://stackoverflow.com/questions/49677522/rhel-pyenv-no-module-named-tkinter
61,480,914
Using PolicyKit to allow non-root users to start and stop a service
I have a requirement to allow non-root users to start and stop a service. It was recommended to me to use PolicyKit rather than sudoers.d , which I am familiar with. As I have no experience with PolicyKit , I thought I would experiment and create a rule to allow non-root users to start and stop the Docker service. I have created a file, /etc/polkit-1/rules.d/10-docker.rules containing: polkit.addRule(function(action, subject) { if (action.id == "org.freedesktop.systemd1.manage-units" && action.lookup("unit") == "docker.service") { return polkit.Result.YES; } }) However, whenever I execute systemctl start|stop|restart docker.service , I keep getting prompted for a password. What am I missing? Also, I would like to limit non-root users to control this service who are in a specific group e.g. blah . How do I incorporate this into my rule? My target OS is RHEL 7.7.
Using PolicyKit to allow non-root users to start and stop a service I have a requirement to allow non-root users to start and stop a service. It was recommended to me to use PolicyKit rather than sudoers.d , which I am familiar with. As I have no experience with PolicyKit , I thought I would experiment and create a rule to allow non-root users to start and stop the Docker service. I have created a file, /etc/polkit-1/rules.d/10-docker.rules containing: polkit.addRule(function(action, subject) { if (action.id == "org.freedesktop.systemd1.manage-units" && action.lookup("unit") == "docker.service") { return polkit.Result.YES; } }) However, whenever I execute systemctl start|stop|restart docker.service , I keep getting prompted for a password. What am I missing? Also, I would like to limit non-root users to control this service who are in a specific group e.g. blah . How do I incorporate this into my rule? My target OS is RHEL 7.7.
systemd, rhel, rhel7, polkit
7
14,952
3
https://stackoverflow.com/questions/61480914/using-policykit-to-allow-non-root-users-to-start-and-stop-a-service
27,518,646
Docker - Creating base image with RHEL iso
I am trying to use a RHEL image for my project. Is there a way to create a base image with my RHEL 6's iso file? I am not using Fedora as it is beneficial for my project to use the RHEL distribution instead.
Docker - Creating base image with RHEL iso I am trying to use a RHEL image for my project. Is there a way to create a base image with my RHEL 6's iso file? I am not using Fedora as it is beneficial for my project to use the RHEL distribution instead.
image, docker, rhel
7
8,899
1
https://stackoverflow.com/questions/27518646/docker-creating-base-image-with-rhel-iso
56,937,215
Use multiple specific network interfaces with docker swarm
I am using docker swarm to deploy an on-premise third party application. The machine I am deploying on is running RHEL 7.6 and has two network interfaces. The users will interact with the application from eth0 , but internal communication with their system must use eth1 or the connection will be blocked by their firewalls. My application requires some of my services to establish connections internal services in their network. I created my swarm using: $ docker swarm init --advertise-addr x.x.x.x Where x.x.x.x is the eth0 inet address. This works for incoming user traffic to the service. However, when I try to establish connections to another service the connection times out, blocked by the firewall. Outside of docker, on the machine, I can run: ssh -b y.y.y.y user@server Where y.y.y.y is the eth1 inet address, and it works. When I run the same in my docker swarm container I get this error: bind: y.y.y.y: Cannot assign requested address Is there some way I can use multiple network interfaces with docker swarm and specify which one is used within containers? I couldn't find much documentation on this. Do I need to set up some sort of proxy?
Use multiple specific network interfaces with docker swarm I am using docker swarm to deploy an on-premise third party application. The machine I am deploying on is running RHEL 7.6 and has two network interfaces. The users will interact with the application from eth0 , but internal communication with their system must use eth1 or the connection will be blocked by their firewalls. My application requires some of my services to establish connections internal services in their network. I created my swarm using: $ docker swarm init --advertise-addr x.x.x.x Where x.x.x.x is the eth0 inet address. This works for incoming user traffic to the service. However, when I try to establish connections to another service the connection times out, blocked by the firewall. Outside of docker, on the machine, I can run: ssh -b y.y.y.y user@server Where y.y.y.y is the eth1 inet address, and it works. When I run the same in my docker swarm container I get this error: bind: y.y.y.y: Cannot assign requested address Is there some way I can use multiple network interfaces with docker swarm and specify which one is used within containers? I couldn't find much documentation on this. Do I need to set up some sort of proxy?
linux, docker, network-programming, docker-swarm, rhel
7
6,562
1
https://stackoverflow.com/questions/56937215/use-multiple-specific-network-interfaces-with-docker-swarm
45,790,480
Ensure yum install fails if post install script fails
When trying to install a yum package, I'm getting: Non-fatal POSTIN scriptlet failure in rpm package But the yum install is completing successfully, so it's tough to know when it failed or not. Anyway to fail when yum encounters this?
Ensure yum install fails if post install script fails When trying to install a yum package, I'm getting: Non-fatal POSTIN scriptlet failure in rpm package But the yum install is completing successfully, so it's tough to know when it failed or not. Anyway to fail when yum encounters this?
linux, centos, yum, rhel
7
3,505
1
https://stackoverflow.com/questions/45790480/ensure-yum-install-fails-if-post-install-script-fails
44,353,128
AWS: Code deploy installation failed
I'm trying to setup deployment from github repository via AWS. I have an issue during these steps: [URL] This command fails: wget [URL] It returns: [ec2-user@ip-172-31-11-55 ~]$ wget [URL] --2017-06-04 10:18:18-- [URL] Resolving bucket-name.s3.amazonaws.com (bucket-name.s3.amazonaws.com)... 54.231.114.146 Connecting to bucket-name.s3.amazonaws.com (bucket-name.s3.amazonaws.com)|54.231.114.146|:443... connected. HTTP request sent, awaiting response... 403 Forbidden 2017-06-04 10:18:18 ERROR 403: Forbidden. I've allowed all the ports for inbound/outbound traffic for my instance. What is wrong?
AWS: Code deploy installation failed I'm trying to setup deployment from github repository via AWS. I have an issue during these steps: [URL] This command fails: wget [URL] It returns: [ec2-user@ip-172-31-11-55 ~]$ wget [URL] --2017-06-04 10:18:18-- [URL] Resolving bucket-name.s3.amazonaws.com (bucket-name.s3.amazonaws.com)... 54.231.114.146 Connecting to bucket-name.s3.amazonaws.com (bucket-name.s3.amazonaws.com)|54.231.114.146|:443... connected. HTTP request sent, awaiting response... 403 Forbidden 2017-06-04 10:18:18 ERROR 403: Forbidden. I've allowed all the ports for inbound/outbound traffic for my instance. What is wrong?
amazon-web-services, rhel, aws-code-deploy
6
3,639
4
https://stackoverflow.com/questions/44353128/aws-code-deploy-installation-failed
40,049,751
malloc inside linux signal handler cause deadlock
First of all sorry for calling malloc inside signal handler :).I too understand we should not do any time consuming task/this kind of nasty stuff inside signal handler. But i am curious to know the reason why it is crashed ? #0 0x00006e3ff2b60dce in _lll_lock_wait_private () from /lib64/libc.so.6 #1 0x00006e3ff2aec138 in _L_lock_9164 () from /lib64/libc.so.6 #2 0x00006e3ff2ae9a32 in malloc () from /lib64/libc.so.6 #3 0x00006e3ff1f691ad in ?? () from .. i got similar core reported in [URL] . operating system : RHEL
malloc inside linux signal handler cause deadlock First of all sorry for calling malloc inside signal handler :).I too understand we should not do any time consuming task/this kind of nasty stuff inside signal handler. But i am curious to know the reason why it is crashed ? #0 0x00006e3ff2b60dce in _lll_lock_wait_private () from /lib64/libc.so.6 #1 0x00006e3ff2aec138 in _L_lock_9164 () from /lib64/libc.so.6 #2 0x00006e3ff2ae9a32 in malloc () from /lib64/libc.so.6 #3 0x00006e3ff1f691ad in ?? () from .. i got similar core reported in [URL] . operating system : RHEL
c, linux, signals, rhel
6
8,011
4
https://stackoverflow.com/questions/40049751/malloc-inside-linux-signal-handler-cause-deadlock
83,242
mysqldump | mysql yields &#39;too many open files&#39; error. Why?
I have a RHEL 5 system with a fresh new hard drive I just dedicated to the MySQL server. To get things started, I used "mysqldump --host otherhost -A | mysql", even though I noticed the manpage never explicitly recommends trying this (mysqldump into a file is a no-go. We're talking 500G of database). This process fails at random intervals, complaining that too many files are open (at which point mysqld gets the relevant signal, and dies and respawns). I tried upping it at sysctl and ulimit, but the problem persists. What do I do about it?
mysqldump | mysql yields &#39;too many open files&#39; error. Why? I have a RHEL 5 system with a fresh new hard drive I just dedicated to the MySQL server. To get things started, I used "mysqldump --host otherhost -A | mysql", even though I noticed the manpage never explicitly recommends trying this (mysqldump into a file is a no-go. We're talking 500G of database). This process fails at random intervals, complaining that too many files are open (at which point mysqld gets the relevant signal, and dies and respawns). I tried upping it at sysctl and ulimit, but the problem persists. What do I do about it?
mysql, rhel
6
9,906
4
https://stackoverflow.com/questions/83242/mysqldump-mysql-yields-too-many-open-files-error-why
18,918,588
Did I install Ruby 1.9.3 correctly on RHEL?
Before you say yum -y install ruby193 ... I did that. Please note that I am not a Ruby developer, but need this program as part of another developer's work via web services. (He is not available.) Any help would be greatly appreciated. I attempted to install a library per instructions and got: [root@ctbroker console]# gem install json -v '1.8.0' Building native extensions. This could take a while... ERROR: Error installing json: ERROR: Failed to build gem native extension. /opt/rh/ruby193/root/usr/bin/ruby extconf.rb mkmf.rb can't find header files for ruby at /opt/rh/ruby193/root/usr/share/include/ruby.h Gem files will remain installed in /opt/rh/ruby193/root/usr/local/share/gems/gems/json-1.8.0 for inspection. Results logged to /opt/rh/ruby193/root/usr/local/share/gems/gems/json-1.8.0/ext/json/ext/generator/gem_make.out I noticed that ruby.h is only on the machine at /usr/lib64/ruby/1.8/x86_64-linux/ruby.h . What am I missing?
Did I install Ruby 1.9.3 correctly on RHEL? Before you say yum -y install ruby193 ... I did that. Please note that I am not a Ruby developer, but need this program as part of another developer's work via web services. (He is not available.) Any help would be greatly appreciated. I attempted to install a library per instructions and got: [root@ctbroker console]# gem install json -v '1.8.0' Building native extensions. This could take a while... ERROR: Error installing json: ERROR: Failed to build gem native extension. /opt/rh/ruby193/root/usr/bin/ruby extconf.rb mkmf.rb can't find header files for ruby at /opt/rh/ruby193/root/usr/share/include/ruby.h Gem files will remain installed in /opt/rh/ruby193/root/usr/local/share/gems/gems/json-1.8.0 for inspection. Results logged to /opt/rh/ruby193/root/usr/local/share/gems/gems/json-1.8.0/ext/json/ext/generator/gem_make.out I noticed that ruby.h is only on the machine at /usr/lib64/ruby/1.8/x86_64-linux/ruby.h . What am I missing?
ruby-on-rails, ruby, linux, json, rhel
6
9,976
4
https://stackoverflow.com/questions/18918588/did-i-install-ruby-1-9-3-correctly-on-rhel
12,963,177
custom yum repo not showing rpm
I have a yum repository I've set up where I store custom rpms. I have no problem finding information about other packages that were built and stored in this custom repo. #yum --disablerepo=rhui-us-east-rhel-server-1y,epel,epel-testing --enablerepo=customrepo install php53-pecl-xdebug php53-pecl-xdebug x86_64 2.2.1-2 customrepo 132 k No problem. Now I drop somerpm.rpm in centos/repo/5/noarch, run createrepo --update . in this directory and try the same command, and yet it shows no results. I tried running createrepo --update in the root of the repo as well, but that did not work either (I'm actually not sure where to run it and if it needs a repodata directory in each subdir). [root@reposerver mnt]# ls -l /var/www/repo/ total 12 -rw-r--r-- 1 root root 203 Jun 8 00:13 REPO_README drwxr-xr-x 3 root root 4096 Jun 10 2011 centos drwxr-xr-x 2 root root 4096 Oct 18 20:02 repodata [root@reposerver mnt]# ls -l /var/www/repo/centos/5/ SRPMS/ i386/ noarch/ repodata/ x86_64/ [root@reposerver mnt]# ls -l /var/www/repo/centos/5/noarch/ total 7324 -rw-r--r-- 1 root root 1622 Jun 28 2011 compat-php-5.1.6-1.noarch.rpm drwxr-xr-x 2 root root 4096 Oct 18 19:55 repodata -rw-r--r-- 1 root root 1066928 Oct 18 19:54 salt-0.10.3-1.noarch.rpm -rw-r--r-- 1 root root 6363197 Oct 18 19:54 salt-0.10.3-1.src.rpm -rw-r--r-- 1 root root 21822 Oct 18 19:54 salt-master-0.10.3-1.noarch.rpm -rw-r--r-- 1 root root 14294 Oct 18 19:54 salt-minion-0.10.3-1.noarch.rpm I also tried adding the exactarch=0 flag to my repo config to ignore arch restrictions and this did not work either, it was a shot in the dark, since my rpm is noarch, it should show regardless. # cat /etc/yum.repos.d/mycompany.repo [mycompany] name=mycompany custom repo baseurl=[URL] enabled=1 exactarch=0 I'm at a loss at this point. Usually createrepo --update does the trick, but for some reason it cannot find the new rpms. repo]# find . -type f -name "*.gz" | xargs zcat | grep salt-minion returns results as well, so it's definitely in the repo data.
custom yum repo not showing rpm I have a yum repository I've set up where I store custom rpms. I have no problem finding information about other packages that were built and stored in this custom repo. #yum --disablerepo=rhui-us-east-rhel-server-1y,epel,epel-testing --enablerepo=customrepo install php53-pecl-xdebug php53-pecl-xdebug x86_64 2.2.1-2 customrepo 132 k No problem. Now I drop somerpm.rpm in centos/repo/5/noarch, run createrepo --update . in this directory and try the same command, and yet it shows no results. I tried running createrepo --update in the root of the repo as well, but that did not work either (I'm actually not sure where to run it and if it needs a repodata directory in each subdir). [root@reposerver mnt]# ls -l /var/www/repo/ total 12 -rw-r--r-- 1 root root 203 Jun 8 00:13 REPO_README drwxr-xr-x 3 root root 4096 Jun 10 2011 centos drwxr-xr-x 2 root root 4096 Oct 18 20:02 repodata [root@reposerver mnt]# ls -l /var/www/repo/centos/5/ SRPMS/ i386/ noarch/ repodata/ x86_64/ [root@reposerver mnt]# ls -l /var/www/repo/centos/5/noarch/ total 7324 -rw-r--r-- 1 root root 1622 Jun 28 2011 compat-php-5.1.6-1.noarch.rpm drwxr-xr-x 2 root root 4096 Oct 18 19:55 repodata -rw-r--r-- 1 root root 1066928 Oct 18 19:54 salt-0.10.3-1.noarch.rpm -rw-r--r-- 1 root root 6363197 Oct 18 19:54 salt-0.10.3-1.src.rpm -rw-r--r-- 1 root root 21822 Oct 18 19:54 salt-master-0.10.3-1.noarch.rpm -rw-r--r-- 1 root root 14294 Oct 18 19:54 salt-minion-0.10.3-1.noarch.rpm I also tried adding the exactarch=0 flag to my repo config to ignore arch restrictions and this did not work either, it was a shot in the dark, since my rpm is noarch, it should show regardless. # cat /etc/yum.repos.d/mycompany.repo [mycompany] name=mycompany custom repo baseurl=[URL] enabled=1 exactarch=0 I'm at a loss at this point. Usually createrepo --update does the trick, but for some reason it cannot find the new rpms. repo]# find . -type f -name "*.gz" | xargs zcat | grep salt-minion returns results as well, so it's definitely in the repo data.
centos, rpm, yum, rhel, repository
6
12,035
1
https://stackoverflow.com/questions/12963177/custom-yum-repo-not-showing-rpm
55,298,884
How to upgrade Python 3 on Linux RHEL?
I have a Rhel version of a Linux and would like to upgrade from Python 3.6 to 3.7.2 What is the best and proven way to do it? Tried with yum but seems that does not have latest versions of python..
How to upgrade Python 3 on Linux RHEL? I have a Rhel version of a Linux and would like to upgrade from Python 3.6 to 3.7.2 What is the best and proven way to do it? Tried with yum but seems that does not have latest versions of python..
python, linux, rhel
6
49,997
2
https://stackoverflow.com/questions/55298884/how-to-upgrade-python-3-on-linux-rhel
17,296,655
EC2 instance launched from AMI not reachable(ssh) after start/stop or reboot
When we launch an instance from an AMI. At first the instance is accessible(ssh). Once we stop/start the instance or reboot it the machine becomes inaccessible via ssh,we can ping it though. We see below error in System log. AMI ID used - ami-72dc9220 Instance - i-0896a15f - Linux rhel6.4 M1.large instance. ../ ******************* BLKFRONT for device/vbd/2049 ********** backend at /local/domain/0/backend/vbd/236/2049 Failed to read /local/domain/0/backend/vbd/236/2049/feature-barrier. Failed to read /local/domain/0/backend/vbd/236/2049/feature-flush-cache. 14680064 sectors of 512 bytes ************************** Thread "kbdfront": pointer: 0x21e0130010, stack: 0x3720000 FBFRONT for device/vfb/0 ********** KBDFRONT for device/vkbd/0 ********** Failed to read device/vfb/0/backend-id. Failed to read device/vkbd/0/backend-id. Error ENOENT when reading the backend path device/vkbd/0/backend Thread "kbdfront" exited. Error ENOENT when reading the backend path device/vfb/0/backend ./
EC2 instance launched from AMI not reachable(ssh) after start/stop or reboot When we launch an instance from an AMI. At first the instance is accessible(ssh). Once we stop/start the instance or reboot it the machine becomes inaccessible via ssh,we can ping it though. We see below error in System log. AMI ID used - ami-72dc9220 Instance - i-0896a15f - Linux rhel6.4 M1.large instance. ../ ******************* BLKFRONT for device/vbd/2049 ********** backend at /local/domain/0/backend/vbd/236/2049 Failed to read /local/domain/0/backend/vbd/236/2049/feature-barrier. Failed to read /local/domain/0/backend/vbd/236/2049/feature-flush-cache. 14680064 sectors of 512 bytes ************************** Thread "kbdfront": pointer: 0x21e0130010, stack: 0x3720000 FBFRONT for device/vfb/0 ********** KBDFRONT for device/vkbd/0 ********** Failed to read device/vfb/0/backend-id. Failed to read device/vkbd/0/backend-id. Error ENOENT when reading the backend path device/vkbd/0/backend Thread "kbdfront" exited. Error ENOENT when reading the backend path device/vfb/0/backend ./
linux, amazon-web-services, amazon-ec2, rhel, amazon-ami
6
6,601
2
https://stackoverflow.com/questions/17296655/ec2-instance-launched-from-ami-not-reachablessh-after-start-stop-or-reboot
53,863,255
&quot;Peer&#39;s Certificate issuer is not recognized&quot; while adding docker repo
Running: yum-config-manager --add-repo [URL] Produces: Could not fetch/save url [URL] to file /etc/yum.repos.d/docker-ce.repo: [Errno 14] curl#60 - "Peer's Certificate issuer is not recognized."
&quot;Peer&#39;s Certificate issuer is not recognized&quot; while adding docker repo Running: yum-config-manager --add-repo [URL] Produces: Could not fetch/save url [URL] to file /etc/yum.repos.d/docker-ce.repo: [Errno 14] curl#60 - "Peer's Certificate issuer is not recognized."
docker, ssl, centos, rhel
6
20,880
3
https://stackoverflow.com/questions/53863255/peers-certificate-issuer-is-not-recognized-while-adding-docker-repo
25,879,840
How to build/deploy RPM(s) for new Boost version on RHEL?
I work in a team of 10+ developers and we use RHEL 6.4 for both our development machines as well as our servers (where our software is deployed). RHEL 6.4 comes with Boost 1.41 but I need fixes that come in at least 1.47. I'd like to upgrade to latest (currently 1.56). It is not as easy as downloading the source and building/installing, because: I want everyone on our team (including future team members) to have easy access to the new Boost version. Asking everyone to build/install is a lot of trouble and there might be inconsistencies. Our software is deployed as RPMs that get installed on hundreds of servers (and the servers are owned by other teams and outside of our control). These are also running RHEL 6.4. Our software would (presumably) need to run-time link to the new Boost shared libraries on all these machines. To make matters uglier, RedHat seems to have their own proprietary way of bundling/packaging the Boost software/libraries into RPMs. They don't have just one RPM but a series of smaller RPMs: $ yum list installed|grep boost boost.x86_64 1.41.0-11.el6_1.2 @Workstation boost-date-time.x86_64 1.41.0-11.el6_1.2 @Workstation boost-devel.x86_64 1.41.0-11.el6_1.2 @Workstation boost-filesystem.x86_64 1.41.0-11.el6_1.2 @Workstation boost-graph.x86_64 1.41.0-11.el6_1.2 @Workstation boost-iostreams.x86_64 1.41.0-11.el6_1.2 @Workstation boost-program-options.x86_64 1.41.0-11.el6_1.2 @Workstation boost-python.x86_64 1.41.0-11.el6_1.2 @Workstation boost-regex.x86_64 1.41.0-11.el6_1.2 @Workstation boost-serialization.x86_64 1.41.0-11.el6_1.2 @Workstation boost-signals.x86_64 1.41.0-11.el6_1.2 @Workstation boost-system.x86_64 1.41.0-11.el6_1.2 @Workstation boost-test.x86_64 1.41.0-11.el6_1.2 @Workstation boost-thread.x86_64 1.41.0-11.el6_1.2 @Workstation boost-wave.x86_64 1.41.0-11.el6_1.2 @Workstation I have been Googling and can't find an easy solution. I am also somewhat of a newbie when it comes to RPMs. How can I build/deploy Boost 1.56 as RPM(s) in our situation?
How to build/deploy RPM(s) for new Boost version on RHEL? I work in a team of 10+ developers and we use RHEL 6.4 for both our development machines as well as our servers (where our software is deployed). RHEL 6.4 comes with Boost 1.41 but I need fixes that come in at least 1.47. I'd like to upgrade to latest (currently 1.56). It is not as easy as downloading the source and building/installing, because: I want everyone on our team (including future team members) to have easy access to the new Boost version. Asking everyone to build/install is a lot of trouble and there might be inconsistencies. Our software is deployed as RPMs that get installed on hundreds of servers (and the servers are owned by other teams and outside of our control). These are also running RHEL 6.4. Our software would (presumably) need to run-time link to the new Boost shared libraries on all these machines. To make matters uglier, RedHat seems to have their own proprietary way of bundling/packaging the Boost software/libraries into RPMs. They don't have just one RPM but a series of smaller RPMs: $ yum list installed|grep boost boost.x86_64 1.41.0-11.el6_1.2 @Workstation boost-date-time.x86_64 1.41.0-11.el6_1.2 @Workstation boost-devel.x86_64 1.41.0-11.el6_1.2 @Workstation boost-filesystem.x86_64 1.41.0-11.el6_1.2 @Workstation boost-graph.x86_64 1.41.0-11.el6_1.2 @Workstation boost-iostreams.x86_64 1.41.0-11.el6_1.2 @Workstation boost-program-options.x86_64 1.41.0-11.el6_1.2 @Workstation boost-python.x86_64 1.41.0-11.el6_1.2 @Workstation boost-regex.x86_64 1.41.0-11.el6_1.2 @Workstation boost-serialization.x86_64 1.41.0-11.el6_1.2 @Workstation boost-signals.x86_64 1.41.0-11.el6_1.2 @Workstation boost-system.x86_64 1.41.0-11.el6_1.2 @Workstation boost-test.x86_64 1.41.0-11.el6_1.2 @Workstation boost-thread.x86_64 1.41.0-11.el6_1.2 @Workstation boost-wave.x86_64 1.41.0-11.el6_1.2 @Workstation I have been Googling and can't find an easy solution. I am also somewhat of a newbie when it comes to RPMs. How can I build/deploy Boost 1.56 as RPM(s) in our situation?
c++, linux, boost, rpm, rhel
6
7,153
2
https://stackoverflow.com/questions/25879840/how-to-build-deploy-rpms-for-new-boost-version-on-rhel
34,889,325
What should the chkconfig line in a RHEL init.d script be set to for a process controller like supervisord?
I'm trying to write a init.d script for the first time to start a supervisord process. Supervisor is a process controller/manager like runit , upstart , or systemd . I would like it to start automatically if the system reboots, so that it can start my applications. I used this tldp tutorial as a base to write an init.d script. It works fine but I don't understand how I should modify this line in the file: # chkconfig: 2345 95 05 The note in the tutorial for this line states: Although these are comments, they are used by chkconfig command and must be present. This particular line defines that on runlevels 2,3,4 and 5, this subsystem will be activated with priority 95 (one of the lasts), and deactivated with priority 05 (one of the firsts). This RHEL doc explains the various runlevels as so: 0 - Halt 1 - Single-user text mode 2 - Not used (user-definable_ 3 - Full multi-user text mode 4 - Not used (user-definable) 5 - Full multi-user grapical mode 6 - Reboot From these choices, I suppose I would like to run mine on 35 , assuming that 1 is only for system administrators. There are a few example supervisord init.d scripts, for example here . I noticed that all of the RHEL init.d scripts contain the following line: # chkconfig: 345 83 04 In this case, what reason could the authors have to want it to be active on runlevel 4, which is "not used" ? The nginx init.d script that I installed contains this line: # chkconfig: - 86 16 What does the - mean for the runlevel here? Why does this line not contain a deactivate priority? How does one decide upon the priority levels for a process controller like supervisor ? The scripts above chose 83 and 04, whereas the tldp tutorial chose 95 and 05.
What should the chkconfig line in a RHEL init.d script be set to for a process controller like supervisord? I'm trying to write a init.d script for the first time to start a supervisord process. Supervisor is a process controller/manager like runit , upstart , or systemd . I would like it to start automatically if the system reboots, so that it can start my applications. I used this tldp tutorial as a base to write an init.d script. It works fine but I don't understand how I should modify this line in the file: # chkconfig: 2345 95 05 The note in the tutorial for this line states: Although these are comments, they are used by chkconfig command and must be present. This particular line defines that on runlevels 2,3,4 and 5, this subsystem will be activated with priority 95 (one of the lasts), and deactivated with priority 05 (one of the firsts). This RHEL doc explains the various runlevels as so: 0 - Halt 1 - Single-user text mode 2 - Not used (user-definable_ 3 - Full multi-user text mode 4 - Not used (user-definable) 5 - Full multi-user grapical mode 6 - Reboot From these choices, I suppose I would like to run mine on 35 , assuming that 1 is only for system administrators. There are a few example supervisord init.d scripts, for example here . I noticed that all of the RHEL init.d scripts contain the following line: # chkconfig: 345 83 04 In this case, what reason could the authors have to want it to be active on runlevel 4, which is "not used" ? The nginx init.d script that I installed contains this line: # chkconfig: - 86 16 What does the - mean for the runlevel here? Why does this line not contain a deactivate priority? How does one decide upon the priority levels for a process controller like supervisor ? The scripts above chose 83 and 04, whereas the tldp tutorial chose 95 and 05.
nginx, init, rhel, supervisord, init.d
6
5,108
2
https://stackoverflow.com/questions/34889325/what-should-the-chkconfig-line-in-a-rhel-init-d-script-be-set-to-for-a-process-c
20,272,845
&#39;strace&#39; fixes hung process
I have a singlethreaded Unix process that communicates over TCP with other processes. The problem is the following. When I start up the process it hangs (no busy loop) until I kill it. The funny thing is, as soon as I attach with strace to it, it continues to run with the expected behavior as if there wasn't any problem at all (always reproducible). What could be the reason for this behavior? What effect has strace on the state of a process? The cause of strace changing the behavior was, because we used openonload with a bug. As soon as we attached strace, the stack was moved back to the kernel and the problem was gone.
&#39;strace&#39; fixes hung process I have a singlethreaded Unix process that communicates over TCP with other processes. The problem is the following. When I start up the process it hangs (no busy loop) until I kill it. The funny thing is, as soon as I attach with strace to it, it continues to run with the expected behavior as if there wasn't any problem at all (always reproducible). What could be the reason for this behavior? What effect has strace on the state of a process? The cause of strace changing the behavior was, because we used openonload with a bug. As soon as we attached strace, the stack was moved back to the kernel and the problem was gone.
unix, process, rhel, strace
6
4,821
4
https://stackoverflow.com/questions/20272845/strace-fixes-hung-process
61,053,867
How to run podman when no home directory?
We are using SELinux in RHEL 8, which in our company does not allow for home directories for users. There are some containers which are started by the root user (which does have a home directory). But all interactive users such as myself do not have a home directory (due to security enforcement). Therefore whenever I run any podman commands, it fails with cannot write to /home/<user> How can I use podman when there is no possibility of a home directory? Seems a big flaw in podman to enforce this requirement. Unless of course, someone can tell me what the change is I need to make? cheers!
How to run podman when no home directory? We are using SELinux in RHEL 8, which in our company does not allow for home directories for users. There are some containers which are started by the root user (which does have a home directory). But all interactive users such as myself do not have a home directory (due to security enforcement). Therefore whenever I run any podman commands, it fails with cannot write to /home/<user> How can I use podman when there is no possibility of a home directory? Seems a big flaw in podman to enforce this requirement. Unless of course, someone can tell me what the change is I need to make? cheers!
rhel, selinux, podman
6
5,447
2
https://stackoverflow.com/questions/61053867/how-to-run-podman-when-no-home-directory
19,256,825
Delete BASH history on exit for all users
Using Red Hat Enterprise Linux is it possible to place a global option that whenever a user exits an SSH connection the BASH history for that user is cleared?
Delete BASH history on exit for all users Using Red Hat Enterprise Linux is it possible to place a global option that whenever a user exits an SSH connection the BASH history for that user is cleared?
bash, rhel
6
4,728
5
https://stackoverflow.com/questions/19256825/delete-bash-history-on-exit-for-all-users
6,113,423
Linux thread scheduling differences on multi-core systems?
We have several latency-sensitive "pipeline"-style programs that have a measurable performance degredation when run on one Linux kernel versus another. In particular, we see better performance with the 2.6.9 CentOS 4.x (RHEL4) kernel, and worse performance with the 2.6.18 kernel from CentOS 5.x (RHEL5). By "pipeline" program, I mean one that has multiple threads. The mutiple threads work on shared data. Between each thread, there is a queue. So thread A gets data, pushes into Qab, thread B pulls from Qab, does some processing, then pushes into Qbc, thread C pulls from Qbc, etc. The initial data is from the network (generated by a 3rd party). We basically measure the time from when the data is received to when the last thread performs its task. In our application, we see an increase of anywhere from 20 to 50 microseconds when moving from CentOS 4 to CentOS 5. I have used a few methods of profiling our application, and determined that the added latency on CentOS 5 comes from queue operations (in particular, popping). However, I can improve performance on CentOS 5 (to be the same as CentOS 4) by using taskset to bind the program to a subset of the available cores. So it appers to me, between CentOS 4 and 5, there was some change (presumably to the kernel) that caused threads to be scheduled differently (and this difference is suboptimal for our application). While I can "solve" this problem with taskset (or in code via sched_setaffinity()), my preference is to not have to do this. I'm hoping there's some kind of kernel tunable (or maybe collection of tunables) whose default was changed between versions. Anyone have any experience with this? Perhaps some more areas to investigate? Update: In this particular case, the issue was resolved by a BIOS update from the server vendor (Dell). I pulled my hair out quite a while on this one. Until I went back to the basics, and checked my vendor's BIOS updates. Suspiciously, one of the updates said something like "improve performance in maximum performance mode". Once I upgraded the BIOS, CentOS 5 was faster---generally speaking, but particularly in my queue tests, and actual production runs.
Linux thread scheduling differences on multi-core systems? We have several latency-sensitive "pipeline"-style programs that have a measurable performance degredation when run on one Linux kernel versus another. In particular, we see better performance with the 2.6.9 CentOS 4.x (RHEL4) kernel, and worse performance with the 2.6.18 kernel from CentOS 5.x (RHEL5). By "pipeline" program, I mean one that has multiple threads. The mutiple threads work on shared data. Between each thread, there is a queue. So thread A gets data, pushes into Qab, thread B pulls from Qab, does some processing, then pushes into Qbc, thread C pulls from Qbc, etc. The initial data is from the network (generated by a 3rd party). We basically measure the time from when the data is received to when the last thread performs its task. In our application, we see an increase of anywhere from 20 to 50 microseconds when moving from CentOS 4 to CentOS 5. I have used a few methods of profiling our application, and determined that the added latency on CentOS 5 comes from queue operations (in particular, popping). However, I can improve performance on CentOS 5 (to be the same as CentOS 4) by using taskset to bind the program to a subset of the available cores. So it appers to me, between CentOS 4 and 5, there was some change (presumably to the kernel) that caused threads to be scheduled differently (and this difference is suboptimal for our application). While I can "solve" this problem with taskset (or in code via sched_setaffinity()), my preference is to not have to do this. I'm hoping there's some kind of kernel tunable (or maybe collection of tunables) whose default was changed between versions. Anyone have any experience with this? Perhaps some more areas to investigate? Update: In this particular case, the issue was resolved by a BIOS update from the server vendor (Dell). I pulled my hair out quite a while on this one. Until I went back to the basics, and checked my vendor's BIOS updates. Suspiciously, one of the updates said something like "improve performance in maximum performance mode". Once I upgraded the BIOS, CentOS 5 was faster---generally speaking, but particularly in my queue tests, and actual production runs.
linux, multithreading, scheduling, latency, rhel
6
2,852
2
https://stackoverflow.com/questions/6113423/linux-thread-scheduling-differences-on-multi-core-systems
60,762,134
How to determine what is shutting down my Java app?
I've got a Java8 application running on RHEL 6.10. This application registers a shutdown handler via the usual method: Thread shutdownThread = new Thread(()=>{ Logger.info("Got shutdown signal"); // Do cleanup }); Runtime.getRuntime().addShutdownHook(shutdownThread); This application is kicked off by a Jenkins build (with the BUILD_ID env var set to dontkillme ). The application initializes successfully, but then after ~30 seconds the shutdown hook is called and the application terminates. I'm trying to figure out who is shutting me down and why. I've monitored top and it doesn't appear that memory is an issue while it's running, so I don't think the OOM killer is the culprit. I've also looked at /var/log/dmesg and /var/log/messages and don't see anything relevant there either. I don't think Jenkins would be killing me, both since I set BUILD_ID and also because the application dies while the "parent" Jenkins job is still running. What other methods / tools can I use to see what's happening? Note that my environment is very locked down, so it would be difficult to download and run something from the internet, hopefully there's something in a standard RHEL6 install I could use.
How to determine what is shutting down my Java app? I've got a Java8 application running on RHEL 6.10. This application registers a shutdown handler via the usual method: Thread shutdownThread = new Thread(()=>{ Logger.info("Got shutdown signal"); // Do cleanup }); Runtime.getRuntime().addShutdownHook(shutdownThread); This application is kicked off by a Jenkins build (with the BUILD_ID env var set to dontkillme ). The application initializes successfully, but then after ~30 seconds the shutdown hook is called and the application terminates. I'm trying to figure out who is shutting me down and why. I've monitored top and it doesn't appear that memory is an issue while it's running, so I don't think the OOM killer is the culprit. I've also looked at /var/log/dmesg and /var/log/messages and don't see anything relevant there either. I don't think Jenkins would be killing me, both since I set BUILD_ID and also because the application dies while the "parent" Jenkins job is still running. What other methods / tools can I use to see what's happening? Note that my environment is very locked down, so it would be difficult to download and run something from the internet, hopefully there's something in a standard RHEL6 install I could use.
java, jenkins, java-8, rhel, rhel6
6
450
2
https://stackoverflow.com/questions/60762134/how-to-determine-what-is-shutting-down-my-java-app
286,767
changing users default login shell on RHEL?
Here is a command on free bsd sudo pw usermod ksbuild -s /usr/local/bin/bash how do I do the equivalent on RHEL?
changing users default login shell on RHEL? Here is a command on free bsd sudo pw usermod ksbuild -s /usr/local/bin/bash how do I do the equivalent on RHEL?
linux, rhel
5
18,296
3
https://stackoverflow.com/questions/286767/changing-users-default-login-shell-on-rhel
24,157,857
ansible command: module returning error
trying to do an iptables-save with ansible name: Save Netfilter Rules action: command iptables-save > /etc/sysconfig/iptables But this gives error failed: [10.110.211.17] => {"changed": true, "cmd": ["iptables-save", ">", "/etc/sysconfig/iptables"], "delta": "0:00:00.009345", "end": "2014-06-09 16:55:18.306375", "rc": 1, "start": "2014-06-09 16:55:18.297030"} stderr: Unknown arguments found on commandline But over ssh this works fine: ssh root@host "iptables-save > /etc/sysconfig/iptables" works fine but not through Ansible command: module How can i make this work
ansible command: module returning error trying to do an iptables-save with ansible name: Save Netfilter Rules action: command iptables-save > /etc/sysconfig/iptables But this gives error failed: [10.110.211.17] => {"changed": true, "cmd": ["iptables-save", ">", "/etc/sysconfig/iptables"], "delta": "0:00:00.009345", "end": "2014-06-09 16:55:18.306375", "rc": 1, "start": "2014-06-09 16:55:18.297030"} stderr: Unknown arguments found on commandline But over ssh this works fine: ssh root@host "iptables-save > /etc/sysconfig/iptables" works fine but not through Ansible command: module How can i make this work
rhel, ansible
5
2,025
1
https://stackoverflow.com/questions/24157857/ansible-command-module-returning-error
37,547,826
Writing a linux daemon
What is the right way to write/configure application under Linux, that runs all the time and serves external requests (TCP, database, filesystem, any kind of them). I specifically do not call this daemon, because it may mean something I do not want it to in Linux environment. I already read multiple topics, including: Linux daemonize best way to write a linux daemon Best practice to run Linux service as a different user but none of them gives full comparison about which approach to use. I see following options: writing application which forks, calls setpid, umask, etc. but this requires application to perform many steps by itself; (with autostart by init.d?) use daemon() init.d function which performs most of those steps for you (but is it portable to all/many linux distributions) running application with & and trust it to run in background But which of them is the way to go. Or if they all can be used, what constitutes daemon in Linux? I am looking for an equivalent of running application as a service under windows (and any .exe can be automatically made for runs as a service with use of sc ). My requirements are as following: start after boot (automatically) runs as specific user (not root) has access to entire filesystem (/) but creates/modifies files as user under which the application is run can be controlled through service start , service stop possibly automatically restart after crash or kill can write to syslog run under RHEL7 I am the author of the application, but would prefer not to alter it to handle daemonization. My guess would be to write custom init.d script which in turn would call daemon() function from /etc/init.d/functions. Am I right?
Writing a linux daemon What is the right way to write/configure application under Linux, that runs all the time and serves external requests (TCP, database, filesystem, any kind of them). I specifically do not call this daemon, because it may mean something I do not want it to in Linux environment. I already read multiple topics, including: Linux daemonize best way to write a linux daemon Best practice to run Linux service as a different user but none of them gives full comparison about which approach to use. I see following options: writing application which forks, calls setpid, umask, etc. but this requires application to perform many steps by itself; (with autostart by init.d?) use daemon() init.d function which performs most of those steps for you (but is it portable to all/many linux distributions) running application with & and trust it to run in background But which of them is the way to go. Or if they all can be used, what constitutes daemon in Linux? I am looking for an equivalent of running application as a service under windows (and any .exe can be automatically made for runs as a service with use of sc ). My requirements are as following: start after boot (automatically) runs as specific user (not root) has access to entire filesystem (/) but creates/modifies files as user under which the application is run can be controlled through service start , service stop possibly automatically restart after crash or kill can write to syslog run under RHEL7 I am the author of the application, but would prefer not to alter it to handle daemonization. My guess would be to write custom init.d script which in turn would call daemon() function from /etc/init.d/functions. Am I right?
c, linux, daemon, rhel
5
2,762
2
https://stackoverflow.com/questions/37547826/writing-a-linux-daemon
42,386,788
How can I detect linux distribution within GOlang program?
I want to write linux distribution independant Golang code. I need detect which linux distribution and need to run distribution specific commands within program. Like dpkg in case of Ubuntu and rpm -q in case of RHEL.
How can I detect linux distribution within GOlang program? I want to write linux distribution independant Golang code. I need detect which linux distribution and need to run distribution specific commands within program. Like dpkg in case of Ubuntu and rpm -q in case of RHEL.
linux, ubuntu, go, rhel, oracle-osm
5
7,095
4
https://stackoverflow.com/questions/42386788/how-can-i-detect-linux-distribution-within-golang-program
48,157,562
Running bash script 10 minutes after the system start
I'm trying to run a bash script 10 minutes after my system startup and on every reboot. I was planning to the @reboot of crontab, but I'm not sure of two things Whether it will run on the first system start or only on reboot. How to delay the run by 10 minutes after the reboot. What expression would suit my situation the best? Please note that I can't run 'at' or system timer to accomplish this as both are not accessible to us. I'm working on the RHEL 7..
Running bash script 10 minutes after the system start I'm trying to run a bash script 10 minutes after my system startup and on every reboot. I was planning to the @reboot of crontab, but I'm not sure of two things Whether it will run on the first system start or only on reboot. How to delay the run by 10 minutes after the reboot. What expression would suit my situation the best? Please note that I can't run 'at' or system timer to accomplish this as both are not accessible to us. I'm working on the RHEL 7..
linux, bash, cron, rhel
5
13,816
3
https://stackoverflow.com/questions/48157562/running-bash-script-10-minutes-after-the-system-start
29,664,256
How to install python debug-info for gdb?
I want to use gdb to debug python script. After starting gdb , it outputs: [root@localhost scripts]# gdb python GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-51.el7 Copyright (C) 2013 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <[URL] This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-redhat-linux-gnu". For bug reporting instructions, please see: <[URL] Reading symbols from /usr/bin/python2.7...Reading symbols from /usr/bin/python2.7...(no debugging symbols found).. .done. (no debugging symbols found)...done. Missing separate debuginfos, use: debuginfo-install python-2.7.5-16.el7.x86_64 According to its prompts, I execute debuginfo-install python-2.7.5-16.el7.x86_64 command, and the output is: [root@localhost scripts]# debuginfo-install python-2.7.5-16.el7.x86_64 Loaded plugins: product-id centos-extra | 3.4 kB 00:00:00 rhel | 4.1 kB 00:00:00 centos-extra/primary_db | 563 kB 00:00:00 Could not find debuginfo for main pkg: python-2.7.5-16.el7.x86_64 Could not find debuginfo pkg for dependency package glibc-2.17-55.el7.x86_64 Could not find debuginfo pkg for dependency package python-libs-2.7.5-16.el7.x86_64 No debuginfo packages available to install P.S.: There are 2 yum data source: the RHEL 7.0 iso and CentOS link: [rhel] name=rhel 7.0 baseurl=file:///mnt/iso enabled=1 gpgcheck=0 [centos-extra] name=centos extra baseurl=[URL] enabled=1 gpgcheck=0 How can I install python debug-info?
How to install python debug-info for gdb? I want to use gdb to debug python script. After starting gdb , it outputs: [root@localhost scripts]# gdb python GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-51.el7 Copyright (C) 2013 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <[URL] This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-redhat-linux-gnu". For bug reporting instructions, please see: <[URL] Reading symbols from /usr/bin/python2.7...Reading symbols from /usr/bin/python2.7...(no debugging symbols found).. .done. (no debugging symbols found)...done. Missing separate debuginfos, use: debuginfo-install python-2.7.5-16.el7.x86_64 According to its prompts, I execute debuginfo-install python-2.7.5-16.el7.x86_64 command, and the output is: [root@localhost scripts]# debuginfo-install python-2.7.5-16.el7.x86_64 Loaded plugins: product-id centos-extra | 3.4 kB 00:00:00 rhel | 4.1 kB 00:00:00 centos-extra/primary_db | 563 kB 00:00:00 Could not find debuginfo for main pkg: python-2.7.5-16.el7.x86_64 Could not find debuginfo pkg for dependency package glibc-2.17-55.el7.x86_64 Could not find debuginfo pkg for dependency package python-libs-2.7.5-16.el7.x86_64 No debuginfo packages available to install P.S.: There are 2 yum data source: the RHEL 7.0 iso and CentOS link: [rhel] name=rhel 7.0 baseurl=file:///mnt/iso enabled=1 gpgcheck=0 [centos-extra] name=centos extra baseurl=[URL] enabled=1 gpgcheck=0 How can I install python debug-info?
python, linux, debugging, gdb, rhel
5
22,017
2
https://stackoverflow.com/questions/29664256/how-to-install-python-debug-info-for-gdb
20,291,233
To get Parent and ChildProcess ID from process ID in Python
I am trying to get the ppid of the process that I want. I used following code to get the pid proc=subprocess.Popen('ps -ae | grep ruby', shell=True, stdout=subprocess.PIPE, ) output=proc.communicate()[0] str = output.split() Now in the str[0] , I have the pid of the process say ruby, I want to get the parent process ID ppid and child process ID of the same process. I need this solution to be run on Solaris as well as Red Hat Enterprise Linux 6.0 Is there any way to get that like getppid() and getchildid() ? Or do I need to do it by grep command again and splitting?
To get Parent and ChildProcess ID from process ID in Python I am trying to get the ppid of the process that I want. I used following code to get the pid proc=subprocess.Popen('ps -ae | grep ruby', shell=True, stdout=subprocess.PIPE, ) output=proc.communicate()[0] str = output.split() Now in the str[0] , I have the pid of the process say ruby, I want to get the parent process ID ppid and child process ID of the same process. I need this solution to be run on Solaris as well as Red Hat Enterprise Linux 6.0 Is there any way to get that like getppid() and getchildid() ? Or do I need to do it by grep command again and splitting?
python, process, solaris, rhel
5
15,196
3
https://stackoverflow.com/questions/20291233/to-get-parent-and-childprocess-id-from-process-id-in-python
25,149,702
How to use CLIPS rule based engine in a linux environment
I am new to computer science. My project requires to use CLIPS rule based engine and it runs in a RHEL box. Looking at the download link for clips ( [URL] ) there is no linux package available. I was wondering if this means I need to build it out of the source files to use it in RHEL? Thanks in advance.
How to use CLIPS rule based engine in a linux environment I am new to computer science. My project requires to use CLIPS rule based engine and it runs in a RHEL box. Looking at the download link for clips ( [URL] ) there is no linux package available. I was wondering if this means I need to build it out of the source files to use it in RHEL? Thanks in advance.
rhel, clips
5
8,600
5
https://stackoverflow.com/questions/25149702/how-to-use-clips-rule-based-engine-in-a-linux-environment
27,267,166
How to install WebLogic server using Console mode in RHEL?
In my REHL server I'm going to install WebLogic server, But while the installation it shows the following, Launcher log file is /tmp/OraInstall2014-12-03_01-46-31AM/launcher2014-12-03_01-46-31AM.log. Extracting files.............. Starting Oracle Universal Installer Checking if CPU speed is above 300 MHz. Actual 1997.386 MHz Passed Checking monitor: must be configured to display at least 256 colors. DISPLAY environment variable not set. Failed <<<< Checking swap space: must be greater than 512 MB. Actual 4145148 MB Passed Checking if this platform requires a 64-bit JVM. Actual 64 Passed (64-bit not required) Checking temp space: must be greater than 300 MB. Actual 953 MB Passed Some system prerequisite checks failed. You must fulfill these requirements before continuing with the installation. Continue? (yes [y] / no [n]) [n] Then I tried install with console mode using the following command, java -jar fmw_12.1.3.0.0_wls.jar -mode=console But it says, Invalid argument(s): -mode=console So can anyone help me to install the WebLogic server using console mode ? Any help would be greatly appreciated. Thank You.
How to install WebLogic server using Console mode in RHEL? In my REHL server I'm going to install WebLogic server, But while the installation it shows the following, Launcher log file is /tmp/OraInstall2014-12-03_01-46-31AM/launcher2014-12-03_01-46-31AM.log. Extracting files.............. Starting Oracle Universal Installer Checking if CPU speed is above 300 MHz. Actual 1997.386 MHz Passed Checking monitor: must be configured to display at least 256 colors. DISPLAY environment variable not set. Failed <<<< Checking swap space: must be greater than 512 MB. Actual 4145148 MB Passed Checking if this platform requires a 64-bit JVM. Actual 64 Passed (64-bit not required) Checking temp space: must be greater than 300 MB. Actual 953 MB Passed Some system prerequisite checks failed. You must fulfill these requirements before continuing with the installation. Continue? (yes [y] / no [n]) [n] Then I tried install with console mode using the following command, java -jar fmw_12.1.3.0.0_wls.jar -mode=console But it says, Invalid argument(s): -mode=console So can anyone help me to install the WebLogic server using console mode ? Any help would be greatly appreciated. Thank You.
installation, weblogic, rhel, rhel6
5
9,958
2
https://stackoverflow.com/questions/27267166/how-to-install-weblogic-server-using-console-mode-in-rhel
67,587,983
Expose ports with rootless podman
I am trying to expose port 8080 using rootless podman on RHEL 8.3. The podman version I am using is: $ podman --version podman version 2.2.1 I am using a simple Flask API to test it: from flask import Flask app = Flask(__name__) @app.route("/") def hello(): return "Hello from the container!\n" if __name__ == "__main__": app.run(host="0.0.0.0") The Containerfile looks like this: FROM python:3.6-alpine RUN pip3 install flask COPY app.py app.py EXPOSE 5000 ENTRYPOINT python3 app.py I am building the image using: $ podman build -t testapi . I am creating a pod and start a container within that pod $ podman pod create --name testpod -p 8080:5000 $ $ podman run -d --rm --name testapi --pod testpod testapi All containers are running as expected: $ podman ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 85289290cc7a localhost/testapi:latest 3 seconds ago Up 2 seconds ago 0.0.0.0:8080->5000/tcp testapi 4b1ac2354a1a k8s.gcr.io/pause:3.2 About a minute ago Up 3 seconds ago 0.0.0.0:8080->5000/tcp 81aa31a38084-infra However, I cannot connect to the port: $ telnet <IP> 8080 Trying <IP>... telnet: Unable to connect to remote host: No route to host When I use netstat to see which port are in use I get this: $ netstat -tulpn | grep LISTEN (Not all processes could be identified, non-owned process info will not be shown, you would have to be root to see it all.) tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN - tcp6 0 0 :::8080 :::* LISTEN 638593/containers-r tcp6 0 0 :::22 :::* LISTEN - And using lsof I get: $ lsof -i -P -n | grep LISTEN exe 638593 ds 13u IPv6 593362 0t0 TCP *:8080 (LISTEN) When I do the same thing using rootfull podman, it works, i.e.: $ sudo podman pod create --name testpod -p 8080:5000 $ sudo podman run -d --rm --name testapi --pod testpod testapi Now the response is: $ telnet 10.100.2.220 8080 Trying 10.100.2.220... Connected to 10.100.2.220. netstat returns: $ netstat -tulpn | grep LISTEN (Not all processes could be identified, non-owned process info will not be shown, you would have to be root to see it all.) tcp 0 0 0.0.0.0:8080 0.0.0.0:* LISTEN - tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN - tcp6 0 0 :::22 :::* LISTEN - and lsof: $ sudo lsof -i -P -n | grep LISTEN conmon 639312 root 5u IPv4 590239 0t0 TCP *:8080 (LISTEN) Is there a way to expose a port using rootless podman so I can access it away from the podman host?
Expose ports with rootless podman I am trying to expose port 8080 using rootless podman on RHEL 8.3. The podman version I am using is: $ podman --version podman version 2.2.1 I am using a simple Flask API to test it: from flask import Flask app = Flask(__name__) @app.route("/") def hello(): return "Hello from the container!\n" if __name__ == "__main__": app.run(host="0.0.0.0") The Containerfile looks like this: FROM python:3.6-alpine RUN pip3 install flask COPY app.py app.py EXPOSE 5000 ENTRYPOINT python3 app.py I am building the image using: $ podman build -t testapi . I am creating a pod and start a container within that pod $ podman pod create --name testpod -p 8080:5000 $ $ podman run -d --rm --name testapi --pod testpod testapi All containers are running as expected: $ podman ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 85289290cc7a localhost/testapi:latest 3 seconds ago Up 2 seconds ago 0.0.0.0:8080->5000/tcp testapi 4b1ac2354a1a k8s.gcr.io/pause:3.2 About a minute ago Up 3 seconds ago 0.0.0.0:8080->5000/tcp 81aa31a38084-infra However, I cannot connect to the port: $ telnet <IP> 8080 Trying <IP>... telnet: Unable to connect to remote host: No route to host When I use netstat to see which port are in use I get this: $ netstat -tulpn | grep LISTEN (Not all processes could be identified, non-owned process info will not be shown, you would have to be root to see it all.) tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN - tcp6 0 0 :::8080 :::* LISTEN 638593/containers-r tcp6 0 0 :::22 :::* LISTEN - And using lsof I get: $ lsof -i -P -n | grep LISTEN exe 638593 ds 13u IPv6 593362 0t0 TCP *:8080 (LISTEN) When I do the same thing using rootfull podman, it works, i.e.: $ sudo podman pod create --name testpod -p 8080:5000 $ sudo podman run -d --rm --name testapi --pod testpod testapi Now the response is: $ telnet 10.100.2.220 8080 Trying 10.100.2.220... Connected to 10.100.2.220. netstat returns: $ netstat -tulpn | grep LISTEN (Not all processes could be identified, non-owned process info will not be shown, you would have to be root to see it all.) tcp 0 0 0.0.0.0:8080 0.0.0.0:* LISTEN - tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN - tcp6 0 0 :::22 :::* LISTEN - and lsof: $ sudo lsof -i -P -n | grep LISTEN conmon 639312 root 5u IPv4 590239 0t0 TCP *:8080 (LISTEN) Is there a way to expose a port using rootless podman so I can access it away from the podman host?
rhel, podman
5
10,641
2
https://stackoverflow.com/questions/67587983/expose-ports-with-rootless-podman
66,324,225
Podman pod disappears after a few days, but process is still running and listening on a given port
I am running an Elasticsearch container as Podman pod using podman play kube and a yaml definition of a pod. Pod is created, cluster of three nodes is created and everything works as expected. But: Podman pod dies after a few days of staying idle. Podman podman ps command says: ERRO[0000] Error refreshing container af05fafe31f6bfb00c2599255c47e35813ecf5af9bbe6760ae8a4abffd343627: error acquiring lock 1 for container af05fafe31f6bfb00c2599255c47e35813ecf5af9bbe6760ae8a4abffd343627: file exists ERRO[0000] Error refreshing container b4620633d99f156bb59eb327a918220d67145f8198d1c42b90d81e6cc29cbd6b: error acquiring lock 2 for container b4620633d99f156bb59eb327a918220d67145f8198d1c42b90d81e6cc29cbd6b: file exists ERRO[0000] Error refreshing pod 389b0c34313d9b23ecea3faa0e494e28413bd15566d66297efa9b5065e025262: error retrieving lock 0 for pod 389b0c34313d9b23ecea3faa0e494e28413bd15566d66297efa9b5065e025262: file exists POD ID NAME STATUS CREATED INFRA ID # OF CONTAINERS 389b0c34313d elasticsearch-pod Created 1 week ago af05fafe31f6 2 What's weird is that the process is still listening if we try to find the process id listening on port 9200 or 9300: Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp6 0 0 :::9200 :::* LISTEN 1328607/containers- tcp6 0 0 :::9300 :::* LISTEN 1328607/containers- The process ID that is hanging (and making the process still listening is): user+ 1339220 0.0 0.1 45452 8284 ? S Jan11 2:19 /bin/slirp4netns --disable-host-loopback --mtu 65520 --enable-sandbox --enable-seccomp -c -e 3 -r 4 --netns-type=path /tmp/run-1002/netns/cni-e4bb2146-d04e-c3f1-9207-380a234efa1f tap0 The only actions I do to the pod is regular: podman pod stop , podman pod rm and podman play kube that is starting pod. What can be causing such strange behaviour of Podman? What may be causing the lock not to be released properly? System information: NAME="Red Hat Enterprise Linux" VERSION="8.3 (Ootpa)" ID="rhel" ID_LIKE="fedora" VERSION_ID="8.3" PLATFORM_ID="platform:el8" PRETTY_NAME="Red Hat Enterprise Linux 8.3 (Ootpa)" ANSI_COLOR="0;31" CPE_NAME="cpe:/o:redhat:enterprise_linux:8.3:GA" HOME_URL="[URL] BUG_REPORT_URL="[URL] REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 8" REDHAT_BUGZILLA_PRODUCT_VERSION=8.3 REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux" REDHAT_SUPPORT_PRODUCT_VERSION="8.3" Red Hat Enterprise Linux release 8.3 (Ootpa) Red Hat Enterprise Linux release 8.3 (Ootpa) Podman version: podman --version podman version 2.2.1
Podman pod disappears after a few days, but process is still running and listening on a given port I am running an Elasticsearch container as Podman pod using podman play kube and a yaml definition of a pod. Pod is created, cluster of three nodes is created and everything works as expected. But: Podman pod dies after a few days of staying idle. Podman podman ps command says: ERRO[0000] Error refreshing container af05fafe31f6bfb00c2599255c47e35813ecf5af9bbe6760ae8a4abffd343627: error acquiring lock 1 for container af05fafe31f6bfb00c2599255c47e35813ecf5af9bbe6760ae8a4abffd343627: file exists ERRO[0000] Error refreshing container b4620633d99f156bb59eb327a918220d67145f8198d1c42b90d81e6cc29cbd6b: error acquiring lock 2 for container b4620633d99f156bb59eb327a918220d67145f8198d1c42b90d81e6cc29cbd6b: file exists ERRO[0000] Error refreshing pod 389b0c34313d9b23ecea3faa0e494e28413bd15566d66297efa9b5065e025262: error retrieving lock 0 for pod 389b0c34313d9b23ecea3faa0e494e28413bd15566d66297efa9b5065e025262: file exists POD ID NAME STATUS CREATED INFRA ID # OF CONTAINERS 389b0c34313d elasticsearch-pod Created 1 week ago af05fafe31f6 2 What's weird is that the process is still listening if we try to find the process id listening on port 9200 or 9300: Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp6 0 0 :::9200 :::* LISTEN 1328607/containers- tcp6 0 0 :::9300 :::* LISTEN 1328607/containers- The process ID that is hanging (and making the process still listening is): user+ 1339220 0.0 0.1 45452 8284 ? S Jan11 2:19 /bin/slirp4netns --disable-host-loopback --mtu 65520 --enable-sandbox --enable-seccomp -c -e 3 -r 4 --netns-type=path /tmp/run-1002/netns/cni-e4bb2146-d04e-c3f1-9207-380a234efa1f tap0 The only actions I do to the pod is regular: podman pod stop , podman pod rm and podman play kube that is starting pod. What can be causing such strange behaviour of Podman? What may be causing the lock not to be released properly? System information: NAME="Red Hat Enterprise Linux" VERSION="8.3 (Ootpa)" ID="rhel" ID_LIKE="fedora" VERSION_ID="8.3" PLATFORM_ID="platform:el8" PRETTY_NAME="Red Hat Enterprise Linux 8.3 (Ootpa)" ANSI_COLOR="0;31" CPE_NAME="cpe:/o:redhat:enterprise_linux:8.3:GA" HOME_URL="[URL] BUG_REPORT_URL="[URL] REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 8" REDHAT_BUGZILLA_PRODUCT_VERSION=8.3 REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux" REDHAT_SUPPORT_PRODUCT_VERSION="8.3" Red Hat Enterprise Linux release 8.3 (Ootpa) Red Hat Enterprise Linux release 8.3 (Ootpa) Podman version: podman --version podman version 2.2.1
rhel, podman, rhel8
5
5,038
1
https://stackoverflow.com/questions/66324225/podman-pod-disappears-after-a-few-days-but-process-is-still-running-and-listeni
56,806,229
How can we install just cqlsh (just CLI) on RHEL instead of complete cassandra?
How can we install cqlsh on RHEL (not the complete cassandra setup) ? I have tried installing the complete Cassandra [URL] but I need only cqlsh. cqlsh installed
How can we install just cqlsh (just CLI) on RHEL instead of complete cassandra? How can we install cqlsh on RHEL (not the complete cassandra setup) ? I have tried installing the complete Cassandra [URL] but I need only cqlsh. cqlsh installed
cassandra, installation, rhel, cqlsh
5
4,997
3
https://stackoverflow.com/questions/56806229/how-can-we-install-just-cqlsh-just-cli-on-rhel-instead-of-complete-cassandra
50,244,935
Class &#39;ZipArchive&#39; not found
What I want to realize I will use PhpSpreadsheet in a PHP web application development, I am trying to configure PHP Zip extension necessary for PhpSpreadsheet to be enabled on the server. I tried two methods, but I could not set it well, so I would like you to tell me the solution and other things to check. 1st method I tried Execute the following at the terminal # yum install php71-php-pecl-zip.x86_64 # cp /etc/opt/remi/php71/php.d/40-zip.ini /etc/php.d/40-zip.ini # systemctl stop httpd.service # systemctl start httpd.service When executing processing using PhpSpreadsheet from the Web browser, an error occurred /vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx.php: 71 Class 'ZipArchive' not found I confirmed that the Zip extension is enabled at the terminal, but I do not know the cause. # php --info Additional. Ini files parsed => · · /etc/php.d/40-zip.ini · · zip Zip => enabled Zip version => 1.15.2 Libzip headers version => 1.3.2 Libzip library version => 1.5.1 zlib ZLib Support => enabled Stream Wrapper => compress.zlib: / / Stream Filter => zlib.inflate, zlib.deflate Compiled Version => 1.2.7 Linked Version => 1.2.7 Directive => Local Value => Master Value zlib.output_compression => Off => Off zlib.output_compression_level => -1 => -1 zlib.output_handler => no value => no value # php vendor / phpoffice / phpspreadsheet / samples / index.php Requirement check: PHP 5.6.0 ... passed PHP extension XML ... passed PHP extension xmlwriter ... passed PHP extension mbstring ... passed PHP extension ZipArchive ... passed PHP extension GD (optional) ... passed PHP extension dom (optional) ... passed 2nd method I tried After canceling the setting of 1st (uninstall package, delete the copied file) Execute the following at the terminal # yum install php71-php-devel.x86_64 # yum install zlib-devel.x86_64 # pecl install zip The following error occurred in the third command # pecl install zip No releases available for package "pecl.php.net/zip" install failed Due to the error above, downloading the file and executing phpize will not proceed with an error again ... # wget [URL] # phpize Can not find PHP headers in /usr/include/php The php-devel package is required for use of this command. I did not understand why errors occurred in pecl install zip and phpize . Additional information (FW / tool version, etc.) OS: Red Hat Enterprise Linux Server release 7.4 (Maipo) PHP: 7.1.14
Class &#39;ZipArchive&#39; not found What I want to realize I will use PhpSpreadsheet in a PHP web application development, I am trying to configure PHP Zip extension necessary for PhpSpreadsheet to be enabled on the server. I tried two methods, but I could not set it well, so I would like you to tell me the solution and other things to check. 1st method I tried Execute the following at the terminal # yum install php71-php-pecl-zip.x86_64 # cp /etc/opt/remi/php71/php.d/40-zip.ini /etc/php.d/40-zip.ini # systemctl stop httpd.service # systemctl start httpd.service When executing processing using PhpSpreadsheet from the Web browser, an error occurred /vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx.php: 71 Class 'ZipArchive' not found I confirmed that the Zip extension is enabled at the terminal, but I do not know the cause. # php --info Additional. Ini files parsed => · · /etc/php.d/40-zip.ini · · zip Zip => enabled Zip version => 1.15.2 Libzip headers version => 1.3.2 Libzip library version => 1.5.1 zlib ZLib Support => enabled Stream Wrapper => compress.zlib: / / Stream Filter => zlib.inflate, zlib.deflate Compiled Version => 1.2.7 Linked Version => 1.2.7 Directive => Local Value => Master Value zlib.output_compression => Off => Off zlib.output_compression_level => -1 => -1 zlib.output_handler => no value => no value # php vendor / phpoffice / phpspreadsheet / samples / index.php Requirement check: PHP 5.6.0 ... passed PHP extension XML ... passed PHP extension xmlwriter ... passed PHP extension mbstring ... passed PHP extension ZipArchive ... passed PHP extension GD (optional) ... passed PHP extension dom (optional) ... passed 2nd method I tried After canceling the setting of 1st (uninstall package, delete the copied file) Execute the following at the terminal # yum install php71-php-devel.x86_64 # yum install zlib-devel.x86_64 # pecl install zip The following error occurred in the third command # pecl install zip No releases available for package "pecl.php.net/zip" install failed Due to the error above, downloading the file and executing phpize will not proceed with an error again ... # wget [URL] # phpize Can not find PHP headers in /usr/include/php The php-devel package is required for use of this command. I did not understand why errors occurred in pecl install zip and phpize . Additional information (FW / tool version, etc.) OS: Red Hat Enterprise Linux Server release 7.4 (Maipo) PHP: 7.1.14
php, linux, rhel, phpspreadsheet
5
18,410
3
https://stackoverflow.com/questions/50244935/class-ziparchive-not-found
45,950,644
Prevent .NET Core 2.0 from leaving files in /tmp on RHEL7
Edit: Martin provides a link below to a defect, which is now fixed and released. I am a university student. I would like to use .NET Core for my coursework. To do so, my code needs to compile and run on the department Linux cluster, because that is what my instructors test my submissions on. My sysadmin installed the recently-released .NET Core 2.0 RHEL package for me on a trial basis. I created, built, and ran the sample CLI projects Microsoft provides , and they worked. But my sysadmin was displeased because dotnet created at least one file in (global) /tmp , which remained there after I logged off. -rw------- myuser mygroup /tmp/.NETCoreApp,Version=v2.0.AssemblyAttributes.cs In principle, he'd prefer dotnet not create any files in /tmp that it doesn't clean up when its process is done. More than that, when he tried to build Microsoft's samples himself, it failed; dotnet tried to access the above file, which his user did not have read permissions for! Ideally, dotnet wouldn't create any files with a lifetime different from the project it is building. To achieve this, any such files could live in the project directory — maybe under the bin subdirectory, so that a clean will purge them. Is there a way to make dotnet write these files there instead? Otherwise, can it least use transient filenames, to avoid the permissions conflict we encountered? Whatever the solution is, it has to be systemwide, and it cannot depend on the good behavior of users. So something like asking the user to set $TMPDIR will not work.
Prevent .NET Core 2.0 from leaving files in /tmp on RHEL7 Edit: Martin provides a link below to a defect, which is now fixed and released. I am a university student. I would like to use .NET Core for my coursework. To do so, my code needs to compile and run on the department Linux cluster, because that is what my instructors test my submissions on. My sysadmin installed the recently-released .NET Core 2.0 RHEL package for me on a trial basis. I created, built, and ran the sample CLI projects Microsoft provides , and they worked. But my sysadmin was displeased because dotnet created at least one file in (global) /tmp , which remained there after I logged off. -rw------- myuser mygroup /tmp/.NETCoreApp,Version=v2.0.AssemblyAttributes.cs In principle, he'd prefer dotnet not create any files in /tmp that it doesn't clean up when its process is done. More than that, when he tried to build Microsoft's samples himself, it failed; dotnet tried to access the above file, which his user did not have read permissions for! Ideally, dotnet wouldn't create any files with a lifetime different from the project it is building. To achieve this, any such files could live in the project directory — maybe under the bin subdirectory, so that a clean will purge them. Is there a way to make dotnet write these files there instead? Otherwise, can it least use transient filenames, to avoid the permissions conflict we encountered? Whatever the solution is, it has to be systemwide, and it cannot depend on the good behavior of users. So something like asking the user to set $TMPDIR will not work.
msbuild, .net-core, rhel, csproj
5
1,129
1
https://stackoverflow.com/questions/45950644/prevent-net-core-2-0-from-leaving-files-in-tmp-on-rhel7
43,741,317
Can&#39;t start MySQL after RHEL upgrade to 7.2, Unregistered Authentication Agent
I just upgraded my RHEL system from 6.7 to 7.2 , and am having issues starting up MySQL again. When running: # systemctl start mysqld I get this error: Job for mysqld.service failed because the control process exited with error code. See "systemctl status mysqld.service" and "journalctl -xe" for details. systemctl status tells me the following: ● mysqld.service - SYSV: MySQL database server. Loaded: loaded (/etc/rc.d/init.d/mysqld) Active: failed (Result: exit-code) since Tue 2017-05-02 10:00:52 CDT; 59s ago Docs: man:systemd-sysv-generator(8) Process: 21827 ExecStart=/etc/rc.d/init.d/mysqld start (code=exited, status=1/FAILURE) May 02 10:00:51 sa-dnca01.zs.local systemd[1]: Starting SYSV: MySQL database server.... May 02 10:00:52 sa-dnca01.zs.local mysqld[21827]: MySQL Daemon failed to start. May 02 10:00:52 sa-dnca01.zs.local mysqld[21827]: Starting mysqld: [FAILED] May 02 10:00:52 sa-dnca01.zs.local systemd[1]: mysqld.service: control process exited, code=exited status=1 May 02 10:00:52 sa-dnca01.zs.local systemd[1]: Failed to start SYSV: MySQL database server.. May 02 10:00:52 sa-dnca01.zs.local systemd[1]: Unit mysqld.service entered failed state. May 02 10:00:52 sa-dnca01.zs.local systemd[1]: mysqld.service failed. And then journalctl -xe tells me the following: May 02 10:03:09 sa-dnca01.zs.local polkitd[768]: Registered Authentication Agent for unix-process:22276:29249716 (system bus name :1.30 [/usr/bin/ May 02 10:03:09 sa-dnca01.zs.local systemd[1]: Starting SYSV: MySQL database server.... -- Subject: Unit mysqld.service has begun start-up -- Defined-By: systemd -- Support: [URL] -- -- Unit mysqld.service has begun starting up. May 02 10:03:10 sa-dnca01.zs.local mysqld[22281]: MySQL Daemon failed to start. May 02 10:03:10 sa-dnca01.zs.local mysqld[22281]: Starting mysqld: [FAILED] May 02 10:03:10 sa-dnca01.zs.local systemd[1]: mysqld.service: control process exited, code=exited status=1 May 02 10:03:10 sa-dnca01.zs.local systemd[1]: Failed to start SYSV: MySQL database server.. -- Subject: Unit mysqld.service has failed -- Defined-By: systemd -- Support: [URL] -- -- Unit mysqld.service has failed. -- -- The result is failed. May 02 10:03:10 sa-dnca01.zs.local systemd[1]: Unit mysqld.service entered failed state. May 02 10:03:10 sa-dnca01.zs.local systemd[1]: mysqld.service failed. May 02 10:03:10 sa-dnca01.zs.local polkitd[768]: Unregistered Authentication Agent for unix-process:22276:29249716 (system bus name :1.30, object I don't really know what any of this means, but I did have a successfully running MySQL server before the server had an OS upgrade.
Can&#39;t start MySQL after RHEL upgrade to 7.2, Unregistered Authentication Agent I just upgraded my RHEL system from 6.7 to 7.2 , and am having issues starting up MySQL again. When running: # systemctl start mysqld I get this error: Job for mysqld.service failed because the control process exited with error code. See "systemctl status mysqld.service" and "journalctl -xe" for details. systemctl status tells me the following: ● mysqld.service - SYSV: MySQL database server. Loaded: loaded (/etc/rc.d/init.d/mysqld) Active: failed (Result: exit-code) since Tue 2017-05-02 10:00:52 CDT; 59s ago Docs: man:systemd-sysv-generator(8) Process: 21827 ExecStart=/etc/rc.d/init.d/mysqld start (code=exited, status=1/FAILURE) May 02 10:00:51 sa-dnca01.zs.local systemd[1]: Starting SYSV: MySQL database server.... May 02 10:00:52 sa-dnca01.zs.local mysqld[21827]: MySQL Daemon failed to start. May 02 10:00:52 sa-dnca01.zs.local mysqld[21827]: Starting mysqld: [FAILED] May 02 10:00:52 sa-dnca01.zs.local systemd[1]: mysqld.service: control process exited, code=exited status=1 May 02 10:00:52 sa-dnca01.zs.local systemd[1]: Failed to start SYSV: MySQL database server.. May 02 10:00:52 sa-dnca01.zs.local systemd[1]: Unit mysqld.service entered failed state. May 02 10:00:52 sa-dnca01.zs.local systemd[1]: mysqld.service failed. And then journalctl -xe tells me the following: May 02 10:03:09 sa-dnca01.zs.local polkitd[768]: Registered Authentication Agent for unix-process:22276:29249716 (system bus name :1.30 [/usr/bin/ May 02 10:03:09 sa-dnca01.zs.local systemd[1]: Starting SYSV: MySQL database server.... -- Subject: Unit mysqld.service has begun start-up -- Defined-By: systemd -- Support: [URL] -- -- Unit mysqld.service has begun starting up. May 02 10:03:10 sa-dnca01.zs.local mysqld[22281]: MySQL Daemon failed to start. May 02 10:03:10 sa-dnca01.zs.local mysqld[22281]: Starting mysqld: [FAILED] May 02 10:03:10 sa-dnca01.zs.local systemd[1]: mysqld.service: control process exited, code=exited status=1 May 02 10:03:10 sa-dnca01.zs.local systemd[1]: Failed to start SYSV: MySQL database server.. -- Subject: Unit mysqld.service has failed -- Defined-By: systemd -- Support: [URL] -- -- Unit mysqld.service has failed. -- -- The result is failed. May 02 10:03:10 sa-dnca01.zs.local systemd[1]: Unit mysqld.service entered failed state. May 02 10:03:10 sa-dnca01.zs.local systemd[1]: mysqld.service failed. May 02 10:03:10 sa-dnca01.zs.local polkitd[768]: Unregistered Authentication Agent for unix-process:22276:29249716 (system bus name :1.30, object I don't really know what any of this means, but I did have a successfully running MySQL server before the server had an OS upgrade.
mysql, rhel, rhel7
5
17,036
1
https://stackoverflow.com/questions/43741317/cant-start-mysql-after-rhel-upgrade-to-7-2-unregistered-authentication-agent
37,203,978
CakePHP permissions error
This may seem like a duplicate but I have read the similar questions and tried what they suggested and it didn't work. When I navigate to my CakePHP site I get the following errors Warning (2): mkdir(): Permission denied [CORE/src/Cache/Engine/FileEngine.php, line 417] Warning: file_put_contents(/var/www/html/my-application/logs/error.log) [function.file-put-contents]: failed to open stream: Permission denied in /var/www/html/my-application/vendor/cakephp/cakephp/src/Log/Engine/FileLog.php on line 134 Warning (512): /var/www/html/my-application/tmp/cache/persistent/ is not writable [CORE/src/Cache/Engine/FileEngine.php, line 425] Warning (2): file_put_contents(/var/www/html/my-application/logs/error.log) [function.file-put-contents]: failed to open stream: Permission denied [CORE/src/Log/Engine/FileLog.php, line 134] Warning: file_put_contents(/var/www/html/my-application/logs/error.log) [function.file-put-contents]: failed to open stream: Permission denied in /var/www/html/my-application/vendor/cakephp/cakephp/src/Log/Engine/FileLog.php on line 134 The thing is I am sure that PHP has access to all the necessary files. PHP runs as user apache, in group apache. Evidence: [ec2-user@cv-stg01 my-application]$ ps -efl | grep apache 5 S apache 21863 21861 0 80 0 - 124037 SYSC_s 03:06 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND 5 S apache 21864 21861 0 80 0 - 123971 SYSC_s 03:06 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND 5 S apache 21865 21861 0 80 0 - 123485 SYSC_s 03:06 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND 5 S apache 21867 21861 0 80 0 - 124037 SYSC_s 03:06 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND 5 S apache 21868 21861 0 80 0 - 123485 SYSC_s 03:06 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND 5 S apache 21869 21861 0 80 0 - 123485 SYSC_s 03:06 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND 5 S apache 21870 21861 0 80 0 - 124037 SYSC_s 03:06 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND 5 S apache 21881 21861 0 80 0 - 123485 SYSC_s 03:09 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND 5 S apache 21882 21861 0 80 0 - 123485 SYSC_s 03:09 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND 5 S apache 21883 21861 0 80 0 - 125444 ep_pol 03:09 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND 0 S ec2-user 21934 21785 0 80 0 - 28161 pipe_w 03:20 pts/0 00:00:00 grep --color=auto apache Relevant directories are owned by apache:apache and have permissions set to 777 anyway: [ec2-user@cv-stg01 my-application]$ ls -l total 132 drwxrwxr-x. 2 apache apache 47 May 12 21:16 bin -rw-rw-r--. 1 apache apache 1128 May 12 21:16 composer.json -rw-rw-r--. 1 apache apache 93002 May 12 21:16 composer.lock drwxrwxr-x. 3 apache apache 4096 May 12 21:19 config -rw-rw-r--. 1 apache apache 648 May 12 21:16 index.php drwxrwxrwx. 2 apache apache 34 May 13 03:10 logs -rw-rw-r--. 1 apache apache 1139 May 12 21:16 phpunit.xml.dist drwxrwxr-x. 2 apache apache 18 May 12 21:16 plugins -rw-rw-r--. 1 apache apache 980 May 12 21:16 README.md drwxrwxr-x. 9 apache apache 4096 May 12 21:16 src drwxrwxrwx. 4 apache apache 55 May 12 21:16 tests drwxrwxrwx. 2 apache apache 6 May 13 03:17 tmp drwxrwxr-x. 28 apache apache 4096 May 12 21:16 vendor drwxrwxr-x. 9 apache apache 4096 May 12 21:16 webroot Sub-directories in tmp/ have correct permissions too: [ec2-user@cv-stg01 tmp]$ ls -l total 0 drwxrwxrwx. 5 apache apache 48 May 12 21:16 cache drwxrwxrwx. 2 apache apache 18 May 12 21:16 sessions drwxrwxrwx. 2 apache apache 18 May 12 21:16 tests I have also tried re-applying the permissions, just in case, using sudo chown -R apache:apache /var/www/html/my-application sudo chmod -R 777 /var/www/html/my-application/tmp sudo chmod -R 777 /var/www/html/my-application/logs sudo chmod -R 777 /var/www/html/my-application/tests And I have even logged in as apache and edited the files myself, with no issues sudo su -s /bin/bash apache vi /var/www/html/my-applciation/logs/error.log I'm really struggling to work out what the issue could be now. We have SELinux installed/enabled, so maybe that's causing issues? Help would be greatly appreciated. Thanks, YM
CakePHP permissions error This may seem like a duplicate but I have read the similar questions and tried what they suggested and it didn't work. When I navigate to my CakePHP site I get the following errors Warning (2): mkdir(): Permission denied [CORE/src/Cache/Engine/FileEngine.php, line 417] Warning: file_put_contents(/var/www/html/my-application/logs/error.log) [function.file-put-contents]: failed to open stream: Permission denied in /var/www/html/my-application/vendor/cakephp/cakephp/src/Log/Engine/FileLog.php on line 134 Warning (512): /var/www/html/my-application/tmp/cache/persistent/ is not writable [CORE/src/Cache/Engine/FileEngine.php, line 425] Warning (2): file_put_contents(/var/www/html/my-application/logs/error.log) [function.file-put-contents]: failed to open stream: Permission denied [CORE/src/Log/Engine/FileLog.php, line 134] Warning: file_put_contents(/var/www/html/my-application/logs/error.log) [function.file-put-contents]: failed to open stream: Permission denied in /var/www/html/my-application/vendor/cakephp/cakephp/src/Log/Engine/FileLog.php on line 134 The thing is I am sure that PHP has access to all the necessary files. PHP runs as user apache, in group apache. Evidence: [ec2-user@cv-stg01 my-application]$ ps -efl | grep apache 5 S apache 21863 21861 0 80 0 - 124037 SYSC_s 03:06 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND 5 S apache 21864 21861 0 80 0 - 123971 SYSC_s 03:06 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND 5 S apache 21865 21861 0 80 0 - 123485 SYSC_s 03:06 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND 5 S apache 21867 21861 0 80 0 - 124037 SYSC_s 03:06 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND 5 S apache 21868 21861 0 80 0 - 123485 SYSC_s 03:06 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND 5 S apache 21869 21861 0 80 0 - 123485 SYSC_s 03:06 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND 5 S apache 21870 21861 0 80 0 - 124037 SYSC_s 03:06 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND 5 S apache 21881 21861 0 80 0 - 123485 SYSC_s 03:09 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND 5 S apache 21882 21861 0 80 0 - 123485 SYSC_s 03:09 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND 5 S apache 21883 21861 0 80 0 - 125444 ep_pol 03:09 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND 0 S ec2-user 21934 21785 0 80 0 - 28161 pipe_w 03:20 pts/0 00:00:00 grep --color=auto apache Relevant directories are owned by apache:apache and have permissions set to 777 anyway: [ec2-user@cv-stg01 my-application]$ ls -l total 132 drwxrwxr-x. 2 apache apache 47 May 12 21:16 bin -rw-rw-r--. 1 apache apache 1128 May 12 21:16 composer.json -rw-rw-r--. 1 apache apache 93002 May 12 21:16 composer.lock drwxrwxr-x. 3 apache apache 4096 May 12 21:19 config -rw-rw-r--. 1 apache apache 648 May 12 21:16 index.php drwxrwxrwx. 2 apache apache 34 May 13 03:10 logs -rw-rw-r--. 1 apache apache 1139 May 12 21:16 phpunit.xml.dist drwxrwxr-x. 2 apache apache 18 May 12 21:16 plugins -rw-rw-r--. 1 apache apache 980 May 12 21:16 README.md drwxrwxr-x. 9 apache apache 4096 May 12 21:16 src drwxrwxrwx. 4 apache apache 55 May 12 21:16 tests drwxrwxrwx. 2 apache apache 6 May 13 03:17 tmp drwxrwxr-x. 28 apache apache 4096 May 12 21:16 vendor drwxrwxr-x. 9 apache apache 4096 May 12 21:16 webroot Sub-directories in tmp/ have correct permissions too: [ec2-user@cv-stg01 tmp]$ ls -l total 0 drwxrwxrwx. 5 apache apache 48 May 12 21:16 cache drwxrwxrwx. 2 apache apache 18 May 12 21:16 sessions drwxrwxrwx. 2 apache apache 18 May 12 21:16 tests I have also tried re-applying the permissions, just in case, using sudo chown -R apache:apache /var/www/html/my-application sudo chmod -R 777 /var/www/html/my-application/tmp sudo chmod -R 777 /var/www/html/my-application/logs sudo chmod -R 777 /var/www/html/my-application/tests And I have even logged in as apache and edited the files myself, with no issues sudo su -s /bin/bash apache vi /var/www/html/my-applciation/logs/error.log I'm really struggling to work out what the issue could be now. We have SELinux installed/enabled, so maybe that's causing issues? Help would be greatly appreciated. Thanks, YM
php, linux, cakephp, permissions, rhel
5
15,658
3
https://stackoverflow.com/questions/37203978/cakephp-permissions-error
17,394,181
replace string to asterisk bash
I am trying to get from user a path as an input. The user will enter a specific path for specific application: script.sh /var/log/dbhome_1/md5 I've wanted to convert the number of directory (in that case - 1) to * (asterisk). later on, the script will do some logic on this path. When i'm trying sed on the input, i'm stuck with the number - echo "/var/log/dbhome_1/md5" | sed "s/dbhome_*/dbhome_\*/g" and the input will be - /var/log/dbhome_*1/md5 I know that i have some problems with the asterisk wildcard and as a char... maybe regex will help here?
replace string to asterisk bash I am trying to get from user a path as an input. The user will enter a specific path for specific application: script.sh /var/log/dbhome_1/md5 I've wanted to convert the number of directory (in that case - 1) to * (asterisk). later on, the script will do some logic on this path. When i'm trying sed on the input, i'm stuck with the number - echo "/var/log/dbhome_1/md5" | sed "s/dbhome_*/dbhome_\*/g" and the input will be - /var/log/dbhome_*1/md5 I know that i have some problems with the asterisk wildcard and as a char... maybe regex will help here?
regex, bash, sed, rhel
5
5,350
3
https://stackoverflow.com/questions/17394181/replace-string-to-asterisk-bash
7,538,757
Mono 2.10.5 for CentOS / RHEL 5
Until now I used THIS to install/update mono on my CentOS machines, but it seems that it's not updated since 2.10.2 anymore (may because mono isn't part of novell anymore). So is there a new location to get newer mono *.rpm from?
Mono 2.10.5 for CentOS / RHEL 5 Until now I used THIS to install/update mono on my CentOS machines, but it seems that it's not updated since 2.10.2 anymore (may because mono isn't part of novell anymore). So is there a new location to get newer mono *.rpm from?
mono, centos, centos5, rhel, rhel5
5
4,805
1
https://stackoverflow.com/questions/7538757/mono-2-10-5-for-centos-rhel-5
45,004,928
Unable to compile the class for JSP
We are facing the below exception when I click on View button to see the user details : 2017-06-30 19:23:52,831 ERROR [com.myapp.jsp] - <Unable to compile class for JSP: An error occurred at line: 53 in the jsp file: /WEB-INF/jsps/ViewUserDetails.jsp apache cannot be resolved or is not a field 50: </myapphtml:myappRow> 51: 52: <myapphtml:myappRow align="left" label="userdetails.field.label.orgs"> 53: <logic:iterate name="userDetails" property="Orgs" id="org"> 54: &nbsp;<bean:write name="org" property="name" /><br> 55: </logic:iterate> 56: </myapphtml:myappRow> Stacktrace:> org.apache.jasper.JasperException: Unable to compile class for JSP: An error occurred at line: 53 in the jsp file: /WEB-INF/jsps/ViewUserDetails.jsp apache cannot be resolved or is not a field 50: </myapphtml:myappRow> 51: 52: <myapphtml:myappRow align="left" label="userdetails.field.label.orgs"> 53: <logic:iterate name="userDetails" property="mappedOrgs" id="org"> 54: &nbsp;<bean:write name="org" property="name" /><br> 55: </logic:iterate> 56: </myapphtml:myappRow> Stacktrace: at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:103) at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:366) at org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:490) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:379) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:354) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:341) at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:662) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:364) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:395) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:339) at javax.servlet.http.HttpServlet.service(HttpServlet.java:731) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:743) at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:485) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:410) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:337) at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1063) at org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:263) at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:386) at org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:318) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:229) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414) at javax.servlet.http.HttpServlet.service(HttpServlet.java:624) at javax.servlet.http.HttpServlet.service(HttpServlet.java:731) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at at com.myapp.tools.auth.client.AuthFilter.doFilter(AuthFilter.java:512) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at com.myapp.tools.auth.client.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:90) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:218) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:110) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:506) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:962) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:445) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1115) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:637) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:318) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Unknown Source) This happens only in the combination of RHEL 7.x and Tomcat combination. I am not able to reproduce this issue in combination other then this. Attaching the ViewUserDetails.jsp <%@ page import="org.apache.struts.Globals" %> <%@ page import="com.myapp.tools.api.impl.User" %> <%@ include file="include/commonDef.jspf" %> <tiles:insert definition="myapp.csd.office.layout.default"> <tiles:put name="header" type="String"> <myapphtml:myappPageHeaderTab headerImage="images/default/icn_user.gif" headerText="form.page.title.user_details"/> </tiles:put> <tiles:put name="content" type="String"> <myapphtml:myappBlock> <myapphtml:myappMessage genErrorKey="<%= myappGlobals.GENERAL_ERROR %>" valErrorKey="<%= Globals.ERROR_KEY %>" genErrorHeading="MC.General.genError" valErrorHeading="MC.General.genError" headingBundle="myappBASETAG"/> </myapphtml:myappBlock> <strutshtml:form action="/processUserList.do" method="POST"> <input type="hidden" name="action" value="" /> <myapphtml:myappRow align="left" label="userdetails.field.label.orgs"> <logic:iterate name="userDetails" property="Orgs" id="org"> &nbsp;<bean:write name="org" property="name" /><br> </logic:iterate> </myapphtml:myappRow> <myapphtml:myappButtonRow formname="UserDetailsForm"> <myapphtml:myappButton action="cancel" name="form.button.label.cancel" buttonStyle="button_gt" /> </myapphtml:myappButtonRow> </strutshtml:form> </tiles:put> </tiles:insert>
Unable to compile the class for JSP We are facing the below exception when I click on View button to see the user details : 2017-06-30 19:23:52,831 ERROR [com.myapp.jsp] - <Unable to compile class for JSP: An error occurred at line: 53 in the jsp file: /WEB-INF/jsps/ViewUserDetails.jsp apache cannot be resolved or is not a field 50: </myapphtml:myappRow> 51: 52: <myapphtml:myappRow align="left" label="userdetails.field.label.orgs"> 53: <logic:iterate name="userDetails" property="Orgs" id="org"> 54: &nbsp;<bean:write name="org" property="name" /><br> 55: </logic:iterate> 56: </myapphtml:myappRow> Stacktrace:> org.apache.jasper.JasperException: Unable to compile class for JSP: An error occurred at line: 53 in the jsp file: /WEB-INF/jsps/ViewUserDetails.jsp apache cannot be resolved or is not a field 50: </myapphtml:myappRow> 51: 52: <myapphtml:myappRow align="left" label="userdetails.field.label.orgs"> 53: <logic:iterate name="userDetails" property="mappedOrgs" id="org"> 54: &nbsp;<bean:write name="org" property="name" /><br> 55: </logic:iterate> 56: </myapphtml:myappRow> Stacktrace: at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:103) at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:366) at org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:490) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:379) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:354) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:341) at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:662) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:364) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:395) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:339) at javax.servlet.http.HttpServlet.service(HttpServlet.java:731) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:743) at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:485) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:410) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:337) at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1063) at org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:263) at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:386) at org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:318) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:229) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414) at javax.servlet.http.HttpServlet.service(HttpServlet.java:624) at javax.servlet.http.HttpServlet.service(HttpServlet.java:731) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at at com.myapp.tools.auth.client.AuthFilter.doFilter(AuthFilter.java:512) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at com.myapp.tools.auth.client.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:90) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:218) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:110) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:506) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:962) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:445) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1115) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:637) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:318) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Unknown Source) This happens only in the combination of RHEL 7.x and Tomcat combination. I am not able to reproduce this issue in combination other then this. Attaching the ViewUserDetails.jsp <%@ page import="org.apache.struts.Globals" %> <%@ page import="com.myapp.tools.api.impl.User" %> <%@ include file="include/commonDef.jspf" %> <tiles:insert definition="myapp.csd.office.layout.default"> <tiles:put name="header" type="String"> <myapphtml:myappPageHeaderTab headerImage="images/default/icn_user.gif" headerText="form.page.title.user_details"/> </tiles:put> <tiles:put name="content" type="String"> <myapphtml:myappBlock> <myapphtml:myappMessage genErrorKey="<%= myappGlobals.GENERAL_ERROR %>" valErrorKey="<%= Globals.ERROR_KEY %>" genErrorHeading="MC.General.genError" valErrorHeading="MC.General.genError" headingBundle="myappBASETAG"/> </myapphtml:myappBlock> <strutshtml:form action="/processUserList.do" method="POST"> <input type="hidden" name="action" value="" /> <myapphtml:myappRow align="left" label="userdetails.field.label.orgs"> <logic:iterate name="userDetails" property="Orgs" id="org"> &nbsp;<bean:write name="org" property="name" /><br> </logic:iterate> </myapphtml:myappRow> <myapphtml:myappButtonRow formname="UserDetailsForm"> <myapphtml:myappButton action="cancel" name="form.button.label.cancel" buttonStyle="button_gt" /> </myapphtml:myappButtonRow> </strutshtml:form> </tiles:put> </tiles:insert>
java, jsp, tomcat, rhel
5
3,609
1
https://stackoverflow.com/questions/45004928/unable-to-compile-the-class-for-jsp
28,497,308
False java.net.BindException: Address already in use on Jetty
On my CI server I have a test that needs to start Jetty server. The test goes like this: Generate random port (using java rand in legit TCP port range). Validate using Linux's fuser to check that port in not in use Run the tests Occasionally, even after validating the port is free, I get the exception: WARN:oejuc.AbstractLifeCycle:FAILED SelectChannelConnector@0.0.0.0:49277 FAILED: java.net.BindException: Address already in use java.net.BindException: Address already in use at sun.nio.ch.Net.bind0(Native Method) at sun.nio.ch.Net.bind(Net.java:444) at sun.nio.ch.Net.bind(Net.java:436) at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:214) at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) at org.eclipse.jetty.server.nio.SelectChannelConnector.open(SelectChannelConnector.java:172) at org.eclipse.jetty.server.AbstractConnector.doStart(AbstractConnector.java:300) at org.eclipse.jetty.server.nio.SelectChannelConnector.doStart(SelectChannelConnector.java:249) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59) at org.eclipse.jetty.server.Server.doStart(Server.java:272) at org.mortbay.jetty.plugin.JettyServer.doStart(JettyServer.java:65) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59) at org.mortbay.jetty.plugin.AbstractJettyMojo.startJetty(AbstractJettyMojo.java:511) at org.mortbay.jetty.plugin.AbstractJettyMojo.execute(AbstractJettyMojo.java:364) at org.mortbay.jetty.plugin.JettyRunWarMojo.execute(JettyRunWarMojo.java:71) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196) at org.apache.maven.cli.MavenCli.main(MavenCli.java:141) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352) The test that runs on: RHEL 6.3 host Maven 3.0.4 jetty-maven-plugin:7.5.4 Java 1.7.51 What can possibly be the reason? Thanks!
False java.net.BindException: Address already in use on Jetty On my CI server I have a test that needs to start Jetty server. The test goes like this: Generate random port (using java rand in legit TCP port range). Validate using Linux's fuser to check that port in not in use Run the tests Occasionally, even after validating the port is free, I get the exception: WARN:oejuc.AbstractLifeCycle:FAILED SelectChannelConnector@0.0.0.0:49277 FAILED: java.net.BindException: Address already in use java.net.BindException: Address already in use at sun.nio.ch.Net.bind0(Native Method) at sun.nio.ch.Net.bind(Net.java:444) at sun.nio.ch.Net.bind(Net.java:436) at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:214) at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) at org.eclipse.jetty.server.nio.SelectChannelConnector.open(SelectChannelConnector.java:172) at org.eclipse.jetty.server.AbstractConnector.doStart(AbstractConnector.java:300) at org.eclipse.jetty.server.nio.SelectChannelConnector.doStart(SelectChannelConnector.java:249) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59) at org.eclipse.jetty.server.Server.doStart(Server.java:272) at org.mortbay.jetty.plugin.JettyServer.doStart(JettyServer.java:65) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59) at org.mortbay.jetty.plugin.AbstractJettyMojo.startJetty(AbstractJettyMojo.java:511) at org.mortbay.jetty.plugin.AbstractJettyMojo.execute(AbstractJettyMojo.java:364) at org.mortbay.jetty.plugin.JettyRunWarMojo.execute(JettyRunWarMojo.java:71) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196) at org.apache.maven.cli.MavenCli.main(MavenCli.java:141) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352) The test that runs on: RHEL 6.3 host Maven 3.0.4 jetty-maven-plugin:7.5.4 Java 1.7.51 What can possibly be the reason? Thanks!
java, maven, continuous-integration, jetty, rhel
5
15,043
2
https://stackoverflow.com/questions/28497308/false-java-net-bindexception-address-already-in-use-on-jetty
19,415,201
XSP Configure fails due to mono module dependancy
I have mono installed in my RHEL 5 machine which is visible as follows: which mono /usr/local/bin/mono mono -V Mono JIT compiler version 2.10.2 (tarball Wed Oct 16 10:33:49 CDT 2013) Copyright (C) 2002-2011 Novell, Inc and Contributors. www.mono-project.com TLS: __thread SIGSEGV: altstack Notifications: epoll Architecture: amd64 Disabled: none Misc: softdebug LLVM: supported, not enabled. GC: Included Boehm (with typed GC and Parallel Mark) When i try to run the configure script for xsp, it fails since it could not find mono. ./configure checking build system type... x86_64-unknown-linux-gnu checking host system type... x86_64-unknown-linux-gnu checking target system type... x86_64-unknown-linux-gnu checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... /bin/mkdir -p checking for gawk... gawk checking whether make sets $(MAKE)... yes checking whether to enable maintainer-specific portions of Makefiles... no checking for a BSD-compatible install... /usr/bin/install -c checking for gawk... (cached) gawk checking for a thread-safe mkdir -p... /bin/mkdir -p checking for pkg-config... /usr/bin/pkg-config checking pkg-config is at least version 0.9.0... yes checking for MONO_MODULE... configure: error: Package requirements (mono >= 2.10.0) were not met: No package 'mono' found Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables MONO_MODULE_CFLAGS and MONO_MODULE_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. I tried to resolve this by adding the mono.pc file path to PKG_CONFIG_PATH. export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig But the issue didn't get resolved and i got the same error nonetheless. Please help me in finding a resolution for this issue.
XSP Configure fails due to mono module dependancy I have mono installed in my RHEL 5 machine which is visible as follows: which mono /usr/local/bin/mono mono -V Mono JIT compiler version 2.10.2 (tarball Wed Oct 16 10:33:49 CDT 2013) Copyright (C) 2002-2011 Novell, Inc and Contributors. www.mono-project.com TLS: __thread SIGSEGV: altstack Notifications: epoll Architecture: amd64 Disabled: none Misc: softdebug LLVM: supported, not enabled. GC: Included Boehm (with typed GC and Parallel Mark) When i try to run the configure script for xsp, it fails since it could not find mono. ./configure checking build system type... x86_64-unknown-linux-gnu checking host system type... x86_64-unknown-linux-gnu checking target system type... x86_64-unknown-linux-gnu checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... /bin/mkdir -p checking for gawk... gawk checking whether make sets $(MAKE)... yes checking whether to enable maintainer-specific portions of Makefiles... no checking for a BSD-compatible install... /usr/bin/install -c checking for gawk... (cached) gawk checking for a thread-safe mkdir -p... /bin/mkdir -p checking for pkg-config... /usr/bin/pkg-config checking pkg-config is at least version 0.9.0... yes checking for MONO_MODULE... configure: error: Package requirements (mono >= 2.10.0) were not met: No package 'mono' found Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables MONO_MODULE_CFLAGS and MONO_MODULE_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. I tried to resolve this by adding the mono.pc file path to PKG_CONFIG_PATH. export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig But the issue didn't get resolved and i got the same error nonetheless. Please help me in finding a resolution for this issue.
linux, mono, rhel, xsp
5
1,853
2
https://stackoverflow.com/questions/19415201/xsp-configure-fails-due-to-mono-module-dependancy
64,479,911
Install pyenv for every user
I would like to install pyenv on a shared server (a gitlab runner) so that it is set up for every user. How can ! adapt the official docs to suit this? Two specific questions: When it says git clone [URL] ~/.pyenv , since this would save to my home directory, I would imagine it should be saved somewhere else. Where would be the recommended place to clone this? Where it says to set up the environment variables in .bash_profile, these environmental variables would only affect my user. Where would be the recommendd place to set these variables so that they are set for every user? TIA
Install pyenv for every user I would like to install pyenv on a shared server (a gitlab runner) so that it is set up for every user. How can ! adapt the official docs to suit this? Two specific questions: When it says git clone [URL] ~/.pyenv , since this would save to my home directory, I would imagine it should be saved somewhere else. Where would be the recommended place to clone this? Where it says to set up the environment variables in .bash_profile, these environmental variables would only affect my user. Where would be the recommendd place to set these variables so that they are set for every user? TIA
linux, virtualenv, rhel, pyenv
5
1,623
1
https://stackoverflow.com/questions/64479911/install-pyenv-for-every-user
2,682,235
Valgrind suppression file for Qt 4.6.2 and RHEL 5
I'm trying to run Valgrind 3.5.0 on RHEL 5.5 with Qt 4.6.2. It's producing loads of spurious errors and I'm wondering if anyone can share a suppressions file they've built? When using --leak-check=full, the output reports leaks in glib, gtk, pango etc. even when I'm just running part7 of the AddressBook example. With over 25000 lines the real memory leaks are lost in the noise.
Valgrind suppression file for Qt 4.6.2 and RHEL 5 I'm trying to run Valgrind 3.5.0 on RHEL 5.5 with Qt 4.6.2. It's producing loads of spurious errors and I'm wondering if anyone can share a suppressions file they've built? When using --leak-check=full, the output reports leaks in glib, gtk, pango etc. even when I'm just running part7 of the AddressBook example. With over 25000 lines the real memory leaks are lost in the noise.
qt, valgrind, rhel
5
2,304
2
https://stackoverflow.com/questions/2682235/valgrind-suppression-file-for-qt-4-6-2-and-rhel-5
67,980,564
Dropbox &quot;No directories are being ignored&quot; on RHEL
Let me start by saying Dropbox support for Linux is in need of some serious improvement! It took me half a day to figure out how to install it on RHEL and that's just the command line interface (don't even know if there is a GUI). Having it now installed, I'm finding that it doesn't appear to be work properly :( I'm using the recommended python controls and when I type dropbox exclude add test_folder it does remove the folder from the list. However, I can not get it back. When I check the exclusion list, it says "No directories are being ignored." Therefore, I can not add it back via exclude remove . I can see when I login online, the folder still exists, but I have no way of adding it back to my local machine. Am I missing something? Dropbox daemon version: 124.4.4912 Dropbox command-line interface version: 2020.03.04
Dropbox &quot;No directories are being ignored&quot; on RHEL Let me start by saying Dropbox support for Linux is in need of some serious improvement! It took me half a day to figure out how to install it on RHEL and that's just the command line interface (don't even know if there is a GUI). Having it now installed, I'm finding that it doesn't appear to be work properly :( I'm using the recommended python controls and when I type dropbox exclude add test_folder it does remove the folder from the list. However, I can not get it back. When I check the exclusion list, it says "No directories are being ignored." Therefore, I can not add it back via exclude remove . I can see when I login online, the folder still exists, but I have no way of adding it back to my local machine. Am I missing something? Dropbox daemon version: 124.4.4912 Dropbox command-line interface version: 2020.03.04
dropbox, dropbox-api, rhel, rhel8
5
328
2
https://stackoverflow.com/questions/67980564/dropbox-no-directories-are-being-ignored-on-rhel
50,071,378
How to make SSL work in pip3?
Python 3.6.5 is built from source and installed along with Python 2.7.5. python3 opens the python terminal, however pip3 fails to install any package with SSL error. [root@servername openssl-OpenSSL_1_1_1-pre5]# pip3 install flask pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available. Collecting flask Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)': /simple/flask/ Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)': /simple/flask/ Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)': /simple/flask/ Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)': /simple/flask/ Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)': /simple/flask/ Could not fetch URL [URL] There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.python.org', port=443): Max retries exceeded with url: /simple/flask/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)) - skipping Could not find a version that satisfies the requirement flask (from versions: ) No matching distribution found for flask It is observed that SSL module is not installed in python3. However, SSL works well in python2. Is it possible to configure python3 to refer to the SSL location that python2 uses? Also, one recommendation was to install openssl-devel. On installing that, the following dependency issue is detected. Any suggestion to make SSL work with python3 is helpful. [root@servername openssl-OpenSSL_1_1_1-pre5]# yum install openssl-devel Loaded plugins: langpacks, rhnplugin, search-disabled-repos This system is receiving updates from RHN Classic or Red Hat Satellite. Resolving Dependencies --> Running transaction check ---> Package openssl-devel.x86_64 1:1.0.1e-42.el7_1.4 will be installed --> Processing Dependency: openssl-libs(x86-64) = 1:1.0.1e-42.el7_1.4 for package: 1:openssl-devel-1.0.1e-42.el7_1.4.x86_64 --> Processing Dependency: krb5-devel(x86-64) for package: 1:openssl-devel-1.0.1e-42.el7_1.4.x86_64 --> Running transaction check ---> Package krb5-devel.x86_64 0:1.12.2-14.el7 will be installed --> Processing Dependency: krb5-libs(x86-64) = 1.12.2-14.el7 for package: krb5-devel-1.12.2-14.el7.x86_64 --> Processing Dependency: libverto-devel for package: krb5-devel-1.12.2-14.el7.x86_64 --> Processing Dependency: libcom_err-devel for package: krb5-devel-1.12.2-14.el7.x86_64 --> Processing Dependency: keyutils-libs-devel for package: krb5-devel-1.12.2-14.el7.x86_64 --> Processing Dependency: libselinux-devel for package: krb5-devel-1.12.2-14.el7.x86_64 --> Processing Dependency: libkdb5.so.7()(64bit) for package: krb5-devel-1.12.2-14.el7.x86_64 ---> Package openssl-devel.x86_64 1:1.0.1e-42.el7_1.4 will be installed --> Processing Dependency: openssl-libs(x86-64) = 1:1.0.1e-42.el7_1.4 for package: 1:openssl-devel-1.0.1e-42.el7_1.4.x86_64 --> Running transaction check ---> Package keyutils-libs-devel.x86_64 0:1.5.8-3.el7 will be installed ---> Package krb5-devel.x86_64 0:1.12.2-14.el7 will be installed --> Processing Dependency: krb5-libs(x86-64) = 1.12.2-14.el7 for package: krb5-devel-1.12.2-14.el7.x86_64 --> Processing Dependency: libkdb5.so.7()(64bit) for package: krb5-devel-1.12.2-14.el7.x86_64 ---> Package libcom_err-devel.x86_64 0:1.42.9-7.el7 will be installed ---> Package libselinux-devel.x86_64 0:2.2.2-6.el7 will be installed --> Processing Dependency: libsepol-devel >= 2.1.9-1 for package: libselinux-devel-2.2.2-6.el7.x86_64 --> Processing Dependency: pkgconfig(libpcre) for package: libselinux-devel-2.2.2-6.el7.x86_64 --> Processing Dependency: pkgconfig(libsepol) for package: libselinux-devel-2.2.2-6.el7.x86_64 ---> Package libverto-devel.x86_64 0:0.2.5-4.el7 will be installed ---> Package openssl-devel.x86_64 1:1.0.1e-42.el7_1.4 will be installed --> Processing Dependency: openssl-libs(x86-64) = 1:1.0.1e-42.el7_1.4 for package: 1:openssl-devel-1.0.1e-42.el7_1.4.x86_64 --> Running transaction check ---> Package krb5-devel.x86_64 0:1.12.2-14.el7 will be installed --> Processing Dependency: krb5-libs(x86-64) = 1.12.2-14.el7 for package: krb5-devel-1.12.2-14.el7.x86_64 --> Processing Dependency: libkdb5.so.7()(64bit) for package: krb5-devel-1.12.2-14.el7.x86_64 ---> Package libsepol-devel.x86_64 0:2.1.9-3.el7 will be installed ---> Package openssl-devel.x86_64 1:1.0.1e-42.el7_1.4 will be installed --> Processing Dependency: openssl-libs(x86-64) = 1:1.0.1e-42.el7_1.4 for package: 1:openssl-devel-1.0.1e-42.el7_1.4.x86_64 ---> Package pcre-devel.x86_64 0:8.32-14.el7 will be installed --> Processing Dependency: pcre(x86-64) = 8.32-14.el7 for package: pcre-devel-8.32-14.el7.x86_64 --> Finished Dependency Resolution Error: Package: 1:openssl-devel-1.0.1e-42.el7_1.4.x86_64 (cat-rhel71_x86_64) Requires: openssl-libs(x86-64) = 1:1.0.1e-42.el7_1.4 Installed: 1:openssl-libs-1.0.1e-51.el7_2.5.x86_64 (@rhel-x86_64-server-7) openssl-libs(x86-64) = 1:1.0.1e-51.el7_2.5 Available: 1:openssl-libs-1.0.1e-34.el7.x86_64 (cat-rhel71_x86_64) openssl-libs(x86-64) = 1:1.0.1e-34.el7 Available: 1:openssl-libs-1.0.1e-34.el7_0.3.x86_64 (cat-rhel71_x86_64) openssl-libs(x86-64) = 1:1.0.1e-34.el7_0.3 Available: 1:openssl-libs-1.0.1e-34.el7_0.4.x86_64 (cat-rhel71_x86_64) openssl-libs(x86-64) = 1:1.0.1e-34.el7_0.4 Available: 1:openssl-libs-1.0.1e-34.el7_0.6.x86_64 (cat-rhel71_x86_64) openssl-libs(x86-64) = 1:1.0.1e-34.el7_0.6 Available: 1:openssl-libs-1.0.1e-34.el7_0.7.x86_64 (cat-rhel71_x86_64) openssl-libs(x86-64) = 1:1.0.1e-34.el7_0.7 Available: 1:openssl-libs-1.0.1e-42.el7.x86_64 (cat-rhel71_x86_64) openssl-libs(x86-64) = 1:1.0.1e-42.el7 Available: 1:openssl-libs-1.0.1e-42.el7_1.4.x86_64 (cat-rhel71_x86_64) openssl-libs(x86-64) = 1:1.0.1e-42.el7_1.4 Error: Package: krb5-devel-1.12.2-14.el7.x86_64 (cat-rhel71_x86_64) Requires: krb5-libs(x86-64) = 1.12.2-14.el7 Installed: krb5-libs-1.13.2-12.el7_2.x86_64 (@rhel-x86_64-server-7) krb5-libs(x86-64) = 1.13.2-12.el7_2 Available: krb5-libs-1.11.3-49.el7.x86_64 (cat-rhel71_x86_64) krb5-libs(x86-64) = 1.11.3-49.el7 Available: krb5-libs-1.12.2-14.el7.x86_64 (cat-rhel71_x86_64) krb5-libs(x86-64) = 1.12.2-14.el7 Error: Package: krb5-devel-1.12.2-14.el7.x86_64 (cat-rhel71_x86_64) Requires: libkdb5.so.7()(64bit) Available: krb5-libs-1.11.3-49.el7.x86_64 (cat-rhel71_x86_64) libkdb5.so.7()(64bit) Available: krb5-libs-1.12.2-14.el7.x86_64 (cat-rhel71_x86_64) libkdb5.so.7()(64bit) Installed: krb5-libs-1.13.2-12.el7_2.x86_64 (@rhel-x86_64-server-7) ~libkdb5.so.8()(64bit) Error: Package: pcre-devel-8.32-14.el7.x86_64 (cat-rhel71_x86_64) Requires: pcre(x86-64) = 8.32-14.el7 Installed: pcre-8.32-15.el7_2.1.x86_64 (@rhel-x86_64-server-7) pcre(x86-64) = 8.32-15.el7_2.1 Available: pcre-8.32-12.el7.x86_64 (cat-rhel71_x86_64) pcre(x86-64) = 8.32-12.el7 Available: pcre-8.32-14.el7.x86_64 (cat-rhel71_x86_64) pcre(x86-64) = 8.32-14.el7 You could try using --skip-broken to work around the problem You could try running: rpm -Va --nofiles --nodigest
How to make SSL work in pip3? Python 3.6.5 is built from source and installed along with Python 2.7.5. python3 opens the python terminal, however pip3 fails to install any package with SSL error. [root@servername openssl-OpenSSL_1_1_1-pre5]# pip3 install flask pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available. Collecting flask Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)': /simple/flask/ Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)': /simple/flask/ Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)': /simple/flask/ Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)': /simple/flask/ Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)': /simple/flask/ Could not fetch URL [URL] There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.python.org', port=443): Max retries exceeded with url: /simple/flask/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)) - skipping Could not find a version that satisfies the requirement flask (from versions: ) No matching distribution found for flask It is observed that SSL module is not installed in python3. However, SSL works well in python2. Is it possible to configure python3 to refer to the SSL location that python2 uses? Also, one recommendation was to install openssl-devel. On installing that, the following dependency issue is detected. Any suggestion to make SSL work with python3 is helpful. [root@servername openssl-OpenSSL_1_1_1-pre5]# yum install openssl-devel Loaded plugins: langpacks, rhnplugin, search-disabled-repos This system is receiving updates from RHN Classic or Red Hat Satellite. Resolving Dependencies --> Running transaction check ---> Package openssl-devel.x86_64 1:1.0.1e-42.el7_1.4 will be installed --> Processing Dependency: openssl-libs(x86-64) = 1:1.0.1e-42.el7_1.4 for package: 1:openssl-devel-1.0.1e-42.el7_1.4.x86_64 --> Processing Dependency: krb5-devel(x86-64) for package: 1:openssl-devel-1.0.1e-42.el7_1.4.x86_64 --> Running transaction check ---> Package krb5-devel.x86_64 0:1.12.2-14.el7 will be installed --> Processing Dependency: krb5-libs(x86-64) = 1.12.2-14.el7 for package: krb5-devel-1.12.2-14.el7.x86_64 --> Processing Dependency: libverto-devel for package: krb5-devel-1.12.2-14.el7.x86_64 --> Processing Dependency: libcom_err-devel for package: krb5-devel-1.12.2-14.el7.x86_64 --> Processing Dependency: keyutils-libs-devel for package: krb5-devel-1.12.2-14.el7.x86_64 --> Processing Dependency: libselinux-devel for package: krb5-devel-1.12.2-14.el7.x86_64 --> Processing Dependency: libkdb5.so.7()(64bit) for package: krb5-devel-1.12.2-14.el7.x86_64 ---> Package openssl-devel.x86_64 1:1.0.1e-42.el7_1.4 will be installed --> Processing Dependency: openssl-libs(x86-64) = 1:1.0.1e-42.el7_1.4 for package: 1:openssl-devel-1.0.1e-42.el7_1.4.x86_64 --> Running transaction check ---> Package keyutils-libs-devel.x86_64 0:1.5.8-3.el7 will be installed ---> Package krb5-devel.x86_64 0:1.12.2-14.el7 will be installed --> Processing Dependency: krb5-libs(x86-64) = 1.12.2-14.el7 for package: krb5-devel-1.12.2-14.el7.x86_64 --> Processing Dependency: libkdb5.so.7()(64bit) for package: krb5-devel-1.12.2-14.el7.x86_64 ---> Package libcom_err-devel.x86_64 0:1.42.9-7.el7 will be installed ---> Package libselinux-devel.x86_64 0:2.2.2-6.el7 will be installed --> Processing Dependency: libsepol-devel >= 2.1.9-1 for package: libselinux-devel-2.2.2-6.el7.x86_64 --> Processing Dependency: pkgconfig(libpcre) for package: libselinux-devel-2.2.2-6.el7.x86_64 --> Processing Dependency: pkgconfig(libsepol) for package: libselinux-devel-2.2.2-6.el7.x86_64 ---> Package libverto-devel.x86_64 0:0.2.5-4.el7 will be installed ---> Package openssl-devel.x86_64 1:1.0.1e-42.el7_1.4 will be installed --> Processing Dependency: openssl-libs(x86-64) = 1:1.0.1e-42.el7_1.4 for package: 1:openssl-devel-1.0.1e-42.el7_1.4.x86_64 --> Running transaction check ---> Package krb5-devel.x86_64 0:1.12.2-14.el7 will be installed --> Processing Dependency: krb5-libs(x86-64) = 1.12.2-14.el7 for package: krb5-devel-1.12.2-14.el7.x86_64 --> Processing Dependency: libkdb5.so.7()(64bit) for package: krb5-devel-1.12.2-14.el7.x86_64 ---> Package libsepol-devel.x86_64 0:2.1.9-3.el7 will be installed ---> Package openssl-devel.x86_64 1:1.0.1e-42.el7_1.4 will be installed --> Processing Dependency: openssl-libs(x86-64) = 1:1.0.1e-42.el7_1.4 for package: 1:openssl-devel-1.0.1e-42.el7_1.4.x86_64 ---> Package pcre-devel.x86_64 0:8.32-14.el7 will be installed --> Processing Dependency: pcre(x86-64) = 8.32-14.el7 for package: pcre-devel-8.32-14.el7.x86_64 --> Finished Dependency Resolution Error: Package: 1:openssl-devel-1.0.1e-42.el7_1.4.x86_64 (cat-rhel71_x86_64) Requires: openssl-libs(x86-64) = 1:1.0.1e-42.el7_1.4 Installed: 1:openssl-libs-1.0.1e-51.el7_2.5.x86_64 (@rhel-x86_64-server-7) openssl-libs(x86-64) = 1:1.0.1e-51.el7_2.5 Available: 1:openssl-libs-1.0.1e-34.el7.x86_64 (cat-rhel71_x86_64) openssl-libs(x86-64) = 1:1.0.1e-34.el7 Available: 1:openssl-libs-1.0.1e-34.el7_0.3.x86_64 (cat-rhel71_x86_64) openssl-libs(x86-64) = 1:1.0.1e-34.el7_0.3 Available: 1:openssl-libs-1.0.1e-34.el7_0.4.x86_64 (cat-rhel71_x86_64) openssl-libs(x86-64) = 1:1.0.1e-34.el7_0.4 Available: 1:openssl-libs-1.0.1e-34.el7_0.6.x86_64 (cat-rhel71_x86_64) openssl-libs(x86-64) = 1:1.0.1e-34.el7_0.6 Available: 1:openssl-libs-1.0.1e-34.el7_0.7.x86_64 (cat-rhel71_x86_64) openssl-libs(x86-64) = 1:1.0.1e-34.el7_0.7 Available: 1:openssl-libs-1.0.1e-42.el7.x86_64 (cat-rhel71_x86_64) openssl-libs(x86-64) = 1:1.0.1e-42.el7 Available: 1:openssl-libs-1.0.1e-42.el7_1.4.x86_64 (cat-rhel71_x86_64) openssl-libs(x86-64) = 1:1.0.1e-42.el7_1.4 Error: Package: krb5-devel-1.12.2-14.el7.x86_64 (cat-rhel71_x86_64) Requires: krb5-libs(x86-64) = 1.12.2-14.el7 Installed: krb5-libs-1.13.2-12.el7_2.x86_64 (@rhel-x86_64-server-7) krb5-libs(x86-64) = 1.13.2-12.el7_2 Available: krb5-libs-1.11.3-49.el7.x86_64 (cat-rhel71_x86_64) krb5-libs(x86-64) = 1.11.3-49.el7 Available: krb5-libs-1.12.2-14.el7.x86_64 (cat-rhel71_x86_64) krb5-libs(x86-64) = 1.12.2-14.el7 Error: Package: krb5-devel-1.12.2-14.el7.x86_64 (cat-rhel71_x86_64) Requires: libkdb5.so.7()(64bit) Available: krb5-libs-1.11.3-49.el7.x86_64 (cat-rhel71_x86_64) libkdb5.so.7()(64bit) Available: krb5-libs-1.12.2-14.el7.x86_64 (cat-rhel71_x86_64) libkdb5.so.7()(64bit) Installed: krb5-libs-1.13.2-12.el7_2.x86_64 (@rhel-x86_64-server-7) ~libkdb5.so.8()(64bit) Error: Package: pcre-devel-8.32-14.el7.x86_64 (cat-rhel71_x86_64) Requires: pcre(x86-64) = 8.32-14.el7 Installed: pcre-8.32-15.el7_2.1.x86_64 (@rhel-x86_64-server-7) pcre(x86-64) = 8.32-15.el7_2.1 Available: pcre-8.32-12.el7.x86_64 (cat-rhel71_x86_64) pcre(x86-64) = 8.32-12.el7 Available: pcre-8.32-14.el7.x86_64 (cat-rhel71_x86_64) pcre(x86-64) = 8.32-14.el7 You could try using --skip-broken to work around the problem You could try running: rpm -Va --nofiles --nodigest
python-3.x, ssl, openssl, pip, rhel
5
7,251
1
https://stackoverflow.com/questions/50071378/how-to-make-ssl-work-in-pip3
17,069,543
Running Java process as Service in Linux
I need to run a Java process as a service in (Red Hat 6.4) Linux (It needs to run at boot time and stay up). I have it mostly working, except for it doesn't seem to status correctly in the "Service Configuration" window. To illustrate, I made a simple Java program: package service; public class JavaService { public static void main(String args[]){ System.out.println("Starting Java-Service"); while(true){ try { Thread.sleep(5000); } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace(); } System.out.println("Java-Service is still running.."); } } } I jarred that up, and put it at this location: /opt/service/lib Then, I created this script: /opt/service/bin/run_java_service #!/bin/tcsh # # chkconfig: 2345 80 30 # description: java-service Service setenv JAVA_SERVICE_HOME /opt/service setenv CLASSPATH $JAVA_SERVICE_HOME/lib/JavaService.jar setenv SERVICE_PID ps aux | grep JavaService | grep -v grep | awk '{print $2}'; if ( (stop == $1 || restart == $1)) then echo "java-service stop"; kill -9 $SERVICE_PID setenv SERVICE_PID endif if ( start == $1 || restart == $1 ) then if($SERVICE_PID) then echo "java-service is already running" else echo "java-service start"; java service.JavaService& endif endif if (status == $1) then if($SERVICE_PID) then echo "java-service (pid $SERVICE_PID) is running..."; else echo "java-service is stopped"; endif endif I then created a symlink to this in the /etc/rc.d/init.d directory and added it to the chkconfig: sudo ln –s /opt/service/bin/run_java_service /etc/rc.d/init.d/java-service sudo chkconfig --add java-service At this point, commands like this work as expected from the command line: sudo service java-service stop sudo service java-service start sudo service java-service status The problem is that things aren't statusing correctly in the "Service Configuration" dialog. For instance, in this screenshot, I have clicked the "Stop Button" and it still shows as "plugged in". What piece of the puzzle am I missing?
Running Java process as Service in Linux I need to run a Java process as a service in (Red Hat 6.4) Linux (It needs to run at boot time and stay up). I have it mostly working, except for it doesn't seem to status correctly in the "Service Configuration" window. To illustrate, I made a simple Java program: package service; public class JavaService { public static void main(String args[]){ System.out.println("Starting Java-Service"); while(true){ try { Thread.sleep(5000); } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace(); } System.out.println("Java-Service is still running.."); } } } I jarred that up, and put it at this location: /opt/service/lib Then, I created this script: /opt/service/bin/run_java_service #!/bin/tcsh # # chkconfig: 2345 80 30 # description: java-service Service setenv JAVA_SERVICE_HOME /opt/service setenv CLASSPATH $JAVA_SERVICE_HOME/lib/JavaService.jar setenv SERVICE_PID ps aux | grep JavaService | grep -v grep | awk '{print $2}'; if ( (stop == $1 || restart == $1)) then echo "java-service stop"; kill -9 $SERVICE_PID setenv SERVICE_PID endif if ( start == $1 || restart == $1 ) then if($SERVICE_PID) then echo "java-service is already running" else echo "java-service start"; java service.JavaService& endif endif if (status == $1) then if($SERVICE_PID) then echo "java-service (pid $SERVICE_PID) is running..."; else echo "java-service is stopped"; endif endif I then created a symlink to this in the /etc/rc.d/init.d directory and added it to the chkconfig: sudo ln –s /opt/service/bin/run_java_service /etc/rc.d/init.d/java-service sudo chkconfig --add java-service At this point, commands like this work as expected from the command line: sudo service java-service stop sudo service java-service start sudo service java-service status The problem is that things aren't statusing correctly in the "Service Configuration" dialog. For instance, in this screenshot, I have clicked the "Stop Button" and it still shows as "plugged in". What piece of the puzzle am I missing?
java, linux, service, rhel, tcsh
5
16,739
1
https://stackoverflow.com/questions/17069543/running-java-process-as-service-in-linux
9,782,053
Perl DBD can&#39;t connect to MySQL on a 64-bit machine
I am on RHEL 5.5 64 bit machine. I installed ActivePerl 5.10 64 bit on the machine, upgrading the previous inbuilt Perl 5.8 64 bit. I have MySQL up and running and my PHP project is able to access it. My Perl file needs to access the same database using DBD, but it's not able to do that. I have verified that: My MySQL service is up and running. My user is present and the database along with data do exist. I am able to access the data from the database via the shell MySQL client. Following is my Perl script. #!/usr/bin/perl use DBI; $dbh = DBI->connect( "DBI:mysql:go:super218:3306","root","NEWPASSWORD" ) or die "Couldn't connect to database: " . DBI->errstr; my $sth = $dbh->prepare( "SELECT * FROM phones" ) or die "Can't prepare SQL statement: $DBI::errstr\n"; $sth->execute or die "executing: $stmtA ", $dbh->errstr; my @row; while ( @row = $sth->fetchrow_array( ) ) { print "Row: @row\n"; } I am getting the following error with correct user and password : DBI connect('go:super218:3306','root',...) failed: (no error string) at testdb.pl line 6 Couldn't connect to database: at testdb.pl line 6. I get the following error with incorrect user or password: DBI connect('go:super218:3306','root1',...) failed: Access denied for user 'root1'@'localhost' (using password: YES) at testdb.pl line 6 Couldn't connect to database: Access denied for user 'root1'@'localhost' (using password: YES) at testdb.pl line 6. How do I solve this? I guess the problem is at MySQL's end.
Perl DBD can&#39;t connect to MySQL on a 64-bit machine I am on RHEL 5.5 64 bit machine. I installed ActivePerl 5.10 64 bit on the machine, upgrading the previous inbuilt Perl 5.8 64 bit. I have MySQL up and running and my PHP project is able to access it. My Perl file needs to access the same database using DBD, but it's not able to do that. I have verified that: My MySQL service is up and running. My user is present and the database along with data do exist. I am able to access the data from the database via the shell MySQL client. Following is my Perl script. #!/usr/bin/perl use DBI; $dbh = DBI->connect( "DBI:mysql:go:super218:3306","root","NEWPASSWORD" ) or die "Couldn't connect to database: " . DBI->errstr; my $sth = $dbh->prepare( "SELECT * FROM phones" ) or die "Can't prepare SQL statement: $DBI::errstr\n"; $sth->execute or die "executing: $stmtA ", $dbh->errstr; my @row; while ( @row = $sth->fetchrow_array( ) ) { print "Row: @row\n"; } I am getting the following error with correct user and password : DBI connect('go:super218:3306','root',...) failed: (no error string) at testdb.pl line 6 Couldn't connect to database: at testdb.pl line 6. I get the following error with incorrect user or password: DBI connect('go:super218:3306','root1',...) failed: Access denied for user 'root1'@'localhost' (using password: YES) at testdb.pl line 6 Couldn't connect to database: Access denied for user 'root1'@'localhost' (using password: YES) at testdb.pl line 6. How do I solve this? I guess the problem is at MySQL's end.
mysql, database, linux, perl, rhel
5
2,791
2
https://stackoverflow.com/questions/9782053/perl-dbd-cant-connect-to-mysql-on-a-64-bit-machine
48,869,913
Docker CE Overlay2
I am looking for clarity regarding using Docker CE on RHEL, and the stipulations of the Overlay vs Overlay2 file system. From Docker Docs I see the following quotes: Note: If you use OverlayFS, use the overlay2 driver rather than the overlay driver, because it is more efficient in terms of inode utilization. To use the new driver, you need version 4.0 or higher of the Linux kernel. And... The overlay2 driver is supported for Docker EE and recommended for Docker CE. And... Note: If you use OverlayFS, use the overlay2 driver rather than the overlay driver, because it is more efficient in terms of inode utilization. To use the new driver, you need version 4.0 or higher of the Linux kernel, unless you are a Docker EE user on RHEL or CentOS, in which case you need version 3.10.0-693 or higher of the kernel and to follow some extra steps. The AWS AMI I use is RHEL and from docker info I see I have: Server Version: 17.09.0-ce Storage Driver: overlay Kernel Version: 3.10.0-693.11.6.el7.x86_64 Is there a path forward to using Overlay2 FS, or must I either upgrade the kernel to 4.0 or use Docker EE?
Docker CE Overlay2 I am looking for clarity regarding using Docker CE on RHEL, and the stipulations of the Overlay vs Overlay2 file system. From Docker Docs I see the following quotes: Note: If you use OverlayFS, use the overlay2 driver rather than the overlay driver, because it is more efficient in terms of inode utilization. To use the new driver, you need version 4.0 or higher of the Linux kernel. And... The overlay2 driver is supported for Docker EE and recommended for Docker CE. And... Note: If you use OverlayFS, use the overlay2 driver rather than the overlay driver, because it is more efficient in terms of inode utilization. To use the new driver, you need version 4.0 or higher of the Linux kernel, unless you are a Docker EE user on RHEL or CentOS, in which case you need version 3.10.0-693 or higher of the kernel and to follow some extra steps. The AWS AMI I use is RHEL and from docker info I see I have: Server Version: 17.09.0-ce Storage Driver: overlay Kernel Version: 3.10.0-693.11.6.el7.x86_64 Is there a path forward to using Overlay2 FS, or must I either upgrade the kernel to 4.0 or use Docker EE?
linux, amazon-web-services, docker, overlay, rhel
5
3,025
1
https://stackoverflow.com/questions/48869913/docker-ce-overlay2
12,399,346
rpm requires range
I currently have two questions: 1) Is it possible to specify a range of a package in a rpm spec file? something like package >= 1.0.0 and package < 1.0.50 meaning that it will pick up the latest package version closer to 1.0.50 2) Does somebody knows if yum will update to a package to a higher version even if the version specified in the spec file is lower? or is there something to avoid yum to upgrading to a higher version? This is my example to be more clear: There are two packages in my repo: package-1.0.5-1 package-2.0.10-1 and if my spec file for package! has the following requires Requires: package > 1.0.5 When I do yum to install of packageA this means that it will install the higher version of 1.0.5 version or it will assume 2.0.10 is higher and will install that ? What I want to achieve is some sort of telling my package that just install as high as 1.0.5 release is and don't skip to the 2.x version. I hope I made my self clear. Thanks for any tip or response you can give me
rpm requires range I currently have two questions: 1) Is it possible to specify a range of a package in a rpm spec file? something like package >= 1.0.0 and package < 1.0.50 meaning that it will pick up the latest package version closer to 1.0.50 2) Does somebody knows if yum will update to a package to a higher version even if the version specified in the spec file is lower? or is there something to avoid yum to upgrading to a higher version? This is my example to be more clear: There are two packages in my repo: package-1.0.5-1 package-2.0.10-1 and if my spec file for package! has the following requires Requires: package > 1.0.5 When I do yum to install of packageA this means that it will install the higher version of 1.0.5 version or it will assume 2.0.10 is higher and will install that ? What I want to achieve is some sort of telling my package that just install as high as 1.0.5 release is and don't skip to the 2.x version. I hope I made my self clear. Thanks for any tip or response you can give me
rpm, rhel
5
2,351
1
https://stackoverflow.com/questions/12399346/rpm-requires-range
6,529,598
Differing behavior with Python script on RHEL and Debian, nearly identical python versions
I rarely post questions to a forum, but this one has me stumped. I'm very curious as to what's causing this (a solution would also be nice, but mostly, I'd like to know why I'm having this issue): I recently wrote a python script for wrapping the invocation of remote commands which are started by a PBS job: #! /usr/bin/env python # # Copyright (c) 2009 Maciej Brodowicz # Copyright (c) 2011 Bryce Lelbach # # Distributed under the Boost Software License, Version 1.0. (See accompanying # file LICENSE_1_0.txt or copy at [URL] from datetime import datetime from string import letters, digits from types import StringType from optparse import OptionParser from threading import Thread # subprocess instantiation wrapper. Unfortunately older Python still lurks on # some machines. try: from subprocess import Popen, STDOUT, PIPE from types import StringType class process: _proc = None _exec = None def __init__(self, cmd): self._proc = Popen(cmd, stderr = STDOUT, stdout = PIPE, shell = (False, True)[type(cmd) == StringType]) def poll(self): return self._proc.poll() def pid(self): return self._proc.pid def _call(self): # annoyingly, KeyboardInterrupts are transported to threads, while most # other Exceptions aren't in python try: self._proc.wait() except Exception, err: self._exec = err def wait(self, timeout=None): if timeout is not None: thread = Thread(target=self._call) thread.start() # wait for the thread and invoked process to finish thread.join(timeout) # be forceful if thread.is_alive(): self._proc.terminate() thread.join() # if an exception happened, re-raise it here in the master thread if self._exec is not None: raise self._exec return (True, self._proc.returncode) if self._exec is not None: raise self._exec return (False, self._proc.returncode) else: return (False, self._proc.wait()) def read(self): return self._proc.stdout.read() except ImportError, err: # no "subprocess"; use older popen module from popen2 import Popen4 from signal import SIGKILL from os import kill, waitpid, WNOHANG class process: _proc = None def __init__(self, cmd): self._proc = Popen4(cmd) def poll(self): return self._proc.poll() def pid(self): return self._proc.pid def _call(self): # annoyingly, KeyboardInterrupts are transported to threads, while most # other Exceptions aren't in python try: self._proc.wait() except Exception, err: self._exec = err def wait(self, timeout=None): if timeout is not None: thread = Thread(target=self._call) thread.start() # wait for the thread and invoked process to finish thread.join(timeout) # be forceful if thread.is_alive(): kill(self._proc.pid, SIGKILL) waitpid(-1, WNOHANG) thread.join() # if an exception happened, re-raise it here in the master thread if self._exec is not None: raise self._exec return (True, self._proc.wait()) if self._exec is not None: raise self._exec return (False, self._proc.wait()) else: return (False, self._proc.wait()) def read(self): return self._proc.fromchild.read() def run(cmd, timeout=3600): start = datetime.now() proc = process(cmd) (timed_out, returncode) = proc.wait(timeout) now = datetime.now() output = '' while True: s = proc.read() if s: output += s else: break return (returncode, output, timed_out) def rstrip_last(s, chars): if s[-1] in chars: return s[:-1] else: return s # {{{ main usage = "usage: %prog [options]" parser = OptionParser(usage=usage) parser.add_option("--timeout", action="store", type="int", dest="timeout", default=3600, help="Program timeout (seconds)") parser.add_option("--program", action="store", type="string", dest="program", help="Program to invoke") (options, cmd) = parser.parse_args() if None == options.program: print "No program specified" exit(1) (returncode, output, timed_out) = run(options.program, options.timeout) if not 0 == len(output): print rstrip_last(output, '\n') if timed_out: print "Program timed out" exit(returncode) # }}} Another python script puts together the command line arguments based on available resources as reported by PBS, similar to mpirun. I use python-paramiko for starting the remote commands over SSH. Initially I just executed the commands directly, but I failed to receive the correct exit codes when one of the remotely run processes exited with a signal (e.g. SIGSEGV). Thus, the need for the above script. When running this script on my development cluster at work, I noticed that this script is subtly failing to work on my 4-core Debian GNU/Linux nodes, yet it does work on my 48-core RHEL/Linux nodes: On the Debian nodes: wash@hermione0:~/sandbox$ python --version Python 2.6.7 wash@hermione0:~/sandbox$ uname -a Linux hermione0 2.6.32-5-amd64 #1 SMP Wed Jan 12 03:40:32 UTC 2011 x86_64 GNU/Linux wash@hermione0:~/sandbox$ time ./hpx_invoke.py --program='sleep 30' --timeout=5 Program timed out real 0m30.025s user 0m0.016s sys 0m0.012s wash@hermione0:~/sandbox$ On the RHEL nodes: [22:08:23]:wash@vega:/home/wash/sandbox$ python --version Python 2.6.6 [22:09:28]:wash@vega:/home/wash/sandbox$ uname -a Linux vega 2.6.32-131.4.1.el6.x86_64 #1 SMP Fri Jun 10 10:54:26 EDT 2011 x86_64 x86_64 x86_64 GNU/Linux [22:09:30]:wash@vega:/home/wash/sandbox$ time ./hpx_invoke.py --program='sleep 30' --timeout=5 Program timed out real 0m5.053s user 0m0.040s sys 0m0.020s [22:09:41]:wash@vega:/home/wash/sandbox$ What could be causing this? P.S. I'm the sysadmin on these boxes.
Differing behavior with Python script on RHEL and Debian, nearly identical python versions I rarely post questions to a forum, but this one has me stumped. I'm very curious as to what's causing this (a solution would also be nice, but mostly, I'd like to know why I'm having this issue): I recently wrote a python script for wrapping the invocation of remote commands which are started by a PBS job: #! /usr/bin/env python # # Copyright (c) 2009 Maciej Brodowicz # Copyright (c) 2011 Bryce Lelbach # # Distributed under the Boost Software License, Version 1.0. (See accompanying # file LICENSE_1_0.txt or copy at [URL] from datetime import datetime from string import letters, digits from types import StringType from optparse import OptionParser from threading import Thread # subprocess instantiation wrapper. Unfortunately older Python still lurks on # some machines. try: from subprocess import Popen, STDOUT, PIPE from types import StringType class process: _proc = None _exec = None def __init__(self, cmd): self._proc = Popen(cmd, stderr = STDOUT, stdout = PIPE, shell = (False, True)[type(cmd) == StringType]) def poll(self): return self._proc.poll() def pid(self): return self._proc.pid def _call(self): # annoyingly, KeyboardInterrupts are transported to threads, while most # other Exceptions aren't in python try: self._proc.wait() except Exception, err: self._exec = err def wait(self, timeout=None): if timeout is not None: thread = Thread(target=self._call) thread.start() # wait for the thread and invoked process to finish thread.join(timeout) # be forceful if thread.is_alive(): self._proc.terminate() thread.join() # if an exception happened, re-raise it here in the master thread if self._exec is not None: raise self._exec return (True, self._proc.returncode) if self._exec is not None: raise self._exec return (False, self._proc.returncode) else: return (False, self._proc.wait()) def read(self): return self._proc.stdout.read() except ImportError, err: # no "subprocess"; use older popen module from popen2 import Popen4 from signal import SIGKILL from os import kill, waitpid, WNOHANG class process: _proc = None def __init__(self, cmd): self._proc = Popen4(cmd) def poll(self): return self._proc.poll() def pid(self): return self._proc.pid def _call(self): # annoyingly, KeyboardInterrupts are transported to threads, while most # other Exceptions aren't in python try: self._proc.wait() except Exception, err: self._exec = err def wait(self, timeout=None): if timeout is not None: thread = Thread(target=self._call) thread.start() # wait for the thread and invoked process to finish thread.join(timeout) # be forceful if thread.is_alive(): kill(self._proc.pid, SIGKILL) waitpid(-1, WNOHANG) thread.join() # if an exception happened, re-raise it here in the master thread if self._exec is not None: raise self._exec return (True, self._proc.wait()) if self._exec is not None: raise self._exec return (False, self._proc.wait()) else: return (False, self._proc.wait()) def read(self): return self._proc.fromchild.read() def run(cmd, timeout=3600): start = datetime.now() proc = process(cmd) (timed_out, returncode) = proc.wait(timeout) now = datetime.now() output = '' while True: s = proc.read() if s: output += s else: break return (returncode, output, timed_out) def rstrip_last(s, chars): if s[-1] in chars: return s[:-1] else: return s # {{{ main usage = "usage: %prog [options]" parser = OptionParser(usage=usage) parser.add_option("--timeout", action="store", type="int", dest="timeout", default=3600, help="Program timeout (seconds)") parser.add_option("--program", action="store", type="string", dest="program", help="Program to invoke") (options, cmd) = parser.parse_args() if None == options.program: print "No program specified" exit(1) (returncode, output, timed_out) = run(options.program, options.timeout) if not 0 == len(output): print rstrip_last(output, '\n') if timed_out: print "Program timed out" exit(returncode) # }}} Another python script puts together the command line arguments based on available resources as reported by PBS, similar to mpirun. I use python-paramiko for starting the remote commands over SSH. Initially I just executed the commands directly, but I failed to receive the correct exit codes when one of the remotely run processes exited with a signal (e.g. SIGSEGV). Thus, the need for the above script. When running this script on my development cluster at work, I noticed that this script is subtly failing to work on my 4-core Debian GNU/Linux nodes, yet it does work on my 48-core RHEL/Linux nodes: On the Debian nodes: wash@hermione0:~/sandbox$ python --version Python 2.6.7 wash@hermione0:~/sandbox$ uname -a Linux hermione0 2.6.32-5-amd64 #1 SMP Wed Jan 12 03:40:32 UTC 2011 x86_64 GNU/Linux wash@hermione0:~/sandbox$ time ./hpx_invoke.py --program='sleep 30' --timeout=5 Program timed out real 0m30.025s user 0m0.016s sys 0m0.012s wash@hermione0:~/sandbox$ On the RHEL nodes: [22:08:23]:wash@vega:/home/wash/sandbox$ python --version Python 2.6.6 [22:09:28]:wash@vega:/home/wash/sandbox$ uname -a Linux vega 2.6.32-131.4.1.el6.x86_64 #1 SMP Fri Jun 10 10:54:26 EDT 2011 x86_64 x86_64 x86_64 GNU/Linux [22:09:30]:wash@vega:/home/wash/sandbox$ time ./hpx_invoke.py --program='sleep 30' --timeout=5 Program timed out real 0m5.053s user 0m0.040s sys 0m0.020s [22:09:41]:wash@vega:/home/wash/sandbox$ What could be causing this? P.S. I'm the sysadmin on these boxes.
python, debian, rhel
5
215
2
https://stackoverflow.com/questions/6529598/differing-behavior-with-python-script-on-rhel-and-debian-nearly-identical-pytho
57,119,809
Forgerock - Forgeops - util - building with RHEL?
I am trying to take this Dockerfile here - [URL] And change the old version which is Alpine linux (seen below): FROM alpine:3.7 ... RUN apk add --update ca-certificates \ && apk add --update -t deps curl\ && curl -L [URL] -o /usr/local/bin/kubectl \ && chmod +x /usr/local/bin/kubectl \ && apk del --purge deps \ && apk add --update jq su-exec unzip curl bash openldap-clients \ && rm /var/cache/apk/* \ && mkdir -p $FORGEROCK_HOME \ && addgroup -g 11111 forgerock \ && adduser -s /bin/bash -h "$FORGEROCK_HOME" -u 11111 -D -G forgerock forgerock To change it to run off of RHEL 7 (my changes below) FROM ubi7-stigd:7.6 ... # Install epel, so we can install jq later RUN rpm --import [URL] \ && yum install -y --disableplugin=subscription-manager [URL] # Install other stuff RUN yum -y --disableplugin=subscription-manager update \ && yum install -y --disableplugin=subscription-manager jq su-exec unzip curl bash openldap-clients ca-certificates deps \ && curl -L [URL] -o /usr/local/bin/kubectl \ && chmod +x /usr/local/bin/kubectl \ && mkdir -p $FORGEROCK_HOME \ && groupadd -g 11111 forgerock \ && useradd -m -s /bin/bash -d "$FORGEROCK_HOME" -u 11111 -g forgerock -G root forgerock The container builds just fine (although it complains about not being able to find "su-exec" and "deps"). But when I upload this image to my OpenShift and run it via an OpenAM pod, the container fails to start, timing out after 10 minutes. The events show that the container started, and logs only show 2 lines, saying it timed out after 10 minutes. Anyone know what the issue might be?
Forgerock - Forgeops - util - building with RHEL? I am trying to take this Dockerfile here - [URL] And change the old version which is Alpine linux (seen below): FROM alpine:3.7 ... RUN apk add --update ca-certificates \ && apk add --update -t deps curl\ && curl -L [URL] -o /usr/local/bin/kubectl \ && chmod +x /usr/local/bin/kubectl \ && apk del --purge deps \ && apk add --update jq su-exec unzip curl bash openldap-clients \ && rm /var/cache/apk/* \ && mkdir -p $FORGEROCK_HOME \ && addgroup -g 11111 forgerock \ && adduser -s /bin/bash -h "$FORGEROCK_HOME" -u 11111 -D -G forgerock forgerock To change it to run off of RHEL 7 (my changes below) FROM ubi7-stigd:7.6 ... # Install epel, so we can install jq later RUN rpm --import [URL] \ && yum install -y --disableplugin=subscription-manager [URL] # Install other stuff RUN yum -y --disableplugin=subscription-manager update \ && yum install -y --disableplugin=subscription-manager jq su-exec unzip curl bash openldap-clients ca-certificates deps \ && curl -L [URL] -o /usr/local/bin/kubectl \ && chmod +x /usr/local/bin/kubectl \ && mkdir -p $FORGEROCK_HOME \ && groupadd -g 11111 forgerock \ && useradd -m -s /bin/bash -d "$FORGEROCK_HOME" -u 11111 -g forgerock -G root forgerock The container builds just fine (although it complains about not being able to find "su-exec" and "deps"). But when I upload this image to my OpenShift and run it via an OpenAM pod, the container fails to start, timing out after 10 minutes. The events show that the container started, and logs only show 2 lines, saying it timed out after 10 minutes. Anyone know what the issue might be?
rhel, alpine-linux, openam, rhel7, forgerock
5
247
1
https://stackoverflow.com/questions/57119809/forgerock-forgeops-util-building-with-rhel
53,107,842
How do I resolve a failure to compile librocksdb-sys error on RHEL 7?
I have been trying to build the Canvas Data Loader . I've gone as far as step 10 and it's been pretty easy for me to resolve dependencies on a cargo build fail , but I've been stuck trying to resolve the librocksdb-sys v5.14.2 dependency for the past 4 days: [root@localhost home]# gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.8.5/lto-wrapper Target: x86_64-redhat-linux Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=[URL] --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-initfini-array --disable-libgcj --with-isl=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/cloog-install --enable-gnu-indirect-function --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux Thread model: posix gcc version 4.8.5 20150623 (Red Hat 4.8.5-28) (GCC) [root@localhost home]# rustc -V rustc 1.30.0 (da5f414c2 2018-10-24) [root@localhost home]# rustup -V rustup 1.14.0 (1e51b07cc 2018-10-04) [root@localhost home]# rustup show Default host: x86_64-unknown-linux-gnu stable-x86_64-unknown-linux-gnu (default) rustc 1.30.0 (da5f414c2 2018-10-24) [root@localhost home]# cargo build --release Compiling gcc v0.3.55 Compiling bit-vec v0.4.4 Compiling rustc-demangle v0.1.9 Compiling percent-encoding v1.0.1 Compiling linked-hash-map v0.5.1 Compiling language-tags v0.2.2 Compiling smallvec v0.4.5 Compiling uuid v0.5.1 Compiling sha1 v0.2.0 Compiling bufstream v0.1.4 Compiling fnv v1.0.6 Compiling untrusted v0.5.1 Compiling crossbeam-utils v0.2.2 Compiling log v0.4.5 Compiling arrayvec v0.4.7 Compiling num_cpus v1.8.0 Compiling iovec v0.1.2 Compiling net2 v0.2.33 Compiling memchr v1.0.2 Compiling atty v0.2.11 Compiling rand v0.4.3 Compiling which v1.0.5 Compiling time v0.1.40 Compiling socket2 v0.3.8 Compiling lazy_static v1.1.0 Compiling memchr v2.1.0 Compiling unicase v2.2.0 Compiling semver v0.9.0 Compiling unreachable v1.0.0 Compiling owning_ref v0.3.3 Compiling rand_core v0.2.2 Compiling regex-syntax v0.6.2 Compiling regex-syntax v0.5.6 Compiling proc-macro2 v0.3.5 Compiling clang-sys v0.23.0 Compiling textwrap v0.10.0 Compiling humantime v1.1.1 Compiling tokio-executor v0.1.5 Compiling tokio-service v0.1.0 Compiling relay v0.1.1 Compiling block-buffer v0.3.3 Compiling unicode-bidi v0.3.4 Compiling phf_shared v0.7.23 Compiling foreign-types v0.3.2 Compiling base64 v0.6.0 Compiling base64 v0.7.0 Compiling nix v0.9.0 Compiling base64 v0.9.3 Compiling scheduled-thread-pool v0.1.0 Compiling serde_test v0.8.23 Compiling yaml-rust v0.4.2 Compiling log v0.3.9 Compiling want v0.0.4 Compiling bytes v0.4.10 Compiling futures-cpupool v0.1.8 Compiling nom v3.2.1 Compiling mio v0.6.16 Compiling rand v0.3.22 Compiling smallvec v0.6.5 Compiling rand v0.5.5 Compiling lock_api v0.1.4 Compiling rustc_version v0.2.3 Compiling quote v0.5.2 Compiling clap v2.32.0 Compiling tokio-current-thread v0.1.3 Compiling tokio-timer v0.2.7 Compiling phf v0.7.23 Compiling stringprep v0.1.2 Compiling idna v0.1.5 Compiling linked-hash-map v0.3.0 Compiling r2d2 v0.7.4 Compiling tokio-io v0.1.10 Compiling generic-array v0.9.0 Compiling mio-uds v0.6.7 Compiling parking_lot_core v0.3.1 Compiling cexpr v0.2.3 Compiling twox-hash v1.1.1 Compiling atoi v0.2.3 Compiling num-traits v0.1.43 Compiling serde_json v1.0.32 Compiling toml v0.4.8 Compiling quote v0.6.8 Compiling tokio-codec v0.1.1 Compiling crossbeam-epoch v0.3.1 Compiling crossbeam-epoch v0.5.2 Compiling thread_local v0.3.6 Compiling url v1.7.1 Compiling digest v0.7.6 Compiling crypto-mac v0.5.2 Compiling aho-corasick v0.6.8 Compiling mime v0.3.12 Compiling chrono v0.4.6 Compiling crossbeam-deque v0.2.0 Compiling syn v0.15.13 Compiling crossbeam-deque v0.6.1 Compiling sha2 v0.7.1 Compiling hmac v0.5.0 Compiling tokio-threadpool v0.1.8 Compiling postgres-protocol v0.3.2 Compiling parking_lot v0.6.4 Compiling rayon v0.8.2 Compiling mysql_common v0.5.0 Compiling serde_derive v1.0.80 Compiling env_logger v0.5.13 Compiling serde-hjson v0.8.2 Compiling tokio-reactor v0.1.6 Compiling tokio-fs v0.1.4 Compiling postgres-shared v0.4.2 Compiling ring v0.12.1 Compiling cc v1.0.25 Compiling tokio-tcp v0.1.2 Compiling tokio-udp v0.1.2 Compiling tokio-uds v0.2.3 Compiling config v0.8.0 Compiling postgres v0.15.2 Compiling libloading v0.5.0 Compiling openssl-sys v0.9.39 Compiling backtrace-sys v0.1.24 Compiling libz-sys v1.0.25 Compiling tokio v0.1.11 Compiling r2d2_postgres v0.13.0 Compiling tokio-core v0.1.17 Compiling flate2 v0.2.20 Compiling backtrace v0.3.9 Compiling tokio-proto v0.1.1 Compiling error-chain v0.11.0 Compiling hyper v0.11.27 Compiling native-tls v0.1.5 Compiling mysql v12.3.1 Compiling tokio-tls v0.1.4 Compiling hyper-tls v0.1.4 Compiling librocksdb-sys v5.14.2 error: failed to run custom build command for librocksdb-sys v5.14.2 process didn't exit successfully: /user1/home/target/release/build/librocksdb-sys-56635e7b678cd86e/build-script-build (exit code: 101) --- stdout cargo:rerun-if-changed=build.rs cargo:rerun-if-changed=rocksdb/ cargo:rerun-if-changed=snappy/ --- stderr thread 'main' panicked at 'Unable to find libclang: "couldn\'t find any of [\'libclang.so\', \'libclang.so.*\', \'libclang-*.so\'], set the LIBCLANG_PATH environment variable to a path where one of these files can be found (skipped: [])"', libcore/result.rs:1009:5 note: Run with RUST_BACKTRACE=1 for a backtrace. I followed these instructions to install clang, then these instructions to build the libcxx by clang. When trying to build again, I ended up with this error: Compiling librocksdb-sys v5.14.2 error: failed to run custom build command for librocksdb-sys v5.14.2 process didn't exit successfully: /user1/home/target/release/build/librocksdb-sys-56635e7b678cd86e/build-script-build (exit code: 101) --- stdout cargo:rerun-if-changed=build.rs cargo:rerun-if-changed=rocksdb/ cargo:rerun-if-changed=snappy/ TARGET = Some("x86_64-unknown-linux-gnu") OPT_LEVEL = Some("3") HOST = Some("x86_64-unknown-linux-gnu") CXX_x86_64-unknown-linux-gnu = None CXX_x86_64_unknown_linux_gnu = None HOST_CXX = None CXX = None CXXFLAGS_x86_64-unknown-linux-gnu = None CXXFLAGS_x86_64_unknown_linux_gnu = None HOST_CXXFLAGS = None CXXFLAGS = None DEBUG = Some("false") running: "c++" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-I" "rocksdb/include/" "-I" "rocksdb/" "-I" "rocksdb/third-party/gtest-1.7.0/fused-src/" "-I" "snappy/" "-I" "." "-Wall" "-Wextra" "-std=c++11" "-Wno-unused-parameter" "-DNDEBUG=1" "-DSNAPPY=1" "-DOS_LINUX=1" "-DROCKSDB_PLATFORM_POSIX=1" "-DROCKSDB_LIB_IO_POSIX=1" "-o" "/user1/home/target/release/build/librocksdb-sys-fe80efb4608df839/out/rocksdb/utilities/blob_db/blob_log_format.o" "-c" "rocksdb/utilities/blob_db/blob_log_format.cc" running: "c++" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-I" "rocksdb/include/" "-I" "rocksdb/" "-I" "rocksdb/third-party/gtest-1.7.0/fused-src/" "-I" "snappy/" "-I" "." "-Wall" "-Wextra" "-std=c++11" "-Wno-unused-parameter" "-DNDEBUG=1" "-DSNAPPY=1" "-DOS_LINUX=1" "-DROCKSDB_PLATFORM_POSIX=1" "-DROCKSDB_LIB_IO_POSIX=1" "-o" "/user1/home/target/release/build/librocksdb-sys-fe80efb4608df839/out/rocksdb/table/full_filter_block.o" "-c" "rocksdb/table/full_filter_block.cc" running: "c++" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-I" "rocksdb/include/" "-I" "rocksdb/" "-I" "rocksdb/third-party/gtest-1.7.0/fused-src/" "-I" "snappy/" "-I" "." "-Wall" "-Wextra" "-std=c++11" "-Wno-unused-parameter" "-DNDEBUG=1" "-DSNAPPY=1" "-DOS_LINUX=1" "-DROCKSDB_PLATFORM_POSIX=1" "-DROCKSDB_LIB_IO_POSIX=1" "-o" "/user1/home/target/release/build/librocksdb-sys-fe80efb4608df839/out/rocksdb/utilities/merge_operators/bytesxor.o" "-c" "rocksdb/utilities/merge_operators/bytesxor.cc" running: "c++" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-I" "rocksdb/include/" "-I" "rocksdb/" "-I" "rocksdb/third-party/gtest-1.7.0/fused-src/" "-I" "snappy/" "-I" "." "-Wall" "-Wextra" "-std=c++11" "-Wno-unused-parameter" "-DNDEBUG=1" "-DSNAPPY=1" "-DOS_LINUX=1" "-DROCKSDB_PLATFORM_POSIX=1" "-DROCKSDB_LIB_IO_POSIX=1" "-o" "/user1/home/target/release/build/librocksdb-sys-fe80efb4608df839/out/rocksdb/cache/clock_cache.o" "-c" "rocksdb/cache/clock_cache.cc" --- stderr rocksdb/include/rocksdb/c.h:48:9: warning: #pragma once in main file, err: false thread 'main' panicked at ' Internal error occurred: Failed to find tool. Is c++ installed? ', /root/.cargo/registry/src/github.com-1ecc6299db9ec823/cc-1.0.25/src/lib.rs:2260:5 note: Run with RUST_BACKTRACE=1 for a backtrace. c++ is installed at /usr/include/c++
How do I resolve a failure to compile librocksdb-sys error on RHEL 7? I have been trying to build the Canvas Data Loader . I've gone as far as step 10 and it's been pretty easy for me to resolve dependencies on a cargo build fail , but I've been stuck trying to resolve the librocksdb-sys v5.14.2 dependency for the past 4 days: [root@localhost home]# gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.8.5/lto-wrapper Target: x86_64-redhat-linux Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=[URL] --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-initfini-array --disable-libgcj --with-isl=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/cloog-install --enable-gnu-indirect-function --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux Thread model: posix gcc version 4.8.5 20150623 (Red Hat 4.8.5-28) (GCC) [root@localhost home]# rustc -V rustc 1.30.0 (da5f414c2 2018-10-24) [root@localhost home]# rustup -V rustup 1.14.0 (1e51b07cc 2018-10-04) [root@localhost home]# rustup show Default host: x86_64-unknown-linux-gnu stable-x86_64-unknown-linux-gnu (default) rustc 1.30.0 (da5f414c2 2018-10-24) [root@localhost home]# cargo build --release Compiling gcc v0.3.55 Compiling bit-vec v0.4.4 Compiling rustc-demangle v0.1.9 Compiling percent-encoding v1.0.1 Compiling linked-hash-map v0.5.1 Compiling language-tags v0.2.2 Compiling smallvec v0.4.5 Compiling uuid v0.5.1 Compiling sha1 v0.2.0 Compiling bufstream v0.1.4 Compiling fnv v1.0.6 Compiling untrusted v0.5.1 Compiling crossbeam-utils v0.2.2 Compiling log v0.4.5 Compiling arrayvec v0.4.7 Compiling num_cpus v1.8.0 Compiling iovec v0.1.2 Compiling net2 v0.2.33 Compiling memchr v1.0.2 Compiling atty v0.2.11 Compiling rand v0.4.3 Compiling which v1.0.5 Compiling time v0.1.40 Compiling socket2 v0.3.8 Compiling lazy_static v1.1.0 Compiling memchr v2.1.0 Compiling unicase v2.2.0 Compiling semver v0.9.0 Compiling unreachable v1.0.0 Compiling owning_ref v0.3.3 Compiling rand_core v0.2.2 Compiling regex-syntax v0.6.2 Compiling regex-syntax v0.5.6 Compiling proc-macro2 v0.3.5 Compiling clang-sys v0.23.0 Compiling textwrap v0.10.0 Compiling humantime v1.1.1 Compiling tokio-executor v0.1.5 Compiling tokio-service v0.1.0 Compiling relay v0.1.1 Compiling block-buffer v0.3.3 Compiling unicode-bidi v0.3.4 Compiling phf_shared v0.7.23 Compiling foreign-types v0.3.2 Compiling base64 v0.6.0 Compiling base64 v0.7.0 Compiling nix v0.9.0 Compiling base64 v0.9.3 Compiling scheduled-thread-pool v0.1.0 Compiling serde_test v0.8.23 Compiling yaml-rust v0.4.2 Compiling log v0.3.9 Compiling want v0.0.4 Compiling bytes v0.4.10 Compiling futures-cpupool v0.1.8 Compiling nom v3.2.1 Compiling mio v0.6.16 Compiling rand v0.3.22 Compiling smallvec v0.6.5 Compiling rand v0.5.5 Compiling lock_api v0.1.4 Compiling rustc_version v0.2.3 Compiling quote v0.5.2 Compiling clap v2.32.0 Compiling tokio-current-thread v0.1.3 Compiling tokio-timer v0.2.7 Compiling phf v0.7.23 Compiling stringprep v0.1.2 Compiling idna v0.1.5 Compiling linked-hash-map v0.3.0 Compiling r2d2 v0.7.4 Compiling tokio-io v0.1.10 Compiling generic-array v0.9.0 Compiling mio-uds v0.6.7 Compiling parking_lot_core v0.3.1 Compiling cexpr v0.2.3 Compiling twox-hash v1.1.1 Compiling atoi v0.2.3 Compiling num-traits v0.1.43 Compiling serde_json v1.0.32 Compiling toml v0.4.8 Compiling quote v0.6.8 Compiling tokio-codec v0.1.1 Compiling crossbeam-epoch v0.3.1 Compiling crossbeam-epoch v0.5.2 Compiling thread_local v0.3.6 Compiling url v1.7.1 Compiling digest v0.7.6 Compiling crypto-mac v0.5.2 Compiling aho-corasick v0.6.8 Compiling mime v0.3.12 Compiling chrono v0.4.6 Compiling crossbeam-deque v0.2.0 Compiling syn v0.15.13 Compiling crossbeam-deque v0.6.1 Compiling sha2 v0.7.1 Compiling hmac v0.5.0 Compiling tokio-threadpool v0.1.8 Compiling postgres-protocol v0.3.2 Compiling parking_lot v0.6.4 Compiling rayon v0.8.2 Compiling mysql_common v0.5.0 Compiling serde_derive v1.0.80 Compiling env_logger v0.5.13 Compiling serde-hjson v0.8.2 Compiling tokio-reactor v0.1.6 Compiling tokio-fs v0.1.4 Compiling postgres-shared v0.4.2 Compiling ring v0.12.1 Compiling cc v1.0.25 Compiling tokio-tcp v0.1.2 Compiling tokio-udp v0.1.2 Compiling tokio-uds v0.2.3 Compiling config v0.8.0 Compiling postgres v0.15.2 Compiling libloading v0.5.0 Compiling openssl-sys v0.9.39 Compiling backtrace-sys v0.1.24 Compiling libz-sys v1.0.25 Compiling tokio v0.1.11 Compiling r2d2_postgres v0.13.0 Compiling tokio-core v0.1.17 Compiling flate2 v0.2.20 Compiling backtrace v0.3.9 Compiling tokio-proto v0.1.1 Compiling error-chain v0.11.0 Compiling hyper v0.11.27 Compiling native-tls v0.1.5 Compiling mysql v12.3.1 Compiling tokio-tls v0.1.4 Compiling hyper-tls v0.1.4 Compiling librocksdb-sys v5.14.2 error: failed to run custom build command for librocksdb-sys v5.14.2 process didn't exit successfully: /user1/home/target/release/build/librocksdb-sys-56635e7b678cd86e/build-script-build (exit code: 101) --- stdout cargo:rerun-if-changed=build.rs cargo:rerun-if-changed=rocksdb/ cargo:rerun-if-changed=snappy/ --- stderr thread 'main' panicked at 'Unable to find libclang: "couldn\'t find any of [\'libclang.so\', \'libclang.so.*\', \'libclang-*.so\'], set the LIBCLANG_PATH environment variable to a path where one of these files can be found (skipped: [])"', libcore/result.rs:1009:5 note: Run with RUST_BACKTRACE=1 for a backtrace. I followed these instructions to install clang, then these instructions to build the libcxx by clang. When trying to build again, I ended up with this error: Compiling librocksdb-sys v5.14.2 error: failed to run custom build command for librocksdb-sys v5.14.2 process didn't exit successfully: /user1/home/target/release/build/librocksdb-sys-56635e7b678cd86e/build-script-build (exit code: 101) --- stdout cargo:rerun-if-changed=build.rs cargo:rerun-if-changed=rocksdb/ cargo:rerun-if-changed=snappy/ TARGET = Some("x86_64-unknown-linux-gnu") OPT_LEVEL = Some("3") HOST = Some("x86_64-unknown-linux-gnu") CXX_x86_64-unknown-linux-gnu = None CXX_x86_64_unknown_linux_gnu = None HOST_CXX = None CXX = None CXXFLAGS_x86_64-unknown-linux-gnu = None CXXFLAGS_x86_64_unknown_linux_gnu = None HOST_CXXFLAGS = None CXXFLAGS = None DEBUG = Some("false") running: "c++" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-I" "rocksdb/include/" "-I" "rocksdb/" "-I" "rocksdb/third-party/gtest-1.7.0/fused-src/" "-I" "snappy/" "-I" "." "-Wall" "-Wextra" "-std=c++11" "-Wno-unused-parameter" "-DNDEBUG=1" "-DSNAPPY=1" "-DOS_LINUX=1" "-DROCKSDB_PLATFORM_POSIX=1" "-DROCKSDB_LIB_IO_POSIX=1" "-o" "/user1/home/target/release/build/librocksdb-sys-fe80efb4608df839/out/rocksdb/utilities/blob_db/blob_log_format.o" "-c" "rocksdb/utilities/blob_db/blob_log_format.cc" running: "c++" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-I" "rocksdb/include/" "-I" "rocksdb/" "-I" "rocksdb/third-party/gtest-1.7.0/fused-src/" "-I" "snappy/" "-I" "." "-Wall" "-Wextra" "-std=c++11" "-Wno-unused-parameter" "-DNDEBUG=1" "-DSNAPPY=1" "-DOS_LINUX=1" "-DROCKSDB_PLATFORM_POSIX=1" "-DROCKSDB_LIB_IO_POSIX=1" "-o" "/user1/home/target/release/build/librocksdb-sys-fe80efb4608df839/out/rocksdb/table/full_filter_block.o" "-c" "rocksdb/table/full_filter_block.cc" running: "c++" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-I" "rocksdb/include/" "-I" "rocksdb/" "-I" "rocksdb/third-party/gtest-1.7.0/fused-src/" "-I" "snappy/" "-I" "." "-Wall" "-Wextra" "-std=c++11" "-Wno-unused-parameter" "-DNDEBUG=1" "-DSNAPPY=1" "-DOS_LINUX=1" "-DROCKSDB_PLATFORM_POSIX=1" "-DROCKSDB_LIB_IO_POSIX=1" "-o" "/user1/home/target/release/build/librocksdb-sys-fe80efb4608df839/out/rocksdb/utilities/merge_operators/bytesxor.o" "-c" "rocksdb/utilities/merge_operators/bytesxor.cc" running: "c++" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-I" "rocksdb/include/" "-I" "rocksdb/" "-I" "rocksdb/third-party/gtest-1.7.0/fused-src/" "-I" "snappy/" "-I" "." "-Wall" "-Wextra" "-std=c++11" "-Wno-unused-parameter" "-DNDEBUG=1" "-DSNAPPY=1" "-DOS_LINUX=1" "-DROCKSDB_PLATFORM_POSIX=1" "-DROCKSDB_LIB_IO_POSIX=1" "-o" "/user1/home/target/release/build/librocksdb-sys-fe80efb4608df839/out/rocksdb/cache/clock_cache.o" "-c" "rocksdb/cache/clock_cache.cc" --- stderr rocksdb/include/rocksdb/c.h:48:9: warning: #pragma once in main file, err: false thread 'main' panicked at ' Internal error occurred: Failed to find tool. Is c++ installed? ', /root/.cargo/registry/src/github.com-1ecc6299db9ec823/cc-1.0.25/src/lib.rs:2260:5 note: Run with RUST_BACKTRACE=1 for a backtrace. c++ is installed at /usr/include/c++
rust, rhel, rust-cargo, libclang, rocksdb
5
2,584
0
https://stackoverflow.com/questions/53107842/how-do-i-resolve-a-failure-to-compile-librocksdb-sys-error-on-rhel-7
47,091,740
Not able to mount azure file share into local RHEL7 VM
I want to mount(symlink) from Azure file share to a local RHEL7 VM . I am using the following command mount -t cifs //<storage-account-name>.file.core.windows.net/<share-name> /mymountpoint -o vers=3.0,username=<storage-acc-name>,password=<pwd>,dir_mode=0777,file_mode=0777,sec=ntlmssp,mfsymlinks but getting the following error mount error(13): Permission denied Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) The dmesg | tail gives the following log [root@googleapps ~]# dmesg | tail [98383.619149] fs/cifs/smb2misc.c: SMB2 data length 0 offset 0 [98383.619151] fs/cifs/smb2misc.c: SMB2 len 77 [98383.619163] fs/cifs/transport.c: cifs_sync_mid_result: cmd=1 mid=1 state=4 [98383.619168] Status code returned 0xc0000022 STATUS_ACCESS_DENIED [98383.619175] fs/cifs/smb2maperror.c: Mapping SMB2 status code -1073741790 to POSIX err -13 [98383.619177] fs/cifs/misc.c: Null buffer passed to cifs_small_buf_release [98383.619181] CIFS VFS: Send error in SessSetup = -13 [98383.619185] fs/cifs/connect.c: CIFS VFS: leaving cifs_get_smb_ses (xid = 59) rc = -13 [98383.619297] fs/cifs/connect.c: CIFS VFS: leaving cifs_mount (xid = 58) rc = -13 [98383.619300] CIFS VFS: cifs_mount failed w/return code = -13
Not able to mount azure file share into local RHEL7 VM I want to mount(symlink) from Azure file share to a local RHEL7 VM . I am using the following command mount -t cifs //<storage-account-name>.file.core.windows.net/<share-name> /mymountpoint -o vers=3.0,username=<storage-acc-name>,password=<pwd>,dir_mode=0777,file_mode=0777,sec=ntlmssp,mfsymlinks but getting the following error mount error(13): Permission denied Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) The dmesg | tail gives the following log [root@googleapps ~]# dmesg | tail [98383.619149] fs/cifs/smb2misc.c: SMB2 data length 0 offset 0 [98383.619151] fs/cifs/smb2misc.c: SMB2 len 77 [98383.619163] fs/cifs/transport.c: cifs_sync_mid_result: cmd=1 mid=1 state=4 [98383.619168] Status code returned 0xc0000022 STATUS_ACCESS_DENIED [98383.619175] fs/cifs/smb2maperror.c: Mapping SMB2 status code -1073741790 to POSIX err -13 [98383.619177] fs/cifs/misc.c: Null buffer passed to cifs_small_buf_release [98383.619181] CIFS VFS: Send error in SessSetup = -13 [98383.619185] fs/cifs/connect.c: CIFS VFS: leaving cifs_get_smb_ses (xid = 59) rc = -13 [98383.619297] fs/cifs/connect.c: CIFS VFS: leaving cifs_mount (xid = 58) rc = -13 [98383.619300] CIFS VFS: cifs_mount failed w/return code = -13
azure-storage, symlink, rhel
5
2,983
3
https://stackoverflow.com/questions/47091740/not-able-to-mount-azure-file-share-into-local-rhel7-vm
21,041,843
java.rmi.server.ExportException: Port already in use: 0
I have about 20 java processes that start up using -Dcom.sun.management.jmxremote in their command line, with no explicit port number specified. My understanding is that this means the JVM gets assigned any free port from the ephemeral port range. This has worked without problem for many years. Last week, I had a one-off event where some of the processes failed to start up because of the following: Error: Exception thrown by the agent : java.rmi.server.ExportException: Port already in use: 0; nested exception is:java.net.BindException: Address already in use The problem is not reproducible, and I have not seen this one before. As I understand it, Port 0 is another term for any ephemeral port. As they are assigned to the JVM by the system, how can an ephemeral port already be in use? [me@server:/tmp]cat /proc/sys/net/ipv4/ip_local_port_range 32768 61000 There should be about 29000 ports available; does this error indicate that they were all in use at the time my processes requested them?
java.rmi.server.ExportException: Port already in use: 0 I have about 20 java processes that start up using -Dcom.sun.management.jmxremote in their command line, with no explicit port number specified. My understanding is that this means the JVM gets assigned any free port from the ephemeral port range. This has worked without problem for many years. Last week, I had a one-off event where some of the processes failed to start up because of the following: Error: Exception thrown by the agent : java.rmi.server.ExportException: Port already in use: 0; nested exception is:java.net.BindException: Address already in use The problem is not reproducible, and I have not seen this one before. As I understand it, Port 0 is another term for any ephemeral port. As they are assigned to the JVM by the system, how can an ephemeral port already be in use? [me@server:/tmp]cat /proc/sys/net/ipv4/ip_local_port_range 32768 61000 There should be about 29000 ports available; does this error indicate that they were all in use at the time my processes requested them?
java, jmx, rhel
5
5,992
0
https://stackoverflow.com/questions/21041843/java-rmi-server-exportexception-port-already-in-use-0
50,612,898
Can my Python script distinguish between if it was run as root or if it was run through sudo?
[root@hostname ~]# python script.py # allow this [user@hostname ~]$ sudo python script.py # deny this [user@hostname ~]$ sudo -E python script.py # deny this [user@hostname ~]$ sudo PATH=$PATH python script.py # deny this [user@hostname ~]$ python script.py # kindly refuse this I'm trying to achieve the behavior above. Read further if you care why or if the example isn't sufficient enough. Sorry for the sharp tongue, but most of my Stack Exchange questions get hostile questions back instead of answers. This question arises from requiring an admin to run my script, but the nature of the script requires root 's environment variables (and not sudo 's). I've given this some thorough research... below is from this answer if os.geteuid() == 0: pass # sufficient to determine if elevated privileges But then I started needing to access PATH inside of my script. I noticed that sudo -E env | grep PATH; env | grep PATH prints different PATH values. I found it was because of the security policy on PATH . I also found the workaround to PATH is sudo PATH=$PATH ... However, it's not the only policy protected environment variable, and at that point, why push this enumeration of environment variables on the script user? It seems that requiring root explicitly is the best approach, and just warn the admin to use root explicitly from within the script otherwise. Is there such a way to distinguish between root and sudo with Python?
Can my Python script distinguish between if it was run as root or if it was run through sudo? [root@hostname ~]# python script.py # allow this [user@hostname ~]$ sudo python script.py # deny this [user@hostname ~]$ sudo -E python script.py # deny this [user@hostname ~]$ sudo PATH=$PATH python script.py # deny this [user@hostname ~]$ python script.py # kindly refuse this I'm trying to achieve the behavior above. Read further if you care why or if the example isn't sufficient enough. Sorry for the sharp tongue, but most of my Stack Exchange questions get hostile questions back instead of answers. This question arises from requiring an admin to run my script, but the nature of the script requires root 's environment variables (and not sudo 's). I've given this some thorough research... below is from this answer if os.geteuid() == 0: pass # sufficient to determine if elevated privileges But then I started needing to access PATH inside of my script. I noticed that sudo -E env | grep PATH; env | grep PATH prints different PATH values. I found it was because of the security policy on PATH . I also found the workaround to PATH is sudo PATH=$PATH ... However, it's not the only policy protected environment variable, and at that point, why push this enumeration of environment variables on the script user? It seems that requiring root explicitly is the best approach, and just warn the admin to use root explicitly from within the script otherwise. Is there such a way to distinguish between root and sudo with Python?
python, environment-variables, python-2.x, sudo, rhel
5
1,037
3
https://stackoverflow.com/questions/50612898/can-my-python-script-distinguish-between-if-it-was-run-as-root-or-if-it-was-run
37,693,747
How to resolve libpcre.so.1()(64bit) dependency in amazon linux ami
When try to install maxscale, it ask libpcre. How to install libpcre on linux? rpm -ivh maxscale-1.4.3-1.rhel.7.x86_64.rpm warning: maxscale-1.4.3-1.rhel.7.x86_64.rpm: Header V4 RSA/SHA1 Signature, key ID 8167ee24: NOKEY error: Failed dependencies: libpcre.so.1()(64bit) is needed by maxscale-1.4.3-1.x86_64
How to resolve libpcre.so.1()(64bit) dependency in amazon linux ami When try to install maxscale, it ask libpcre. How to install libpcre on linux? rpm -ivh maxscale-1.4.3-1.rhel.7.x86_64.rpm warning: maxscale-1.4.3-1.rhel.7.x86_64.rpm: Header V4 RSA/SHA1 Signature, key ID 8167ee24: NOKEY error: Failed dependencies: libpcre.so.1()(64bit) is needed by maxscale-1.4.3-1.x86_64
linux, amazon-web-services, perl, rhel, maxscale
5
7,971
1
https://stackoverflow.com/questions/37693747/how-to-resolve-libpcre-so-164bit-dependency-in-amazon-linux-ami
25,642,071
How to install PostGIS on Oracle Linux 6.4 x64?
I am reading the following guide [URL] (this link is from [URL] ). The command yum install postgis2_93 gives the following errors: Error: Package: gdal-libs-1.9.2-6.rhel6.x86_64 (pgdg93) Requires: libhdf5.so.6()(64bit) Error: Package: gdal-libs-1.9.2-6.rhel6.x86_64 (pgdg93) Requires: libdapserver.so.7()(64bit) Error: Package: gdal-libs-1.9.2-6.rhel6.x86_64 (pgdg93) Requires: libCharLS.so.1()(64bit) Error: Package: postgis2_93-2.1.3-1.rhel6.x86_64 (pgdg93) Requires: libjson.so.0()(64bit) Error: Package: gdal-libs-1.9.2-6.rhel6.x86_64 (pgdg93) Requires: libgta.so.0()(64bit) Error: Package: gdal-libs-1.9.2-6.rhel6.x86_64 (pgdg93) Requires: libspatialite.so.2()(64bit) Error: Package: gdal-libs-1.9.2-6.rhel6.x86_64 (pgdg93) Requires: libcfitsio.so.0()(64bit) Error: Package: postgis2_93-2.1.3-1.rhel6.x86_64 (pgdg93) Requires: json-c Error: Package: postgis2_93-2.1.3-1.rhel6.x86_64 (pgdg93) Requires: hdf5 Error: Package: armadillo-4.300.0-1.rhel6.x86_64 (pgdg93) Requires: libhdf5.so.6()(64bit) Error: Package: gdal-libs-1.9.2-6.rhel6.x86_64 (pgdg93) Requires: libnetcdf.so.6()(64bit) Error: Package: gdal-libs-1.9.2-6.rhel6.x86_64 (pgdg93) Requires: libdapclient.so.3()(64bit) Error: Package: armadillo-4.300.0-1.rhel6.x86_64 (pgdg93) Requires: libarpack.so.2()(64bit) Error: Package: gdal-libs-1.9.2-6.rhel6.x86_64 (pgdg93) Requires: libfreexl.so.1()(64bit) Error: Package: gdal-libs-1.9.2-6.rhel6.x86_64 (pgdg93) Requires: libdap.so.11()(64bit) They were expected. Then I do the following (it's according to the guide): sudo rpm -ivh [URL] and yum install postgis2_93 gives the following: [URL] [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found" Trying other mirror. [URL] [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found" Trying other mirror. [URL] [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found" Trying other mirror. [URL] [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found" Trying other mirror. [URL] [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found" Trying other mirror. [URL] [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found" Trying other mirror. [URL] [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found" Trying other mirror. [URL] [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found" Trying other mirror. ... yum clean all and yum clean metadata don't solve the problem. I also tried to use EPEL 7.1, but I got the same errors. Where can I get these packages?
How to install PostGIS on Oracle Linux 6.4 x64? I am reading the following guide [URL] (this link is from [URL] ). The command yum install postgis2_93 gives the following errors: Error: Package: gdal-libs-1.9.2-6.rhel6.x86_64 (pgdg93) Requires: libhdf5.so.6()(64bit) Error: Package: gdal-libs-1.9.2-6.rhel6.x86_64 (pgdg93) Requires: libdapserver.so.7()(64bit) Error: Package: gdal-libs-1.9.2-6.rhel6.x86_64 (pgdg93) Requires: libCharLS.so.1()(64bit) Error: Package: postgis2_93-2.1.3-1.rhel6.x86_64 (pgdg93) Requires: libjson.so.0()(64bit) Error: Package: gdal-libs-1.9.2-6.rhel6.x86_64 (pgdg93) Requires: libgta.so.0()(64bit) Error: Package: gdal-libs-1.9.2-6.rhel6.x86_64 (pgdg93) Requires: libspatialite.so.2()(64bit) Error: Package: gdal-libs-1.9.2-6.rhel6.x86_64 (pgdg93) Requires: libcfitsio.so.0()(64bit) Error: Package: postgis2_93-2.1.3-1.rhel6.x86_64 (pgdg93) Requires: json-c Error: Package: postgis2_93-2.1.3-1.rhel6.x86_64 (pgdg93) Requires: hdf5 Error: Package: armadillo-4.300.0-1.rhel6.x86_64 (pgdg93) Requires: libhdf5.so.6()(64bit) Error: Package: gdal-libs-1.9.2-6.rhel6.x86_64 (pgdg93) Requires: libnetcdf.so.6()(64bit) Error: Package: gdal-libs-1.9.2-6.rhel6.x86_64 (pgdg93) Requires: libdapclient.so.3()(64bit) Error: Package: armadillo-4.300.0-1.rhel6.x86_64 (pgdg93) Requires: libarpack.so.2()(64bit) Error: Package: gdal-libs-1.9.2-6.rhel6.x86_64 (pgdg93) Requires: libfreexl.so.1()(64bit) Error: Package: gdal-libs-1.9.2-6.rhel6.x86_64 (pgdg93) Requires: libdap.so.11()(64bit) They were expected. Then I do the following (it's according to the guide): sudo rpm -ivh [URL] and yum install postgis2_93 gives the following: [URL] [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found" Trying other mirror. [URL] [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found" Trying other mirror. [URL] [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found" Trying other mirror. [URL] [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found" Trying other mirror. [URL] [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found" Trying other mirror. [URL] [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found" Trying other mirror. [URL] [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found" Trying other mirror. [URL] [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found" Trying other mirror. ... yum clean all and yum clean metadata don't solve the problem. I also tried to use EPEL 7.1, but I got the same errors. Where can I get these packages?
linux, postgresql, postgis, rhel
4
9,570
2
https://stackoverflow.com/questions/25642071/how-to-install-postgis-on-oracle-linux-6-4-x64
16,425,053
Before filters not running
The problem is the client told us we could go live with any OS we wanted, so we developed on CentOS as usual, and when we went to go live, they said "oh, new policy is RHEL only, sorry". Our application works perfectly on CentOS, but not on RHEL. Main Problem: routes protected by a 'before' => 'auth' filter are being protected on CentOS, but not on RHEL. This means the user is never Authenticated, so Auth::user() is always empty, so all subsequent code fails. Configuration Info: both servers are running Apache 2.2.15 and PHP 5.4.13 both have the same set of Apache modules and PHP extensions. both have the same code from git. I have a fix, but it makes NO sense: in vendor/laravel/framework/src/Illuminate/Routing/Router.php at line 1398, change this: public function filtersEnabled() { return $this->runFilters; } to this: public function filtersEnabled() { return true;//$this->runFilters; } Do you have any idea what's going on here? I can't find a config option anywhere that would be setting runFilters = false.
Before filters not running The problem is the client told us we could go live with any OS we wanted, so we developed on CentOS as usual, and when we went to go live, they said "oh, new policy is RHEL only, sorry". Our application works perfectly on CentOS, but not on RHEL. Main Problem: routes protected by a 'before' => 'auth' filter are being protected on CentOS, but not on RHEL. This means the user is never Authenticated, so Auth::user() is always empty, so all subsequent code fails. Configuration Info: both servers are running Apache 2.2.15 and PHP 5.4.13 both have the same set of Apache modules and PHP extensions. both have the same code from git. I have a fix, but it makes NO sense: in vendor/laravel/framework/src/Illuminate/Routing/Router.php at line 1398, change this: public function filtersEnabled() { return $this->runFilters; } to this: public function filtersEnabled() { return true;//$this->runFilters; } Do you have any idea what's going on here? I can't find a config option anywhere that would be setting runFilters = false.
php, apache, laravel, laravel-4, rhel
4
422
1
https://stackoverflow.com/questions/16425053/before-filters-not-running
22,311,699
Trouble with OpenSSL on RHEL 6.3 and all Ruby installers
OpenSSL does not appear to be compiling correctly when installing any version of Ruby on our RHEL 6.3 system. I have been trying to leave user installs of RVM behind and replace them with root installs via ruby-install and chruby. OpenSSL works okay in our RVM user installs (with the prescribed RVM fix) as well as in the built-in system install of Ruby 1.8.7 in /usr/bin . OpenSSL is broken in each Ruby version I have tried with ruby-install, ruby-build, and even RVM when using their latest suggested fix. 1.9.3-p392 (our prod version), 1.9 latest, and 2.1.0 current. I have tried every openssl fix/workaround I can find, such as the --with-openssl-dir=/some/dir config pointing to various openssl folders, but nothing works for me. Here are some relevant messages from a few of my many attempts: [root@dbatcit ~]# ruby-install ruby >>> Installing ruby 2.1.0 into /opt/rubies/ruby-2.1.0 ... >>> Installing dependencies for ruby 2.1.0 ... Loaded plugins: product-id, rhnplugin, security, subscription-manager Updating certificate-based repositories. Unable to read consumer identity Setting up Install Process Package gcc-4.4.7-4.el6.x86_64 already installed and latest version Package automake-1.11.1-4.el6.noarch already installed and latest version Package zlib-devel-1.2.3-29.el6.x86_64 already installed and latest version Package libyaml-devel-0.1.3-1.el6.x86_64 already installed and latest version Package openssl-devel-1.0.1e-16.el6_5.4.x86_64 already installed and latest version Package gdbm-devel-1.8.0-36.el6.x86_64 already installed and latest version Package readline-devel-6.0-4.el6.x86_64 already installed and latest version Package ncurses-devel-5.7-3.20090208.el6.x86_64 already installed and latest version Package libffi-devel-3.0.5-3.2.el6.x86_64 already installed and latest version Nothing to do . . make[2]: Entering directory /usr/local/src/ruby-2.1.0/ext/openssl' compiling ossl_pkey.c compiling ossl_ssl.c ossl_ssl.c:121: error: âTLSv1_2_methodâ undeclared here (not in a function) ossl_ssl.c:122: error: âTLSv1_2_server_methodâ undeclared here (not in a function) ossl_ssl.c:123: error: âTLSv1_2_client_methodâ undeclared here (not in a function) ossl_ssl.c:127: error: âTLSv1_1_methodâ undeclared here (not in a function) ossl_ssl.c:128: error: âTLSv1_1_server_methodâ undeclared here (not in a function) ossl_ssl.c:129: error: âTLSv1_1_client_methodâ undeclared here (not in a function) make[2]: *** [ossl_ssl.o] Error 1 make[2]: Leaving directory /usr/local/src/ruby-2.1.0/ext/openssl' make[1]: *** [ext/openssl/all] Error 2 make[1]: Leaving directory /usr/local/src/ruby-2.1.0' make: *** [build-ext] Error 2 !!! Compiling ruby 2.1.0 failed! [root@dbatcit ~]# ruby-install ruby 1.9 >>> Installing ruby 1.9.3-p484 into /opt/rubies/ruby-1.9.3-p484 ... >>> Installing dependencies for ruby 1.9.3-p484 ... Loaded plugins: product-id, rhnplugin, security, subscription-manager Updating certificate-based repositories. Unable to read consumer identity Setting up Install Process Package gcc-4.4.7-4.el6.x86_64 already installed and latest version Package automake-1.11.1-4.el6.noarch already installed and latest version Package zlib-devel-1.2.3-29.el6.x86_64 already installed and latest version Package libyaml-devel-0.1.3-1.el6.x86_64 already installed and latest version Package openssl-devel-1.0.1e-16.el6_5.4.x86_64 already installed and latest version Package gdbm-devel-1.8.0-36.el6.x86_64 already installed and latest version Package readline-devel-6.0-4.el6.x86_64 already installed and latest version Package ncurses-devel-5.7-3.20090208.el6.x86_64 already installed and latest version Package libffi-devel-3.0.5-3.2.el6.x86_64 already installed and latest version Nothing to do . . make[2]: Entering directory /usr/local/src/ruby-1.9.3-p484/ext/openssl' compiling ossl_pkey.c compiling ossl_ssl.c compiling ossl_pkcs12.c compiling ossl_bn.c compiling ossl_hmac.c ossl_hmac.c: In function âossl_hmac_copyâ: ossl_hmac.c:90: warning: implicit declaration of function âHMAC_CTX_copyâ compiling ossl_asn1.c compiling ossl.c compiling ossl_bio.c compiling ossl_pkey_rsa.c compiling ossl_ocsp.c ossl_ocsp.c: In function âossl_ocspreq_add_certidâ: ossl_ocsp.c:180: warning: function called through a non-compatible type ossl_ocsp.c:180: note: if this code is reached, the program will abort ossl_ocsp.c: In function âossl_ocspreq_get_certidâ: ossl_ocsp.c:200: warning: function called through a non-compatible type ossl_ocsp.c:200: note: if this code is reached, the program will abort ossl_ocsp.c: In function âossl_ocspbres_get_statusâ: ossl_ocsp.c:541: warning: function called through a non-compatible type ossl_ocsp.c:541: note: if this code is reached, the program will abort compiling ossl_pkey_dh.c ossl_pkey_dh.c: In function âossl_dh_initializeâ: ossl_pkey_dh.c:184: warning: function called through a non-compatible type ossl_pkey_dh.c:184: note: if this code is reached, the program will abort ossl_pkey_dh.c: In function âossl_dh_to_public_keyâ: ossl_pkey_dh.c:372: warning: function called through a non-compatible type ossl_pkey_dh.c:372: note: if this code is reached, the program will abort compiling ossl_ns_spki.c compiling ossl_x509attr.c compiling ossl_x509name.c ossl_x509name.c: In function âossl_x509name_hash_oldâ: ossl_x509name.c:342: warning: implicit declaration of function âX509_NAME_hash_oldâ compiling ossl_pkcs7.c compiling ossl_pkey_ec.c ossl_pkey_ec.c: In function âossl_ec_group_initializeâ: ossl_pkey_ec.c:784: warning: function called through a non-compatible type ossl_pkey_ec.c:784: note: if this code is reached, the program will abort ossl_pkey_ec.c: In function âossl_ec_group_to_stringâ: ossl_pkey_ec.c:1154: warning: function called through a non-compatible type ossl_pkey_ec.c:1154: note: if this code is reached, the program will abort compiling ossl_ssl_session.c ossl_ssl_session.c: In function âossl_ssl_session_initializeâ: ossl_ssl_session.c:53: warning: function called through a non-compatible type ossl_ssl_session.c:53: note: if this code is reached, the program will abort ossl_ssl_session.c:57: warning: function called through a non-compatible type ossl_ssl_session.c:57: note: if this code is reached, the program will abort ossl_ssl_session.c: In function âossl_ssl_session_to_pemâ: ossl_ssl_session.c:251: warning: function called through a non-compatible type ossl_ssl_session.c:251: note: if this code is reached, the program will abort compiling openssl_missing.c compiling ossl_x509.c compiling ossl_x509cert.c compiling ossl_digest.c compiling ossl_pkcs5.c ossl_pkcs5.c: In function âossl_pkcs5_pbkdf2_hmacâ: ossl_pkcs5.c:39: warning: implicit declaration of function âPKCS5_PBKDF2_HMACâ compiling ossl_rand.c compiling ossl_engine.c compiling ossl_x509crl.c compiling ossl_cipher.c ossl_cipher.c: In function âossl_cipher_copyâ: ossl_cipher.c:143: warning: implicit declaration of function âEVP_CIPHER_CTX_copyâ compiling ossl_x509ext.c compiling ossl_config.c compiling ossl_x509store.c compiling ossl_x509revoked.c compiling ossl_pkey_dsa.c compiling ossl_x509req.c linking shared-object openssl.so installing default openssl libraries make[2]: Leaving directory /usr/local/src/ruby-1.9.3-p484/ext/openssl' . . >>> Successfully installed ruby 1.9.3-p484 into /opt/rubies/ruby-1.9.3-p484 Note all the ossl warnings above. Restart session. Test system Ruby 1.8.7 openssl: Works. Test ruby-install Ruby 1.9.3 openssl: Fails. [root@dbatcit ~]# chruby ruby-1.9.3-p484 [root@dbatcit ~]# which ruby /usr/bin/ruby [root@dbatcit ~]# ruby -v ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux] [root@dbatcit ~]# ruby -ropenssl -e "puts OpenSSL::VERSION" 1.0.0 [root@dbatcit ~]# chruby 1.9 [root@dbatcit ~]# chruby * ruby-1.9.3-p484 [root@dbatcit ~]# which ruby /opt/rubies/ruby-1.9.3-p484/bin/ruby [root@dbatcit ~]# ruby -v ruby 1.9.3p484 (2013-11-22 revision 43786) [x86_64-linux] [root@dbatcit ~]# ruby -ropenssl -e "puts OpenSSL::VERSION" /opt/rubies/ruby-1.9.3-p484/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in require': /opt/rubies/ruby-1.9.3-p484/lib/ruby/1.9.1/x86_64-linux/openssl.so: undefined symbol: EC_GROUP_new_curve_GF2m - /opt/rubies/ruby-1.9.3-p484/lib/ruby/1.9.1/x86_64-linux/openssl.so (LoadError) from /opt/rubies/ruby-1.9.3-p484/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in require' from /opt/rubies/ruby-1.9.3-p484/lib/ruby/1.9.1/openssl.rb:17:in <top (required)>' from /opt/rubies/ruby-1.9.3-p484/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in require' from /opt/rubies/ruby-1.9.3-p484/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in require' [root@dbatcit ~]# [root@dbatcit ~]# which -a openssl /usr/bin/openssl /usr/local/bin/openssl [root@dbatcit ~]# openssl version OpenSSL 1.0.1e-fips 11 Feb 2013 [root@dbatcit ~]# /usr/local/bin/openssl version OpenSSL 0.9.8d 28 Sep 2006 Test RVM Ruby 1.9.3 openssl in user home: Works. [userbob@dbatcit ~]$ ruby -v ruby 1.9.3p392 (2013-02-22 revision 39386) [x86_64-linux] [userbob@dbatcit ~]$ ruby -ropenssl -e "puts OpenSSL::VERSION" 1.1.0 [userbob@dbatcit ~]$ which openssl /usr/local/bin/openssl [userbob@dbatcit ~]$ openssl version OpenSSL 0.9.8d 28 Sep 2006 [userbob@dbatcit ~]$ .rvm/usr/bin/openssl version OpenSSL 1.0.1c 10 May 2012
Trouble with OpenSSL on RHEL 6.3 and all Ruby installers OpenSSL does not appear to be compiling correctly when installing any version of Ruby on our RHEL 6.3 system. I have been trying to leave user installs of RVM behind and replace them with root installs via ruby-install and chruby. OpenSSL works okay in our RVM user installs (with the prescribed RVM fix) as well as in the built-in system install of Ruby 1.8.7 in /usr/bin . OpenSSL is broken in each Ruby version I have tried with ruby-install, ruby-build, and even RVM when using their latest suggested fix. 1.9.3-p392 (our prod version), 1.9 latest, and 2.1.0 current. I have tried every openssl fix/workaround I can find, such as the --with-openssl-dir=/some/dir config pointing to various openssl folders, but nothing works for me. Here are some relevant messages from a few of my many attempts: [root@dbatcit ~]# ruby-install ruby >>> Installing ruby 2.1.0 into /opt/rubies/ruby-2.1.0 ... >>> Installing dependencies for ruby 2.1.0 ... Loaded plugins: product-id, rhnplugin, security, subscription-manager Updating certificate-based repositories. Unable to read consumer identity Setting up Install Process Package gcc-4.4.7-4.el6.x86_64 already installed and latest version Package automake-1.11.1-4.el6.noarch already installed and latest version Package zlib-devel-1.2.3-29.el6.x86_64 already installed and latest version Package libyaml-devel-0.1.3-1.el6.x86_64 already installed and latest version Package openssl-devel-1.0.1e-16.el6_5.4.x86_64 already installed and latest version Package gdbm-devel-1.8.0-36.el6.x86_64 already installed and latest version Package readline-devel-6.0-4.el6.x86_64 already installed and latest version Package ncurses-devel-5.7-3.20090208.el6.x86_64 already installed and latest version Package libffi-devel-3.0.5-3.2.el6.x86_64 already installed and latest version Nothing to do . . make[2]: Entering directory /usr/local/src/ruby-2.1.0/ext/openssl' compiling ossl_pkey.c compiling ossl_ssl.c ossl_ssl.c:121: error: âTLSv1_2_methodâ undeclared here (not in a function) ossl_ssl.c:122: error: âTLSv1_2_server_methodâ undeclared here (not in a function) ossl_ssl.c:123: error: âTLSv1_2_client_methodâ undeclared here (not in a function) ossl_ssl.c:127: error: âTLSv1_1_methodâ undeclared here (not in a function) ossl_ssl.c:128: error: âTLSv1_1_server_methodâ undeclared here (not in a function) ossl_ssl.c:129: error: âTLSv1_1_client_methodâ undeclared here (not in a function) make[2]: *** [ossl_ssl.o] Error 1 make[2]: Leaving directory /usr/local/src/ruby-2.1.0/ext/openssl' make[1]: *** [ext/openssl/all] Error 2 make[1]: Leaving directory /usr/local/src/ruby-2.1.0' make: *** [build-ext] Error 2 !!! Compiling ruby 2.1.0 failed! [root@dbatcit ~]# ruby-install ruby 1.9 >>> Installing ruby 1.9.3-p484 into /opt/rubies/ruby-1.9.3-p484 ... >>> Installing dependencies for ruby 1.9.3-p484 ... Loaded plugins: product-id, rhnplugin, security, subscription-manager Updating certificate-based repositories. Unable to read consumer identity Setting up Install Process Package gcc-4.4.7-4.el6.x86_64 already installed and latest version Package automake-1.11.1-4.el6.noarch already installed and latest version Package zlib-devel-1.2.3-29.el6.x86_64 already installed and latest version Package libyaml-devel-0.1.3-1.el6.x86_64 already installed and latest version Package openssl-devel-1.0.1e-16.el6_5.4.x86_64 already installed and latest version Package gdbm-devel-1.8.0-36.el6.x86_64 already installed and latest version Package readline-devel-6.0-4.el6.x86_64 already installed and latest version Package ncurses-devel-5.7-3.20090208.el6.x86_64 already installed and latest version Package libffi-devel-3.0.5-3.2.el6.x86_64 already installed and latest version Nothing to do . . make[2]: Entering directory /usr/local/src/ruby-1.9.3-p484/ext/openssl' compiling ossl_pkey.c compiling ossl_ssl.c compiling ossl_pkcs12.c compiling ossl_bn.c compiling ossl_hmac.c ossl_hmac.c: In function âossl_hmac_copyâ: ossl_hmac.c:90: warning: implicit declaration of function âHMAC_CTX_copyâ compiling ossl_asn1.c compiling ossl.c compiling ossl_bio.c compiling ossl_pkey_rsa.c compiling ossl_ocsp.c ossl_ocsp.c: In function âossl_ocspreq_add_certidâ: ossl_ocsp.c:180: warning: function called through a non-compatible type ossl_ocsp.c:180: note: if this code is reached, the program will abort ossl_ocsp.c: In function âossl_ocspreq_get_certidâ: ossl_ocsp.c:200: warning: function called through a non-compatible type ossl_ocsp.c:200: note: if this code is reached, the program will abort ossl_ocsp.c: In function âossl_ocspbres_get_statusâ: ossl_ocsp.c:541: warning: function called through a non-compatible type ossl_ocsp.c:541: note: if this code is reached, the program will abort compiling ossl_pkey_dh.c ossl_pkey_dh.c: In function âossl_dh_initializeâ: ossl_pkey_dh.c:184: warning: function called through a non-compatible type ossl_pkey_dh.c:184: note: if this code is reached, the program will abort ossl_pkey_dh.c: In function âossl_dh_to_public_keyâ: ossl_pkey_dh.c:372: warning: function called through a non-compatible type ossl_pkey_dh.c:372: note: if this code is reached, the program will abort compiling ossl_ns_spki.c compiling ossl_x509attr.c compiling ossl_x509name.c ossl_x509name.c: In function âossl_x509name_hash_oldâ: ossl_x509name.c:342: warning: implicit declaration of function âX509_NAME_hash_oldâ compiling ossl_pkcs7.c compiling ossl_pkey_ec.c ossl_pkey_ec.c: In function âossl_ec_group_initializeâ: ossl_pkey_ec.c:784: warning: function called through a non-compatible type ossl_pkey_ec.c:784: note: if this code is reached, the program will abort ossl_pkey_ec.c: In function âossl_ec_group_to_stringâ: ossl_pkey_ec.c:1154: warning: function called through a non-compatible type ossl_pkey_ec.c:1154: note: if this code is reached, the program will abort compiling ossl_ssl_session.c ossl_ssl_session.c: In function âossl_ssl_session_initializeâ: ossl_ssl_session.c:53: warning: function called through a non-compatible type ossl_ssl_session.c:53: note: if this code is reached, the program will abort ossl_ssl_session.c:57: warning: function called through a non-compatible type ossl_ssl_session.c:57: note: if this code is reached, the program will abort ossl_ssl_session.c: In function âossl_ssl_session_to_pemâ: ossl_ssl_session.c:251: warning: function called through a non-compatible type ossl_ssl_session.c:251: note: if this code is reached, the program will abort compiling openssl_missing.c compiling ossl_x509.c compiling ossl_x509cert.c compiling ossl_digest.c compiling ossl_pkcs5.c ossl_pkcs5.c: In function âossl_pkcs5_pbkdf2_hmacâ: ossl_pkcs5.c:39: warning: implicit declaration of function âPKCS5_PBKDF2_HMACâ compiling ossl_rand.c compiling ossl_engine.c compiling ossl_x509crl.c compiling ossl_cipher.c ossl_cipher.c: In function âossl_cipher_copyâ: ossl_cipher.c:143: warning: implicit declaration of function âEVP_CIPHER_CTX_copyâ compiling ossl_x509ext.c compiling ossl_config.c compiling ossl_x509store.c compiling ossl_x509revoked.c compiling ossl_pkey_dsa.c compiling ossl_x509req.c linking shared-object openssl.so installing default openssl libraries make[2]: Leaving directory /usr/local/src/ruby-1.9.3-p484/ext/openssl' . . >>> Successfully installed ruby 1.9.3-p484 into /opt/rubies/ruby-1.9.3-p484 Note all the ossl warnings above. Restart session. Test system Ruby 1.8.7 openssl: Works. Test ruby-install Ruby 1.9.3 openssl: Fails. [root@dbatcit ~]# chruby ruby-1.9.3-p484 [root@dbatcit ~]# which ruby /usr/bin/ruby [root@dbatcit ~]# ruby -v ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux] [root@dbatcit ~]# ruby -ropenssl -e "puts OpenSSL::VERSION" 1.0.0 [root@dbatcit ~]# chruby 1.9 [root@dbatcit ~]# chruby * ruby-1.9.3-p484 [root@dbatcit ~]# which ruby /opt/rubies/ruby-1.9.3-p484/bin/ruby [root@dbatcit ~]# ruby -v ruby 1.9.3p484 (2013-11-22 revision 43786) [x86_64-linux] [root@dbatcit ~]# ruby -ropenssl -e "puts OpenSSL::VERSION" /opt/rubies/ruby-1.9.3-p484/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in require': /opt/rubies/ruby-1.9.3-p484/lib/ruby/1.9.1/x86_64-linux/openssl.so: undefined symbol: EC_GROUP_new_curve_GF2m - /opt/rubies/ruby-1.9.3-p484/lib/ruby/1.9.1/x86_64-linux/openssl.so (LoadError) from /opt/rubies/ruby-1.9.3-p484/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in require' from /opt/rubies/ruby-1.9.3-p484/lib/ruby/1.9.1/openssl.rb:17:in <top (required)>' from /opt/rubies/ruby-1.9.3-p484/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in require' from /opt/rubies/ruby-1.9.3-p484/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in require' [root@dbatcit ~]# [root@dbatcit ~]# which -a openssl /usr/bin/openssl /usr/local/bin/openssl [root@dbatcit ~]# openssl version OpenSSL 1.0.1e-fips 11 Feb 2013 [root@dbatcit ~]# /usr/local/bin/openssl version OpenSSL 0.9.8d 28 Sep 2006 Test RVM Ruby 1.9.3 openssl in user home: Works. [userbob@dbatcit ~]$ ruby -v ruby 1.9.3p392 (2013-02-22 revision 39386) [x86_64-linux] [userbob@dbatcit ~]$ ruby -ropenssl -e "puts OpenSSL::VERSION" 1.1.0 [userbob@dbatcit ~]$ which openssl /usr/local/bin/openssl [userbob@dbatcit ~]$ openssl version OpenSSL 0.9.8d 28 Sep 2006 [userbob@dbatcit ~]$ .rvm/usr/bin/openssl version OpenSSL 1.0.1c 10 May 2012
ruby, openssl, rvm, rhel, ruby-install
4
6,828
3
https://stackoverflow.com/questions/22311699/trouble-with-openssl-on-rhel-6-3-and-all-ruby-installers
4,146,275
Why TWiki can&#39;t locate a module that is already in the @INC?
recently I was installing some perl modules on my RHEL 5 with perl version 5.8.8 and all instalations went fine. I can see that the modules exist in the @INC but my TWiki site claims that it can't find them returning an error: Can't locate Net/LDAP.pm in @INC (a lot of paths which contain the modules) at TWiki.pm line xx. When I do perl -e 'use Net::LDAP'; it doesn't return anything which means perl can find that module. Also TWiki was configured corectly and works fine except the plugins that use specific modules I had to install, I've even added the paths to setLib.cfg just in case. Edit: which perl returns /usr/bin/perl the shebang line of twiki/cgi-bin/view is #!/usr/bin/perl -wT perl -MNet::LDAP -e 'print $INC{"Net/LDAP.pm"}, "\n";' returns: /usr/lib/perl5/site_perl/5.8.8/Net/LDAP.pm apache error logs show: [Tue Nov 16 10:53:47 2010] [error] [client 10.76.14.170] [Tue Nov 16 10:53:47 2010] view: INC /usr/lib/perl5/site_perl/5.8.8 at /usr/local/apache2/htdocs/twiki5_pdc/bin/view line 44. So it use's the correct path.
Why TWiki can&#39;t locate a module that is already in the @INC? recently I was installing some perl modules on my RHEL 5 with perl version 5.8.8 and all instalations went fine. I can see that the modules exist in the @INC but my TWiki site claims that it can't find them returning an error: Can't locate Net/LDAP.pm in @INC (a lot of paths which contain the modules) at TWiki.pm line xx. When I do perl -e 'use Net::LDAP'; it doesn't return anything which means perl can find that module. Also TWiki was configured corectly and works fine except the plugins that use specific modules I had to install, I've even added the paths to setLib.cfg just in case. Edit: which perl returns /usr/bin/perl the shebang line of twiki/cgi-bin/view is #!/usr/bin/perl -wT perl -MNet::LDAP -e 'print $INC{"Net/LDAP.pm"}, "\n";' returns: /usr/lib/perl5/site_perl/5.8.8/Net/LDAP.pm apache error logs show: [Tue Nov 16 10:53:47 2010] [error] [client 10.76.14.170] [Tue Nov 16 10:53:47 2010] view: INC /usr/lib/perl5/site_perl/5.8.8 at /usr/local/apache2/htdocs/twiki5_pdc/bin/view line 44. So it use's the correct path.
perl, rhel, twiki
4
5,804
5
https://stackoverflow.com/questions/4146275/why-twiki-cant-locate-a-module-that-is-already-in-the-inc
36,592,618
reportlab Image to PDF: &quot;please call tobytes()&quot;
I'm trying to generate PDF's with Images. im = ImageReader('00001.png') c = canvas.Canvas('networkanalyze.pdf', pagesize=A4) c.drawImage(im, 10, 10, mask='auto') c.showPage() c.save() Traceback: Traceback (most recent call last): File "pdf.py", line 9, in <module> c.drawImage(im, 10, 10, mask='auto') File "/usr/lib/python2.6/site-packages/reportlab-2.7-py2.6-linux-x86_64.egg/reportlab/pdfgen/canvas.py", line 909, in drawImage rawdata = image.getRGBData() File "/usr/lib/python2.6/site-packages/reportlab-2.7-py2.6-linux-x86_64.egg/reportlab/lib/utils.py", line 656, in getRGBData annotateException('\nidentity=%s'%self.identity()) File "/usr/lib/python2.6/site-packages/reportlab-2.7-py2.6-linux-x86_64.egg/reportlab/lib/utils.py", line 653, in getRGBData self._data = im.tostring() File "/usr/lib/python2.6/site-packages/Pillow-3.2.0-py2.6-linux-x86_64.egg/PIL/Image.py", line 699, in tostring "Please call tobytes() instead.") Exception: tostring() has been removed. Please call tobytes() instead. 2nd Approach: def generate_pdf(c): """ letter :- (612.0, 792.0) """ im = Image.open("00001.png") c.drawInlineImage(im, 256, 720, width=100, height=60) c = canvas.Canvas("report_image.pdf", pagesize=letter) generate_pdf(c) c.save() Traceback: Traceback (most recent call last): File "pdf2.py", line 14, in <module> generate_pdf(c) File "pdf2.py", line 11, in generate_pdf c.drawInlineImage(im, 256, 720, width=100, height=60) File "/usr/lib/python2.6/site-packages/reportlab-2.7-py2.6-linux-x86_64.egg/reportlab/pdfgen/canvas.py", line 837, in drawInlineImage img_obj = PDFImage(image, x,y, width, height) File "/usr/lib/python2.6/site-packages/reportlab-2.7-py2.6-linux-x86_64.egg/reportlab/pdfgen/pdfimages.py", line 42, in __init__ self.getImageData() File "/usr/lib/python2.6/site-packages/reportlab-2.7-py2.6-linux-x86_64.egg/reportlab/pdfgen/pdfimages.py", line 156, in getImageData imagedata, imgwidth, imgheight = self.PIL_imagedata() File "/usr/lib/python2.6/site-packages/reportlab-2.7-py2.6-linux-x86_64.egg/reportlab/pdfgen/pdfimages.py", line 117, in PIL_imagedata raw = myimage.tostring() File "/usr/lib/python2.6/site-packages/Pillow-3.2.0-py2.6-linux-x86_64.egg/PIL/Image.py", line 699, in tostring "Please call tobytes() instead.") Exception: tostring() has been removed. Please call tobytes() instead. So it seems to not be code related. I am running python on a server: Python 2.6.6 (r266:84292, Nov 21 2013, 10:50:32) [GCC 4.4.7 20120313 (Red Hat 4.4.7-4)] on linux2 Version of Pillow: Pillow-3.2.0-py2.6-linux-x86_64.egg Version of reportlab: reportlab-2.7-py2.6-linux-x86_64.egg I searched for this particular error without success, what can I do to solve this?
reportlab Image to PDF: &quot;please call tobytes()&quot; I'm trying to generate PDF's with Images. im = ImageReader('00001.png') c = canvas.Canvas('networkanalyze.pdf', pagesize=A4) c.drawImage(im, 10, 10, mask='auto') c.showPage() c.save() Traceback: Traceback (most recent call last): File "pdf.py", line 9, in <module> c.drawImage(im, 10, 10, mask='auto') File "/usr/lib/python2.6/site-packages/reportlab-2.7-py2.6-linux-x86_64.egg/reportlab/pdfgen/canvas.py", line 909, in drawImage rawdata = image.getRGBData() File "/usr/lib/python2.6/site-packages/reportlab-2.7-py2.6-linux-x86_64.egg/reportlab/lib/utils.py", line 656, in getRGBData annotateException('\nidentity=%s'%self.identity()) File "/usr/lib/python2.6/site-packages/reportlab-2.7-py2.6-linux-x86_64.egg/reportlab/lib/utils.py", line 653, in getRGBData self._data = im.tostring() File "/usr/lib/python2.6/site-packages/Pillow-3.2.0-py2.6-linux-x86_64.egg/PIL/Image.py", line 699, in tostring "Please call tobytes() instead.") Exception: tostring() has been removed. Please call tobytes() instead. 2nd Approach: def generate_pdf(c): """ letter :- (612.0, 792.0) """ im = Image.open("00001.png") c.drawInlineImage(im, 256, 720, width=100, height=60) c = canvas.Canvas("report_image.pdf", pagesize=letter) generate_pdf(c) c.save() Traceback: Traceback (most recent call last): File "pdf2.py", line 14, in <module> generate_pdf(c) File "pdf2.py", line 11, in generate_pdf c.drawInlineImage(im, 256, 720, width=100, height=60) File "/usr/lib/python2.6/site-packages/reportlab-2.7-py2.6-linux-x86_64.egg/reportlab/pdfgen/canvas.py", line 837, in drawInlineImage img_obj = PDFImage(image, x,y, width, height) File "/usr/lib/python2.6/site-packages/reportlab-2.7-py2.6-linux-x86_64.egg/reportlab/pdfgen/pdfimages.py", line 42, in __init__ self.getImageData() File "/usr/lib/python2.6/site-packages/reportlab-2.7-py2.6-linux-x86_64.egg/reportlab/pdfgen/pdfimages.py", line 156, in getImageData imagedata, imgwidth, imgheight = self.PIL_imagedata() File "/usr/lib/python2.6/site-packages/reportlab-2.7-py2.6-linux-x86_64.egg/reportlab/pdfgen/pdfimages.py", line 117, in PIL_imagedata raw = myimage.tostring() File "/usr/lib/python2.6/site-packages/Pillow-3.2.0-py2.6-linux-x86_64.egg/PIL/Image.py", line 699, in tostring "Please call tobytes() instead.") Exception: tostring() has been removed. Please call tobytes() instead. So it seems to not be code related. I am running python on a server: Python 2.6.6 (r266:84292, Nov 21 2013, 10:50:32) [GCC 4.4.7 20120313 (Red Hat 4.4.7-4)] on linux2 Version of Pillow: Pillow-3.2.0-py2.6-linux-x86_64.egg Version of reportlab: reportlab-2.7-py2.6-linux-x86_64.egg I searched for this particular error without success, what can I do to solve this?
python, pdf, rhel, reportlab, python-imaging-library
4
4,909
3
https://stackoverflow.com/questions/36592618/reportlab-image-to-pdf-please-call-tobytes
9,811,587
How to install C++11 C++0x header files on Redhat Enterprise
I moved my application to another Linux box, after compilation, it returns an error saying #include <atomic> can not be resolved. I guess the new GNU C++11 header files / libraries are not installed on new machine. My question is how can I install them? I am running on Redhat Enterprise, so yum install ? Thanks.
How to install C++11 C++0x header files on Redhat Enterprise I moved my application to another Linux box, after compilation, it returns an error saying #include <atomic> can not be resolved. I guess the new GNU C++11 header files / libraries are not installed on new machine. My question is how can I install them? I am running on Redhat Enterprise, so yum install ? Thanks.
c++, c++11, gnu, rhel
4
8,901
3
https://stackoverflow.com/questions/9811587/how-to-install-c11-c0x-header-files-on-redhat-enterprise
50,680,625
How can I offline install .NET Core and SDK on Linux (RHEL)?
I have to install .NET Core 2.0 and SDK on a Linux machine ( Red Hat Linux (RHEL) distribution) server, where there isn't any Internet connectivity. How can I do it?
How can I offline install .NET Core and SDK on Linux (RHEL)? I have to install .NET Core 2.0 and SDK on a Linux machine ( Red Hat Linux (RHEL) distribution) server, where there isn't any Internet connectivity. How can I do it?
.net, linux, .net-core, offline, rhel
4
6,846
3
https://stackoverflow.com/questions/50680625/how-can-i-offline-install-net-core-and-sdk-on-linux-rhel
48,824,572
I installed MySQL 8.x using yum, but I cannot find or reset the root password
I had to install mysql 8.0 because previous version were crashing. Now I'm struggling with setting root password. The default empty password doesn't work, I've tried root , mysql as passwords but they are not working. I've created the init file to reset password. Unfortunately, my passwords are not accepted, here is my log: 2018-02-16T10:12:22.962733Z 0 [Warning] [MY-010139] Changed limits: max_open_files: 5000 (requested 8161) 2018-02-16T10:12:22.962815Z 0 [Warning] [MY-010142] Changed limits: table_open_cache: 2419 (requested 4000) 2018-02-16T10:12:23.160066Z 0 [System] [MY-010116] /usr/sbin/mysqld (mysqld 8.0.4-rc-log) starting as process 20059 ... 2018-02-16T10:12:24.013727Z 0 [Warning] [MY-010068] CA certificate ca.pem is self signed. 2018-02-16T10:12:24.026122Z 0 [Warning] [MY-010319] Found invalid password for user: 'root@localhost'; Ignoring user 2018-02-16T10:12:24.043758Z 6 [Warning] [MY-010319] Found invalid password for user: 'root@localhost'; Ignoring user 2018-02-16T10:12:24.050668Z 0 [System] [MY-010931] /usr/sbin/mysqld: ready for connections. Version: '8.0.4-rc-log' socket: '/var/lib/mysql/mysql.sock' port: 3306 MySQL Community Server (GPL). Here is my current init file content: SET GLOBAL validate_password.policy = 'LOW'; UPDATE mysql.user SET authentication_string = PASSWORD('new_password'), password_expired = 'N' WHERE User = 'root' AND Host = 'localhost'; FLUSH PRIVILEGES; I've tried so much different passwords, none worked. I've tried to create passwords longer than 16 characters with special characters and numbers, nothing. Any advices what I could do to reset the password and actually start using DB?
I installed MySQL 8.x using yum, but I cannot find or reset the root password I had to install mysql 8.0 because previous version were crashing. Now I'm struggling with setting root password. The default empty password doesn't work, I've tried root , mysql as passwords but they are not working. I've created the init file to reset password. Unfortunately, my passwords are not accepted, here is my log: 2018-02-16T10:12:22.962733Z 0 [Warning] [MY-010139] Changed limits: max_open_files: 5000 (requested 8161) 2018-02-16T10:12:22.962815Z 0 [Warning] [MY-010142] Changed limits: table_open_cache: 2419 (requested 4000) 2018-02-16T10:12:23.160066Z 0 [System] [MY-010116] /usr/sbin/mysqld (mysqld 8.0.4-rc-log) starting as process 20059 ... 2018-02-16T10:12:24.013727Z 0 [Warning] [MY-010068] CA certificate ca.pem is self signed. 2018-02-16T10:12:24.026122Z 0 [Warning] [MY-010319] Found invalid password for user: 'root@localhost'; Ignoring user 2018-02-16T10:12:24.043758Z 6 [Warning] [MY-010319] Found invalid password for user: 'root@localhost'; Ignoring user 2018-02-16T10:12:24.050668Z 0 [System] [MY-010931] /usr/sbin/mysqld: ready for connections. Version: '8.0.4-rc-log' socket: '/var/lib/mysql/mysql.sock' port: 3306 MySQL Community Server (GPL). Here is my current init file content: SET GLOBAL validate_password.policy = 'LOW'; UPDATE mysql.user SET authentication_string = PASSWORD('new_password'), password_expired = 'N' WHERE User = 'root' AND Host = 'localhost'; FLUSH PRIVILEGES; I've tried so much different passwords, none worked. I've tried to create passwords longer than 16 characters with special characters and numbers, nothing. Any advices what I could do to reset the password and actually start using DB?
mysql, centos, yum, rhel, mysql-8.0
4
12,602
4
https://stackoverflow.com/questions/48824572/i-installed-mysql-8-x-using-yum-but-i-cannot-find-or-reset-the-root-password
3,358,869
Running Zend Framework on PHP 5.1.6 - patch or fix for ksort()?
I've built a ZF app using 1.10 for deployment on RHEL server in a corporate client, which has PHP 5.1.6. It won't run. I googled and now realise it's the version of PHP. I didn't realise ZF had a minimum requirement for PHP 5.2.4, and calls to HeadLink seem to be causing fatal error "Call to undefined method Zend_View_Helper_Placeholder_Container::ksort()": PHP Fatal error: Call to undefined method Zend_View_Helper_Placeholder_Container::ksort() in /library/ Zend/View/Helper/HeadLink.php on line 321 The client won't upgrade their PHP; I don't want to rewrite the app without ZF, and I'd rather not downgrade ZF to a grossly earlier version. Is there some patch I can use to add ksort() to ZF 1.10 to get around this? There may be other problems, but this is where I'm stuck right now. Any advice welcome Many thanks Ian EDIT: As I say in a comment below, I expect many people have hit this before and will keep on doing so as RHEL5 will be a standard in corporate environments for a good time to come. I was hoping for a link to an existing solution rather having to devise one from scratch. UPDATE: I used the patch linked to in the accepted answer and it fixed the problem for me. This is adding the following public method to Zend/View/Helper/Placeholder/Container/Abstract.php /** * Sort the array by key * * @return array */ public function ksort() { $items = $this->getArrayCopy(); return ksort($items); } There was one remaining issue; a PHP notice caused by a string conversion in Zend_View_Helper_Doctype. Comparing this function to similar ones above and below, this seems to be an error in the library public function isHtml5() { return (stristr($this->doctype(), '<!DOCTYPE html>') ? true : false); } Changed to: public function isHtml5() { return (stristr($this->getDoctype(), '<!DOCTYPE html>') ? true : false); } Patching the library itself was the last thing I would normally do, but in this case it got me out of a spot. We'll make sure the patch is versioned in the repo and documented obviously for future developers.
Running Zend Framework on PHP 5.1.6 - patch or fix for ksort()? I've built a ZF app using 1.10 for deployment on RHEL server in a corporate client, which has PHP 5.1.6. It won't run. I googled and now realise it's the version of PHP. I didn't realise ZF had a minimum requirement for PHP 5.2.4, and calls to HeadLink seem to be causing fatal error "Call to undefined method Zend_View_Helper_Placeholder_Container::ksort()": PHP Fatal error: Call to undefined method Zend_View_Helper_Placeholder_Container::ksort() in /library/ Zend/View/Helper/HeadLink.php on line 321 The client won't upgrade their PHP; I don't want to rewrite the app without ZF, and I'd rather not downgrade ZF to a grossly earlier version. Is there some patch I can use to add ksort() to ZF 1.10 to get around this? There may be other problems, but this is where I'm stuck right now. Any advice welcome Many thanks Ian EDIT: As I say in a comment below, I expect many people have hit this before and will keep on doing so as RHEL5 will be a standard in corporate environments for a good time to come. I was hoping for a link to an existing solution rather having to devise one from scratch. UPDATE: I used the patch linked to in the accepted answer and it fixed the problem for me. This is adding the following public method to Zend/View/Helper/Placeholder/Container/Abstract.php /** * Sort the array by key * * @return array */ public function ksort() { $items = $this->getArrayCopy(); return ksort($items); } There was one remaining issue; a PHP notice caused by a string conversion in Zend_View_Helper_Doctype. Comparing this function to similar ones above and below, this seems to be an error in the library public function isHtml5() { return (stristr($this->doctype(), '<!DOCTYPE html>') ? true : false); } Changed to: public function isHtml5() { return (stristr($this->getDoctype(), '<!DOCTYPE html>') ? true : false); } Patching the library itself was the last thing I would normally do, but in this case it got me out of a spot. We'll make sure the patch is versioned in the repo and documented obviously for future developers.
php, zend-framework, rhel
4
2,082
2
https://stackoverflow.com/questions/3358869/running-zend-framework-on-php-5-1-6-patch-or-fix-for-ksort
34,633,287
RPM spec %post doesn&#39;t execute in rpmbuild
Given the minimal RPM spec file, that should only execute a %post stanza: $ cat ~/RPMBUILD/SPECS/test.spec Name: None Version: 1.0 Release: 1 Summary: Bla License: Proprietary %description Bla %prep %build %install %clean %post echo ">>> Inside post <<<" %files However, the echo from the %post is not executed: $ rpmbuild -v -bb ~/RPMBUILD/SPECS/test.spec Executing(%prep): /bin/sh -e /home/ronbarak/RPMBUILD/tmp/rpm-tmp.IvhCZs + umask 022 + cd /home/ronbarak/RPMBUILD/BUILD + LANG=C + export LANG + unset DISPLAY + exit 0 Executing(%build): /bin/sh -e /home/ronbarak/RPMBUILD/tmp/rpm-tmp.yCLpOK + umask 022 + cd /home/ronbarak/RPMBUILD/BUILD + LANG=C + export LANG + unset DISPLAY + exit 0 Executing(%install): /bin/sh -e /home/ronbarak/RPMBUILD/tmp/rpm-tmp.uEbSD2 + umask 022 + cd /home/ronbarak/RPMBUILD/BUILD + '[' /home/ronbarak/RPMBUILD/BUILDROOT/None-1.0-1.x86_64 '!=' / ']' + rm -rf /home/ronbarak/RPMBUILD/BUILDROOT/None-1.0-1.x86_64 ++ dirname /home/ronbarak/RPMBUILD/BUILDROOT/None-1.0-1.x86_64 + mkdir -p /home/ronbarak/RPMBUILD/BUILDROOT + mkdir /home/ronbarak/RPMBUILD/BUILDROOT/None-1.0-1.x86_64 + LANG=C + export LANG + unset DISPLAY + /usr/lib/rpm/check-buildroot + /usr/lib/rpm/redhat/brp-compress + /usr/lib/rpm/redhat/brp-strip /usr/bin/strip + /usr/lib/rpm/redhat/brp-strip-static-archive /usr/bin/strip + /usr/lib/rpm/redhat/brp-strip-comment-note /usr/bin/strip /usr/bin/objdump + /usr/lib/rpm/brp-python-bytecompile + /usr/lib/rpm/redhat/brp-python-hardlink + /usr/lib/rpm/redhat/brp-java-repack-jars Processing files: None-1.0-1.x86_64 Checking for unpackaged file(s): /usr/lib/rpm/check-files /home/ronbarak/RPMBUILD/BUILDROOT/None-1.0-1.x86_64 Wrote: /home/ronbarak/RPMBUILD/RPMS/x86_64/None-1.0-1.x86_64.rpm Executing(%clean): /bin/sh -e /home/ronbarak/RPMBUILD/tmp/rpm-tmp.wLCv3C + umask 022 + cd /home/ronbarak/RPMBUILD/BUILD + exit 0 What should I change so that the %post will execute?
RPM spec %post doesn&#39;t execute in rpmbuild Given the minimal RPM spec file, that should only execute a %post stanza: $ cat ~/RPMBUILD/SPECS/test.spec Name: None Version: 1.0 Release: 1 Summary: Bla License: Proprietary %description Bla %prep %build %install %clean %post echo ">>> Inside post <<<" %files However, the echo from the %post is not executed: $ rpmbuild -v -bb ~/RPMBUILD/SPECS/test.spec Executing(%prep): /bin/sh -e /home/ronbarak/RPMBUILD/tmp/rpm-tmp.IvhCZs + umask 022 + cd /home/ronbarak/RPMBUILD/BUILD + LANG=C + export LANG + unset DISPLAY + exit 0 Executing(%build): /bin/sh -e /home/ronbarak/RPMBUILD/tmp/rpm-tmp.yCLpOK + umask 022 + cd /home/ronbarak/RPMBUILD/BUILD + LANG=C + export LANG + unset DISPLAY + exit 0 Executing(%install): /bin/sh -e /home/ronbarak/RPMBUILD/tmp/rpm-tmp.uEbSD2 + umask 022 + cd /home/ronbarak/RPMBUILD/BUILD + '[' /home/ronbarak/RPMBUILD/BUILDROOT/None-1.0-1.x86_64 '!=' / ']' + rm -rf /home/ronbarak/RPMBUILD/BUILDROOT/None-1.0-1.x86_64 ++ dirname /home/ronbarak/RPMBUILD/BUILDROOT/None-1.0-1.x86_64 + mkdir -p /home/ronbarak/RPMBUILD/BUILDROOT + mkdir /home/ronbarak/RPMBUILD/BUILDROOT/None-1.0-1.x86_64 + LANG=C + export LANG + unset DISPLAY + /usr/lib/rpm/check-buildroot + /usr/lib/rpm/redhat/brp-compress + /usr/lib/rpm/redhat/brp-strip /usr/bin/strip + /usr/lib/rpm/redhat/brp-strip-static-archive /usr/bin/strip + /usr/lib/rpm/redhat/brp-strip-comment-note /usr/bin/strip /usr/bin/objdump + /usr/lib/rpm/brp-python-bytecompile + /usr/lib/rpm/redhat/brp-python-hardlink + /usr/lib/rpm/redhat/brp-java-repack-jars Processing files: None-1.0-1.x86_64 Checking for unpackaged file(s): /usr/lib/rpm/check-files /home/ronbarak/RPMBUILD/BUILDROOT/None-1.0-1.x86_64 Wrote: /home/ronbarak/RPMBUILD/RPMS/x86_64/None-1.0-1.x86_64.rpm Executing(%clean): /bin/sh -e /home/ronbarak/RPMBUILD/tmp/rpm-tmp.wLCv3C + umask 022 + cd /home/ronbarak/RPMBUILD/BUILD + exit 0 What should I change so that the %post will execute?
rpm, rhel, rpmbuild, rpm-spec
4
6,996
2
https://stackoverflow.com/questions/34633287/rpm-spec-post-doesnt-execute-in-rpmbuild
17,348,885
Getting a single digit integer for RHEL version using SED or AWK
I can get the 5.8 or 6.4 number from looking at /etc/redhat-release , but I don't know how to get it converted from 5.8 to just 5 . The command I'm using so far is: cat /etc/redhat-release | awk {'print $7'} Which produces the 5.8 . How would I go about getting the single digit integer from that using bash?
Getting a single digit integer for RHEL version using SED or AWK I can get the 5.8 or 6.4 number from looking at /etc/redhat-release , but I don't know how to get it converted from 5.8 to just 5 . The command I'm using so far is: cat /etc/redhat-release | awk {'print $7'} Which produces the 5.8 . How would I go about getting the single digit integer from that using bash?
bash, integer, converters, rhel
4
944
2
https://stackoverflow.com/questions/17348885/getting-a-single-digit-integer-for-rhel-version-using-sed-or-awk
13,192,717
How Can I install ruby on Redhat? ruby package not found
I dont' know why I cannot install ruby through yum in my RHEL6.2 How can I fix it. I don't wanna install through source. Any idea? [root@kithost ~]# yum install ruby Loaded plugins: product-id, refresh-packagekit, security, subscription-manager Updating certificate-based repositories. Setting up Install Process No package ruby available. Error: Nothing to do RVM is a solution but it is not that I want. What I want to know is that once we can't find any package from yum, what kind of thing should we fix into order to let yum find it?
How Can I install ruby on Redhat? ruby package not found I dont' know why I cannot install ruby through yum in my RHEL6.2 How can I fix it. I don't wanna install through source. Any idea? [root@kithost ~]# yum install ruby Loaded plugins: product-id, refresh-packagekit, security, subscription-manager Updating certificate-based repositories. Setting up Install Process No package ruby available. Error: Nothing to do RVM is a solution but it is not that I want. What I want to know is that once we can't find any package from yum, what kind of thing should we fix into order to let yum find it?
ruby, rhel
4
19,534
3
https://stackoverflow.com/questions/13192717/how-can-i-install-ruby-on-redhat-ruby-package-not-found
7,426,865
Hadoop namenode rejecting connections!? What am I doing wrong?
My configuration: Server-class machine cluster (4 machines), each with RHEL, 8GB RAM, quad core processors. I setup machine 'B1' to be the master, rest of 'em as slaves (B2,B3,B4). Kicked off dfs-start.sh, name node came up on 53410 on B1. Rest of the nodes are not able to connect to B1 on 53410! Here's what I did so far: Tried "telnet B1 53410" from B2, B3, B4 - Connection refused. Tried ssh to B1 from B2,B3,B4 and viceversa - no problem, works fine. Changed 53410 to 55410, restarted dfs, same issue - connection refused on this port too. Disabled firewall (iptables stop) on B1 - tried connecting from B2,B3,B4 - fails on telnet. Disabled firewall on all nodes, tried again, fails again to connect to 53410. Checked ftp was working from B2,B3,B4 to B1, stopped ftp service (service vsftpd stop), tried bringing up dfs on standard ftp port (21), namenode comes up, rest of the nodes are failing again. Can't even telnet to the ftp port from B2,B3,B4. "telnet localhost 53410" works fine on B1. All nodes are reachable from one another and all /etc/hosts are setup with correct mapping for ip addresses. So, I am pretty much clueless at this point. Why on earth would the namenode reject connections - is there a setting in hadoop conf, that I should be aware of to allow external clients connect remotely on the namenode port?
Hadoop namenode rejecting connections!? What am I doing wrong? My configuration: Server-class machine cluster (4 machines), each with RHEL, 8GB RAM, quad core processors. I setup machine 'B1' to be the master, rest of 'em as slaves (B2,B3,B4). Kicked off dfs-start.sh, name node came up on 53410 on B1. Rest of the nodes are not able to connect to B1 on 53410! Here's what I did so far: Tried "telnet B1 53410" from B2, B3, B4 - Connection refused. Tried ssh to B1 from B2,B3,B4 and viceversa - no problem, works fine. Changed 53410 to 55410, restarted dfs, same issue - connection refused on this port too. Disabled firewall (iptables stop) on B1 - tried connecting from B2,B3,B4 - fails on telnet. Disabled firewall on all nodes, tried again, fails again to connect to 53410. Checked ftp was working from B2,B3,B4 to B1, stopped ftp service (service vsftpd stop), tried bringing up dfs on standard ftp port (21), namenode comes up, rest of the nodes are failing again. Can't even telnet to the ftp port from B2,B3,B4. "telnet localhost 53410" works fine on B1. All nodes are reachable from one another and all /etc/hosts are setup with correct mapping for ip addresses. So, I am pretty much clueless at this point. Why on earth would the namenode reject connections - is there a setting in hadoop conf, that I should be aware of to allow external clients connect remotely on the namenode port?
java, linux, hadoop, port, rhel
4
5,837
4
https://stackoverflow.com/questions/7426865/hadoop-namenode-rejecting-connections-what-am-i-doing-wrong
45,065,707
Unable to execute binary file in Docker container (&quot;Operation not permitted&quot;)
Problem I am building a Docker container (based on RHEL) that includes a custom binary from a third-party repository. When executing the binary in the container, I receive a nondescript error: " Operation not permitted ". Analysis Dockerfile The Dockerfile is fairly simple. FROM dockerregistry.example.com/rhel7:latest RUN yum -y install \ curl \ custom-package && \ curl -Lsq [URL] > /sbin/dumb-init && \ chmod 755 /sbin/dumb-init && \ yum clean all ADD custom-package.conf /etc/custom-package/custom-package.conf ENTRYPOINT ["/sbin/dumb-init", "--"] CMD ["/usr/local/custom-package/bin/custom-package", "--config", "/etc/custom-package/custom-package.conf"] Building the image I build and enter the container on my workstation using the following commands. $ docker build -t custom-package:v1 . $ docker run --security-opt seccomp:unconfined -d custom-package:v1 tail -f /dev/null $ docker exec -it <image ID> /bin/bash "Operation not permitted" Once I'm inside the image, if I try executing the binary, I receive an extremely unhelpful error. Running strace also gives a confusing output. On inspecting file permissions and metadata, it appears to be fine. # /usr/local/telegraf/bin/telegraf bash: /usr/local/telegraf/bin/telegraf: Operation not permitted # strace -f /usr/local/telegraf/bin/telegraf execve("/usr/local/telegraf/bin/telegraf", ["/usr/local/telegraf/bin/telegraf"], [/* 17 vars */]) = -1 EPERM (Operation not permitted) write(2, "strace: exec: Operation not perm"..., 38strace: exec: Operation not permitted ) = 38 exit_group(1) = ? +++ exited with 1 +++ # ls -l /usr/local/telegraf/bin/telegraf -rwxr-xr-x 1 telegraf telegraf 38664736 Jun 3 15:41 /usr/local/telegraf/bin/telegraf # getcap -v /usr/local/telegraf/bin/telegraf /usr/local/telegraf/bin/telegraf = cap_sys_rawio+ep I am unable to collect enough information to debug my container and why the executable binary isn't working. Is there something that stands out as wrong or a reason why I would receive an unhelpful error like this? Thanks!
Unable to execute binary file in Docker container (&quot;Operation not permitted&quot;) Problem I am building a Docker container (based on RHEL) that includes a custom binary from a third-party repository. When executing the binary in the container, I receive a nondescript error: " Operation not permitted ". Analysis Dockerfile The Dockerfile is fairly simple. FROM dockerregistry.example.com/rhel7:latest RUN yum -y install \ curl \ custom-package && \ curl -Lsq [URL] > /sbin/dumb-init && \ chmod 755 /sbin/dumb-init && \ yum clean all ADD custom-package.conf /etc/custom-package/custom-package.conf ENTRYPOINT ["/sbin/dumb-init", "--"] CMD ["/usr/local/custom-package/bin/custom-package", "--config", "/etc/custom-package/custom-package.conf"] Building the image I build and enter the container on my workstation using the following commands. $ docker build -t custom-package:v1 . $ docker run --security-opt seccomp:unconfined -d custom-package:v1 tail -f /dev/null $ docker exec -it <image ID> /bin/bash "Operation not permitted" Once I'm inside the image, if I try executing the binary, I receive an extremely unhelpful error. Running strace also gives a confusing output. On inspecting file permissions and metadata, it appears to be fine. # /usr/local/telegraf/bin/telegraf bash: /usr/local/telegraf/bin/telegraf: Operation not permitted # strace -f /usr/local/telegraf/bin/telegraf execve("/usr/local/telegraf/bin/telegraf", ["/usr/local/telegraf/bin/telegraf"], [/* 17 vars */]) = -1 EPERM (Operation not permitted) write(2, "strace: exec: Operation not perm"..., 38strace: exec: Operation not permitted ) = 38 exit_group(1) = ? +++ exited with 1 +++ # ls -l /usr/local/telegraf/bin/telegraf -rwxr-xr-x 1 telegraf telegraf 38664736 Jun 3 15:41 /usr/local/telegraf/bin/telegraf # getcap -v /usr/local/telegraf/bin/telegraf /usr/local/telegraf/bin/telegraf = cap_sys_rawio+ep I am unable to collect enough information to debug my container and why the executable binary isn't working. Is there something that stands out as wrong or a reason why I would receive an unhelpful error like this? Thanks!
bash, docker, centos, dockerfile, rhel
4
7,087
1
https://stackoverflow.com/questions/45065707/unable-to-execute-binary-file-in-docker-container-operation-not-permitted
35,951,506
Running Gulp in background always
I have to maintain a AngularJS/Node.js application which uses Gulp with browserify. I cannot install npm on server so I unzipped node x64 and added it to the path. The code is compiled locally with node_modules in the code folder. We are unzipping it into a folder in server and executing the gulp serve & . The process starts fine, however exits as soon as the user is logged out. Kindly suggest the best way to resolve this issue.
Running Gulp in background always I have to maintain a AngularJS/Node.js application which uses Gulp with browserify. I cannot install npm on server so I unzipped node x64 and added it to the path. The code is compiled locally with node_modules in the code folder. We are unzipping it into a folder in server and executing the gulp serve & . The process starts fine, however exits as soon as the user is logged out. Kindly suggest the best way to resolve this issue.
angularjs, node.js, gulp, rhel
4
4,368
2
https://stackoverflow.com/questions/35951506/running-gulp-in-background-always
31,161,063
AWS EC2 RHEL 7.1 console output doesn&#39;t show cloud-init&#39;s output
It seems that the instances started from RHEL 7.1 AMIs does not write the SSH fingerprint into the system log (exactly nothing from cloud-init's output), therefore I can't use the 'Get System Log' menu on AWS UI or the command line tool to figure out the ssh fingerprint of the launched server. On Centos 7 it works by default. Can it be an issue with the cloud-init config or is it something else? Cloud-init runs successfully, the logs are present in /var/log after SSH-ing.
AWS EC2 RHEL 7.1 console output doesn&#39;t show cloud-init&#39;s output It seems that the instances started from RHEL 7.1 AMIs does not write the SSH fingerprint into the system log (exactly nothing from cloud-init's output), therefore I can't use the 'Get System Log' menu on AWS UI or the command line tool to figure out the ssh fingerprint of the launched server. On Centos 7 it works by default. Can it be an issue with the cloud-init config or is it something else? Cloud-init runs successfully, the logs are present in /var/log after SSH-ing.
amazon-web-services, amazon-ec2, rhel, cloud-init, rhel7
4
1,202
1
https://stackoverflow.com/questions/31161063/aws-ec2-rhel-7-1-console-output-doesnt-show-cloud-inits-output
53,871,808
Installing matplotlib using pip RHEL getting error &quot;Cannot uninstall &#39;pyparsing&#39; &quot;
I am currently using RHEL7 and am trying to install matplotlib. When ever i have attempted to do python -m pip install -U matplotlib or pip install matplotlib I get the error message " Cannot uninstall 'pyparsing'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall ." Any help would be greatly appreciated, and if you need more information I can provide it.
Installing matplotlib using pip RHEL getting error &quot;Cannot uninstall &#39;pyparsing&#39; &quot; I am currently using RHEL7 and am trying to install matplotlib. When ever i have attempted to do python -m pip install -U matplotlib or pip install matplotlib I get the error message " Cannot uninstall 'pyparsing'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall ." Any help would be greatly appreciated, and if you need more information I can provide it.
python, matplotlib, pip, rhel
4
2,966
1
https://stackoverflow.com/questions/53871808/installing-matplotlib-using-pip-rhel-getting-error-cannot-uninstall-pyparsing
52,780,825
RHEL Developer subscription not finding repos
I've been signed up for the Redhat Developer program for a while. I needed to do some tests in the RHEL 7.5 VM that had been working with the subscription program. When I reverted and did an update, I was able to get updates. However, I need to access some items via the downloads and had to change password on the site. I unregistered my subscription and re-registered using new password. Now when I use subscription manager to list repos. It says returns: $ sudo subscription-manager repos --list This system has no repositories available through subscriptions. It seems as though I have nothing but problems with subscription-manager. Is there something that I'm doing wrong with the Developer program?
RHEL Developer subscription not finding repos I've been signed up for the Redhat Developer program for a while. I needed to do some tests in the RHEL 7.5 VM that had been working with the subscription program. When I reverted and did an update, I was able to get updates. However, I need to access some items via the downloads and had to change password on the site. I unregistered my subscription and re-registered using new password. Now when I use subscription manager to list repos. It says returns: $ sudo subscription-manager repos --list This system has no repositories available through subscriptions. It seems as though I have nothing but problems with subscription-manager. Is there something that I'm doing wrong with the Developer program?
rhel
4
6,325
1
https://stackoverflow.com/questions/52780825/rhel-developer-subscription-not-finding-repos
34,762,680
Restrict kill commands when running jar file using a shell script
I have a jar file which is a program which accept user input and processes it. I am running this jar file using the below shell script: PR=basename $0 cdt=date +'%H:%M:%S %d/%m/%Y' cd $HOME/myprogram java -cp $HOME/myprogram/ifxjdbc.jar:$HOME/myprogram/jarprogram.jar:. MyProgram $@ cdt=date +'%H:%M:%S %d/%m/%Y' The problem I am facing with this is, I want to restrict the user from exiting the application using any of the combinations of the below commands. For example: Ctrl + z Ctrl + c Ctrl + break Please help me.
Restrict kill commands when running jar file using a shell script I have a jar file which is a program which accept user input and processes it. I am running this jar file using the below shell script: PR=basename $0 cdt=date +'%H:%M:%S %d/%m/%Y' cd $HOME/myprogram java -cp $HOME/myprogram/ifxjdbc.jar:$HOME/myprogram/jarprogram.jar:. MyProgram $@ cdt=date +'%H:%M:%S %d/%m/%Y' The problem I am facing with this is, I want to restrict the user from exiting the application using any of the combinations of the below commands. For example: Ctrl + z Ctrl + c Ctrl + break Please help me.
java, linux, shell, rhel, bash-trap
4
634
2
https://stackoverflow.com/questions/34762680/restrict-kill-commands-when-running-jar-file-using-a-shell-script
15,858,837
How to disable CPACK_PACKAGE_VERSION_PATCH in CMakeLists.txt?
I am still a CMake newbie (started learning 3 days ago). In my current CMakeLists.txt , I have the following set directives: [...] SET(CPACK_GENERATOR "RPM") SET(CPACK_PACKAGE_VERSION_MAJOR "3") SET(CPACK_PACKAGE_VERSION_MINOR "3") SET(CPACK_PACKAGE_VERSION_PATCH "svn") SET(CPACK_SYSTEM_NAME "0.el6.x86_64") [...] Once I run make package , I got a libcxx-3.3.svn-0.el6.x86_64.rpm . But IMHO this is "cheating". According to [URL] , ideally I should be able to generate a libcxx-3.3-0.el6.x86_64.rpm instead. But this demands that CPack not to show the CPACK_PACKAGE_VERSION_PATCH . Nevertheless, according to my trial results, it doesn't seem to be feasible. I would appreciate a hint as to how.
How to disable CPACK_PACKAGE_VERSION_PATCH in CMakeLists.txt? I am still a CMake newbie (started learning 3 days ago). In my current CMakeLists.txt , I have the following set directives: [...] SET(CPACK_GENERATOR "RPM") SET(CPACK_PACKAGE_VERSION_MAJOR "3") SET(CPACK_PACKAGE_VERSION_MINOR "3") SET(CPACK_PACKAGE_VERSION_PATCH "svn") SET(CPACK_SYSTEM_NAME "0.el6.x86_64") [...] Once I run make package , I got a libcxx-3.3.svn-0.el6.x86_64.rpm . But IMHO this is "cheating". According to [URL] , ideally I should be able to generate a libcxx-3.3-0.el6.x86_64.rpm instead. But this demands that CPack not to show the CPACK_PACKAGE_VERSION_PATCH . Nevertheless, according to my trial results, it doesn't seem to be feasible. I would appreciate a hint as to how.
cmake, fedora, rpm, rhel, cpack
4
1,533
1
https://stackoverflow.com/questions/15858837/how-to-disable-cpack-package-version-patch-in-cmakelists-txt
4,819,834
git push over sshfs failing with &quot;error when closing sha1 file: Bad file descriptor&quot;
We are mounting a filesystem over SSH using sshfs and are using it as a remote storage for git repository collaboration. Mac OSX 10.6.6 to a RHEL 3 server SSHFS version 2.2 (MacFUSE SSHFS 2.2.0) MacFUSE library version: FUSE 2.7.3 / MacFUSE 2.0.3 sshfs -o workaround=rename gituser@gitserver.ourdomain.com:/path/to/directory ~/git Here's how we're creating our repo's, working with them locally, then trying to push back to the server: cd ~/git/mypersonaluser git init --bare --share mynewrepo.git git clone ~/git/mypersonaluser/mynewrepo.git ~/Desktop/mynewrepo cd ~/Desktop/mynewrepo ... make a few edits to the repo ... git push origin master Counting objects: 7, done. Delta compression using up to 2 threads. Compressing objects: 100% (4/4), done. Writing objects: 100% (4/4), 20.82 KiB | 23 KiB/s, done. Total 4 (delta 1), reused 0 (delta 0) fatal: error when closing sha1 file: Bad file descriptor error: unpack failed: unpack-objects abnormal exit To /Users/joebob/git/mypersonaluser/mynewrepo.git/ ! [remote rejected] master -> master (n/a (unpacker error)) error: failed to push some refs to '/Users/joebob/git/mypersonaluser/mynewrepo.git/' What's weird is it appears that small edits to the repo push successfully, but that larger commits with multiple new files or large amounts of edits do not work. We're sshfs and MacFuse newbies, but intermediate git users. Any ideas or suggestions?
git push over sshfs failing with &quot;error when closing sha1 file: Bad file descriptor&quot; We are mounting a filesystem over SSH using sshfs and are using it as a remote storage for git repository collaboration. Mac OSX 10.6.6 to a RHEL 3 server SSHFS version 2.2 (MacFUSE SSHFS 2.2.0) MacFUSE library version: FUSE 2.7.3 / MacFUSE 2.0.3 sshfs -o workaround=rename gituser@gitserver.ourdomain.com:/path/to/directory ~/git Here's how we're creating our repo's, working with them locally, then trying to push back to the server: cd ~/git/mypersonaluser git init --bare --share mynewrepo.git git clone ~/git/mypersonaluser/mynewrepo.git ~/Desktop/mynewrepo cd ~/Desktop/mynewrepo ... make a few edits to the repo ... git push origin master Counting objects: 7, done. Delta compression using up to 2 threads. Compressing objects: 100% (4/4), done. Writing objects: 100% (4/4), 20.82 KiB | 23 KiB/s, done. Total 4 (delta 1), reused 0 (delta 0) fatal: error when closing sha1 file: Bad file descriptor error: unpack failed: unpack-objects abnormal exit To /Users/joebob/git/mypersonaluser/mynewrepo.git/ ! [remote rejected] master -> master (n/a (unpacker error)) error: failed to push some refs to '/Users/joebob/git/mypersonaluser/mynewrepo.git/' What's weird is it appears that small edits to the repo push successfully, but that larger commits with multiple new files or large amounts of edits do not work. We're sshfs and MacFuse newbies, but intermediate git users. Any ideas or suggestions?
git, macos, rhel, sshfs
4
2,951
2
https://stackoverflow.com/questions/4819834/git-push-over-sshfs-failing-with-error-when-closing-sha1-file-bad-file-descrip
64,308,704
what is the formal latest python3 installtion on rhel 7.X servers
I am very confused after searching a while in google , we found many sites that explain how to install python 3 on rhel 7 I want to explain our needs we have productions servers , and we want now to add python 3 on all servers the current python version is python 2.7.5 I also searched on REDHAT sites , but not found formal documentation about latest python 3.x version what I found is the following site/post [URL] we tried it , and we installed successfully the python 3.x version but the question is , that we not sure if we can trust this post and the python packages since we are talking on very important and secured servers , we want to be sure about the python 3 installation please advice - what are the best way to install python 3 on rhel 7.x servers ( better with yum ) we cant download the following rpm's yum repolist rhel-7-server-optional-rpms/7Server/x86_64 Red Hat Enterprise Linux 7 Server - Optional (RPMs) 22,108 rhel-7-server-rpms/7Server/x86_64 Red Hat Enterprise Linux 7 Server (RPMs) 30,607 rhel-server-rhscl-7-rpms/7Server/x86_64 Red Hat Software Collections RPMs for Red Hat Enterprise Linux 7 Server yumdownloader install rh-python38-numpy rh-python38-scipy rh-python38-python-tools rh-python38-python-six Loaded plugins: langpacks, product-id No Match for argument install No Match for argument rh-python38-numpy No Match for argument rh-python38-scipy No Match for argument rh-python38-python-tools rh-python38-python-six-1.12.0-10.el7.noarch.rpm
what is the formal latest python3 installtion on rhel 7.X servers I am very confused after searching a while in google , we found many sites that explain how to install python 3 on rhel 7 I want to explain our needs we have productions servers , and we want now to add python 3 on all servers the current python version is python 2.7.5 I also searched on REDHAT sites , but not found formal documentation about latest python 3.x version what I found is the following site/post [URL] we tried it , and we installed successfully the python 3.x version but the question is , that we not sure if we can trust this post and the python packages since we are talking on very important and secured servers , we want to be sure about the python 3 installation please advice - what are the best way to install python 3 on rhel 7.x servers ( better with yum ) we cant download the following rpm's yum repolist rhel-7-server-optional-rpms/7Server/x86_64 Red Hat Enterprise Linux 7 Server - Optional (RPMs) 22,108 rhel-7-server-rpms/7Server/x86_64 Red Hat Enterprise Linux 7 Server (RPMs) 30,607 rhel-server-rhscl-7-rpms/7Server/x86_64 Red Hat Software Collections RPMs for Red Hat Enterprise Linux 7 Server yumdownloader install rh-python38-numpy rh-python38-scipy rh-python38-python-tools rh-python38-python-six Loaded plugins: langpacks, product-id No Match for argument install No Match for argument rh-python38-numpy No Match for argument rh-python38-scipy No Match for argument rh-python38-python-tools rh-python38-python-six-1.12.0-10.el7.noarch.rpm
python, python-3.x, python-2.7, yum, rhel
4
20,537
1
https://stackoverflow.com/questions/64308704/what-is-the-formal-latest-python3-installtion-on-rhel-7-x-servers
6,815,330
Weblogic not clearing cache
We have installed Weblogic 10.3.1.0 on a RHEL (linux) machine. Recently a new version of an application was uploaded to the Weblogic. Unfortunately the new changes are not reflecting. I am told by the environments team that they did clear the /opt/BAE_Weblogic/WL_DOMAIN/servers/AdminServer/tmp/_WL_user/our_application folder before deploying. I have checked the following folders and I don't see any old files there: /tmp/_WL_user/AFM2.2.24M2/ths7y1/war /tmp/_WL_user/AFM2.2.24M2/ths7y1/public domains/DOMAIN/servers/AdminServer/cache Is there something that I am missing.
Weblogic not clearing cache We have installed Weblogic 10.3.1.0 on a RHEL (linux) machine. Recently a new version of an application was uploaded to the Weblogic. Unfortunately the new changes are not reflecting. I am told by the environments team that they did clear the /opt/BAE_Weblogic/WL_DOMAIN/servers/AdminServer/tmp/_WL_user/our_application folder before deploying. I have checked the following folders and I don't see any old files there: /tmp/_WL_user/AFM2.2.24M2/ths7y1/war /tmp/_WL_user/AFM2.2.24M2/ths7y1/public domains/DOMAIN/servers/AdminServer/cache Is there something that I am missing.
caching, jakarta-ee, jar, weblogic, rhel
4
25,291
2
https://stackoverflow.com/questions/6815330/weblogic-not-clearing-cache
64,237,287
How to find a YAML value from Bash using PyYAML
I'm testing the feasibility of using PyYAML v3.12 within a RHEL7 environment to parse the contents of moderately complex YAML config files, by feeding it a key and getting the keypair value back. The query would look something like this python my_yaml_search.py key_to_search and having it print back the value , for example: Desired bash command: python search_yaml.py $servername Desired response (value only, not key-value): myServer14 So far I've created the following .py: import sys import yaml key = sys.argv[1] with open("config.yml") as f: try: data = yaml.safe_load(f) for k, v in data.items(): if data[k].has_key(key): print data[k][v] except yaml.YAMLError as exc: print "Error: key not found in YAML" config.yml: --- server: servername: myServer14 filename: testfile.zip location: [URL] repo: server_name_fqdn: server.name.fqdn.com port: 1234 So far, running python search_yaml.py $servername produces a list index out of range ; python search_yaml.py servername produces nothing. I'm new to Python/PyYAML, so I assume I'm likely passing in a variable to the program incorrectly and sys might not be the Python library I need, however I'm hitting a brick wall on how to do this correctly - any input would save my sanity.
How to find a YAML value from Bash using PyYAML I'm testing the feasibility of using PyYAML v3.12 within a RHEL7 environment to parse the contents of moderately complex YAML config files, by feeding it a key and getting the keypair value back. The query would look something like this python my_yaml_search.py key_to_search and having it print back the value , for example: Desired bash command: python search_yaml.py $servername Desired response (value only, not key-value): myServer14 So far I've created the following .py: import sys import yaml key = sys.argv[1] with open("config.yml") as f: try: data = yaml.safe_load(f) for k, v in data.items(): if data[k].has_key(key): print data[k][v] except yaml.YAMLError as exc: print "Error: key not found in YAML" config.yml: --- server: servername: myServer14 filename: testfile.zip location: [URL] repo: server_name_fqdn: server.name.fqdn.com port: 1234 So far, running python search_yaml.py $servername produces a list index out of range ; python search_yaml.py servername produces nothing. I'm new to Python/PyYAML, so I assume I'm likely passing in a variable to the program incorrectly and sys might not be the Python library I need, however I'm hitting a brick wall on how to do this correctly - any input would save my sanity.
python, bash, shell, rhel, pyyaml
4
1,060
1
https://stackoverflow.com/questions/64237287/how-to-find-a-yaml-value-from-bash-using-pyyaml
60,982,717
Shiny Server missing charts generated by R markdown file
I have an R markdown file which I'd like to be available on my corporate Shiny Server. According to R Markdown: The Definitive Guide I can add runtime: shiny to the YAML metadata at the top of the Rmd file to turn it into a Shiny document. I have done this and it works. If I click "Run Document" in RStudio it will run the Rmd and I will see the report with no problems. My project is located in the ShinyApps directory where the Shiny Server is looking for apps to serve. When I hit the URL for this project I get the report without any charts . I just get broken image icons where the charts should be. (I am using RStudio Server so it is the exact same files being accessed by RStudio and Shiny Server). R version 3.4.3, Shiny Server version 1.5.6.875 UPDATE: I have reproduced the behaviour with the simplest possible example. I created a new RStudio project - just a plain project - called TEST located in my ShinyApps directory. Then I created a new R Markdown file, which I called TEST.Rmd. This file is pre-populated with example RMarkdown using the cars and pressure built-in datasets. I changed the YAML header to include runtime: shiny . The RStudio "knit" button is replaced by the "Run Document" button, as expected, and clicking this runs the document and works as expected. Attempting to view the page via the Shiny Server has the same issue whereby the plot is not included; a broken image icon takes its place. UPDATE 2: As requested, here is the Markdown file. It is literally the sample file generated by RStudio with the addition of runtime: shiny in the YAML header. --- title: "Test RMarkdown" author: "Michael Henry" date: "4/6/2020" output: html_document runtime: shiny --- [CODE_BLOCK] ## R Markdown This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see <[URL] When you click the **Knit** button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this: [CODE_BLOCK] ## Including Plots You can also embed plots, for example: [CODE_BLOCK] Note that the echo = FALSE parameter was added to the code chunk to prevent printing of the R code that generated the plot. UPDATE 3: So I went hunting around the server looking for a log file for Shiny Server. I do not have any administrator privileges so I've never looked for this before, but I found a log file which included this: /lib64/libpango-1.0.so.0: undefined symbol: g_log_structured_standard . It turns out there is a bug in RHEL which has a fix available so I have put a request in with my administrator to apply the fix. I will report back after this has been applied as to whether it resolved my issue. UPDATE 4: It turns out my RHEL server is up-to-date; it already has the version of glib2 suggested by the bugfix. The fact that I am still getting this error is therefore something that my administrator is going to escalate to Red Hat. UPDATE 5: The Red Hat support suggested there was another glib2 so file lying around and it turned out that this was the case. Removing this file resolved the issue!
Shiny Server missing charts generated by R markdown file I have an R markdown file which I'd like to be available on my corporate Shiny Server. According to R Markdown: The Definitive Guide I can add runtime: shiny to the YAML metadata at the top of the Rmd file to turn it into a Shiny document. I have done this and it works. If I click "Run Document" in RStudio it will run the Rmd and I will see the report with no problems. My project is located in the ShinyApps directory where the Shiny Server is looking for apps to serve. When I hit the URL for this project I get the report without any charts . I just get broken image icons where the charts should be. (I am using RStudio Server so it is the exact same files being accessed by RStudio and Shiny Server). R version 3.4.3, Shiny Server version 1.5.6.875 UPDATE: I have reproduced the behaviour with the simplest possible example. I created a new RStudio project - just a plain project - called TEST located in my ShinyApps directory. Then I created a new R Markdown file, which I called TEST.Rmd. This file is pre-populated with example RMarkdown using the cars and pressure built-in datasets. I changed the YAML header to include runtime: shiny . The RStudio "knit" button is replaced by the "Run Document" button, as expected, and clicking this runs the document and works as expected. Attempting to view the page via the Shiny Server has the same issue whereby the plot is not included; a broken image icon takes its place. UPDATE 2: As requested, here is the Markdown file. It is literally the sample file generated by RStudio with the addition of runtime: shiny in the YAML header. --- title: "Test RMarkdown" author: "Michael Henry" date: "4/6/2020" output: html_document runtime: shiny --- [CODE_BLOCK] ## R Markdown This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see <[URL] When you click the **Knit** button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this: [CODE_BLOCK] ## Including Plots You can also embed plots, for example: [CODE_BLOCK] Note that the echo = FALSE parameter was added to the code chunk to prevent printing of the R code that generated the plot. UPDATE 3: So I went hunting around the server looking for a log file for Shiny Server. I do not have any administrator privileges so I've never looked for this before, but I found a log file which included this: /lib64/libpango-1.0.so.0: undefined symbol: g_log_structured_standard . It turns out there is a bug in RHEL which has a fix available so I have put a request in with my administrator to apply the fix. I will report back after this has been applied as to whether it resolved my issue. UPDATE 4: It turns out my RHEL server is up-to-date; it already has the version of glib2 suggested by the bugfix. The fact that I am still getting this error is therefore something that my administrator is going to escalate to Red Hat. UPDATE 5: The Red Hat support suggested there was another glib2 so file lying around and it turned out that this was the case. Removing this file resolved the issue!
r, shiny, r-markdown, rhel
4
652
2
https://stackoverflow.com/questions/60982717/shiny-server-missing-charts-generated-by-r-markdown-file
16,122,599
gcc ld error &quot;libgcov.a(_gcov_merge_add.o) is referenced by DSO&quot;
Trying to compiler our code for code coverage using gcov. Getting following error: hidden symbol `__gcov_merge_add' in /usr/lib/gcc/i686-redhat-linux/4.4.4/libgcov.a(_gcov_merge_add.o) is referenced by DSO /usr/bin/ld: final link failed: Nonrepresentable section on output collect2: ld returned 1 exit status Following compiler options are newly added for gcov: -O0 -fprofile-arcs -ftest-coverage -Xlinker -zmuldefs and ld flags: -fprofile-generate -fprofile-arcs and linked with library -lgcov Please suggest.
gcc ld error &quot;libgcov.a(_gcov_merge_add.o) is referenced by DSO&quot; Trying to compiler our code for code coverage using gcov. Getting following error: hidden symbol `__gcov_merge_add' in /usr/lib/gcc/i686-redhat-linux/4.4.4/libgcov.a(_gcov_merge_add.o) is referenced by DSO /usr/bin/ld: final link failed: Nonrepresentable section on output collect2: ld returned 1 exit status Following compiler options are newly added for gcov: -O0 -fprofile-arcs -ftest-coverage -Xlinker -zmuldefs and ld flags: -fprofile-generate -fprofile-arcs and linked with library -lgcov Please suggest.
c, linux, gcc, rhel
4
4,220
2
https://stackoverflow.com/questions/16122599/gcc-ld-error-libgcov-a-gcov-merge-add-o-is-referenced-by-dso
15,080,571
Yum install through other server
I have two servers (CentOS 6.2) on the same network. One of them (server1) has access to internet and the other one (server2) doesn't. I need to configure my servers so that server2 could install packages! Please help !
Yum install through other server I have two servers (CentOS 6.2) on the same network. One of them (server1) has access to internet and the other one (server2) doesn't. I need to configure my servers so that server2 could install packages! Please help !
linux, centos, yum, rhel
4
1,865
2
https://stackoverflow.com/questions/15080571/yum-install-through-other-server