OpenEdx 500 Server error after installing Custom them - bitnami

Already posted in Bitnami community. www.community.bitnami.com/t/500-server-error-after-installing-custom-theme/52736
I'm trying to install a open edx theme from
Links: www.github(dot)com/dadasoz/edx-bootstrap-theme. and following steps at
docs.bitnami(dot)com/installer/apps/edx/#how-to-install-a-custom-standford-theme
** I'm getting 500 internal server error.
Apache Logs
[Wed Oct 18 00:51:26.682720 2017] [:error] [pid 25207] File "/opt/bitnami/apps/edx/venvs/edxapp/lib/python2.7/site-packages/mako/runtime.py", line 890, in _exec_template
[Wed Oct 18 00:51:26.682723 2017] [:error] [pid 25207] callable_(context, *args, **kwargs)
[Wed Oct 18 00:51:26.682726 2017] [:error] [pid 25207] File "/tmp/mako_lms/cd6b613ed628f9f43e33fb106119f020/edx-bootstrap-theme/lms/templates/main.html.py", line 293, in render_body
[Wed Oct 18 00:51:26.682729 2017] [:error] [pid 25207] runtime._include_file(context, (static.get_template_path('header.html')), _template_uri, online_help_token=online_help_token)
[Wed Oct 18 00:51:26.682733 2017] [:error] [pid 25207] File "/opt/bitnami/apps/edx/venvs/edxapp/lib/python2.7/site-packages/mako/runtime.py", line 752, in _include_file
[Wed Oct 18 00:51:26.682736 2017] [:error] [pid 25207] callable_(ctx, **_kwargs_for_include(callable_, context._data, **kwargs))
[Wed Oct 18 00:51:26.682739 2017] [:error] [pid 25207] File "/tmp/mako_lms/cd6b613ed628f9f43e33fb106119f020/edx-bootstrap-theme/lms/templates/header.html.py", line 34, in render_body
[Wed Oct 18 00:51:26.682742 2017] [:error] [pid 25207] runtime._include_file(context, (static.get_themed_template_path(relative_path='theme-header.html', default_path='theme-header.html')), _template_uri, online_help_token=online_help_token)
[Wed Oct 18 00:51:26.682746 2017] [:error] [pid 25207] File "/opt/bitnami/apps/edx/venvs/edxapp/lib/python2.7/site-packages/mako/runtime.py", line 625, in getattr
[Wed Oct 18 00:51:26.682749 2017] [:error] [pid 25207] (self.name, key))
[Wed Oct 18 00:51:26.682752 2017] [:error] [pid 25207] AttributeError: Namespace 'static' has no member 'get_themed_template_path'
My site is down now.Can someone please help me in fixing the issue.

I have reached the same error, trying to find more information about the case, I have seen in the theme GitHub repository there is an open issue in which it is said that this theme is not compatible with Eucalyptus.
If your instance is not very old you'll be using Ficus which is the current version released by Bitnami, if the previous version (Eucalyptus) is not compatible with this theme, I'm afraid Ficus will not be either.

Related

Gluon Mobile not compiling on WSL2 Ubuntu 20.04

Ive been trying to create an apk file for my gluon project. On windows and for windows, the prroject runs perfectly but when in Ubuntu, the commands mvn -Pandroid gluonfx:runagent will run the project but the project wont compile and build.
the error I get keep getting is:
[Wed Jan 04 15:32:35 IST 2023][INFO] We will now compile your code for aarch64-linux-android. This may take some time.[Wed Jan 04 15:33:01 IST 2023][INFO] Additional information: Objectfile should be called com.gluonapplication.mobiletrial1.o but we didn't find that under /mnt/g/Intellij_Projects/MobileTrial1/target/gluonfx/aarch64-android/gvm[Wed Jan 04 15:33:01 IST 2023][SEVERE] Compiling failed.Check the log files under /mnt/g/Intellij_Projects/MobileTrial1/target/gluonfx/aarch64-android/gvm/logAnd please check https://docs.gluonhq.com/ for more information.[INFO] ------------------------------------------------------------------------[INFO] BUILD FAILURE[INFO] ------------------------------------------------------------------------[INFO] Total time: 45.283 s[INFO] Finished at: 2023-01-04T15:33:01+05:30[INFO] ------------------------------------------------------------------------[ERROR] Failed to execute goal com.gluonhq:gluonfx-maven-plugin:1.0.15:compile (default-cli) on project mobiletrial1: Compiling failed -> [Help 1]
The log file
[Wed Jan 04 16:48:54 IST 2023][FINE] PB Command for compile: /mnt/c/Java/linux/graalvm-svm-java17-linux-gluon-22.1.0.1-Final/bin/native-image -Djdk.internal.lambda.eagerlyInitialize=false --no-server -H:+SharedLibrary -H:+AddAllCharsets -H:+ReportExceptionStackTraces -H:-DeadlockWatchdogExitOnTimeout -H:DeadlockWatchdogInterval=0 -H:+RemoveSaturatedTypeFlows -H:+ExitAfterRelocatableImageWrite --features=org.graalvm.home.HomeFinderFeature -H:TempDirectory=/mnt/g/Intellij_Projects/MobileTrial1/target/gluonfx/aarch64-android/gvm/tmp -H:EnableURLProtocols=http,https --initialize-at-build-time=com.gluonhq.charm.glisten.visual.MaterialDesignIcon -H:ReflectionConfigurationFiles=/mnt/g/Intellij_Projects/MobileTrial1/target/gluonfx/aarch64-android/gvm/reflectionconfig-aarch64-android.json -H:JNIConfigurationFiles=/mnt/g/Intellij_Projects/MobileTrial1/target/gluonfx/aarch64-android/gvm/jniconfig-aarch64-android.json -H:ResourceConfigurationFiles=/mnt/g/Intellij_Projects/MobileTrial1/target/gluonfx/aarch64-android/gvm/resourceconfig-aarch64-android.json -H:-SpawnIsolates -Dsvm.targetArch=aarch64 -H:+ForceNoROSectionRelocations --libc=bionic -H:+UseCAPCache -H:CAPCacheDir=/mnt/g/Intellij_Projects/MobileTrial1/target/gluonfx/aarch64-android/gvm/capcache -H:CompilerBackend=lir -H:IncludeResourceBundles=com/sun/javafx/scene/control/skin/resources/controls,com/sun/javafx/scene/control/skin/resources/controls-nt,com.sun.javafx.tk.quantum.QuantumMessagesBundle -Dsvm.platform=org.graalvm.nativeimage.Platform$LINUX_AARCH64 -cp /home/vatsal/.m2/repository/com/gluonhq/substrate/0.0.55/substrate-0.0.55.jar:/mnt/g/Intellij_Projects/MobileTrial1/target/gluonfx/aarch64-android/gvm/tmp/classpathJar.jar com.gluonapplication.MobileTrial1
[Wed Jan 04 16:48:54 IST 2023][FINE] Start process compile...
[Wed Jan 04 16:48:54 IST 2023][FINE] Result for compile: 0
[Wed Jan 04 16:48:54 IST 2023][FINE] Logging process [compile] to file: /mnt/g/Intellij_Projects/MobileTrial1/target/gluonfx/log/process-compile-1672831134641.log
[Wed Jan 04 16:48:54 IST 2023][INFO] Additional information: Objectfile should be called com.gluonapplication.mobiletrial1.o but we didn't find that under /mnt/g/Intellij_Projects/MobileTrial1/target/gluonfx/aarch64-android/gvm
[Wed Jan 04 16:48:54 IST 2023][SEVERE] Compiling failed.
Check the log files under /mnt/g/Intellij_Projects/MobileTrial1/target/gluonfx/aarch64-android/gvm/log
And please check https://docs.gluonhq.com/ for more information.
gluonfx log file
Process
=======
compile
Command Line
============
/mnt/c/Java/linux/graalvm-svm-java17-linux-gluon-22.1.0.1-Final/bin/native-image -Djdk.internal.lambda.eagerlyInitialize=false --no-server -H:+SharedLibrary -H:+AddAllCharsets -H:+ReportExceptionStackTraces -H:-DeadlockWatchdogExitOnTimeout -H:DeadlockWatchdogInterval=0 -H:+RemoveSaturatedTypeFlows -H:+ExitAfterRelocatableImageWrite --features=org.graalvm.home.HomeFinderFeature --features=com.gluonhq.substrate.feature.GluonFeature -H:TempDirectory=/mnt/g/Intellij_Projects/MobileTrial1/target/gluonfx/x86_64-linux/gvm/tmp -H:EnableURLProtocols=http,https -H:ReflectionConfigurationFiles=/mnt/g/Intellij_Projects/MobileTrial1/target/gluonfx/x86_64-linux/gvm/reflectionconfig-x86_64-linux.json -H:JNIConfigurationFiles=/mnt/g/Intellij_Projects/MobileTrial1/target/gluonfx/x86_64-linux/gvm/jniconfig-x86_64-linux.json -H:ResourceConfigurationFiles=/mnt/g/Intellij_Projects/MobileTrial1/target/gluonfx/x86_64-linux/gvm/resourceconfig-x86_64-linux.json -H:IncludeResourceBundles=com/sun/javafx/scene/control/skin/resources/controls,com/sun/javafx/scene/control/skin/resources/controls-nt,com.sun.javafx.tk.quantum.QuantumMessagesBundle -Dsvm.platform=org.graalvm.nativeimage.Platform$LINUX_AMD64 -cp /home/vatsal/.m2/repository/com/gluonhq/substrate/0.0.55/substrate-0.0.55.jar:/mnt/g/Intellij_Projects/MobileTrial1/target/gluonfx/x86_64-linux/gvm/tmp/classpathJar.jar com.gluonapplication.MobileTrial1
Output
======
Result
======
result: 0
I have tried uninstalling and reinstalling ubuntu and wsl and I have tried the same process on Linux and have got the same error.

Apache2 Passenger not updating Ruby on Rails classes on restart

Forgive me as I am a bit new to this but I have inherited an Ruby On Rails web application that runs on Apache2 Passenger. I have tried to make a small change to the application which works succssefully on DEV so I have deployed to our PROD environment. However after deploying and restarting Apache2 none of my changes are taking effect. If I change the
config.cache_classes = true
Setting in the config/environments/production.rb to false then all is fine, however everything I read is that should only be set to false in dev.
This leads me to believe that the cache is not being refreshed once Apache2 is started. Any ideas on what this could be? I don't see any errors in the Apache2 error log (debug level set), below is a snippet from a restart.
[Tue Sep 27 09:30:09.840437 2022] [mpm_event:notice] [pid 6259:tid 139952997727168] AH00491: caught SIGTERM, shutting down
[ N 2022-09-27 09:30:09.8404 6264/T8 age/Cor/CoreMain.cpp:614 ]: Signal received. Gracefully shutting down... (send signal 2 more time(s) to force shutdown)
[ N 2022-09-27 09:30:09.8405 6264/T1 age/Cor/CoreMain.cpp:1112 ]: Received command to shutdown gracefully. Waiting until all clients have disconnected...
[ N 2022-09-27 09:30:09.8406 6264/T1 age/Cor/CoreMain.cpp:1026 ]: Checking whether to disconnect long-running connections for process 6492, application /var/www/fpsmidas (production)
[ N 2022-09-27 09:30:09.8408 6264/T8 Ser/Server.h:903 ]: [ServerThr.1] Freed 0 spare client objects
[ N 2022-09-27 09:30:09.8409 6264/T8 Ser/Server.h:559 ]: [ServerThr.1] Shutdown finished
[ N 2022-09-27 09:30:09.8421 6264/Td Ser/Server.h:903 ]: [ServerThr.4] Freed 0 spare client objects
[ N 2022-09-27 09:30:09.8421 6264/Td Ser/Server.h:559 ]: [ServerThr.4] Shutdown finished
[ N 2022-09-27 09:30:09.8422 6264/Ta Ser/Server.h:903 ]: [ServerThr.2] Freed 0 spare client objects
[ N 2022-09-27 09:30:09.8422 6264/Tc Ser/Server.h:903 ]: [ServerThr.3] Freed 0 spare client objects
[ N 2022-09-27 09:30:09.8422 6264/Ta Ser/Server.h:559 ]: [ServerThr.2] Shutdown finished
[ N 2022-09-27 09:30:09.8422 6264/Tc Ser/Server.h:559 ]: [ServerThr.3] Shutdown finished
[ N 2022-09-27 09:30:09.8436 6264/Tf Ser/Server.h:903 ]: [ApiServer] Freed 0 spare client objects
[ N 2022-09-27 09:30:09.8436 6264/Tf Ser/Server.h:559 ]: [ApiServer] Shutdown finished
[ N 2022-09-27 09:30:09.8437 6264/T1 age/Cor/CoreMain.cpp:1026 ]: Checking whether to disconnect long-running connections for process 6492, application /var/www/fpsmidas (production)
[ N 2022-09-27 09:30:09.8586 6264/T8 age/Cor/CoreMain.cpp:614 ]: Signal received. Gracefully shutting down... (send signal 1 more time(s) to force shutdown)
[Tue Sep 27 09:30:09.859619 2022] [core:trace4] [pid 6259] mpm_common.c(429): end of generation 0
[ N 2022-09-27 09:30:10.0068 6264/T1 age/Cor/CoreMain.cpp:1185 ]: Passenger core shutdown finished
[ N 2022-09-27 09:30:10.0867 11570/T1 age/Wat/WatchdogMain.cpp:1297 ]: Starting Passenger watchdog...
[ N 2022-09-27 09:30:10.1067 11574/T1 age/Cor/CoreMain.cpp:1200 ]: Starting Passenger core...
[ N 2022-09-27 09:30:10.1068 11574/T1 age/Cor/CoreMain.cpp:250 ]: Passenger core running in multi-application mode.
[ W 2022-09-27 09:30:10.1142 11574/T1 age/Cor/CoreMain.cpp:927 ]: WARNING: potential privilege escalation vulnerability detected. Phusion Passenger is running as root, and part(s) of the Passenger root path (/opt/passenger-5.3.4) can be changed by non-root user(s):
- /opt/passenger-5.3.4 is not secure: it can be modified by group root
Please either fix up the permissions for the insecure paths, or install Passenger in a different location that can only be modified by root.
[ N 2022-09-27 09:30:10.1142 11574/T1 age/Cor/CoreMain.cpp:935 ]: Passenger core online, PID 11574
[Tue Sep 27 09:30:10.115046 2022] [ssl:trace2] [pid 11556:tid 140281045076928] ssl_engine_rand.c(126): Init: Seeding PRNG with 656 bytes of entropy
[Tue Sep 27 09:30:10.115077 2022] [ssl:info] [pid 11556:tid 140281045076928] AH01887: Init: Initializing (virtual) servers for SSL
[Tue Sep 27 09:30:10.121210 2022] [ssl:info] [pid 11556:tid 140281045076928] AH01876: mod_ssl/2.4.29 compiled against Server: Apache/2.4.29, Library: OpenSSL/1.1.1
[ N 2022-09-27 09:30:10.1332 11574/T7 age/Cor/CoreMain.cpp:614 ]: Signal received. Gracefully shutting down... (send signal 2 more time(s) to force shutdown)
[ N 2022-09-27 09:30:10.1332 11574/T1 age/Cor/CoreMain.cpp:1112 ]: Received command to shutdown gracefully. Waiting until all clients have disconnected...
[ N 2022-09-27 09:30:10.1333 11574/T9 Ser/Server.h:903 ]: [ServerThr.2] Freed 0 spare client objects
[ N 2022-09-27 09:30:10.1333 11574/T9 Ser/Server.h:559 ]: [ServerThr.2] Shutdown finished
[ N 2022-09-27 09:30:10.1333 11574/T7 Ser/Server.h:903 ]: [ServerThr.1] Freed 0 spare client objects
[ N 2022-09-27 09:30:10.1333 11574/T7 Ser/Server.h:559 ]: [ServerThr.1] Shutdown finished
[ N 2022-09-27 09:30:10.1334 11574/Tf Ser/Server.h:903 ]: [ApiServer] Freed 0 spare client objects
[ N 2022-09-27 09:30:10.1334 11574/Tf Ser/Server.h:559 ]: [ApiServer] Shutdown finished
[ N 2022-09-27 09:30:10.1334 11574/Tb Ser/Server.h:903 ]: [ServerThr.3] Freed 0 spare client objects
[ N 2022-09-27 09:30:10.1334 11574/Tb Ser/Server.h:559 ]: [ServerThr.3] Shutdown finished
[ N 2022-09-27 09:30:10.1334 11574/Td Ser/Server.h:903 ]: [ServerThr.4] Freed 0 spare client objects
[ N 2022-09-27 09:30:10.1335 11574/Td Ser/Server.h:559 ]: [ServerThr.4] Shutdown finished
[ N 2022-09-27 09:30:10.1640 11599/T1 age/Wat/WatchdogMain.cpp:1297 ]: Starting Passenger watchdog...
[ N 2022-09-27 09:30:10.1807 11602/T1 age/Cor/CoreMain.cpp:1200 ]: Starting Passenger core...
[ N 2022-09-27 09:30:10.1808 11602/T1 age/Cor/CoreMain.cpp:250 ]: Passenger core running in multi-application mode.
[ W 2022-09-27 09:30:10.1883 11602/T1 age/Cor/CoreMain.cpp:927 ]: WARNING: potential privilege escalation vulnerability detected. Phusion Passenger is running as root, and part(s) of the Passenger root path (/opt/passenger-5.3.4) can be changed by non-root user(s):
- /opt/passenger-5.3.4 is not secure: it can be modified by group root
Please either fix up the permissions for the insecure paths, or install Passenger in a different location that can only be modified by root.
[ N 2022-09-27 09:30:10.1883 11602/T1 age/Cor/CoreMain.cpp:935 ]: Passenger core online, PID 11602
[Tue Sep 27 09:30:10.189036 2022] [ssl:trace2] [pid 11597:tid 140281045076928] ssl_engine_rand.c(126): Init: Seeding PRNG with 656 bytes of entropy
[Tue Sep 27 09:30:10.189153 2022] [socache_shmcb:debug] [pid 11597:tid 140281045076928] mod_socache_shmcb.c(401): AH00821: shmcb_init allocated 512000 bytes of shared memory
[Tue Sep 27 09:30:10.189161 2022] [socache_shmcb:debug] [pid 11597:tid 140281045076928] mod_socache_shmcb.c(417): AH00822: for 511912 bytes (512000 including header), recommending 32 subcaches, 88 indexes each
[Tue Sep 27 09:30:10.189165 2022] [socache_shmcb:debug] [pid 11597:tid 140281045076928] mod_socache_shmcb.c(450): AH00824: shmcb_init_memory choices follow
[Tue Sep 27 09:30:10.189167 2022] [socache_shmcb:debug] [pid 11597:tid 140281045076928] mod_socache_shmcb.c(452): AH00825: subcache_num = 32
[Tue Sep 27 09:30:10.189170 2022] [socache_shmcb:debug] [pid 11597:tid 140281045076928] mod_socache_shmcb.c(454): AH00826: subcache_size = 15992
[Tue Sep 27 09:30:10.189173 2022] [socache_shmcb:debug] [pid 11597:tid 140281045076928] mod_socache_shmcb.c(456): AH00827: subcache_data_offset = 2128
[Tue Sep 27 09:30:10.189175 2022] [socache_shmcb:debug] [pid 11597:tid 140281045076928] mod_socache_shmcb.c(458): AH00828: subcache_data_size = 13864
[Tue Sep 27 09:30:10.189178 2022] [socache_shmcb:debug] [pid 11597:tid 140281045076928] mod_socache_shmcb.c(460): AH00829: index_num = 88
[Tue Sep 27 09:30:10.189256 2022] [socache_shmcb:info] [pid 11597:tid 140281045076928] AH00830: Shared memory socache initialised
[Tue Sep 27 09:30:10.189261 2022] [ssl:info] [pid 11597:tid 140281045076928] AH01887: Init: Initializing (virtual) servers for SSL
[Tue Sep 27 09:30:10.191097 2022] [ssl:info] [pid 11597:tid 140281045076928] AH01876: mod_ssl/2.4.29 compiled against Server: Apache/2.4.29, Library: OpenSSL/1.1.1
[Tue Sep 27 09:30:10.191123 2022] [watchdog:debug] [pid 11597:tid 140281045076928] mod_watchdog.c(454): AH010033: Watchdog: Running with WatchdogInterval 1000ms
[Tue Sep 27 09:30:10.191128 2022] [watchdog:debug] [pid 11597:tid 140281045076928] mod_watchdog.c(462): AH02974: Watchdog: found parent providers.
[Tue Sep 27 09:30:10.191132 2022] [watchdog:debug] [pid 11597:tid 140281045076928] mod_watchdog.c(508): AH02977: Watchdog: found child providers.
[Tue Sep 27 09:30:10.191135 2022] [watchdog:debug] [pid 11597:tid 140281045076928] mod_watchdog.c(516): AH02978: Watchdog: Looking for child (_singleton_).
[Tue Sep 27 09:30:10.191139 2022] [watchdog:debug] [pid 11597:tid 140281045076928] mod_watchdog.c(516): AH02978: Watchdog: Looking for child (_default_).
[Tue Sep 27 09:30:10.191655 2022] [core:trace4] [pid 11597:tid 140281045076928] mpm_common.c(533): mpm child 11623 (gen 0/slot 0) started
[Tue Sep 27 09:30:10.191949 2022] [core:trace4] [pid 11597:tid 140281045076928] mpm_common.c(533): mpm child 11624 (gen 0/slot 1) started
[Tue Sep 27 09:30:10.191968 2022] [mpm_event:notice] [pid 11597:tid 140281045076928] AH00489: Apache/2.4.29 (Ubuntu) Phusion_Passenger/5.3.4 OpenSSL/1.1.1 configured -- resuming normal operations
[Tue Sep 27 09:30:10.191973 2022] [mpm_event:info] [pid 11597:tid 140281045076928] AH00490: Server built: 2020-08-12T21:33:25
[Tue Sep 27 09:30:10.191982 2022] [core:notice] [pid 11597:tid 140281045076928] AH00094: Command line: '/usr/sbin/apache2'
[Tue Sep 27 09:30:10.191986 2022] [core:debug] [pid 11597:tid 140281045076928] log.c(1570): AH02639: Using SO_REUSEPORT: yes (1)
[Tue Sep 27 09:30:10.192288 2022] [watchdog:debug] [pid 11623:tid 140281045076928] mod_watchdog.c(565): AH02980: Watchdog: nothing configured?
[Tue Sep 27 09:30:10.192397 2022] [proxy:debug] [pid 11623:tid 140281045076928] proxy_util.c(1785): AH00925: initializing worker proxy:reverse shared
[Tue Sep 27 09:30:10.192412 2022] [proxy:debug] [pid 11623:tid 140281045076928] proxy_util.c(1842): AH00927: initializing worker proxy:reverse local
[Tue Sep 27 09:30:10.192442 2022] [proxy:debug] [pid 11623:tid 140281045076928] proxy_util.c(1877): AH00930: initialized pool in child 11623 for (*) min=0 max=25 smax=25
[Tue Sep 27 09:30:10.192550 2022] [mpm_event:debug] [pid 11623:tid 140280930666240] event.c(2218): AH02471: start_threads: Using epoll (wakeable)
[Tue Sep 27 09:30:10.193150 2022] [watchdog:debug] [pid 11624:tid 140281045076928] mod_watchdog.c(565): AH02980: Watchdog: nothing configured?
[Tue Sep 27 09:30:10.193477 2022] [proxy:debug] [pid 11624:tid 140281045076928] proxy_util.c(1785): AH00925: initializing worker proxy:reverse shared
[Tue Sep 27 09:30:10.193491 2022] [proxy:debug] [pid 11624:tid 140281045076928] proxy_util.c(1842): AH00927: initializing worker proxy:reverse local
[Tue Sep 27 09:30:10.193512 2022] [proxy:debug] [pid 11624:tid 140281045076928] proxy_util.c(1877): AH00930: initialized pool in child 11624 for (*) min=0 max=25 smax=25
[Tue Sep 27 09:30:10.193616 2022] [mpm_event:debug] [pid 11624:tid 140280930666240] event.c(2218): AH02471: start_threads: Using epoll (wakeable)
[ N 2022-09-27 09:30:10.1964 11574/T1 age/Cor/CoreMain.cpp:1185 ]: Passenger core shutdown finished
[ E 2022-09-27 09:30:12.5618 11602/T5 age/Cor/SecurityUpdateChecker.h:505 ]: Security update check failed: SSL connect error while connecting to https://securitycheck.phusionpassenger.com/v1/check.json (if this error persists check your connection security or try upgrading Passenger) (next check in 24 hours)
Any thoughts would be greatly appreciated.
I managed to figure out the problem, when deploying my coding changes I backed up the original file in the same directory just appending a date to it, for example my personnel_controller.rb was renamed to personnel_controller_20220926.rb and the modified personnel_controller.rb from dev was moved over. For whatever reason Rails (or maybe Apache) was still interrupting the old file rather then the new one. Once I moved the old file to a new location outside of the applicaitons directory and restarted Apache all worked fine. I am still new to Ruby on Rails in general so if anyone has an explanation as to why this is I would be curious to know.

Symfony 4.3.5 - locale loading nonexistent public

In Symfony 4.3.5 when using locale in url (e.q. http://127.0.0.1:8000/en/example), framework starts loading nonexisting public route to resources;
/en/images/like-icon-58x25.png instead images/like-icon-58x25.png.
I got 404 on each of these resources when server tries to access public route with locale prefixed in route, only plain HTML loads:
[Wed Jan 29 19:17:30 2020] 127.0.0.1:50790 [404]: /en/css/bootstrap.css
[Wed Jan 29 19:17:30 2020] 127.0.0.1:50794 [404]: /en/css/style.css
[Wed Jan 29 19:17:30 2020] 127.0.0.1:50792 [404]: /en/css/fonts.css
[Wed Jan 29 19:17:30 2020] 127.0.0.1:50796 [404]: /en/images/logo-proizd-team-2019-web2.png
[Wed Jan 29 19:17:30 2020] 127.0.0.1:50798 [404]: /en/images/project-1-195x164.jpg
[Wed Jan 29 19:17:30 2020] 127.0.0.1:50800 [404]: /en/js/core.min.js
[Wed Jan 29 19:17:30 2020] 127.0.0.1:50802 [404]: /en/js/script.js
How to solve this problem. Could not find similar problems and solutions.
I've found solution.
Since I'm using Twig, assets must be put into asset() function.
e.g.
src="{{ asset('images/like-icon-58x25.png') }}"

CKAN Dataset Upload Page giving a Server

When creating a dataset you are required to either upload the csv or xml file containing the data or link to the data file located on a server. When I attempt to upload a csv or xml file the upload process starts but the page eventually crash with the following message.
Server Error
An internal server error occurred
also see below error in /var/log/apache2/ckan_default.error.log
[Mon Aug 10 19:08:18.934269 2015] [:error] [pid 1243] 2015-08-10 19:08:18,934 INFO [ckan.lib.base] / render time 0.169 seconds
[Mon Aug 10 19:08:21.217534 2015] [:error] [pid 1243] 2015-08-10 19:08:21,217 INFO [ckan.lib.base] /api/i18n/en render time 0.002 seconds
[Mon Aug 10 19:08:23.832089 2015] [:error] [pid 1244] 2015-08-10 19:08:23,831 INFO [ckan.lib.base] /user/admin render time 0.413 seconds
[Mon Aug 10 19:08:24.430716 2015] [:error] [pid 1243] 2015-08-10 19:08:24,430 INFO [ckan.lib.base] /api/i18n/en render time 0.002 seconds
[Mon Aug 10 19:08:26.858892 2015] [:error] [pid 1243] 2015-08-10 19:08:26,858 WARNI [ckan.lib.maintain] Function get_action() in module ckan.lib.helpers has been deprecated and will be removed in a later release of ckan. helpers.get_action() is deprecated and will be removed in a future version of CKAN. Instead, please use the extra_vars param to render() in your controller to pass results from action functions to your templates.
[Mon Aug 10 19:08:27.080089 2015] [:error] [pid 1243] 2015-08-10 19:08:27,079 WARNI [ckan.lib.maintain] Function get_action() in module ckan.lib.helpers has been deprecated and will be removed in a later release of ckan. helpers.get_action() is deprecated and will be removed in a future version of CKAN. Instead, please use the extra_vars param to render() in your controller to pass results from action functions to your templates.
[Mon Aug 10 19:08:27.190495 2015] [:error] [pid 1243] 2015-08-10 19:08:27,190 INFO [ckan.lib.base] /dataset/grocery-prices render time 0.551 seconds
[Mon Aug 10 19:08:27.664450 2015] [:error] [pid 1244] 2015-08-10 19:08:27,664 INFO [ckan.lib.base] /api/i18n/en render time 0.002 seconds
[Mon Aug 10 19:08:30.847326 2015] [:error] [pid 1243] 2015-08-10 19:08:30,847 INFO [ckan.lib.base] /dataset/edit/grocery-prices render time 0.405 seconds
[Mon Aug 10 19:08:31.373743 2015] [:error] [pid 1244] 2015-08-10 19:08:31,373 INFO [ckan.lib.base] /api/i18n/en render time 0.002 seconds
[Mon Aug 10 19:08:34.934102 2015] [:error] [pid 1243] 2015-08-10 19:08:34,933 INFO [ckan.lib.base] /dataset/new render time 0.091 seconds
[Mon Aug 10 19:08:35.451324 2015] [:error] [pid 1244] 2015-08-10 19:08:35,451 INFO [ckan.lib.base] /dataset/new_resource/grocery-prices render time 0.412 seconds
[Mon Aug 10 19:08:36.271926 2015] [:error] [pid 1244] 2015-08-10 19:08:36,271 INFO [ckan.lib.base] /api/i18n/en render time 0.002 seconds
[Mon Aug 10 19:08:49.310932 2015] [:error] [pid 1244] 2015-08-10 19:08:49,310 INFO [ckan.lib.base] /api/2/util/resource/format_autocomplete render time 0.006 seconds
[Mon Aug 10 19:09:11.244287 2015] [:error] [pid 1243] /usr/lib/ckan/default/lib/python2.7/site-packages/sqlalchemy/orm/unitofwork.py:79: SAWarning: Usage of the 'related attribute set' operation is not currently supported within the execution stage of the flush process. Results may not be consistent. Consider using alternative event listeners or connection-level operations instead.
[Mon Aug 10 19:09:11.244325 2015] [:error] [pid 1243] sess._flush_warning("related attribute set")
[Mon Aug 10 19:09:11.518274 2015] [:error] [pid 1243] 2015-08-10 19:09:11,518 INFO [ckan.lib.base] /dataset/new_resource/grocery-prices render time 0.176 seconds
[Mon Aug 10 19:09:11.975593 2015] [:error] [pid 1244] 2015-08-10 19:09:11,975 INFO [ckan.lib.base] /api/i18n/en render time 0.002 seconds
Not sure what caused this error and the logs do not provide enough information. The file is not deposited to the dataset directory location.
Using CKAN 2.3 on a Ubuntu 14.04 server running apache2

Connection error using Rails 3.0 and Mongo 1.4.0

I created a library that would record events to MongoDB from my Rails application. I'm using version 1.4.0 of the mongo gem and Rails 3.0 w/Ruby 1.8.7. The relevant code is:
def new_event(collection, event)
#conn = Mongo::Connection.new("localhost", 27017, :pool_size => 5, :pool_timeout => 5)
#conn.db("event").collection(collection).insert(event)
#conn.close
end
This has worked fine for recording new events as they happen on the site. However, I also need to backfill the db with old events. So I'm doing running a script that basically does this:
SomeModel.find_each do |model|
Tracker.new.new_event("model_event", { ... info from model ... })
end
I'm trying to backfill something on the order of 50k events. As the script runs, I see this:
Tue Sep 27 23:45:20 [initandlisten] waiting for connections on port 27017
Tue Sep 27 23:46:20 [clientcursormon] mem (MB) res:12 virt:78 mapped:0
Tue Sep 27 23:48:49 [initandlisten] connection accepted from 127.0.0.1:51006 #1
Tue Sep 27 23:49:03 [conn1] remove event.application 103ms
Tue Sep 27 23:49:12 [conn1] remove event.listing 127ms
Tue Sep 27 23:49:20 [clientcursormon] mem (MB) res:37 virt:207 mapped:128
Tue Sep 27 23:51:44 [initandlisten] connection accepted from 127.0.0.1:48103 #2
Tue Sep 27 23:51:44 [conn2] end connection 127.0.0.1:48103
Tue Sep 27 23:51:44 [initandlisten] connection accepted from 127.0.0.1:48104 #3
Tue Sep 27 23:51:44 [conn3] end connection 127.0.0.1:48104
Tue Sep 27 23:51:44 [initandlisten] connection accepted from 127.0.0.1:48105 #4
Tue Sep 27 23:51:44 [conn4] end connection 127.0.0.1:48105
Tue Sep 27 23:51:44 [initandlisten] connection accepted from 127.0.0.1:48106 #5
Tue Sep 27 23:51:44 [conn5] end connection 127.0.0.1:48106
The ports (127.0.0.1:XXXXX) and (what I assume are) the Connection Pool #s keep incrementing, until eventually I get this exception from the ruby script:
Failed to connect to a master node at localhost:27017
/var/bundler/turtle/ruby/1.8/gems/mongo-1.4.0/lib/../lib/mongo/connection.rb:526:in `connect'
/var/bundler/turtle/ruby/1.8/gems/mongo-1.4.0/lib/../lib/mongo/connection.rb:688:in `setup'
/var/bundler/turtle/ruby/1.8/gems/mongo-1.4.0/lib/../lib/mongo/connection.rb:104:in `initialize'
Just found the solution. I needed to make the connection object a class variable so it was shared across all instances of the Tracker class.
##conn = Mongo::Connection.new("localhost", 27017, :pool_size => 5, :pool_timeout => 5)
def self.new_event(collection, event)
##conn.db("event").collection(collection).insert(event)
end

Resources