Closed wynst closed 7 years ago
Thank you for the bug report! Briefly scanning the issue it looks like the mix is trying to bind to a local port before getting the dependencies. Not sure what it is trying to accomplish, and binding to a port on OpenShift is a bit tricky, they are much more restricted. I will take a look this weekend if I can work around it somehow.
Thank you for responding!
I was trying to deploy this app to test the waters on Elixir/Erlang, apologize if I can't be of any help.
some of the findings:
I hope to find some spare time next weekend to resolve the problem cause, then the fun part will be how to convince mix and elixir :)
Any chance you can find some spare time to solve this issue? It would be very, very much appreciated.
Great that you asked, I was running on a reduced schedule lately but I just started working on this again.
Hi, I have finally advanced a bit, but the current situation is still far from optimal. I patched mix to bypass httpc and use wget instead, this seems to work quite well, mix local.hex fetches all that's needed and hex also works well as long as the dependencies are from git. Unfortunately, it fails for all other cases of dependency repositories, therefore, I recommend getting the dependencies on your machine and include them all in your project's git repository.
For the reference if anyone would like to help to resolve this issue: 1) the OpenShift limits network interfaces quite heavily 1.1) the $OPENSHIFT_ERL_IP can be bound and used to listen for incoming connections, the fw and routing tables will not let you send anywhere through this IP address 1.2) the 'ip addr' will give you the IP of ethernet interface used for outgoing connections. Binding that interface is forbidden by OpenShift, but for outgoing connections you generally shouldn't need to bind the socket to an address. 2) erlangs httpc module insists on binding a network interface in order to connect to some remote socket, I couldn't find a way around that 3) I have forked the elixir to https://github.com/wozniakjan/elixir, patched the mix to bypass httpc to avoid binding an interface. Cmdline utility wget downloads the file, mix reads the file from the disk and then proceeds 4) hex was a bit tough cookie for me to chew on
I recommend for now to work around the hex, download the dependencies and put them all to your project depository, rest of elixir environment seems to be working well, even if a bit slow and may need to execute some commands manually a few times. I managed to get phoenix running with a few additional tweaks around OpenShift hard timeouts and fact, that elixir doesn't have the fastest compiler. Unless I get enlightened by some fantastic idea or help from someone more knowledgeable, I will pause my research for some time and cowardly wait for OpenShift3, which could resolve all our issues after all.
Hi,
It seems openshift3 is out! I've tried to deploy an app from your config but it's failing unfortunately
The error is something like -> Resource kind not specified ...
Hi, openshift2 and openshift3 are not backward compatible, unfortunately. For openshift3, try playing around with https://github.com/bitwalker/s2i-erlang
I will try to revisit and port this to openshift3 as well at some point in future
I was trying to
git push origin
elixir project with the followingmix.exs
:I got the following error:
Tried to manually install hex by logging in to openshift:
full dump of log here
curl
the said file totmp
Any pointers is highly appreciated, thanks!