Comments (7)
Apologies if I'm missing something, but I'm not sure what you're trying to achieve here.
Are you trying to add/build something in the container?
It'd be good to know what commands you're running both to start the container and inside it. A simple reproducer that I can try would be helpful.
from fivem.
Hi, sorry, I'm just trying to run the cfx base resources like yarn, webpack and screenshot-basic
.
I found a part of the issue.
Here is what a fork process is on NodeJs :
Fork is a special instance of spawn, that runs a fresh instance of the V8 engine.
Meaning, you can essentially create multiple workers, running on the exact same Node code base,
or perhaps a different module for a specific task.
This is most useful for creating a worker pool.
While node's async event model allows a single core of a machine to be used fairly efficiently,
it doesn't allow a node process to make use of multi core machines.
Easiest way to accomplish this is to run multiple copies of the same program, on a single processor.
Ok so it does create a new V8 instance, for instance, the custom v8 one defined here : https://github.com/citizenfx/fivem/blob/29400ece2a7185da725e7be4335e2ef044a6041b/code/components/citizen-scripting-v8/src/V8ScriptRuntime.cpp#L1884-L1889
To add more context around this, here is the code of the yarn resource that want to fork a process : https://github.com/citizenfx/cfx-server-data/blob/7680f316a7a128ca09d27101dac572098c111242/resources/%5Bsystem%5D/%5Bbuilders%5D/yarn/yarn_builder.js#L44-L49
Obvisouly, that's where the bad option --library-path
comes from. So why the option is recognized on a basic linux system and not in the container ? I don't know really why
from fivem.
Hi, just echoing what @frebib is saying here - a docker run line or a compose file would be useful to help us replicate this. A modlist would be helpful too - the image is tested with the base version of FiveM so even if the issue is in the base container we'd need some of your mods to attempt to replicate. If you could find the minimum viable amount that triggers the issue, that would also help a lot!
To give you a bit of background: the FiveM project packages a full filesystem designed for running the server, all we really do is shove it into a docker container. This should mean there is no difference between our image and running outside of docker, but theory and practice are two very different things.
from fivem.
Ok, sorry.
I'm able to reproduce with a fresh install. So basically :
- Create a docker container with your image and just add this to your server.cfg :
# add these basic resource (found in cfx-server-data)
ensure yarn
ensure webpack
ensure screenshot-basic
You'll have this output
_fivem_test_logs.txt
I have added the server-data just in case fivem-test-data.zip
from fivem.
Well after a few hours of bashing our heads against the linux library loaders, we've replicated what the official FiveM run script does and this seems to have fixed it. To be frank we have no idea why - the implicit libraries are identical to the ones in the citizen-fx dir & we respected the other library paths it loaded in. I suspect its something very janky in the way FiveM calls yarn!
The CI is building an image now - please let us know if this doesn't fix the issue.
from fivem.
from fivem.
@Adam-Ant It works like a charm, thanks you for your reactivity ❤️
from fivem.
Related Issues (20)
- I am trying restart script in fivem start.bat HOT 1
- I am trying restart script in fivem start.bat but i seen couldn't find resource script HOT 1
- Building resource webpack failed. Error data: yarn failed. HOT 2
- Entrypoint doesn't pass on SIGKILL to FiveM
- No archive resource in Dockerfile HOT 1
- Outdated version HOT 1
- [QUESTION] Could the webUI be added back to this? HOT 2
- Latest FiveM Version isn't working at container runtime HOT 1
- Fivem problem HOT 2
- README needs txAdmin volume information
- [ citizen-server-impl] Couldn't find resource category [vehicles]. HOT 1
- Change TX admin port HOT 1
- Server keeps restarting for yarn install HOT 1
- Timezone HOT 2
- Yarn in Server Fivem HOT 1
- Adding Scripts to FxServer HOT 1
- Tutorial how to setup DB and resources? HOT 1
- Webpack is busy HOT 1
- This server does not have a license key specified HOT 3
- POLICE / BODYGUARD PEDS don't shoot when onesync off HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fivem.