Solved Segmentation fault error after python 3.6 to 3.7 update

In terms of backing up. For some time, sudo does not allow me to get into the www directory. So I am not sure how to back it up. I tried webmin, but it truncated it.

This is what happens:

cd /usr/local/www/openemr
/usr/local/www/openemr: Permission denied.
sandra@mail:~ % sudo cd /usr/local/www/openemr
Password:
sandra@mail:~ %
 
I set up this server only a few months ago. I don't know why I installed the older perl. Totally missed that one. Thanks.
 
Yes it will be bad idea to stay with the old version of perl as the default version already was switched to 5.32. Perl is used and installed during build of one of the dependencies of py-certbot. In OpenEMR there's no information which perl version they use. It's easy just to backup your installation and test it on virtual machine to see if it work after upgrading to perl5.32
 
All dependencies of py-certbot are building just fine on python3.7
In the last version of certbot 1.8 the support of the old python3.5 is removed. It still support python3.6 but it's about time when it will drop support of it.
 
Again, the problem is with python I think, this is where rebuilding perl modules has stopped:

Code:
===>  Configuring for py37-MarkupSafe-1.1.1
setup.py:1: ResourceWarning: unclosed file <_io.BufferedReader name='setup.py'>
  from __future__ import print_function
ResourceWarning: Enable tracemalloc to get the object allocation traceback
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "setup.py", line 13, in <module>
    from setuptools.command.build_ext import build_ext
  File "/usr/local/lib/python3.7/site-packages/setuptools/command/build_ext.py", line 26, in <module>
    __import__('Cython.Compiler.Main')
  File "/usr/local/lib/python3.7/site-packages/Cython/Compiler/Main.py", line 28, in <module>
    from .Scanning import PyrexScanner, FileSourceDescriptor
SystemError: init function of Scanning returned uninitialized object
*** Error code 1

Stop.
make: stopped in /usr/ports/textproc/py-MarkupSafe

I want to know what this means: "unclosed file <_io.BufferedReader name='setup.py'>"

I get this error frequently
 
I may suggest cleaning out your /etc/make.conf as using wrong settings can break things. Only use /etc/make.conf if you know exactly what you're doing. Also I may suggest using Poudriere to build your own packages so you'll know if it works or breaks during build time. I never used ports again after I started using packages built by poudriere. Also it keeps the system clean without so many orphaned dependencies cluttered across the system.
 
Yes, it did work prior to the update to python 3.7
No, the system is my main system. I was working on setting up the jails such that I could migrate nginx to a jail

I have not set up test VM yet. I don't have a VM. But I do have another server. My thing is not knowing how to use the HDD. It has 6 1 TB HDD. I was going to ask advice on how to design the ZFS in the new system. My goal was to migrate this older machine to the new machine, because I was not satisfied with my ZFS design
 
I think you are in search of the perfect set-up - with jails, ports, make.conf tweaks, perfect ZFS set-up, etc. from the get-go.

It feels like you've tried to sprinkle lots of "best" or "better" practices and ended up with a bit of a monster set-up that you don't quite understand and is fragile and too hard to update.

I really don't mean that rudely, so please don't take it that way! I've not used jails nor ZFS in production (yet) because even after many years, I'm still learning and taking things in baby steps. I use test machines/virtual machines to experiment with things, make mistakes, learn & document. I'm still using things like MySQL 5.6 and mod_php while I make sure I'm ready to move to php-fpm and MySQL 5.7.

Slow down, try a few things on the spare server. Learn what works and doesn't work, document those things. Take the time to learn. Don't worry about getting ZFS set up "properly" on the test server, just take the defaults. You will probably make some mistakes and end up having to scrub the server and trying from scratch again. But that's great - you'll learn what can go wrong, how it will manifest itself, and get used to trying to fix things and roll back.

Keep it simple, only make it as complicated as it needs to be. No-one can tell you what you need or what is best for you & your set-up - that's what you have to find out.

Start simple - take the default options for OS install, use binary packages (pkg) for everything. Try and get basic cop(ies) of your website(s) etc. working on the spare server. Do you need jails? Do you need to use ports? Or can you keep it very simple to start with?

Then you can use that experiment to fix your main server, but keep the spare server going, and test all your upgrades on that machine - giving you the confidence that it should work on the main machine when you want to upgrade that.
 
I think you are in search of the perfect set-up - with jails, ports, make.conf tweaks, perfect ZFS set-up, etc. from the get-go.

It feels like you've tried to sprinkle lots of "best" or "better" practices and ended up with a bit of a monster set-up that you don't quite understand and is fragile and too hard to update.
Yes, I agree with you. I can't help it.

I really don't mean that rudely, so please don't take it that way!
No offense taken at all. I actually appreciate the help.


Slow down, try a few things on the spare server. Learn what works and doesn't work, document those things. Take the time to learn. Don't worry about getting ZFS set up "properly" on the test server, just take the defaults. You will probably make some mistakes and end up having to scrub the server and trying from scratch again. But that's great - you'll learn what can go wrong, how it will manifest itself, and get used to trying to fix things and roll back.

Keep it simple, only make it as complicated as it needs to be. No-one can tell you what you need or what is best for you & your set-up - that's what you have to find out.

Start simple - take the default options for OS install, use binary packages (pkg) for everything. Try and get basic cop(ies) of your website(s) etc. working on the spare server. Do you need jails? Do you need to use ports? Or can you keep it very simple to start with?

Then you can use that experiment to fix your main server, but keep the spare server going, and test all your upgrades on that machine - giving you the confidence that it should work on the main machine when you want to upgrade that.
OK, but I will use 1 TB and leave 6 out? :-(
 
I need to safeguard data, like a bank does, and I need to make it readily available, like Netflix. I need redundancy as well.
Well, right now, only I am using my system and my patients who use my patient portal. Eventually, I would like to offer a solution to other doctors.
 
Oh, look, it's getting complicated again. :rolleyes:

I'd really suggest you try installing FreeBSD on the spare machine, take all the defaults (if that uses one drive or 15, who cares, this is just a test install), install packages, copy across your site(s) and see if you can things working on there - not 100% but enough to prove you can set-up a working configuration. Leave it a few days and try freebsd-update and pkg update/upgrade and get confidence that all works.

As part of this process you'll find out if packages work for you or if you really need to use ports.

Then scrub the machine, use ZFS options, make jails, etc. Go to town - at least you've got a baseline you can retreat to if you get lost.

If you break anything, clear it down, try again.

It doesn't even have to be real hardware - if you've got a Windows or Mac or Linux box or FreeBSD desktop machine - install Virtual Box and play on there. Do an install in the VM, freebsd-upgrade it, copy the VM file (for faster restore to good starting state.)

You are still trying to run before you can walk, and tripping up over your shoe laces (or is that mixed metaphors?!)
 
Oh, look, it's getting complicated again. :rolleyes:

I'd really suggest you try installing FreeBSD on the spare machine, take all the defaults (if that uses one drive or 15, who cares, this is just a test install), install packages, copy across your site(s) and see if you can things working on there - not 100% but enough to prove you can set-up a working configuration. Leave it a few days and try freebsd-update and pkg update/upgrade and get confidence that all works.

As part of this process you'll find out if packages work for you or if you really need to use ports.

Then scrub the machine, use ZFS options, make jails, etc. Go to town - at least you've got a baseline you can retreat to if you get lost.

If you break anything, clear it down, try again.

It doesn't even have to be real hardware - if you've got a Windows or Mac or Linux box or FreeBSD desktop machine - install Virtual Box and play on there. Do an install in the VM, freebsd-upgrade it, copy the VM file (for faster restore to good starting state.)

You are still trying to run before you can walk, and tripping up over your shoe laces (or is that mixed metaphors?!)
lol, yes I think too much, also, I need access to my charts. But yes, I will take all the defaults. It's just so much work. It takes me hours. I have to research everything (practically) but yes, I will do it.

What is your availability requirement? 5 minutes a year, 5 hours a year, or it doesn't matter? ZFS isn't storage that can be replicated disk like an enterprise where 2 TB of SAN will come to about $10,000, and you can have a remote copy on another sever. ZFS is intended to be on an individual server.

I don't understand. The server must be available at all times.

There is an option to use ZFS+HAST+CARP, but it involves diverging from the KISS principle. There is also FreeNAS. I'd be partial to SmartOS for NAS since it boots from USB and all of the disk is left for storage.

What would be optimal is you have a primary server and a second server used as the failover. If something happens on the primary, then your secondary becomes the active server. A third server would be your development server. It would, or should, be as nearly identical to prod as possible. Then, if you need to upgrade FreeBSD and/or packages, then your development server is the guinea pig. If something goes wrong then you fix it there and take note so you're aware for prod. When all updates are done on development, then you do the secondary server which validates your development steps. Then when you move to production, there should be no surprises.
Yes, I have two boxes with 6 hot-swappable drive bays. I have 100 1 TB drives for those bays. I've been planning for this for years. Since 2008. These boxes are in addition to the box which has the broken system. The latter has 8 small form factor hot-swappable HDD bays.

nginx can be setup for high availability in either an active=passive or active-active setup. I don't know anything about openmr and how it stores data. Glusterfs is a distributed filesystem that may be an option to store the openmr data. Not sure if FreeBSD has AoE (ATA over Ethernet) which could be a low cost SAN or maybe use iSCSI. Brantley Coile, the founder of Coraid is the inventor of AoE, and also developed the PIX firewall (on Plan 9). AoE has to be inside your LAN and is not routable outside of it.

At work we have systems tiered. Tier 0 are critical. Tier 4 are heh, okay (when we get it back up). We no longer use any HA clustering software like Veritas Cluster Server or Sun Cluster, but it is on the application teams to design HA into their applications. If Hadoop has an NVMe drive failure then it is replaced and data synced from other servers in the cluster. Another highly critical app has servers over two data centers and dozens of apps on hundreds of servers which are in their own clusters of usually 8 servers. We have over 30,000 servers in 4 data centers and other remote locations (not Facebook or Google or an Internet-related industry).

It all comes down to "how reliable does it need to be?

US healthcare. It needs to be reliable.
 
Yes, I have two boxes with 6 hot-swappable drive bays. I have 100 1 TB drives for those bays. I've been planning for this for years. Since 2008. These boxes are in addition to the box which has the broken system. The latter has 8 small form factor hot-swappable HDD bays.

US healthcare. It needs to be reliable.

You will need RAIDZ2 with 6 drive configurations so you can replace 2 failed drives without losing data or taking the system down. The drives need to be identical. RAIDZ also allows you to upgrade to bigger drives as well without taking down the system. You will need to study the ZFS and ZPOOL commands to understand how to operate it. FreeBSD does the ZFS setup for you.

I have 4 servers using RAIDZ configurations and never experienced data loss or data corruption. The purposes for ZFS are redundancy and preserving data integrity.

My suggestion is to experiment this on a test server with single drive using ZFS so you can learn how to issue ZFS/ZPOOL commands. I use EZJAIL which is outdated which I use workarounds but it works very well even with FreeBSD 12. I know IOCAGE works well with ZFS too.

With healthcare... you really need to pay more attention to using ZFS and don't skip anything otherwise you'll lose data if something goes wrong.

Keep in mind when selecting RAIDZ configuration on your production server. You cannot change it afterward. Changing RAIDZ1 to RAIDZ2 will not work without starting over from scratch.
 
Yes, this is what I'm striving for. My current problem is I'm sure a poor python 3.6 to 3.7 upgrade!

OMG, it just keeps getting worse. I am working on updating the dependencies, (the ones that will update) and working with packages. I received specific instructions to follow but couldn't read them. My screen was not bright enough. I stupidly rebooted my laptop to move to another location. Is there a pkg log?
 
OMG, it just keeps getting worse. I am working on updating the dependencies, (the ones that will update) and working with packages. I received specific instructions to follow but couldn't read them. My screen was not bright enough. I stupidly rebooted my laptop to move to another location. Is there a pkg log?


Try this...
You can add to the ALIAS section of /usr/local/etc/pkg.conf
Code:
message: "query '[%C/%n] %M'",
read through the messages all using
Code:
pkg message | less
and apply the requested settings...
 
Of course I am trying to learn as much as I can, so while I am backing up my system, I am also continuing to follow suggestions above.
While doing that I came across this:


It just looks so similar to what is happening in my system. I definitely did not follow the /usr/ports/UPDATING instructions for the python 3.6 to 3.7 update. I know that is where the problem started. It would be great if someone could figure it out, for the next knucklehead like me.

BTW, I have tried rebuilding ports from my box directly with similar results, but I will try again. Yes, I do take notes.
 
py-setuptools is what I needed, followed by
py-sphinx

now cmake is updating

I will post an update here.
Also the title should be changed maybe, the problem was not rebuilding after updating from python 3.6 to 3.7

How do I keep IOCAGE?
I will need python 3.6 as well?

thanks to all of you awesome sys admins and programmers, you da best
 
If it works with Python 3.6 then leave it alone and run a test on other server to be sure it works with Python 3.7. Never upgrade on a production server without testing on a other server first.
 
Yes, I am learning that the hard way. The thing is that until recently I only had one server.
So, with rebuilding everything, (python 3.7 and perl 5.32) my EHR is back up and running. My problem was that I updated python to 3.7 without following the instructions.
IOCAGE-devel does work with python 3.7
I just keep getting the unclosed file warning, that is all.

This is one of the very last ports I was able to update: py-requests-toolbelt dunno if this is what ended up fixing the error 11 segmentation fault problem. That took the longest. Just adding it here in case anyone runs into the same issue.

I learned a lot!
 
until recently I only had one server
All you need is an old laptop that can run Virtual Box. None of the learning need be on a real server machine (until you want to learn about real RAID and real performance etc. but that is a way down the trail!)
I just keep getting the unclosed file warning, that is all.
I skimmed the last 3 pages but can't see that message but have probably missed it.
 
Back
Top