snipe / snipe-it

A free open source IT asset/license management system
https://snipeitapp.com
GNU Affero General Public License v3.0
11.12k stars 3.19k forks source link

copy(): SSL operation failed with code 1. OpenSSL Error messages: #6286

Closed fuzzmonster closed 5 years ago

fuzzmonster commented 6 years ago

Please confirm you have done the following before posting your bug report:

Server (please complete the following information):

Hello,

Having issues installing Snipe-IT. I'm becoming very fustrated.

Am behind a squid3 proxy and have the proper environment setup (/etc/environment) as well as ~/.bashrc configured for the proxy (export http_proxy="")

Beyond frustrated at this point and feel the installer has ALOT of limitations and leaves alot to be desired with how it was all built. The documentation leaves ALOT to be desired.. sorry. but truth, perhaps not enough hand holding? But there are some '"gotcha's".

when i run ./install.sh - i receive a 404 error about cert. So I manually pulled down the snipeinstall.sh file... works

ok, met all dependence:

below is error, this is after running it a second time, so obviously database already exsists:

ERROR 1007 (HY000) at line 1: Can't create database 'snipeit'; database exists

Any fix for this?

I really feel the devs are obfuscating the install details and leave issues behind to force people to pay for hosted instances of snipe-it??

In an EDU environment and like to try this to see if it's a good fix. But about to throw in towel and move on.

snipe commented 6 years ago

The installer is not the preferred way to install Snipe-IT, and we make that pretty clear in the documentation. It was written by members of the community, and while we all work together to try to make sure every imaginable scenario is covered, you can see how difficult that is, can't you?

when i run ./install.sh - i receive a 404 error about cert

Could you be a little more specific here? That's the first I'm hearing about that error, and literally thousands of people have used the installer successfully.

Beyond frustrated at this point and feel the installer has ALOT of limitations and leaves alot to be desired with how it was all built.

As I said, someone volunteered the installer. I personally don't like to include anything in my repos that requires root/sudo access, but it solved the problem of a lot of IT folks not knowing how to set up a LAMP stack with virtual hosts.

If you feel it could be improved, we welcome your pull request.

I really feel the devs are obfuscating the install details

The shell script source is available in the repo. Nothing is being obfuscated. The bash script is literally right there.

and leave issues behind to force people to pay for hosted instances of snipe-it??

Seriously?

If that's what we wanted to do, why would we make it open source at all? Why not just make it a commercial product and spare ourselves the time and the insults of people who are having trouble and prefer to consider absurd conspiracy theories instead of the far more likely scenario that 1) technology is hard 2) trying to accommodate every possible OS is hard 3) Sometimes things change on the OS side and we don't immediately know about it 4) Different organizations have wildly different technical, networking, and business requirements.

We'll look into this issue - this is the first I'm seeing it, but your sense of entitlement and suspicion are not appreciated. We work hard on this project, and we don't deserve our commitment to open source being doubted because technology is complicated.

EarlRamirez commented 6 years ago

@snipe I'll check it, I believe that the errors that @fuzzmonster is experiencing are related to the proxy server, give me an hour or so and I will have an Ubuntu box behind a squid proxy server and see how it goes.

@fuzzmonster if you don't have a preference for OS you can use _https://github.com/EarlRamirez/snipeit_iso_

fuzzmonster commented 6 years ago

I ended up modifying the snipeinstall.sh script

commended out the #install composer portion. As I manually pulled down https://getcomposer.org/installer and moved to the correct location. This got me further and now have 'something went wrong' when navigating to the site IP/FQDN.

Also had to remove the apache default files (sites-enabled/000-default) (sites-avail/-default)

I am following the documentation, even where manually create DB: But appear to be confusion throughout as the documentation jumps around. within the /var/www/snipit directory I had to run "composer install --no-dev --prefer-source"

Then it pulled down everything needed and I could re-run the installer (./snipeinstall)

I see the snipeinstall.sh was built to ease the install process; as you described. I feel the main issue here is with the composer.

I'm going to blow away this VM and setup another and start over. I'll start process and manually create DB, user, and go without the ./snipeinstall. rely 100% on the git pull.

Perhaps modify the documentation for when folks are doing the git pull to pull it into proper directory

/var/www/snipeit ?

as this is where the snipinstaller puts everything. Prior installs, I was doing /opt/snipeit. This will be my 4th go around here.

fuzzmonster commented 6 years ago

Still like to know why this error;

installing composer. PHP Warning: copy(): SSL operation failed with code 1. OpenSSL Error messages: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed in Command line code on line 1 PHP Warning: copy(): Failed to enable crypto in Command line code on line 1 PHP Warning: copy(https://getcomposer.org/installer): failed to open stream: operation failed in Command line code on line 1 PHP Warning: hash_file(composer-setup.php): failed to open stream: No such file or directory in Command line code on line 1 ERROR: Invalid composer installer signature rm: cannot remove 'composer-setup.php': No such file or directory

fuzzmonster commented 6 years ago

@EarlRamirez

Thanks for the input. I also tried pure debian 9 (stretch). This was my first install and go around, then I said let try ubuntu lts 1604.. same issue. I do believe its due to being behind proxy. Hence me having to manually create the composer-php file and paste in file contents

EarlRamirez commented 6 years ago

Give me a few and I will verify the installation on a Ubuntu without a squid proxy and with a squid proxy.

snipe commented 6 years ago

I feel the main issue here is with the composer.

That's unlikely. My guess would be an issue with your proxy settings.

Perhaps modify the documentation for when folks are doing the git pull to pull it into proper directory /var/www/snipeit

The git pull method means you can put those files wherever you want, as you're responsible for setting up the web server's virtual host settings.

Still like to know why this error; installing composer. PHP Warning: copy(): SSL operation failed with code 1. OpenSSL Error messages: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed in Command line code on line 1

Literally the first google results for this error message:

https://serverfault.com/questions/63210/ssl-operation-failed-with-code-1-openssl-error-messages-error140770fcssl-rou https://github.com/composer/composer/issues/5866 https://github.com/composer/composer/issues/5519#issuecomment-233112329

fuzzmonster commented 6 years ago

@snipe

Yes - I googled the error before posting here.

The composer/composer#5866. was more helpful. I had openssl installed, but not ca-certificates

Will run it again.

fuzzmonster commented 6 years ago

actually:

Reading package lists... Done Building dependency tree Reading state information... Done ca-certificates is already the newest version (20170717~16.04.1).

fuzzmonster commented 6 years ago

@EarlRamirez

I may give your snipit_iso contribution a try. We run CentOS in production but slowly moving to Ubuntu/Debian because of repo's on centos side. 98% linux environment here.

Going to give the roll your own/manually install one more try before day is over. WIl pick back up on it tomorrow.

fuzzmonster commented 6 years ago

snipeitapp@localhost:/var/www/snipeit$ composer install --no-dev --prefer-source Loading composer repositories with package information Installing dependencies from lock file

[RuntimeException] /var/www/snipeit/vendor does not exist and could not be created.

i su'd to a non root user.. actually the same user that will ultimately end up owning the files (chown -R)

the git pull method, includes the community provided ./snipeinstall.sh within the root directory.

still same as before:

ERROR 1007 (HY000) at line 1: Can't create database 'snipeit'; database exists

EarlRamirez commented 6 years ago

@fuzzmonster the internet connection where I have been beyond horrible; therefore, I was not able even to perform a git clone on the text box because of this. Did you try the custom ISO?

EarlRamirez commented 6 years ago

@fuzzmonster my apologies for the delayed response, I did not have the best internet connection for a few weeks, anyway, I was able to install and configure Snipe-IT behind a Squid proxy and unfortunately, I did not receive any of the errors that you encountered. The only thing I noticed was I had to restart the server after I added the proxy to /etc/environment

jackka commented 5 years ago

@fuzzmonster Try to execute the following wget https://composer.github.io/installer.sig If you catch something like ERROR: cannot verify composer.github.io's certificate, issued by ... then take a look here https://github.com/snipe/snipe-it/issues/6256 Maybe this is your case too.

stale[bot] commented 5 years ago

Is this still relevant? We haven't heard from anyone in a bit. If so, please comment with any updates or additional detail. This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Don't take it personally, we just need to keep a handle on things. Thank you for your contributions!

jackka commented 5 years ago

Yep

stale[bot] commented 5 years ago

Okay, it looks like this issue or feature request might still be important. We'll re-open it for now. Thank you for letting us know!

stale[bot] commented 5 years ago

Is this still relevant? We haven't heard from anyone in a bit. If so, please comment with any updates or additional detail. This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Don't take it personally, we just need to keep a handle on things. Thank you for your contributions!

stale[bot] commented 5 years ago

This issue has been automatically closed because it has not had recent activity. If you believe this is still an issue, please confirm that this issue is still happening in the most recent version of Snipe-IT and reply to this thread to re-open it.