Hello all, we’re running Meltano in our stage kube...
# troubleshooting
r
Hello all, we’re running Meltano in our stage kubernetes cluster as a test and are seeing this error:
Copy code
meltano      | ELT could not be completed: Cannot start loader: Executable 'target-mysql' could not be found. Loader 'target-mysql' may not have been installed yet using `meltano install loader target-mysql`, or the executable name may be incorrect.
ELT could not be completed: Cannot start loader: Executable 'target-mysql' could not be found. Loader 'target-mysql' may not have been installed yet using `meltano install loader target-mysql`, or the executable name may be incorrect.
We have checked the
.meltano
folder and made sure that target-mysql exists but we’re still getting this error.
d
@rohith_desikan Can you run again with
meltano --log-level=debug
? The additional debug logging my reveal the underlying issue
One thing to check: did you run
meltano install
in the same environment you’re now running
meltano elt
in?
r
We’re getting a successful result for the install. It’s installing 3 plug ins as expected.
As for the directory, it looks like we’re running the meltano command from the usr local bin folder inside the container.
Copy code
Command: ['/usr/local/bin/meltano', 'elt', '--catalog', '/opt/wg/meltano/{job}/catalog.json', 'tap-s3-csv', 'target-mysql']
Note: We’re generating the command using python code
d
That should be OK as long as the working directory is the project directory. Can you show the result of running with with
meltano --log-level=debug elt
, so that we can see the full error stacktrace?
r
```meltano | DEBUG Deleted configuration at /opt/wg/.meltano/run/elt/2021-07-01T180538--tap-s3-csv--target-mysql/d393000a-5740-4ffc-8b33-05a891db5479/target.config.json meltano | DEBUG Deleted configuration at /opt/wg/.meltano/run/elt/2021-07-01T180538--tap-s3-csv--target-mysql/d393000a-5740-4ffc-8b33-05a891db5479/tap.config.json meltano | DEBUG ELT could not be completed: Cannot start loader: Executable 'target-mysql' could not be found. Loader 'target-mysql' may not have been installed yet using
meltano install loader target-mysql
, or the executable name may be incorrect. Traceback (most recent call last): File "/usr/local/lib/python3.8/dist-packages/meltano/core/plugin_invoker.py", line 237, in _invoke yield (popen_args, popen_options, popen_env) File "/usr/local/lib/python3.8/dist-packages/meltano/core/plugin_invoker.py", line 249, in invoke_async return await asyncio.create_subprocess_exec( File "/usr/lib/python3.8/asyncio/subprocess.py", line 236, in create_subprocess_exec transport, protocol = await loop.subprocess_exec( File "/usr/lib/python3.8/asyncio/base_events.py", line 1630, in subprocess_exec transport = await self._make_subprocess_transport( File "/usr/lib/python3.8/asyncio/unix_events.py", line 197, in _make_subprocess_transport transp = _UnixSubprocessTransport(self, protocol, args, shell, File "/usr/lib/python3.8/asyncio/base_subprocess.py", line 36, in init self._start(args=args, shell=shell, stdin=stdin, stdout=stdout, File "/usr/lib/python3.8/asyncio/unix_events.py", line 789, in _start self._proc = subprocess.Popen( File "/usr/lib/python3.8/subprocess.py", line 854, in init self._execute_child(args, executable, preexec_fn, close_fds, File "/usr/lib/python3.8/subprocess.py", line 1702, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) FileNotFoundError: [Errno 2] No such file or directory: '/opt/wg/.meltano/loaders/target-mysql/venv/bin/target-mysql' The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/usr/local/lib/python3.8/dist-packages/meltano/core/runner/singer.py", line 105, in invoke p_target = await target.invoke_async( File "/usr/local/lib/python3.8/dist-packages/meltano/core/plugin_invoker.py", line 249, in invoke_async return await asyncio.create_subprocess_exec( File "/usr/lib/python3.8/contextlib.py", line 131, in exit self.gen.throw(type, value, traceback) File "/usr/local/lib/python3.8/dist-packages/meltano/core/plugin_invoker.py", line 239, in _invoke raise ExecutableNotFoundError( meltano.core.plugin_invoker.ExecutableNotFoundError: Executable 'target-mysql' could not be found. Loader 'target-mysql' may not have been installed yet using
meltano install loader target-mysql
, or the executable name may be incorrect. The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/usr/local/lib/python3.8/dist-packages/meltano/cli/elt.py", line 237, in _run_elt await _run_extract_load(elt_context, output_logger) File "/usr/local/lib/python3.8/dist-packages/meltano/cli/elt.py", line 275, in _run_extract_load await singer_runner.run( File "/usr/local/lib/python3.8/dist-packages/meltano/core/runner/singer.py", line 257, in run await self.invoke( File "/usr/local/lib/python3.8/dist-packages/meltano/core/runner/singer.py", line 112, in invoke raise RunnerError(f"Cannot start loader: {err}") from err meltano.core.runner.RunnerError: Cannot start loader: Executable 'target-mysql' could not be found. Loader 'target-mysql' may not have been installed yet using
meltano install loader target-mysql
, or the executable name may be incorrect. The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/usr/local/lib/python3.8/dist-packages/meltano/cli/elt.py", line 225, in _red…
d
Copy code
FileNotFoundError: [Errno 2] No such file or directory: '/opt/wg/.meltano/loaders/target-mysql/venv/bin/target-mysql'
Does that file in fact exist?
r
So I noticed that as well, and it looks like it doesn’t exist even though the plug in says it was installed
d
Is
/opt/wg/
the meltano project directory?
r
Yes, That’s where the meltano.yml file lives and the
.meltano
folder lives.
d
Is there anything in
/opt/wg/.meltano/loaders/target-mysql/venv
at all?
r
Copy code
drwxr-xr-x 6 uvicorn uvicorn  87 Jul  1 18:15 .
drwxr-xr-x 3 uvicorn uvicorn  18 Jul  1 18:15 ..
drwxr-xr-x 2 uvicorn uvicorn 180 Jul  1 18:15 bin
drwxr-xr-x 2 uvicorn uvicorn   6 Jul  1 18:15 include
drwxr-xr-x 3 uvicorn uvicorn  23 Jul  1 18:15 lib
lrwxrwxrwx 1 uvicorn uvicorn   3 Jul  1 18:15 lib64 -> lib
-rw-r--r-- 1 uvicorn uvicorn  69 Jul  1 18:15 pyvenv.cfg
drwxr-xr-x 3 uvicorn uvicorn  27 Jul  1 18:15 share
d
What is in
bin
, if not
target-mysql
?
r
Copy code
drwxr-xr-x 2 uvicorn uvicorn  180 Jul  1 18:15 .
drwxr-xr-x 6 uvicorn uvicorn   87 Jul  1 18:15 ..
-rw-r--r-- 1 uvicorn uvicorn 8834 Jul  1 18:15 Activate.ps1
-rw-r--r-- 1 uvicorn uvicorn 2222 Jul  1 18:15 activate
-rw-r--r-- 1 uvicorn uvicorn 1274 Jul  1 18:15 activate.csh
-rw-r--r-- 1 uvicorn uvicorn 2426 Jul  1 18:15 activate.fish
-rwxr-xr-x 1 uvicorn uvicorn  250 Jul  1 18:15 jsonschema
-rwxr-xr-x 1 uvicorn uvicorn  258 Jul  1 18:15 pip
-rwxr-xr-x 1 uvicorn uvicorn  258 Jul  1 18:15 pip3
-rwxr-xr-x 1 uvicorn uvicorn  258 Jul  1 18:15 pip3.8
lrwxrwxrwx 1 uvicorn uvicorn   15 Jul  1 18:15 python -> /usr/bin/python
lrwxrwxrwx 1 uvicorn uvicorn    6 Jul  1 18:15 python3 -> python
-rwxr-xr-x 1 uvicorn uvicorn  245 Jul  1 18:15 wheel
d
OK, so only the standard python and pip stuff, and jsonschema, so something is getting installed at least. What
pip_url
have you set for
target-mysql
in
meltano.yml
? Was this working fine locally?
r
Well we just have this for our loaders and it was not easy to test this locally since we have a tap-s3-csv. Note that we built off the target-mysql singer target and installed it in our own private pypi repo in AWS S3.
Copy code
loaders:
  - name: target-postgres
    variant: datamill-co
    pip_url: singer-target-postgres
  - name: target-mysql
    namespace: target_mysql
    pip_url: target-mysql
    executable: target-mysql
    settings:
    - name: mysql_host
    - name: mysql_port
    - name: mysql_username
    - name: mysql_password
    - name: mysql_database
d
@rohith_desikan OK, that looks correct. Are you sure your fork of target-mysql still installs the
target-mysql
executable? If you install it manually with
pip install target-mysql
, can you use the executable as expected?
r
Yeah lemme check that
Hey thanks for your help, I’m getting closer to getting this working, I think it’s a pip installation error, that target-mysql didn’t exist inside the bin folder
d
Okay, glad you’re making progress!